/* Color packages: independent of light/dark mode; no network or animation overhead. */
:root, [data-color-theme="ocean"] { --sc-palette:#006b80; --sc-pastel:#edf7fa; --sc-header:#102c46; --sc-radius:22px; }
[data-color-theme="lavender"] { --sc-palette:#6551a6; --sc-pastel:#f3effc; --sc-header:#302154; --sc-radius:24px; }
[data-color-theme="emerald"] { --sc-palette:#08775d; --sc-pastel:#edf8f0; --sc-header:#123d31; --sc-radius:18px; }
[data-color-theme="rose"] { --sc-palette:#a33864; --sc-pastel:#fff0f5; --sc-header:#54243b; --sc-radius:24px; }
[data-color-theme="amber"] { --sc-palette:#966000; --sc-pastel:#fff8e8; --sc-header:#4c3613; --sc-radius:16px; }
[data-color-theme="sky"] { --sc-palette:#236aa3; --sc-pastel:#eef6ff; --sc-header:#163654; --sc-radius:20px; }
[data-color-theme="mint"] { --sc-palette:#08736f; --sc-pastel:#ecfaf6; --sc-header:#17443e; --sc-radius:26px; }
[data-color-theme="coral"] { --sc-palette:#ae4933; --sc-pastel:#fff2ec; --sc-header:#542e26; --sc-radius:18px; }
[data-color-theme="indigo"] { --sc-palette:#4558a6; --sc-pastel:#f0f2fd; --sc-header:#232e54; --sc-radius:20px; }
[data-color-theme="plum"] { --sc-palette:#82478c; --sc-pastel:#faf0fb; --sc-header:#48244e; --sc-radius:24px; }
[data-color-theme="slate"] { --sc-palette:#476479; --sc-pastel:#f0f5f8; --sc-header:#263746; --sc-radius:16px; }
[data-color-theme="peach"] { --sc-palette:#a75b24; --sc-pastel:#fff4e9; --sc-header:#513721; --sc-radius:22px; }

:root:not([data-theme="dark"]) { --soft: var(--sc-pastel); --accent: var(--sc-palette); --line: color-mix(in srgb,var(--sc-header) 22%,white); }
:root { --sc-shadow: 0 8px 20px color-mix(in srgb,var(--sc-header) 23%,transparent); }
.site-header { position:static; inset:auto; background:linear-gradient(120deg,var(--sc-header),var(--sc-palette)); border-bottom-color:var(--gold); box-shadow:0 4px 14px #0002; }
.top-nav a:hover, .top-nav a[aria-current="page"] { background:#ffffff20; border-color:#ffffff50; }
.public-result-board.section { border-top-color:var(--sc-palette); }
.public-result-board .result-card, .public-result-board .result-card.nearest-result { background:var(--paper); border:2px solid var(--sc-header); border-radius:var(--sc-radius); box-shadow:var(--sc-shadow); }
.public-result-board .result-card:before { background:var(--sc-palette); }
.public-result-board .result-card-game { background:var(--sc-pastel) !important; }
.public-result-board .result-card-values .result-value, .public-result-board .result-card.nearest-result .result-value { background:var(--sc-palette) !important; border-color:var(--sc-header); box-shadow:0 3px 0 var(--sc-header); }
:root:not([data-theme="dark"]) .core-chart-links a, :root:not([data-theme="dark"]) .pill.light { background:var(--sc-pastel); border-color:var(--line); }
.core-chart-links a[aria-current="page"], .chart-hub-years a:hover { background:var(--sc-palette); color:white; }
:root:not([data-theme="dark"]) .forum-page #page-content { background:var(--sc-pastel); }
:root:not([data-theme="dark"]) .notice-item { border-left:4px solid var(--sc-palette); box-shadow:var(--sc-shadow); }
[data-theme="dark"] .public-result-board .result-card { border-color:#8298b0; }
[data-theme="dark"] .public-result-board .result-card-game { background:#172d51 !important; }
[data-theme="dark"] .public-result-board .result-card-values .result-value { color:white !important; }
.color-theme-dialog { width:min(660px,calc(100% - 24px)); max-height:85dvh; padding:20px; border:2px solid var(--line); border-radius:24px; color:var(--ink); background:var(--paper); box-shadow:0 20px 60px #0005; }
.color-theme-dialog::backdrop { background:#0a172c99; backdrop-filter:blur(4px); }
.color-theme-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.color-theme-dialog h2 { margin:0; font-size:1.25rem; }
.color-theme-dialog button { cursor:pointer; }
.color-theme-dialog .theme-close { min-width:44px; min-height:44px; padding:6px; border:1px solid var(--line); background:var(--soft); color:var(--ink); border-radius:12px; }
.color-theme-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0; }
.color-theme-choice { color:var(--swatch-header); background:var(--swatch-bg); border:2px solid var(--swatch-header); border-radius:var(--swatch-radius); padding:12px; min-width:0; font-size:.85rem; font-weight:800; box-shadow:0 4px 0 color-mix(in srgb,var(--swatch-header) 20%,transparent); }
.color-theme-choice span { display:block; height:32px; border-radius:8px; margin-bottom:10px; background:linear-gradient(120deg,var(--swatch-header),var(--swatch-primary)); }
.color-theme-choice[aria-pressed="true"] { outline:3px solid var(--ink); outline-offset:2px; }
.color-theme-dialog button:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
.theme-next { display:block; width:100%; padding:12px; border:0; border-radius:12px; background:var(--sc-palette); color:white; font-weight:750; }
.color-theme-status { margin-bottom:0; font-size:.8rem; color:var(--muted); }
@media(max-width:700px) { .header-grid .top-nav { grid-template-columns:repeat(6,minmax(0,1fr)); } .header-grid .top-nav a,.header-grid .top-nav button { padding:10px 3px; font-size:.72rem; } }
@media(max-width:480px) { .color-theme-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .color-theme-dialog { padding:14px; } }
@media(prefers-reduced-motion:no-preference) { .color-theme-choice:hover { transform:translateY(-2px); } }

.result-name-row { display:flex; gap:6px; align-items:center; }
.result-name-row .result-card-game { flex:1; min-width:0; }
.game-name-switch { flex:0 0 32px; min-height:44px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--soft); color:var(--ink); cursor:pointer; font-size:1.2rem; }
.game-name-switch:focus-visible { outline:3px solid var(--gold); }
@media(max-width:480px) { .result-name-row { flex-wrap:wrap; justify-content:center; } .result-name-row .result-card-game { flex-basis:100%; } }

/* Paired decorative quote marks, outside the post text. */
.forum-quote:before, .forum-quote:after { display:block; color:var(--accent); font:700 2.5rem/1 Georgia,serif; }
.forum-quote:before { content:"\201C"; margin-bottom:4px; }
.forum-quote:after { content:"\201D"; margin-top:4px; text-align:right; }
/* Website parity with the compact app cards and navigation. */
body { padding-bottom:calc(84px + env(safe-area-inset-bottom)); }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.global-search { position:relative; margin-block:14px; z-index:35; }
.global-search form { display:flex; align-items:center; background:var(--paper); border:1.5px solid var(--line); border-radius:16px; box-shadow:var(--sc-shadow); padding:4px 8px 4px 14px; }
.global-search input { width:100%; min-width:0; padding:12px 4px; border:0; background:transparent; color:var(--ink); outline-offset:2px; }
.global-search button { min-width:44px; height:44px; border:0; border-radius:12px; background:var(--sc-palette); color:white; font-size:1.8rem; cursor:pointer; }
.live-search-results { position:absolute; top:calc(100% + 8px); inset-inline:0; max-height:55dvh; overflow-y:auto; border:1.5px solid var(--line); border-radius:18px; background:var(--paper); padding:12px; box-shadow:0 12px 30px #10213830; }
.live-search-results[hidden] { display:none; }
.live-search-results p { margin:0 4px 8px; font-size:.8rem; color:var(--muted); }
.live-search-results a { display:flex; justify-content:space-between; gap:12px; padding:12px; border-radius:10px; color:var(--ink); overflow-wrap:anywhere; }
.live-search-results a:hover,.live-search-results a:focus-visible { background:var(--soft); }
.live-search-results small { color:var(--muted); flex-shrink:0; }
.live-search-results [data-search-all] { color:var(--accent); font-weight:700; border-top:1px solid var(--line); }
.persistent-ad.wrap { margin-block:0; padding-block:0; }
.site-bottom-menu { position:fixed; inset:auto 0 0; z-index:100; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:3px; min-height:74px; padding:8px max(8px,calc((100% - 680px)/2)) calc(8px + env(safe-area-inset-bottom)); background:var(--paper); border-top:1px solid var(--line); box-shadow:0 -4px 18px #10213818; }
.site-bottom-menu a,.site-bottom-menu .site-auth-control { display:flex; flex-direction:column; gap:5px; align-items:center; justify-content:center; color:var(--muted); font-size:.74rem; font-weight:700; text-decoration:none; padding:2px; border-radius:14px; }
.site-bottom-menu a span,.site-bottom-menu .site-auth-control span { display:flex; align-items:center; justify-content:center; min-height:30px; padding:3px 14px; border-radius:18px; }
.site-bottom-menu a[aria-current],.site-bottom-menu .bottom-home { color:var(--accent); }
.site-bottom-menu a[aria-current] span { background:var(--soft); }
.site-notice-box { padding:22px; background:var(--paper); border:1.5px solid var(--line); border-radius:var(--sc-radius); box-shadow:var(--sc-shadow); }
.site-notice-quote { margin:14px 0 0; padding:14px 18px; background:var(--soft); border-left:4px solid var(--accent); border-radius:14px; color:var(--ink); overflow-wrap:anywhere; }
.site-notice-quote:before,.site-notice-quote:after { display:block; color:var(--accent); font:700 2rem/1 Georgia,serif; }
.site-notice-quote:before { content:'\201C'; }.site-notice-quote:after { content:'\201D'; text-align:right; }
.site-notice-quote h3 { margin:4px 0 8px; font-size:1rem; }.site-notice-quote p { margin:0; line-height:1.8; }
.live-ist-clock { position:relative; display:flex; flex-direction:column; width:min(240px,100%); margin:20px auto 22px; padding:14px; text-align:center; border:1.5px solid #eac568; border-radius:18px; background:linear-gradient(120deg,var(--sc-header),var(--sc-palette)); color:white; box-shadow:0 6px 0 color-mix(in srgb,var(--sc-header) 65%,transparent),0 12px 25px #10213830; }
.live-ist-clock:before,.live-ist-clock:after { content:''; position:absolute; top:-18px; width:3px; height:18px; background:#eac568; }.live-ist-clock:before { left:25%; }.live-ist-clock:after { right:25%; }
.live-ist-clock time { color:#ffe19a; font:800 1.35rem/1.3 ui-monospace,monospace; letter-spacing:.1em; }.live-ist-clock span { font-size:.75rem; margin-top:5px; }
.public-result-board .result-card { padding:12px; box-shadow:0 10px 20px color-mix(in srgb,var(--sc-header) 28%,transparent); }
.result-name-row { position:relative; display:block; margin-bottom:12px; padding:10px 38px; border-radius:14px; background:linear-gradient(120deg,var(--paper),var(--soft)); box-shadow:0 4px 9px #10213814; }
.public-result-board .result-name-row .result-card-game { display:block; padding:6px 0; font-size:clamp(.95rem,2.6vw,1.15rem); background:transparent !important; }
.result-favorite { position:absolute; left:3px; top:50%; transform:translateY(-50%); width:30px; height:36px; padding:0; border:1px solid #c38a27; border-radius:10px; background:linear-gradient(135deg,#fffdf4,#ffe9bd); color:#805108; box-shadow:0 2px 0 #b58135,0 4px 6px #93672730; cursor:pointer; font-size:1.35rem; }
.result-favorite[aria-pressed='true'] { background:linear-gradient(135deg,#ffe9a0,#e9ad36); }
.result-name-row .game-name-switch { position:absolute; right:3px; top:50%; transform:translateY(-50%); width:30px; min-height:36px; font-size:1rem; }
.public-result-board .result-card-values .old-result { position:relative; padding:12px 4px; font-size:1.65rem; background:linear-gradient(135deg,#fff2d0,#ffe8b8); border:1px solid #efdcaf; box-shadow:0 3px 0 #af9c70,0 6px 10px #10213820; }
.public-result-board .result-card-values .result-value,.public-result-board .result-card.nearest-result .result-value { padding:12px 4px; font-size:1.9rem; background:linear-gradient(135deg,color-mix(in srgb,var(--sc-palette) 82%,white),var(--sc-palette)) !important; border:1px solid color-mix(in srgb,var(--sc-palette) 65%,white); box-shadow:0 3px 0 var(--sc-header),0 6px 10px #10213820; text-shadow:0 2px 2px #0002; }
.public-result-board .result-card-values small { display:block; font-size:.58rem; line-height:1.3; margin-bottom:5px; letter-spacing:.14em; font-weight:700; }
.public-result-board .record-date { font-size:.67rem; margin-top:14px; }
.game-chart-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:18px 0 14px; }
.game-chart-tabs a { display:flex; align-items:center; justify-content:center; padding:14px 6px; border:1.5px solid var(--line); border-radius:14px; color:#b71c1c; background:var(--paper); font-size:1rem; font-weight:850; box-shadow:0 4px 0 #10213818; text-transform:uppercase; }
.game-chart-tabs a[aria-current] { background:var(--sc-header); border-color:var(--gold); color:#ffaba2; }
.year-switch { display:grid; grid-template-columns:repeat(auto-fit,minmax(72px,1fr)); width:100%; gap:10px; }
.year-switch a,.year-switch span { display:flex; justify-content:center; align-items:center; min-height:44px; border-radius:12px; padding:8px; }
.chart-hub-years-grid { grid-template-columns:repeat(auto-fit,minmax(72px,1fr)); gap:10px; }
.chart-hub-row h2,.chart-hero h1,.chart-hero-stats dd:first-child { color:#b71c1c; }
.forum-card-top { background:linear-gradient(120deg,var(--sc-header),var(--sc-palette)); box-shadow:0 5px 0 var(--sc-header),0 9px 14px #10213822; }
.forum-card-author { font-size:1.2rem; letter-spacing:.04em; }.forum-card-top .forum-meta { font-size:.72rem; }
.forum-reaction-bar { grid-template-columns:repeat(5,minmax(0,1fr)); }
.forum-reaction-bar button,.forum-reaction-bar>a,.forum-reaction-bar>.forum-view-count { min-height:64px; padding:8px 3px; font-size:.7rem; }
.forum-quote p { margin:4px 0; }
.forum-page #page-content { --accent:var(--sc-palette); }
.footer-notices[hidden] { display:none; }
.header-brand-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.site-menu-open { display:flex; align-items:center; gap:8px; min-height:44px; padding:8px 12px; border:1px solid #ffffff60; border-radius:12px; background:#ffffff18; color:white; cursor:pointer; }
.site-menu-open span { font-size:1.2rem; }
.site-drawer { inset:0 auto 0 0; margin:0; height:100dvh; max-height:100dvh; width:min(350px,calc(100% - 32px)); padding:22px; border:0; border-right:2px solid var(--line); border-radius:0 24px 24px 0; color:var(--ink); background:var(--paper); box-shadow:12px 0 40px #10213835; }
.site-drawer::backdrop { background:#10213880; backdrop-filter:blur(3px); }
.site-drawer header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.site-drawer h2 { font-size:1.25rem; }.site-drawer header button { min-width:44px; min-height:44px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--soft); cursor:pointer; }
.site-drawer nav { display:grid; gap:6px; }.site-drawer h3 { margin:20px 12px 8px; color:var(--accent); font-size:.85rem; }
.site-drawer nav a,.site-drawer nav button { display:block; padding:12px; min-height:44px; border:0; border-radius:12px; text-align:left; font-size:.95rem; font-weight:650; line-height:1.4; font-family:inherit; color:var(--ink); background:transparent; cursor:pointer; }
.site-drawer nav a:hover,.site-drawer nav button:hover { background:var(--soft); }.site-drawer nav .drawer-game { color:#b71c1c; text-transform:uppercase; }
.drawer-status { font-size:.8rem; color:var(--muted); }
[data-theme='dark'] .site-drawer nav .drawer-game { color:#ff8a80; }
[data-theme='dark'] .game-chart-tabs a,[data-theme='dark'] .chart-hub-row h2,[data-theme='dark'] .chart-hero h1 { color:#ff8a80; }
@media(max-width:700px) { .header-grid .top-nav { grid-template-columns:repeat(7,minmax(0,1fr)); } .header-grid .top-nav a,.header-grid .top-nav button { padding-inline:2px; font-size:.65rem; } }
@media(max-width:480px) { .public-result-board .result-card { padding:9px; }.result-name-row { padding:8px 32px; }.result-name-row .result-card-game { flex-basis:auto; }.public-result-board .result-card-values .old-result { font-size:1.35rem; }.public-result-board .result-card-values .result-value { font-size:1.55rem; }.game-chart-tabs { gap:6px; }.game-chart-tabs a { font-size:.8rem; }.site-notice-box { padding:14px; } }
@media(max-width:480px) {
  .result-name-row { padding:6px 3px 52px; }
  .public-result-board .result-name-row .result-card-game { font-size:clamp(.72rem,2.6vw,.88rem); letter-spacing:0; }
  .result-name-row .result-favorite,.result-name-row .game-name-switch { top:auto; bottom:5px; transform:none; width:44px; height:40px; min-height:40px; }
  .result-name-row .result-favorite { left:5px; }.result-name-row .game-name-switch { right:5px; }
}
@media(max-width:340px) { .public-result-board .result-card-grid { grid-template-columns:1fr; }.forum-reaction-bar { grid-template-columns:repeat(3,minmax(0,1fr)); }.game-chart-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Readable mobile text and touch controls, after the compact theme rules. */
@media (max-width: 760px) {
  html { font-size:17px; }
  body { font-size:1rem; padding-bottom:calc(96px + env(safe-area-inset-bottom)); }
  .header-grid .top-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .header-grid .top-nav a,.header-grid .top-nav button { min-height:48px; padding:10px 8px; font-size:1rem; overflow-wrap:anywhere; }
  #page-content input:not([type=checkbox]):not([type=radio]),#page-content select,#page-content textarea,.global-search input { min-width:0; max-width:100%; min-height:52px; padding:12px; font-size:18px; }
  #page-content label { font-size:1rem; }
  #page-content .small,#page-content .help { font-size:.9rem; line-height:1.6; }
  .forum-form,.forum-panel,.forum-shell,.forum-shell>* { min-width:0; }
  .forum-form input,.forum-form textarea,.forum-form select { width:100%; }
  .forum-btn,.forum-share a,.forum-share button,.forum-comment-actions button,.btn,.pill { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:12px 16px; font-size:1rem; max-width:100%; white-space:normal; }
  .forum-form>.forum-btn { display:flex; width:100%; margin-top:12px; }
  .forum-form .help,.forum-meta,.forum-card-top .forum-meta,.forum-status,.drawer-status { font-size:.88rem; line-height:1.6; }
  .forum-card-author { font-size:1.25rem; overflow-wrap:anywhere; }
  .forum-quote,.forum-quote p,.site-notice-quote p { font-size:1rem; line-height:1.75; overflow-wrap:anywhere; }
  .public-result-board .result-name-row .result-card-game { font-size:1rem; line-height:1.4; overflow-wrap:anywhere; }
  .public-result-board .result-card-values small { font-size:.78rem; letter-spacing:.05em; }
  .public-result-board .record-date,.result-card-time,.result-card-time strong,.live-ist-clock span { font-size:.85rem; }
  .public-result-board .result-card-values .old-result { font-size:1.6rem; }
  .public-result-board .result-card-values .result-value { font-size:1.8rem; }
  .game-chart-tabs a,.year-switch a,.year-switch span,.chart-hub-years a,.chart-hub-years span { min-height:48px; font-size:1rem; }
  .year-switch,.chart-hub-years-grid { grid-template-columns:repeat(auto-fit,minmax(84px,1fr)); }
  .forum-reaction-bar button,.forum-reaction-bar>a,.forum-reaction-bar>.forum-view-count { min-height:68px; font-size:.88rem; }
  .site-drawer nav a,.site-drawer nav button { min-height:48px; font-size:1rem; }
  .site-drawer h3,.color-theme-choice,.color-theme-status { font-size:.95rem; }
  .site-bottom-menu { min-height:86px; }
  .site-bottom-menu a,.site-bottom-menu .site-auth-control { font-size:.82rem; min-width:0; }
  .chart-table-viewport { overflow-x:auto; }
  .chart-table-viewport table { min-width:640px; font-size:1rem; }
  .chart-table-viewport th,.chart-table-viewport td { font-size:16px; }
}
@media (max-width: 480px) {
  .forum-grid.two,.forum-shell.has-sidebar { grid-template-columns:minmax(0,1fr); }
  .forum-reaction-bar { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .forum-profile-card { flex-wrap:wrap; }
  .game-chart-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.site-auth-form{margin:0;display:flex;min-width:0}.site-auth-form>button{width:100%;font-family:inherit;cursor:pointer}.site-bottom-menu .site-auth-control{border:0;background:transparent}

.footer-clear-history { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 14px; border:1px solid #839bae; border-radius:8px; background:#163e50; color:#fff; font:inherit; font-size:.83rem; font-weight:700; cursor:pointer; }
.footer-clear-history:hover,.footer-clear-history:focus-visible { background:#245b70; outline:2px solid #d6a441; outline-offset:2px; }
.footer-clear-history:disabled { opacity:.65; cursor:wait; }
.footer-cache-status { align-self:center; color:#d8e6ee; font-size:.8rem; }
