:root {
  /* Light mode: parchment scroll (mirrors the game's tan/khaki UI) */
  --bg: #cdbe9a;
  --bg-texture: #c2b28c;
  --panel: #e6dabb;
  --panel-2: #dbcca4;
  --rule: #a68e5f;
  --text: #362a1c;
  --text-muted: #6d5c3f;
  --accent: #a84c1a;
  --accent-ink: #fff6e6;
  --brass: #8a6a2a;
  --tag-best: #8a6a2a;
  --tag-alt: #4f6a3c;
  --tag-f2p: #2f6b5e;
  --shadow: rgba(54, 42, 28, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17130f;
    --bg-texture: #1d1811;
    --panel: #241d15;
    --panel-2: #2c2318;
    --rule: #4d3f29;
    --text: #ece1c8;
    --text-muted: #a2957a;
    --accent: #d9843c;
    --accent-ink: #1c140a;
    --brass: #c9a35a;
    --tag-best: #c9a35a;
    --tag-alt: #8fae7a;
    --tag-f2p: #6fae9a;
    --shadow: rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg: #17130f;
  --bg-texture: #1d1811;
  --panel: #241d15;
  --panel-2: #2c2318;
  --rule: #4d3f29;
  --text: #ece1c8;
  --text-muted: #a2957a;
  --accent: #d9843c;
  --accent-ink: #1c140a;
  --brass: #c9a35a;
  --tag-best: #c9a35a;
  --tag-alt: #8fae7a;
  --tag-f2p: #6fae9a;
  --shadow: rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "Noto Sans TC", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Arabic", "Noto Sans", -apple-system, sans-serif;
  line-height: 1.65;
  background-image:
    radial-gradient(ellipse at top, var(--bg-texture), var(--bg) 70%);
  min-height: 100vh;
  padding-bottom: 48px;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 16px 0;
}

header.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-eyebrow {
  font-family: "Oswald", "Noto Sans TC", sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.brand-title {
  font-family: "Oswald", "Noto Sans TC", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Arabic", sans-serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0;
  color: var(--text);
}

.top-btns { display: flex; gap: 6px; flex: none; }
.theme-toggle {
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--text-muted);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  flex: none;
  font-size: 15px;
  cursor: pointer;
}

.lang-row,
.guide-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.lang-row { margin-bottom: 20px; }
.guide-row { margin-bottom: 22px; }

.lang-btn {
  flex: none;
  font-family: "Noto Sans TC", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Arabic", "Noto Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.guide-chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.guide-chip.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.guide-chip .emoji { font-size: 16px; }

.doc {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 18px 26px;
  box-shadow: 0 8px 24px var(--shadow);
}

.doc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Oswald", "Noto Sans TC", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 18px;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 14px;
}

.doc-title .emoji { font-size: 26px; }

.section { margin-bottom: 20px; }
.section:last-child { margin-bottom: 0; }

.section h3 {
  font-family: "Oswald", "Noto Sans TC", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Arabic", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--brass);
  margin: 0 0 8px;
  padding-inline-start: 10px;
  border-inline-start: 3px solid var(--accent);
}

.section p { margin: 0 0 8px; color: var(--text); }

.prep-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.prep-list li {
  position: relative;
  padding-inline-start: 22px;
  margin-bottom: 10px;
}

.prep-list li::before {
  content: "▸";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent);
}

.callout {
  background: var(--panel-2);
  border-inline-start: 3px solid var(--brass);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0;
  margin-inline-start: 22px;
  font-size: 14px;
  color: var(--text-muted);
}

.callout a { color: var(--accent); }

.gen-card {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--panel-2);
}

.gen-card .gen-label {
  font-family: "Oswald", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.lineup-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--rule);
}

.lineup-row:first-of-type { border-top: none; }

.lineup-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-family: "Oswald", sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent-ink);
  flex: none;
}

.tag.best { background: var(--tag-best); }
.tag.alt { background: var(--tag-alt); }
.tag.f2p { background: var(--tag-f2p); }

.heroes { font-weight: 600; font-size: 14.5px; }

.ratio {
  font-family: "Oswald", monospace;
  font-size: 13px;
  color: var(--text-muted);
  flex: none;
}

.gen-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  padding-inline-start: 2px;
}

.tbd { color: var(--text-muted); font-size: 13.5px; font-style: italic; }

.joiner-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.joiner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 12px;
}

.joiner-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--rule);
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  color: var(--brass);
}

.joiner-name {
  font-weight: 700;
  font-size: 15px;
}

.joiner-role {
  font-size: 12.5px;
  color: var(--text-muted);
}

.missing-lang {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

footer.note {
  max-width: 620px;
  margin: 18px auto 0;
  padding: 0 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* =========================================================================
   通用區塊（聖劍爭奪等以 blocks 撰寫的攻略）
   ========================================================================= */
h3.section-h {
  font-family: "Oswald", "Noto Sans TC", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Arabic", sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--brass); margin: 24px 0 8px; padding-inline-start: 10px;
  border-inline-start: 3px solid var(--accent);
}
h4.sub-h { font-size: 15px; margin: 16px 0 6px; }
.doc > div > p { margin: 0 0 8px; }
.callout.flat { margin-inline-start: 0; margin-top: 10px; }
.legend { font-size: 12.5px; color: var(--text-muted); margin: 0 0 8px; }

.bld-card, .zone-card, .tl-card {
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; background: var(--panel-2);
}
.bld-head, .tl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bld-name { font-weight: 700; }
.bld-pts { display: grid; gap: 2px; margin: 6px 0; font-size: 14px; }
.bld-pts span { display: inline-block; min-width: 5.5em; margin-inline-end: 0.5em; color: var(--text-muted); font-size: 12.5px; }
.bld-meta { font-size: 12.5px; color: var(--text-muted); }
.tag.pr-top { background: var(--accent); }
.tag.pr-high { background: var(--tag-best); }
.tag.pr-med { background: var(--tag-alt); }

.zone-card { border-inline-start: 4px solid var(--zc, var(--rule)); }
.zone-card ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 14px; }
.zone-title { font-weight: 700; font-size: 14.5px; }
.zone-purple { --zc: #8a5cc2; } .zone-blue { --zc: #3f8fd0; }
.zone-yellow { --zc: #c9a020; } .zone-green { --zc: #5a9a3c; }
.zone-center { --zc: #8a8a8a; }

.tl-head { justify-content: flex-start; font-weight: 700; }
.tl-time { font-family: "Oswald", monospace; color: var(--accent); }
.tl-sub { font-weight: 700; font-size: 13.5px; margin: 8px 0 4px; }
.tl-card .prep-list { margin-top: 6px; }

/* =========================================================================
   RTL（阿拉伯文）與語言列
   ========================================================================= */
.lang-row, .guide-row { direction: ltr; }
[dir="rtl"] .prep-list li::before { content: "◂"; }
html[lang="ar"] * { letter-spacing: 0 !important; }
.tl-time { direction: ltr; unicode-bidi: isolate; }

img.fig { display: block; width: 100%; height: auto; margin: 12px 0; border: 1px solid var(--rule); border-radius: 10px; }

/* Language picker (first screen) */
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; direction: ltr; }
.lang-pick {
  font-family: "Noto Sans TC", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Arabic", "Noto Sans", sans-serif;
  font-size: 16px; font-weight: 600; padding: 14px 10px;
  border-radius: 10px; border: 1px solid var(--rule);
  background: var(--panel-2); color: var(--text); cursor: pointer;
}
.lang-pick:hover, .lang-pick:active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.lang-pick:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Video blocks */
.video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 12px 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
video.fig { display: block; width: 100%; height: auto; max-height: 75vh; margin: 12px 0; border: 1px solid var(--rule); border-radius: 10px; background: #000; }

/* Side menu (guide list) */
.guide-chip.menu-btn { flex: 1; justify-content: flex-start; }
#menuOverlay { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
#menuPanel {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 901;
  width: min(82vw, 320px); display: flex; flex-direction: column; direction: ltr;
  background: var(--panel); border-right: 1px solid var(--rule); box-shadow: 8px 0 24px var(--shadow);
  padding-top: env(safe-area-inset-top);
  transform: translateX(-102%); transition: transform 0.22s ease;
}
body.menu-open #menuOverlay { opacity: 1; pointer-events: auto; }
body.menu-open #menuPanel { transform: translateX(0); }
body.menu-open { overflow: hidden; }
.menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 10px; border-bottom: 1px solid var(--rule);
  font-family: "Oswald", "Noto Sans TC", sans-serif; font-size: 13px; letter-spacing: 0.14em; color: var(--text-muted);
  text-transform: uppercase;
}
.menu-head button { border: 0; background: transparent; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px 8px; }
#menuList { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; text-align: start; width: 100%;
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--panel-2); color: var(--text); font-size: 15px; font-family: inherit; cursor: pointer;
}
.menu-item .emoji { font-size: 18px; }
.menu-item.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }

/* Guide buttons at the top: show all of them, wrap onto several lines (no sideways scrolling) */
.guide-row { flex-wrap: wrap; overflow-x: visible; padding-bottom: 0; }
.guide-row .guide-chip { flex: 0 1 auto; max-width: 100%; text-align: start; }

.guide-link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--panel-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  font-family: inherit;
}
.guide-link-btn .emoji { font-size: 18px; }
.guide-link-btn .arrow { margin-inline-start: auto; color: var(--accent); font-size: 18px; }

.ann-board {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--shadow);
}

.ann-tabs {
  display: flex;
  overflow-x: auto;
  background: var(--panel-2);
  border-bottom: 1px solid var(--rule);
  scrollbar-color: var(--accent) transparent;   /* the sideways bar in our orange instead of black */
  scrollbar-width: thin;
}
.ann-tabs::-webkit-scrollbar { height: 6px; }
.ann-tabs::-webkit-scrollbar-track { background: transparent; }
.ann-tabs::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }
@media (pointer: fine) { .ann-tabs { cursor: grab; } }

.ann-tab {
  flex: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.ann-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.ann-body { padding: 16px 18px; touch-action: pan-y; }   /* sideways swipes go to the next / previous announcement */

.ann-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ann-text { font-size: 14.5px; white-space: pre-wrap; }
/* long titles: the tab shows the start (…), the full title sits on top of the announcement */
.ann-tab { max-width: 13em; overflow: hidden; text-overflow: ellipsis; }
.ann-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; line-height: 1.35; }

.ann-img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.ann-more-label {
  margin: 14px 0 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.ann-link-btn { margin: 0 0 8px; }

.ann-ticker {
  margin-bottom: 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  overflow: hidden;
}

.ann-ticker button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 9px 0;
  overflow: hidden;
}

.ann-ticker-track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  animation: ann-marquee 45s linear infinite;
}

@keyframes ann-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .ann-ticker-track { animation: none; padding-left: 12px; }
}

.chk-wrap { overflow-x: auto; margin: 12px 0; }
.kvk-plan-link { display: inline-block; background: none; font-family: inherit; cursor: pointer; margin: 4px 0 2px; padding: 5px 10px; border: 1px dashed var(--accent); border-radius: 999px; font-size: 13px; color: var(--accent); text-decoration: none; line-height: 1.4; }
.chk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chk-table th, .chk-table td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--rule); }
.chk-table th { color: var(--brass); font-family: "Oswald", sans-serif; font-size: 12px; }
.chk-label { text-align: start !important; font-size: 13.5px; white-space: nowrap; }
.chk-icon { font-size: 16px; }
.chk-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; font-size: 12.5px; color: var(--text-muted); }
.chk-ok {
  display: inline-block;
  background: #2b6cb0;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.4;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.popup-box {
  background: var(--panel);
  color: var(--text, #222);
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.popup-text {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.popup-text strong {
  color: var(--accent, #2b6cb0);
}
.popup-confirm-btn {
  background: var(--accent, #2b6cb0);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1rem;
  cursor: pointer;
}
.popup-confirm-btn:hover {
  filter: brightness(1.1);
}

.lineup-img {
  display: block;
  max-width: 180px;
  height: auto;
  margin: 6px 0 4px;
}

.joiner-avatar { overflow: hidden; }
.joiner-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:8px 0 12px;}
.info-card{border:1px solid rgba(0,0,0,.12);border-radius:10px;overflow:hidden;background:rgba(255,255,255,.04);}
.info-card-img{display:block;width:100%;height:auto;}
.info-card-body{padding:8px 10px 10px;}
.info-card-title{font-weight:700;font-size:1.05em;}
.info-card-meta{font-size:.85em;opacity:.75;margin:2px 0 6px;}
.info-card-body .prep-list{margin:0;padding-inline-start:18px;}

.ann-ticker-item{display:inline-block;margin-right:6em;cursor:pointer;}
.ann-ticker-item:hover{text-decoration:underline;}

html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
.ann-ticker-item{font-size:inherit;white-space:nowrap;line-height:1.4;vertical-align:middle;}

/* ---- Hero cards ---- */
.hc-filters{display:flex;flex-direction:column;gap:8px;margin:8px 0 14px;}
.hc-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.hc-chip{padding:5px 12px;border-radius:999px;border:1px solid var(--rule);background:var(--panel);color:var(--text);font:inherit;font-size:.92em;cursor:pointer;}
.hc-chip.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:700;}
.hc-role select{padding:5px 8px;border-radius:8px;border:1px solid var(--rule);background:var(--panel);color:var(--text);font:inherit;max-width:100%;}
.hc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;}
.hc-card{border:1px solid var(--rule);border-radius:14px;overflow:hidden;background:var(--panel);box-shadow:0 3px 10px var(--shadow);display:flex;flex-direction:column;}
.hc-art{position:relative;aspect-ratio:480/476;background:linear-gradient(#7fa6bd,#4f7488);}
.hc-art img{display:block;width:100%;height:100%;object-fit:cover;}
.hc-head{position:absolute;inset:auto 0 0 0;padding:28px 10px 8px;background:linear-gradient(transparent,rgba(0,0,0,.72));color:#fff;}
.hc-name{font-weight:800;font-size:1.3em;text-shadow:0 1px 3px rgba(0,0,0,.6);}
.hc-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;}
.hc-tag{font-size:.75em;padding:1px 7px;border-radius:6px;background:rgba(255,255,255,.18);backdrop-filter:blur(2px);}
.hc-tag.r-SSR{background:#e3a91e;color:#3a2600;font-weight:800;}
.hc-tag.r-SR{background:#9b6be0;color:#fff;font-weight:800;}
.hc-tag.r-R{background:#3a9ad9;color:#fff;font-weight:800;}
.hc-body{padding:10px 12px 12px;}
.hc-roles{list-style:none;margin:0 0 8px;padding:0;border:1px solid var(--rule);border-radius:10px;overflow:hidden;font-size:.9em;}
.hc-roles li{display:flex;justify-content:space-between;gap:8px;padding:4px 10px;border-bottom:1px solid var(--rule);}
.hc-roles li:last-child{border-bottom:0;}
.hc-roles li.hl{background:color-mix(in srgb,var(--accent) 18%,transparent);font-weight:700;}
.hc-v{white-space:nowrap;}
.hc-stars{color:#e3a91e;letter-spacing:1px;}
.hc-body .prep-list{margin:0;padding-inline-start:18px;font-size:.92em;}
.hc-quip{margin:8px 0 0;font-style:italic;color:var(--text-muted);font-size:.9em;}
.hc-note{margin:0 0 8px;color:var(--text-muted);font-size:.9em;}
.lt { color: var(--text-muted); font-size: 0.9em; white-space: nowrap; }

/* ---- home page: "Today & this week" card ---- */
.today-card { border: 2px solid var(--accent); border-radius: 14px; padding: 12px 12px 6px; margin: 0 0 18px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.today-card .td-title { font-weight: 800; font-size: 17px; margin-bottom: 4px; }
.today-card .td-h { font-size: 12.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 4px; }
.today-card .td-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 10px; margin: 0 0 6px; border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.today-card .td-row .emoji { font-size: 22px; }
.today-card .td-row .arrow { margin-inline-start: auto; color: var(--accent); font-size: 18px; }
.today-card .td-main { display: flex; flex-direction: column; min-width: 0; }
.today-card .td-meta { font-size: 13px; color: var(--text-muted); }
.today-card .td-time { font-size: 13px; font-weight: 600; }
.today-card .td-loc { font-weight: 400; color: var(--text-muted); }
.today-card .td-none { font-size: 14px; color: var(--text-muted); padding: 6px 0 8px; }
/* 📆 month calendar */
.month-card { border-color: var(--rule); background: var(--panel); padding-bottom: 8px; }
.month-card .cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-card .cal-nav { display: flex; direction: ltr; align-items: center; gap: 6px; font-size: 14px; }
.month-card .cal-nav button { width: 30px; height: 30px; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); color: var(--accent); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.month-card .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 6px 0 2px; }
.month-card .cal-w { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 2px 0; }
.month-card .cal-d { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 46px; padding: 3px 1px; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.month-card .cal-d.pad { border-color: transparent; background: transparent; cursor: default; }
.month-card .cal-d .n { font-size: 12px; font-weight: 600; color: var(--text-muted); line-height: 1.1; }
.month-card .cal-d .e { font-size: 13px; line-height: 1.15; letter-spacing: -1px; text-align: center; word-break: break-all; }
.month-card .cal-d .e i { font-style: normal; }
.month-card .cal-d .e i.s { opacity: .3; }   /* event running, but not its battle day */
.month-card .cal-d.bear .n::after { content: "·"; color: var(--accent); margin-inline-start: 1px; }
.month-card .cal-d.today .n { color: var(--accent); font-weight: 800; }
.month-card .cal-d.pick { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.guide-link-btn.sub-back { width: auto; display: inline-flex; margin: 0 0 10px; padding: 6px 12px; font-size: 14px; }
.ratio-card { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px 4px; margin: 0 0 16px; background: var(--panel-2); }
.ratio-card .td-title { font-weight: 800; margin-bottom: 6px; }
.ratio-card .rc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.ratio-card .rc-main { flex: 1; min-width: 0; font-size: 14px; }
.ratio-card .rc-r { color: var(--text-muted); font-size: 12.5px; }
.ratio-card .rc-n { font-variant-numeric: tabular-nums; font-size: 13.5px; margin-top: 2px; }
.ratio-card .rc-copy { border: 1px solid var(--accent); background: transparent; color: var(--text); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }

.key-points { border: 1px solid var(--accent); border-radius: 12px; padding: 10px 14px 6px; margin: 0 0 16px; background: var(--panel-2); }
.key-points .kp-title { font-weight: 800; margin-bottom: 4px; }
.key-points ul { margin: 0; padding-inline-start: 20px; }
.key-points li { margin: 0 0 6px; line-height: 1.5; }

.jump-card { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; margin: 0 0 16px; background: var(--panel-2); }
.jump-card .jc-title { font-weight: 800; margin-bottom: 8px; }
.jump-card .jc-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.jump-card button { border: 1px solid var(--accent); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.jump-card button:hover { background: var(--accent); color: #fff; }
.jump-target { scroll-margin-top: 80px; }
.jump-flash { animation: jumpflash 1.8s ease-out; border-radius: 8px; }
@keyframes jumpflash { 0%, 30% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 4px transparent; } }

/* ✅ Daily checklist card (General Tips) — tick per device, cleared at 00:00 UTC */
.daily-card { scroll-margin-top: 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); box-shadow: 0 8px 24px var(--shadow); padding: 14px 16px; margin: 6px 0 18px; }
.daily-card .dl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 16px; }
.daily-card .dl-count { font-weight: 700; color: var(--accent); white-space: nowrap; }
.daily-card .dl-bar { height: 6px; border-radius: 6px; background: var(--panel-2); margin: 8px 0 4px; overflow: hidden; }
.daily-card .dl-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .25s; }
.daily-card .dl-all { font-weight: 700; color: var(--accent); margin: 6px 0 2px; }
.daily-card .dl-sub { font-weight: 700; font-size: 14px; margin: 12px 0 4px; }
.daily-card .dl-item { display: flex; gap: 10px; align-items: flex-start; padding: 6px 2px; font-size: 14.5px; line-height: 1.45; cursor: pointer; border-bottom: 1px dashed var(--rule); }
.daily-card .dl-item:last-of-type { border-bottom: 0; }
.daily-card .dl-item input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.daily-card .dl-item input:checked + span { color: var(--text-muted); text-decoration: line-through; }
.daily-card .dl-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* jump-to-section button at the top of a guide (e.g. KvK → Nov 9 push plan) */
.guide-link-btn.jump-btn { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); font-weight: 700; margin-bottom: 14px; }
h3.section-h[id] { scroll-margin-top: 70px; }

/* 🧮 bear calculator link inside the Bear Hunt row of the This-week card (lines up with the row text) */
.today-card .td-bt { display: inline-flex; align-items: center; align-self: flex-start; margin-top: 6px; padding: 3px 10px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.month-card .cal-nav .cal-todaybtn { height: 30px !important; line-height: 1 !important; width: auto !important; padding: 2px 10px !important; margin-inline-start: 6px; border-radius: 999px; background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; font-size: 12.5px; font-weight: 700; }

/* every button visibly sinks when tapped */
button, .btn, .guide-chip, .td-row { transition: transform .08s, filter .08s; }
button:active:not(:disabled), .btn:active, .guide-chip:active { transform: scale(.95); filter: brightness(.88); }
