/* Rotate only the background, keeping navigation and text upright. */
body {
  --mybg: none;
  --mybg-dark: none;
  isolation: isolate;
  background-color: #172940;
}
body::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vh;
  height: 100vw;
  width: 100dvh;
  height: 100dvw;
  transform: translate(-50%, -50%) rotate(-90deg);
  background: url("/img/background-original.jpeg") center / cover no-repeat;
  pointer-events: none;
  z-index: -1;
}

/* Keep post metadata and long bilingual titles readable. */
.bean-article .article-category {
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px;
}
.bean-article .article-category .category-item {
  flex: 0 0 auto;
  margin: 0;
  height: auto;
  min-height: 24px;
  white-space: nowrap;
}
.bean-article .article-title {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.bean-main .links .link-item { min-height: 44px; box-sizing: border-box; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #66ccff;
  outline-offset: 4px;
}
@media (max-width: 768px) {
  .bean-article { min-height: 300px; }
  .bean-article .article-title { font-size: 20px; padding: 16px; }
  .bean-main.bean-main-mini .link-text { display: inline; font-size: 14px; }
  .bean-main .links { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.modal .bean-read .article-cover .article-category {
  flex-wrap: wrap;
  gap: 6px;
}
.modal .bean-read .article-cover .article-category .category-item {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .modal .bean-read .banner-content { flex-wrap: wrap; gap: 4px 12px; border-radius: 24px; }
  .modal .bean-read .banner-content .banner-author { flex-wrap: wrap; }
  .modal .bean-read .banner-content .publish-time,
  .modal .bean-read .banner-content .reading-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .modal .bean-read .article-cover { min-height: 320px; }
}

/* Dim artwork without altering the source image or glass surface blur. */
body::before { filter: brightness(.55); }
.bean-main {
  background-color: rgba(15, 25, 43, .72);
  color: #fff;
}
.bean-main .meta-info { color: #e2e8f0; }
.bean-article .article-title,
.modal .bean-read .article-cover .article-title {
  color: #fff;
  background: linear-gradient(to bottom, rgba(8, 15, 29, .68), rgba(8, 15, 29, .94));
  text-shadow: 0 1px 3px #000;
}
.modal .bean-read .article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 16px;
}
