/* Website usability refresh · 26 Oct 2026. Loaded last for shared UI. */
:root { --header-h: 72px; }
body.inner {
  --text: #34443e; --muted: #657167; --line: #e0e4d7;
  --paper: #fffef9; --cream-2: #faf9f2; --teal: #2f6f73; --teal-deep: #245557;
  --radius: 20px; --shadow: 0 4px 16px #34443e08; --shadow-lg: 0 10px 28px #34443e12;
  background: var(--cream-2);
}
body.inner main { background: linear-gradient(#f1f5ed, #faf9f2 360px); }
body.inner main::before, body.inner main::after { display: none; }
body.inner h1, body.inner h2, body.inner .section-head h1, body.inner .section-head h2, body.inner .detail-head h1, body.inner .group-title { color: #294c48; }
body.inner .section { padding-block: 40px; }
body.inner .section + .section { padding-top: 0; }
body.inner .card { background: var(--paper); border-width: 1px; box-shadow: var(--shadow); }
body.inner a.card:hover, body.inner .hub-card:hover, body.inner .mon-card:hover, body.inner .class-card:hover, body.inner .news-card:hover, body.inner .pack:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #a8c4b3;
}
body.inner .card-media { background: #f1f3e9; }
body.inner .stats > div, body.inner .drop-list li, body.inner .faq div, body.inner .skill-row {
  background: var(--paper); border: 1px solid var(--line); box-shadow: none;
}
body.inner .stats dt, body.inner .meta { color: var(--muted); }
body.inner .stats dd { color: var(--text); }
body.inner .group-title::after { border-top: 1px solid var(--line); }
body.inner .crumbs { padding-block: 18px 4px; font-size: .9rem; }
body.inner .crumbs ol { row-gap: 8px; }
body.inner .crumbs a { border: 0; padding: 4px 0; background: transparent; font-size: inherit; text-decoration: underline; text-decoration-color: #b7cdc0; }
body.inner .crumbs li + li::before { color: #789185; margin-inline: 10px; }
body.inner .prose { font-size: 1.075rem; line-height: 1.9; }
body.inner .prose > p, body.inner .prose > ul, body.inner .prose > ol { margin-bottom: 1.35em; }
body.inner .prose h2 { margin-top: 1.75em; }
body.inner .prose blockquote { background: #eef5ec; border: 0; border-left: 4px solid #83a98c; border-radius: 0 14px 14px 0; }
body.inner .prose table { border-width: 1px; background: #fffef9; }
body.inner .prose th { background: #eef3e8; }
body.inner .prose td, body.inner .prose th { padding: 12px 14px; }
body.inner .faq dt { color: var(--teal-deep); font-size: 1.075rem; }
body.inner .faq dd { color: var(--text); line-height: 1.8; }
body.inner .btn, .btn { border-radius: 13px; }
body.inner .btn-gold, .btn-gold { box-shadow: 0 2px 0 #bd8b2b; }
body.inner .btn-gold:hover, .btn-gold:hover { box-shadow: 0 3px 0 #bd8b2b, 0 6px 14px #a1751720; }
body.inner .btn-ghost { border-width: 1px; border-color: #a5bfb2; color: #285c55; }
:focus-visible { outline: 3px solid #2f6f73; outline-offset: 3px; }

/* A stable header keeps navigation and the home link in the same place. */
.site-header, .is-home .site-header {
  position: sticky; top: 8px; left: auto; right: auto; z-index: 50;
  width: min(1360px, calc(100% - 32px)); margin: 8px auto 12px;
  background: #fffef9f5; color: #34443e; border: 1px solid #e0e4d7;
  border-radius: 20px; box-shadow: 0 4px 18px #34443e0a; backdrop-filter: blur(12px);
}
.header-row { width: calc(100% - 32px); min-height: 72px; gap: 24px; align-items: center; padding: 0; }
.brand, body.scrolled .brand { opacity: 1; transform: none; pointer-events: auto; margin: 0; }
.brand img { width: 148px; filter: none; }
.header-pill { display: flex; align-items: center; flex: 1; gap: 16px; min-width: 0; }
.main-nav { flex: 1; }
.nav { gap: 2px; justify-content: center; }
.nav-link { color: #475c51; font-size: .92rem; padding: 10px 12px; border-radius: 10px; }
.nav-link:hover, .nav-link[aria-current], .nav-link[aria-expanded="true"] { background: #edf4eb; color: #225c54; }
.nav-link[aria-current]::after { display: none; }
.sub { margin-top: 8px; border: 1px solid #dae6da; box-shadow: 0 12px 32px #254a4220; background: #fffef9; min-width: 240px; }
.sub a { min-height: 44px; font-size: .94rem; }
.sub a[aria-current] { background: #edf4eb; color: #225c54; }
.header-cta { gap: 10px; }
.header-cta .btn-play, body.inner .header-cta .btn-play { min-height: 44px; padding: 10px 18px; font-size: .92rem; white-space: nowrap; }
.header-cta .lang-switch > * { min-height: 40px; }
.header-gems { width: 40px; height: 40px; box-shadow: none; background: #eef5ee; }
.menu-btn { width: 44px; height: 44px; flex: none; background: #eef4ec; border-color: #d5e3d7; }
.menu-btn span { background: #2f6f73; }
.mobile-menu { top: calc(100% + 8px); border-color: #dae3d5; background: #fffef9; max-height: calc(100dvh - 100px); }
.mobile-menu > ul { display: flex; flex-direction: column; gap: 0; padding: 4px 16px 16px; }
.mobile-menu .mobile-primary a, .mobile-menu summary { padding: 12px; min-height: 48px; font-size: 1rem; background: transparent; border: 0; border-bottom: 1px solid #edf0e6; border-radius: 0; }
.mobile-menu .mobile-group { grid-column: auto; }
.mobile-menu .mobile-group ul { padding: 4px 12px 12px; background: #f4f7ef; border-radius: 12px; }
.mobile-menu .mobile-group ul a { font-size: .95rem; padding: 10px 12px; min-height: 44px; }
.mobile-menu a[aria-current] { color: #245557; background: #e8f1e5; }
.mobile-menu .mobile-primary a { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu .mobile-lang { padding-top: 14px; }
.mobile-menu .lang-switch > * { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 0; }
.mobile-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px 16px 8px; }
.mobile-shortcuts a { padding: 12px 8px; background: #eaf3e5; border: 1px solid #d1e2ca; border-radius: 12px; color: #285a49; text-align: center; font-size: .92rem; }
.mobile-shortcuts a:hover { background: #dfeeda; }
body.menu-open .consent-bar { visibility: hidden; }

/* Consent and the mobile play button never occupy the same screen space. */
.consent-bar {
  left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 920px;
  border: 1px solid #d4dfd1; border-radius: 16px; background: #fffef9;
  padding: 12px 16px; gap: 12px; font-size: .88rem; line-height: 1.55;
  box-shadow: 0 4px 22px #294b3e18; color: #425447;
}
.consent-bar p { flex: 1 1 320px; margin: 0; }
.consent-btns { gap: 8px; }
.consent-btns .btn, body.inner .consent-btns .btn { min-width: 96px; min-height: 44px; padding: 8px 16px; font-size: .88rem; border: 1px solid #93b2a3; color: #2b6355; background: #fffef9; box-shadow: none; }
.consent-btns .btn:hover { background: #edf4e9; }
.mobile-play { visibility: hidden; transform: translateY(160%); }
body.show-sticky .mobile-play { visibility: visible; }
body.has-consent .mobile-play { visibility: hidden; transform: translateY(160%); }
body.has-consent { padding-bottom: calc(var(--consent-height, 130px) + 24px); }
body.menu-open .mobile-play { visibility: hidden; }
@media (max-width: 1180px) {
  .header-pill { justify-content: flex-end; }
  .header-row { gap: 16px; }
}
@media (max-width: 700px) {
  :root { --header-h: 64px; }
  .site-header, .is-home .site-header { width: calc(100% - 24px); margin: 8px auto 10px; border-radius: 17px; }
  .header-row { width: calc(100% - 24px); min-height: 64px; gap: 8px; }
  .brand img { width: 116px; }
  .header-cta { gap: 8px; }
  .header-cta .btn-play, body.inner .header-cta .btn-play { padding: 9px 14px; font-size: .88rem; }
  .header-gems { display: none; }
  .consent-bar { padding: 11px 14px; gap: 8px; }
  .consent-btns { flex: 1 1 100%; }
  .consent-btns .btn { flex: 1; }
  body.inner .section { padding-block: 28px; }
  body.inner .prose { font-size: 1rem; line-height: 1.85; }
  body.inner .crumbs { padding-top: 12px; }
  body.inner .prose td, body.inner .prose th { padding: 10px; }
}
@media (max-width: 360px) {
  .brand img { width: 100px; }
  .header-row { width: calc(100% - 20px); }
  .header-cta { gap: 6px; }
  .header-cta .btn-play, body.inner .header-cta .btn-play { padding-inline: 10px; }
  .mobile-shortcuts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .card, .btn, .nav-link, .h6-btn { transition: none; } }

/* Keep database tools near the top; decorative art supports the task. */
body.inner .dbhero { padding-block: 18px 12px; }
body.inner .dbhero-card { grid-template-columns: minmax(0, 1fr) minmax(180px, .5fr); min-height: 0; gap: 24px; padding: 28px 32px; border: 1px solid #dce5d4; border-radius: 24px; background: #eef4e8; box-shadow: none; }
body.inner .dbhero-oasis .dbhero-card, body.inner .dbhero-sea .dbhero-card { background: #eaf5ef; }
body.inner .dbhero-dusk .dbhero-card { background: #f6eee2; }
.dbhero-rays { display: none; }
body.inner .dbhero-text h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 4px 0 8px; color: #285957; }
body.inner .dbhero-lead { max-width: 60ch; font-size: 1rem; color: #657260; }
body.inner .dbhero-art { min-height: 120px; margin: 0; align-items: center; overflow: hidden; }
body.inner .dbhero-art .fl { max-height: 150px; max-width: 45%; animation: none; filter: none; }
body.inner .dbhero-art .h-item { max-height: 68px; max-width: 24%; margin: 0 0 0 2%; padding: 7px; border-radius: 14px; background: #fffef9; box-shadow: none; }
body.inner .dbhero-chips { margin-top: 14px; gap: 8px; }
body.inner .dbhero-chips li { border-width: 1px; padding: 4px 12px; }
body.inner .filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; padding: 20px; margin-bottom: 16px; background: #fffef9; border: 1px solid #dce5d4; border-radius: 20px; box-shadow: none; align-items: end; }
body.inner .filters .f-search { grid-column: 1 / -1; }
body.inner .filters label { display: grid; gap: 6px; min-width: 0; width: auto; }
body.inner .filters label > span { font-size: .86rem; color: #526c5b; font-weight: 500; }
body.inner .filters input, body.inner .filters select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid #bfcebd; border-radius: 10px; background: #fff; font-family: var(--font-body); font-size: 1rem; color: #34443e; }
body.inner .filters .f-search input { background: #f7faf3; }
.filters .f-feedback { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.filters .f-options { grid-column: 1 / -1; min-width: 0; }
.filters .f-options summary { min-height: 44px; padding: 10px 12px; font-size: .9rem; color: #315f4d; cursor: pointer; background: #f2f6ed; border-radius: 10px; }
.filters .f-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.filters .f-options summary [data-filter-total] { font-weight: 600; }
@media (min-width: 761px) { .filters .f-options[open] summary { display: none; } }
.filters .f-count { font-size: .88rem; color: #5e715f; flex: 1; white-space: normal; }
.filters .filter-reset { padding: 6px 12px; min-height: 44px; border-radius: 10px; border: 1px solid #c6d6c3; background: #f1f6ec; color: #2e634f; }
.item-browse { margin: 0 0 18px; border: 1px solid #dce5d4; border-radius: 12px; background: #f4f7ef; }
.item-browse summary { cursor: pointer; padding: 10px 14px; min-height: 44px; color: #385f4c; font-size: .9rem; }
.item-browse .item-categories { margin: 0; padding: 0 12px 12px; }
.item-categories a { min-height: 44px; display: inline-flex; align-items: center; background: #fffef9; font-size: .88rem; }
.item-pagination { gap: 6px; justify-content: center; padding-top: 12px; }
.item-pagination a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #fffef9; }
.item-pagination [aria-current], .item-categories [aria-current] { background: #2f6f73; }
body.inner .item-card { padding: 14px 16px 14px 12px; gap: 14px; border-radius: 16px; }
body.inner .item-card.has-rank { border-left-width: 3px; }
body.inner .item-card .item-media { width: 72px; height: 72px; background: #f2f5eb; border-radius: 14px; }
body.inner .item-card .card-body h3 { font-size: 1rem; line-height: 1.5; margin: 2px 0 4px; }
body.inner .item-card .card-body .meta { font-size: .84rem; line-height: 1.5; }
body.inner .item-card .card-body .small { font-size: .9rem; line-height: 1.55; }
@media (max-width: 760px) {
  body.inner .dbhero { padding-top: 12px; }
  body.inner .dbhero-card { grid-template-columns: 1fr; padding: 22px; gap: 0; }
  body.inner .dbhero-art { display: none; }
  body.inner .dbhero-text h1 { font-size: 1.9rem; }
  body.inner .dbhero-lead { font-size: .96rem; line-height: 1.7; }
  body.inner .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; gap: 12px; }
  .filters .f-selects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
  .item-browse summary { font-size: .88rem; }
}
@media (max-width: 359px) { body.inner .filters, .filters .f-selects { grid-template-columns: 1fr; } body.inner .dbhero-card { padding: 18px; } }

/* Shared phone/tablet polish, including notched landscape screens. */
:root { --safe-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); }
.wrap { width: min(calc(100% - var(--safe-gutter) * 2), var(--wrap)); }
.h6-wrap { width: min(calc(100% - var(--safe-gutter) * 2), 1200px); }
.site-header, .is-home .site-header { width: min(1360px, calc(100% - max(12px, env(safe-area-inset-left), env(safe-area-inset-right)) * 2)); }
.header-row { width: calc(100% - 32px); }
.consent-bar, .mobile-play { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); }
.mobile-play { bottom: max(14px, env(safe-area-inset-bottom)); }
.header-cta .lang-switch > * { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.header-gems { width: 44px; height: 44px; }
.site-footer li a { min-height: 44px; }
.site-footer [data-consent-open] { min-height: 44px; padding: 8px 4px; text-underline-offset: 3px; }
.table-wrap[data-scrollable] { border: 1px solid #c7d8c6; border-radius: 12px; overscroll-behavior-inline: contain; }
.table-scroll-hint { margin: 0 0 8px; color: #486853; font-size: .875rem; }
.table-scroll-hint[hidden] { display: none; }
@media (max-width: 700px) { .header-row { width: calc(100% - 24px); } }
@media (max-width: 360px) { .header-row { width: calc(100% - 20px); } }
