@import url("fonts/golos.css");

:root {
  --ink: #1d2b35;
  --muted: #52616d;
  --blue: #245e80;
  --accent: #216e73;
  --accent-hover: #17575c;
  --focus: #247e96;
  --line: #d5dee3;
  --control-line: #7f909c;
  --bg: #f1f4f5;
  --panel: #fff;
  --soft: #edf3f5;
  --nav: #14212c;
  --nav-ink: #edf3f6;
  --nav-muted: #b4c4ce;
  --danger: #8e3948;
  --radius: 10px;
  --shadow: 0 2px 8px rgb(25 43 54 / 4%);
  --content-width: 1320px;
  --header-height: 76px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-height) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 "Golos Text", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
a { color: var(--blue); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; scroll-margin-top: calc(var(--header-height) + 20px); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .58; }
input:disabled, select:disabled { background: #eef2f4; color: var(--muted); opacity: 1; }
[hidden] { display: none !important; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; line-height: 1.18; letter-spacing: -.025em; font-weight: 750; }
h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.015em; }
h3 { font-size: 18px; line-height: 1.35; }
p { margin-bottom: 14px; }
::selection { background: #d8ecee; color: #15383d; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 200; min-height: 44px; padding: 10px 16px; border: 2px solid var(--focus); border-radius: 6px; background: white; color: var(--ink); font-weight: 700; }
.skip-link:focus { top: 12px; }

/* One navigation row, shared by every working page. */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--nav); color: var(--nav-ink); border-bottom: 1px solid #31414d; }
.topbar-inner { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 1440px; min-height: var(--header-height); margin: auto; padding: 10px 28px; }
.brand { display: inline-flex; align-items: center; flex: none; gap: 10px; min-height: 48px; color: white; font-size: 23px; font-weight: 750; letter-spacing: -.03em; white-space: nowrap; }
.brand:hover { color: white; text-decoration: none; }
.brand-emblem, .brand-logo { display: block; width: 44px; height: 44px; object-fit: contain; flex: none; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #52727c; border-radius: 10px; background: #233f49; color: #d5eff1; font-size: 22px; }
.brand-tail { margin-left: 6px; color: var(--nav-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.header-spacer { margin-left: auto; }
.header-database { display: inline-flex; align-items: center; min-height: 44px; color: var(--nav-muted); font-size: 13px; white-space: nowrap; }
.account-trigger { min-height: 44px; max-width: 170px; flex: none; padding: 9px 14px; border: 1px solid #40828a; border-radius: 7px; background: #276c72; color: white; font-size: 13px; line-height: 20px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-trigger:hover { background: #327c83; border-color: #6da5ab; }
.notification-trigger { display: grid; place-items: center; position: relative; flex: none; width: 44px; height: 44px; padding: 9px; border: 1px solid #526470; border-radius: 7px; background: transparent; color: #e2edf2; }
.notification-trigger:hover, .notification-trigger[aria-expanded=true] { background: #273c49; border-color: #92b2bf; }
.notification-trigger svg { display: block; width: 22px; height: 22px; }
.notification-count { position: absolute; right: -5px; top: -5px; min-width: 19px; min-height: 19px; padding: 0 4px; border: 2px solid var(--nav); border-radius: 12px; background: #aa4558; color: white; font-size: 10px; line-height: 15px; font-weight: 750; text-align: center; }
.lang-switch { display: none; }
.notification-panel { position: absolute; top: calc(100% + 8px); right: max(16px,calc((100vw - 1384px)/2)); z-index: 60; width: min(420px,calc(100vw - 32px)); max-height: min(70vh,560px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); box-shadow: 0 14px 40px rgb(15 35 47 / 18%); }
.notification-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.notification-head h2 { margin: 0; font-size: 17px; }
.notification-head button { width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 25px; }
.notification-item { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.notification-item:hover { background: var(--soft); text-decoration: none; }
.notification-item.unread { border-left: 3px solid var(--accent); background: #f0f7f7; }
.notification-item strong, .notification-item small { display: block; }
.notification-item strong { font-size: 14px; line-height: 1.4; }
.notification-item small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.notification-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 14px; }

/* Reading and filters use the same spacing and control measurements. */
.page { width: 100%; max-width: var(--content-width); margin: auto; padding: 22px 28px 56px; }
.page-intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 20px; }
.page-intro h1 { margin-bottom: 8px; }
.page-intro p:last-child { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 15px; }
.kicker { display: none; }
.edition { display: flex; flex: none; flex-direction: column; gap: 3px; text-align: right; color: var(--muted); font-size: 12px; }
.edition strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.filters, .db-controls { margin-bottom: 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.filter-row { display: grid; grid-template-columns: 92px minmax(0,1fr); align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid #e4eaee; }
.filter-label { color: var(--muted); font-size: 12px; line-height: 18px; font-weight: 650; }
.class-filter-row { display: block; min-height: 0; border: 0; }
.class-filter-row > .filter-label { display: block; margin-bottom: 6px; }
.scroll-tabs { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.scroll-tabs button { min-height: 44px; padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; line-height: 20px; white-space: nowrap; }
.scroll-tabs button:hover { background: var(--soft); color: var(--ink); }
.scroll-tabs button[aria-pressed=true] { border-color: #99bac5; background: #e8f1f4; color: #154d61; font-weight: 650; }
.class-tabs { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; }
.class-tabs .class-choice { display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 7px; min-width: max-content; min-height: 48px; padding: 8px 10px; border: 1px solid #becbd3; border-radius: 7px; background: white; box-shadow: inset 0 -3px var(--class-color,#698594); color: var(--ink); font-size: 13px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.class-choice img { width: 24px; height: 24px; flex: none; border: 1px solid #b7c4cd; border-radius: 5px; object-fit: cover; }
.class-tabs .class-choice:hover { border-color: #728e9c; background: #f5f8f9; }
.class-tabs .class-choice[aria-pressed=true] { border-color: #3c7988; background: #eaf3f4; box-shadow: inset 0 -3px var(--class-color,#3c7988); color: #153e48; }
.class-tabs .class-choice-all { box-shadow: inset 0 -3px #81929d; }
.filter-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.filter-toggle, .filter-reset, .advanced-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--control-line); border-radius: 7px; background: white; color: var(--ink); font-size: 13px; line-height: 20px; font-weight: 600; }
.filter-toggle:hover, .filter-reset:hover { background: var(--soft); }
.filter-toggle.has-selection::after { content: attr(data-count); display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 4px; background: #dcecef; color: #174b56; font-size: 11px; }
.filter-toggle[aria-expanded=true] [aria-hidden=true] { transform: rotate(180deg); }
.filter-options { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.filter-options .scroll-tabs { flex-wrap: wrap; overflow: visible; padding: 4px 0; }
.quick-tag-tabs button { border-color: #d5dfe5; background: #f7f9fa; }
.filter-fields, .filter-bottom { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); align-items: end; gap: 14px; margin-top: 12px; }
.filter-fields { grid-template-columns: repeat(3,minmax(0,1fr)) minmax(180px,1.3fr); }
.filter-fields label, .filter-bottom label, .db-controls label, .map-section label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; line-height: 18px; font-weight: 650; }
.filter-fields input, .filter-fields select, .filter-bottom input, .filter-bottom select, .db-controls input, .map-section select { display: block; width: 100%; min-width: 0; height: 44px; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: 7px; background: white; color: var(--ink); font-size: 14px; line-height: 22px; }
.filter-bottom .advanced-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.filter-options-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.filter-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.result-count { margin: 8px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.filter-toolbar .result-count { margin: 0; text-align: right; }
.advanced-toggle { display: none; }
.empty-day, .empty-state, .dupe-panel { padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); }
.dupe-panel { margin-bottom: 18px; border-left: 3px solid var(--accent); }
.site-message { max-width: 1264px; margin: 12px auto 0; padding: 11px 14px; border: 1px solid #d9aab3; border-radius: 7px; background: #fff2f4; color: var(--danger); font-size: 14px; }

/* Compact cards keep the item or discovery itself prominent. */
.day-report { margin-bottom: 28px; }
.day-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.day-heading h2 { margin: 0; font-size: 21px; }
.day-heading a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.story-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.card-image, .card-visual { display: block; width: 100%; height: 136px; }
.card-image { object-fit: cover; background: #e7edf0; }
.card-visual-icon { display: grid; height: 96px; place-items: center; border-bottom: 1px solid #d4e0e6; background: #e8eff2; }
.card-visual-icon img { width: 64px; height: 64px; border: 2px solid #cad7df; border-radius: 9px; object-fit: cover; box-shadow: 0 4px 12px rgb(23 44 56 / 12%); }
.card-visual-source { position: relative; overflow: hidden; }
.card-visual-source img { width: 100%; height: 100%; object-fit: cover; }
.card-visual-source a { position: absolute; right: 8px; bottom: 7px; max-width: calc(100% - 16px); padding: 4px 7px; border-radius: 4px; background: rgb(13 30 40 / 85%); color: white; font-size: 10px; line-height: 1.3; }
.story-body { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 16px; }
.story-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.story-meta > span:first-child { color: var(--accent); font-weight: 650; }
.story-card h3 { margin: 0 0 9px; font-size: 18px; line-height: 1.35; font-weight: 700; }
.story-card h3 .headline-link { display: inline-block; min-height: 44px; color: var(--ink); overflow-wrap: anywhere; }
.story-card h3 .headline-link:hover { color: var(--blue); }
.story-card p { margin: 0 0 12px; color: #40515e; font-size: 14px; line-height: 1.55; }
.story-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.tag { padding: 3px 6px; border: 1px solid #dce5ea; border-radius: 4px; background: #f2f6f8; color: #4a606f; font-size: 10px; line-height: 1.4; }
.story-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid #e2e9ed; font-size: 12px; }
.story-card .confidence { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; }
.signal, .story-foot > a:not(.read-more) { color: var(--muted); }
.read-more { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-size: 13px; font-weight: 650; white-space: nowrap; }
.status { padding: 3px 6px; border: 1px solid #cbd8df; border-radius: 4px; background: #f0f4f6; color: #3d5664; }
.community-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.community-actions button, .community-actions .view-count { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; padding: 8px 9px; border: 1px solid #d1dce3; border-radius: 6px; background: white; color: #455b6a; font-size: 12px; line-height: 20px; font-weight: 600; }
.community-actions .view-count { border-color: transparent; background: #f3f6f7; }
.community-actions button:hover { border-color: #8ba6b6; background: #f3f7f8; }
.community-actions button[aria-pressed=true] { border-color: #73a0ab; background: #e7f1f3; color: #174c5b; }
.view-count .view-icon { display: block; width: 19px; height: 19px; flex: none; }
.popular-results { margin-bottom: 28px; }
.popular-results h2 { margin-bottom: 4px; }
.popular-results > p { color: var(--muted); font-size: 13px; }
.featured-block > h3, .more-block > h3 { margin-bottom: 5px; }
.featured-block > p { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.more-block { margin-top: 20px; }
.update-badge, .story-meta .card-update-badge { display: inline-flex; align-items: center; flex: none; padding: 2px 6px; border: 1px solid #a9c9cf; border-radius: 4px; background: #edf6f6; color: #25616b; font-size: 10px; line-height: 1.5; font-weight: 650; white-space: nowrap; }
.story-meta .card-update-badge { margin-left: auto; }

/* Article structure and original media. */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; }
.article-header { max-width: 960px; margin-bottom: 22px; }
.article-header h1 { margin-bottom: 12px; overflow-wrap: anywhere; }
.article-lead { max-width: 76ch; margin-bottom: 16px; color: #415460; font-size: 17px; line-height: 1.6; }
.article-engagement, .issue-status { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.article-header .community-actions { margin: 12px 0; }
.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 22px; align-items: start; }
.article-main, .article-aside { min-width: 0; }
.article-section, .article-aside section, .article-image { margin: 0 0 16px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.article-section h2, .article-aside h2 { margin-bottom: 12px; font-size: 21px; }
.article-aside h2 { font-size: 17px; }
.article-section h2:not(:first-child) { margin-top: 22px; }
.article-section p { max-width: 80ch; line-height: 1.7; }
.article-section p:last-child { margin-bottom: 0; }
.article-aside p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.steps, .plain-list { margin: 0; padding-left: 22px; }
.steps li, .plain-list li { margin-bottom: 10px; }
.article-image { padding: 12px; }
.article-image img { display: block; width: 100%; max-height: 440px; border-radius: 6px; background: #f3f6f7; object-fit: contain; }
.article-image figcaption { padding: 8px 2px 0; color: var(--muted); font-size: 11px; }
.article-image figcaption a { text-decoration: underline; }
.audience-list { margin: 0; }
.audience-list > div { padding: 8px 0; border-bottom: 1px solid #e3eaee; }
.audience-list > div:last-child { border: 0; }
.audience-list dt { color: var(--muted); font-size: 11px; }
.audience-list dd { margin: 4px 0 0; font-size: 13px; font-weight: 600; }
.source-list, .discussion-list { margin: 0; padding: 0; list-style: none; }
.source-list li, .discussion-list li { padding: 9px 0; border-bottom: 1px solid #e3eaee; overflow-wrap: anywhere; }
.source-list li:last-child, .discussion-list li:last-child { border: 0; }
.source-list li span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.discussion-list p { margin: 5px 0; font-size: 13px; }
.discussion-list a { font-size: 12px; }
.map-section label { max-width: 450px; margin-bottom: 12px; }
.map-section summary { display: flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 600; }
.map-embed, .video-embed { overflow: hidden; aspect-ratio: 16/9; border: 1px solid #c6d5dd; border-radius: 7px; background: #e8eef1; }
.map-embed iframe, .video-embed iframe { width: 100%; height: 100%; border: 0; }
.map-direct { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-size: 13px; }
.route-section, .map-section { scroll-margin-top: 96px; }
.route-section > p { color: var(--muted); font-size: 14px; }
.route-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.route-list li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 7px; }
.route-stop { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; min-height: 56px; padding: 7px; border: 0; border-radius: 5px; background: white; color: var(--ink); text-align: left; }
.route-stop:hover, .route-stop[aria-current=location] { background: #edf4f6; }
.route-number { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 6px; background: #dcecf0; color: #215667; font-size: 12px; font-weight: 700; }
.route-stop strong, .route-stop small { display: block; }
.route-stop strong { font-size: 14px; }
.route-stop small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.route-stop code { display: inline-block; margin-top: 4px; padding: 2px 5px; border-radius: 4px; background: #edf2f5; color: #435a69; font: 11px/1.4 ui-monospace,monospace; }
.route-source { display: inline-flex; align-items: center; min-height: 44px; font-size: 11px; white-space: nowrap; }
.route-list li:has(.route-stop[aria-current=location]) { border-color: #6b9aab; }
.article-update { max-width: 800px; margin-bottom: 20px; padding: 16px 18px; border: 1px solid #b8d0d6; border-left: 3px solid var(--accent); border-radius: 8px; background: #f2f8f8; }
.article-update h2 { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 17px; }
.article-update .update-entry p { margin: 7px 0; line-height: 1.6; overflow-wrap: anywhere; }
.article-update .update-date, .article-update .update-time-note { color: var(--muted); font-size: 12px; }
.update-history { margin-top: 12px; padding-top: 4px; border-top: 1px solid #c7dbe0; }
.update-history summary { display: flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; }
.update-history summary::before { content: '▸'; margin-right: 7px; }
.update-history[open] summary::before { content: '▾'; }
.update-history .update-entry + .update-entry { margin-top: 12px; padding-top: 6px; border-top: 1px solid #c7dbe0; }
.digest-section { margin: 20px 0 28px; }
.digest-section > h2 { margin-bottom: 12px; }

/* Interactive game facts retain their source images and labels. */
.entity-mention { display: inline-flex; align-items: center; gap: 4px; vertical-align: baseline; padding: 1px 3px; border: 0; border-bottom: 1px dotted #6c97a8; border-radius: 3px; background: #edf4f7; color: #225771; font: inherit; font-weight: 600; line-height: 1.4; text-align: left; cursor: pointer; }
.entity-mention:hover, .entity-mention[aria-expanded=true] { background: #dcecf1; border-bottom-style: solid; }
.entity-mention img { width: 18px; height: 18px; flex: none; border-radius: 3px; object-fit: cover; }
.entity-dot { display: inline-grid; place-items: center; width: 17px; height: 17px; flex: none; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; }
.entity-dot-place { border-radius: 3px; }
.entity-dot-npc { background: #e7edf4; color: #4c6385; }
.entity-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.entity-chip { min-height: 36px; padding: 6px 8px; border: 1px solid #c6d8e1; border-radius: 6px; background: #f1f6f8; font-size: 11px; }
.entity-chip img { width: 22px; height: 22px; }
.entity-more { display: inline-flex; align-items: center; min-height: 36px; padding: 0 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.entity-popover { position: fixed; z-index: 100; width: min(380px,calc(100vw - 24px)); max-height: min(520px,calc(100vh - 24px)); overflow: auto; padding: 18px; border: 1px solid #9fbac7; border-radius: 10px; background: white; color: var(--ink); box-shadow: 0 12px 40px rgb(15 35 47 / 22%); font-size: 14px; }
.entity-popover-head { display: flex; align-items: flex-start; gap: 10px; }
.entity-popover-icon { width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 6px; }
.entity-popover-title { display: flex; flex-direction: column; min-width: 0; }
.entity-popover-title strong { font-size: 17px; line-height: 1.3; }
.entity-kind { color: var(--muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.entity-close { min-width: 44px; min-height: 44px; margin: -8px -8px 0 auto; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 25px; line-height: 1; }
.entity-close:hover { background: var(--soft); }
.entity-popover p { margin: 10px 0 0; line-height: 1.6; }
.entity-availability { color: #2b586a; font-weight: 600; }
.entity-localization { color: var(--muted); font-size: 12px; }
.entity-source, .entity-local-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; margin-right: 12px; font-weight: 600; }
.entity-image-credit { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }

/* Accounts use ordinary fields, restrained actions and clear grouping. */
.auth-dialog, #recovery-codes-dialog { width: min(460px,calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 24px; border: 1px solid #9eb3bf; border-radius: 12px; background: white; color: var(--ink); box-shadow: 0 24px 70px rgb(11 29 40 / 30%); }
.auth-dialog::backdrop, #recovery-codes-dialog::backdrop { background: rgb(10 23 32 / 68%); }
.auth-head { display: flex; align-items: start; gap: 12px; }
.auth-head h2 { margin: 0 0 16px; font-size: 23px; }
.auth-head button { min-width: 44px; min-height: 44px; margin: -8px -8px 0 auto; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 26px; }
.auth-head button:hover { background: var(--soft); }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.auth-tabs button { flex: 1; min-height: 44px; padding: 8px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 13px; line-height: 20px; font-weight: 600; }
.auth-tabs button[aria-selected=true] { border-bottom-color: var(--accent); color: var(--accent); }
.auth-form, .account-form { display: grid; gap: 14px; }
.auth-form label, .account-form label, .avatar-row label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 12px; line-height: 18px; font-weight: 650; }
.auth-form input, .account-form input, .account-form select, .account-form textarea, .avatar-row input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: 7px; background: white; color: var(--ink); font-size: 14px; line-height: 22px; }
.auth-form input, .account-form input, .account-form select { height: 44px; }
.account-form textarea { resize: vertical; line-height: 1.6; }
.account-form input[readonly] { background: #f3f6f7; color: var(--muted); }
.primary-button, .auth-form button[type=submit], .account-form button[type=submit], .avatar-row button, .subscribe-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 15px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: white; font-size: 14px; line-height: 22px; font-weight: 650; }
.primary-button:hover, .auth-form button[type=submit]:hover, .account-form button[type=submit]:hover, .avatar-row button:hover, .subscribe-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.account-form button[type=reset], .text-button, #verify-email { min-height: 44px; padding: 10px 13px; border: 1px solid var(--control-line); border-radius: 7px; background: white; color: var(--ink); font-size: 14px; line-height: 22px; font-weight: 600; }
.account-form button[type=reset]:hover, .text-button:hover, #verify-email:hover { background: var(--soft); }
.form-help { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-message { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #bed8ce; border-radius: 7px; background: #eef7f3; color: #245844; font-size: 13px; }
.form-message[data-error=true] { border-color: #dfb8c0; background: #fff3f5; color: var(--danger); }
.account-page .page-intro { min-height: 108px; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(90deg,rgb(18 40 51 / 94%),rgb(18 40 51 / 74%) 45%,rgb(18 40 51 / 28%)),url("/assets/wowiuc-profile-cover.png") center 45%/cover; color: white; }
.account-page .page-intro h1 { margin: 0; color: white; }
#account-private { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 18px; }
.account-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.account-panel h2 { margin-bottom: 14px; font-size: 18px; }
.account-panel p { color: var(--muted); font-size: 14px; line-height: 1.6; }
#characters-panel { grid-column: 1/-1; }
.profile-grid { display: grid; gap: 18px; min-width: 0; }
.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-preview { display: grid; place-items: center; width: 64px; height: 64px; flex: none; overflow: hidden; border: 1px solid #c6d8df; border-radius: 10px; background: #e9f1f3; color: #286273; font-size: 25px; font-weight: 700; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-row form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; min-width: 0; flex: 1; }
.avatar-row input[type=file] { height: 44px; padding: 8px; font-size: 11px; }
.avatar-row button { padding: 10px 12px; font-size: 13px; }
#profile-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
#profile-form label:has(textarea), #profile-form button { grid-column: 1/-1; }
#profile-form button { justify-self: start; }
#password-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
#password-form button { grid-column: 1/-1; justify-self: start; }
.security-panel .text-button { margin-top: 16px; color: var(--danger); }
#favorite-list { display: grid; gap: 7px; }
#favorite-list a { display: block; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-size: 13px; font-weight: 600; }
#favorite-list a:hover { border-color: #80a5b5; background: #f5f8f9; text-decoration: none; }
#subscription-list { display: flex; flex-wrap: wrap; gap: 7px; }
#subscription-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 11px; border: 1px solid #d1dfe6; border-radius: 6px; background: #f1f6f8; color: #365e72; font-size: 12px; font-weight: 600; }
.subscribe-button[aria-pressed=true] { background: white; color: var(--accent); }
.subscription-note { margin-top: 10px; color: var(--muted); font-size: 12px; }
#account-guest { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#account-guest p { margin: 0; }
#recovery-codes-dialog { width: min(580px,calc(100vw - 24px)); }
#recovery-codes-dialog h2 { font-size: 22px; }
#recovery-codes-dialog p { color: var(--muted); font-size: 14px; }
#recovery-codes-values { padding: 16px; border: 1px solid #d5e1e7; border-radius: 7px; background: #f3f7f8; color: #234e61; font: 14px/1.9 ui-monospace,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
#recovery-codes-dialog button { min-height: 44px; margin: 6px 8px 0 0; padding: 10px 13px; border: 1px solid var(--control-line); border-radius: 7px; background: white; color: var(--ink); font-size: 13px; font-weight: 600; }
#recovery-codes-dialog #recovery-codes-download { border-color: var(--accent); background: var(--accent); color: white; }
.code-recover { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.code-recover summary { display: flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 13px; font-weight: 650; }
.code-recover summary::before { content: '+'; margin-right: 8px; font-size: 20px; }
.code-recover[open] summary::before { content: '−'; }
.code-recover form { padding-top: 12px; }
.reset-page { max-width: 640px; }
.reset-page .account-panel { margin-top: 20px; }

/* The database uses the same neutral cards and factual icon assets. */
.db-controls label { gap: 5px; }
.db-controls .scroll-tabs { flex-wrap: wrap; margin-top: 10px; }
.db-controls p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.db-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.db-card { display: flex; align-items: flex-start; gap: 11px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.db-card-visual { display: grid; place-items: center; width: 48px; height: 48px; flex: none; }
.db-card-visual img { width: 48px; height: 48px; border-radius: 7px; object-fit: cover; }
.db-kind-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #c9d8df; border-radius: 7px; background: #edf3f6; color: #426476; font-size: 20px; font-weight: 650; }
.db-kind, .db-count { margin: 0 0 3px; color: var(--muted); font-size: 11px; }
.db-card h2 { margin: 0 0 5px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.db-card h2 a { color: var(--ink); }
.db-classes { margin: 0 0 22px; }
.db-classes h2 { margin-bottom: 10px; font-size: 18px; }
.db-class-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.db-class { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 7px 10px; border: 1px solid #c5d2da; border-left: 3px solid var(--class-color,#75909f); border-radius: 6px; background: white; color: var(--ink); font-size: 13px; font-weight: 600; }
.db-class:hover { border-color: #7ba0b0; background: #f4f8f9; text-decoration: none; }
.db-class img { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; }
.db-detail-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 20px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.db-detail-head h1 { margin-bottom: 9px; }
.db-detail-head p { margin-bottom: 10px; }
.db-detail-icon { width: 80px; height: 80px; flex: none; border-radius: 10px; object-fit: cover; }
.db-detail-media { max-width: 220px; flex: none; }
.db-detail-media .db-detail-icon { width: 180px; height: 130px; object-fit: cover; }
.db-detail-media .db-detail-icon[src*="zamimg.com"], .db-detail-media .db-detail-icon[src*="classes/"] { width: 80px; height: 80px; }
.db-image-credit { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.db-availability { color: var(--muted); font-size: 13px; }
.db-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.db-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.db-related h2 { font-size: 21px; }
.footer { display: flex; align-items: center; gap: 20px; max-width: var(--content-width); margin: auto; padding: 22px 28px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.footer-brand { margin-right: auto; color: #38505f; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }

@media(max-width:1200px) {
  .topbar-inner { gap: 10px; padding-right: 20px; padding-left: 20px; }
  .brand { gap: 8px; font-size: 21px; }
  .brand-emblem { width: 40px; height: 40px; }
  .account-trigger { max-width: 120px; padding: 9px 11px; }
  .db-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:1000px) {
  :root { --header-height: 124px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .article-layout { grid-template-columns: minmax(0,1fr) 280px; }
  .topbar-inner { flex-wrap: wrap; min-height: 0; }
  .profile-grid { display: grid; grid-template-columns: 1fr; }
  .filter-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .db-class-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:760px) {
  :root { --header-height: 68px; }
  .topbar { position: relative; }
  .topbar-inner { gap: 10px; padding: 10px 16px 8px; }
  .brand { font-size: 21px; }
  .brand-emblem { width: 40px; height: 40px; }
  .header-spacer { flex: 1; }
  .account-trigger { max-width: 150px; }
  .page { padding: 20px 16px 40px; }
  h1 { font-size: 27px; }
  .page-intro { align-items: start; flex-direction: column; gap: 8px; margin-bottom: 16px; }
  .edition { text-align: left; }
  .filters, .db-controls { padding: 12px; }
  .filter-row { display: block; padding: 6px 0; }
  .filter-label { display: block; margin-bottom: 5px; }
  .filter-bottom { grid-template-columns: 1fr; }
  .filter-options-foot { align-items: start; flex-direction: column; gap: 10px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .article-aside section { margin-bottom: 0; }
  .article-section, .article-aside section { padding: 18px; }
  #account-private { grid-template-columns: 1fr; }
  #characters-panel { grid-column: auto; }
  .account-panel { padding: 18px; }
  #profile-form, #password-form { grid-template-columns: 1fr; }
  #profile-form label:has(textarea), #profile-form button, #password-form button { grid-column: auto; }
  .db-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer { flex-wrap: wrap; padding-right: 16px; padding-left: 16px; gap: 14px; }
  .site-message { margin-right: 16px; margin-left: 16px; }
}
@media(max-width:520px) {
  .card-grid, .db-grid { grid-template-columns: 1fr; }
  .class-tabs .class-choice { flex: 1 1 calc(50% - 6px); min-width: 0; font-size: 12px; }
  .filter-fields, .filter-bottom .advanced-filters { grid-template-columns: 1fr; }
  .article-aside { display: block; }
  .article-aside section { margin-bottom: 14px; }
  .entity-popover { left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; max-height: min(70vh,550px); }
  .entity-chip, .entity-more { min-height: 44px; }
  .route-list li { display: block; }
  .route-source { margin-left: 45px; }
  .day-heading { align-items: start; }
  .day-heading h2 { font-size: 19px; }
  .day-heading a { font-size: 12px; }
  .avatar-row { align-items: start; }
  .avatar-row form { grid-template-columns: 1fr; }
  .avatar-row button { justify-self: start; }
  #account-guest { align-items: start; flex-direction: column; }
  .db-detail-head { flex-direction: column; }
  .db-class-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .notification-panel { right: 12px; width: calc(100vw - 24px); }
  .account-page .page-intro { min-height: 96px; padding: 20px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.db-detail-media .db-detail-icon[src*="guide-icons/"], .db-detail-media .db-detail-icon[src*="entity-icons/"] { width: 80px; height: 80px; object-fit: contain; }
