/* GameGuidePro — mobile-first, zero-framework UI */
:root {
  --bg: #0c0f1d;
  --bg-soft: #11162a;
  --card: #171d33;
  --card-2: #1d2440;
  --text: #edf0f8;
  --muted: #a8b0c7;
  --brand: #6c93ff;
  --brand-2: #9a6cff;
  --accent: #ffd166;
  --good: #55d6a0;
  --line: #2a3152;
  --shadow: 0 14px 40px rgba(0, 0, 0, .28);
  --radius: 16px;
  --maxw: 1120px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 76px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  min-height: 100vh;
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(108, 147, 255, .22), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(154, 108, 255, .16), transparent 30rem),
    var(--bg);
  word-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid rgba(108, 147, 255, .65); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; }
.sr-only {
  position: absolute; 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: 12px; top: 12px; z-index: 100;
  transform: translateY(calc(-100% - 18px));
  background: #fff; color: #111; padding: 9px 14px; border-radius: 8px;
  font-weight: 700;
  transition: transform .15s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); text-decoration: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 15, 29, .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(42, 49, 82, .85);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: rgba(12, 15, 29, .97); }
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; }
.brand { font-weight: 900; font-size: 20px; color: #fff; letter-spacing: -.02em; touch-action: manipulation; }
.brand:hover { text-decoration: none; }
.brand span {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 22px; list-style: none; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 700; padding: 8px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; text-decoration: none; }
.nav-links a[aria-current="page"] { position: relative; }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 25px; line-height: 1; cursor: pointer; padding: 8px 10px; touch-action: manipulation; }
@media (max-width: 760px) {
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(12, 15, 29, .97);
  }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 60px; left: 0; right: 0;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(17, 22, 42, .98); border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), visibility 0s linear .16s;
  }
  .nav-links.open {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
    transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), visibility 0s;
  }
  .nav-links a { display: block; padding: 12px 4px; border-bottom: 1px solid rgba(42, 49, 82, .65); }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a[aria-current="page"]::after { display: none; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .nav-links, .nav-links.open { transform: none; transition: opacity .01ms; }
}

/* Hero */
.hero { padding: 64px 0 34px; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 5px 12px;
  color: #cdd8ff; background: rgba(108, 147, 255, .13);
  border: 1px solid rgba(108, 147, 255, .25); border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 { max-width: 780px; margin: 0 auto 14px; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.08; letter-spacing: -.045em; }
.hero p { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); }
.searchbox { max-width: 650px; margin: 24px auto 0; }
.searchbox input {
  width: 100%; color: var(--text); background: rgba(255, 255, 255, .055);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.searchbox input::placeholder { color: #828ba6; }
.searchbox input:focus { background: rgba(255, 255, 255, .08); border-color: var(--brand); }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; list-style: none; }
.stats li {
  min-width: 118px; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 14px; background: rgba(255, 255, 255, .035);
}
.stats strong { display: block; font-size: 22px; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* Sections */
.section { padding: 30px 0; }
.section h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.2; margin-bottom: 8px; letter-spacing: -.02em; }
.meta { color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .grid { grid-template-columns: repeat(3, 1fr); } }

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  transition: transform .16s var(--ease-out), border-color .16s var(--ease-out);
}
.card a { color: inherit; text-decoration: none; display: block; height: 100%; touch-action: manipulation; }
.thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--card-2); }
.body { padding: 16px 17px 18px; }
.card h2, .card h3 { color: #fff; font-size: 17px; line-height: 1.3; margin: 7px 0 7px; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: 14px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; color: var(--accent);
  background: rgba(255, 209, 102, .11); border: 1px solid rgba(255, 209, 102, .18);
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
}
.tag a { color: inherit; }
.card-link { display: inline-block; margin-top: 13px; color: #b8c8ff; font-size: 13px; font-weight: 800; }
.feature { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.035); }
.feature h3 { margin-bottom: 7px; font-size: 16px; }
.feature p { color: var(--muted); font-size: 14px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-4px); border-color: rgba(108, 147, 255, .75); }
}
@media (hover: none) and (pointer: coarse) {
  .card:active { transform: scale(.995); }
}

/* Guide lists */
.guide-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.guide-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; color: inherit; background: rgba(255,255,255,.035);
  border: 1px solid var(--line); border-radius: 14px; touch-action: manipulation;
  transition: background-color .14s var(--ease-out), border-color .14s var(--ease-out), transform .14s var(--ease-out);
}
.guide-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.guide-game { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.guide-title { color: #fff; font-weight: 750; line-height: 1.35; }
.guide-row small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 3px; }
.guide-meta { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 700; }
.guide-row[hidden], .guide-card[hidden] { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  .guide-row:hover {
    text-decoration: none; border-color: rgba(108, 147, 255, .65);
    background: rgba(108, 147, 255, .08);
  }
}
@media (hover: none) and (pointer: coarse) {
  .guide-row:active { transform: scale(.997); border-color: rgba(108, 147, 255, .55); }
}
@media (max-width: 560px) {
  .guide-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .guide-meta { align-self: flex-end; }
}

/* Content pages */
.layout { display: grid; gap: 26px; grid-template-columns: 1fr; padding: 8px 0 30px; }
@media (min-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.sidebar { align-self: start; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 980px) { .sidebar { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; padding-right: 2px; } }
.side-box { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-box h2 { font-size: 14px; margin-bottom: 9px; color: #fff; }
.side-links { list-style: none; }
.side-links li { padding: 7px 0; border-bottom: 1px solid rgba(42, 49, 82, .7); font-size: 14px; }
.side-links li:last-child { border-bottom: 0; }
.article {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.018)), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 8px 28px rgba(0,0,0,.15);
}
.article > .tag { margin-bottom: 14px; }
.article h1 { font-size: clamp(1.75rem, 4vw, 2.45rem); line-height: 1.18; letter-spacing: -.035em; margin-bottom: 12px; }
.article h2 { font-size: clamp(1.3rem, 3vw, 1.62rem); margin: 30px 0 10px; line-height: 1.25; scroll-margin-top: 80px; }
.article h3 { font-size: 1.13rem; margin: 22px 0 8px; }
.article p, .article ul, .article ol { margin: 12px 0; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 7px 0; }
.article blockquote {
  border-left: 4px solid var(--brand-2); background: rgba(154, 108, 255, .09);
  padding: 12px 15px; margin: 16px 0; color: #c8cee2; border-radius: 0 10px 10px 0;
}
.article code { background: #0a0d19; border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.article img { border-radius: 12px; margin: 16px 0; }
.lead { font-size: 1.12rem; color: #d5dbee; }
.game-cover { border: 1px solid var(--line); margin: 20px 0; }
.checklist { list-style: none; padding-left: 0 !important; display: grid; gap: 8px; margin: 14px 0; }
.checklist li { position: relative; padding-left: 30px; margin: 0 !important; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: .02em; width: 21px; height: 21px;
  display: grid; place-items: center; border-radius: 50%;
  color: #06251a; background: var(--good); font-size: 13px; font-weight: 900;
}
.related { padding-left: 0; }
.mt { margin-top: 22px; }

/* Breadcrumb */
.breadcrumb { padding: 18px 0 2px; color: var(--muted); font-size: 13px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.breadcrumb li::after { content: "/"; margin-left: 7px; color: var(--line); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: #fff; }

/* Ads */
.ad { margin: 24px 0; text-align: center; min-height: 90px; background: rgba(255,255,255,.025);
  border: 1px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad ins { width: 100%; }
.ad-anchor {
  position: fixed; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom)); z-index: 60; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 5px; box-shadow: var(--shadow);
  animation: ad-slide-in .2s var(--ease-out) both;
}
.ad-anchor.closing { animation: ad-slide-out .14s ease-in both; }
.ad-anchor .close { position: absolute; top: 2px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; touch-action: manipulation; }
body.has-anchor { padding-bottom: 78px; }
@keyframes ad-slide-in {
  from { opacity: 0; transform: translateY(calc(100% + 16px)); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ad-slide-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(calc(100% + 16px)); }
}

/* Buttons + footer */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  padding: 11px 18px; font-weight: 800; font-size: 14px; min-height: 44px;
  box-shadow: 0 10px 24px rgba(91, 113, 255, .22);
  touch-action: manipulation;
  transition: transform .15s var(--ease-out), opacity .15s var(--ease-out),
    border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { text-decoration: none; opacity: .94; transform: translateY(-1px); }
}
.btn:active { transform: translateY(0) scale(.98); }
.btn-secondary { background: rgba(255,255,255,.07); box-shadow: none; border-color: var(--line); }
.site-footer { border-top: 1px solid var(--line); margin-top: 54px; padding: 32px 0; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: #fff; }
/* Reading progress */
.reading-progress {
  position: fixed; top: 60px; left: 0; right: 0; z-index: 49;
  height: 3px; background: rgba(42, 49, 82, .72); pointer-events: none;
}
.reading-progress span {
  display: block; width: 100%; height: 100%;
  transform: scaleX(0); transform-origin: left center;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent));
}

/* Lightweight entrance motion */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise-in .22s var(--ease-out) both; }
  .hero > *:nth-child(2) { animation-delay: .03s; }
  .hero > *:nth-child(3) { animation-delay: .06s; }
  .hero > *:nth-child(4) { animation-delay: .09s; }
  .hero > *:nth-child(5) { animation-delay: .11s; }
  .hero > *:nth-child(6) { animation-delay: .13s; }
  .hero > *:nth-child(7) { animation-delay: .15s; }
  #games .card { animation: rise-in .24s var(--ease-out) both; }
  #games .card:nth-child(2) { animation-delay: .05s; }
  #games .card:nth-child(3) { animation-delay: .1s; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Guide facts and challenges */
.guide-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin: 18px 0 8px;
}
.fact {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .035); min-width: 0;
}
.fact span {
  display: block; color: var(--muted); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px;
}
.fact strong { display: block; color: #fff; font-size: 14px; line-height: 1.3; }
.challenge {
  margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 209, 102, .28); background: rgba(255, 209, 102, .09);
  color: #f7e8bd;
}
@media (max-width: 620px) { .guide-facts { grid-template-columns: 1fr; } }

/* Table of contents */
.toc {
  margin: 18px 0 24px; padding: 15px 18px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, .035);
}
.toc-title {
  margin: 0 0 7px !important; color: #fff; font-size: 14px;
  font-weight: 900; text-transform: uppercase; letter-spacing: .05em;
}
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 30px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: #c7d3ff; font-size: 14px; }
@media (max-width: 700px) { .toc ol { columns: 1; } }

/* 30-second quick card */
.quick-card {
  position: relative;
  margin: 20px 0 22px;
  padding: 17px 18px 15px;
  border: 1px solid rgba(108, 147, 255, .32);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(108, 147, 255, .16), rgba(154, 108, 255, .08)),
    rgba(255, 255, 255, .035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.quick-card::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 4px; border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2), var(--accent));
}
.quick-kicker {
  margin: 0 0 5px !important;
  color: #c9d6ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.quick-summary {
  margin: 0 0 10px !important;
  color: #eef2ff;
  font-size: 14px;
  line-height: 1.55;
}
.quick-card ul {
  margin: 0 !important;
  padding-left: 20px !important;
  display: grid;
  gap: 5px;
}
.quick-card li {
  margin: 0 !important;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.quick-card li::marker { color: var(--accent); }
/* Callouts */
.callout {
  margin: 18px 0; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
}
.callout p { margin: 0; }
.callout-label {
  margin: 0 0 5px !important; font-size: 12px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
}
.callout-fun-challenge { border-color: rgba(255, 209, 102, .34); background: rgba(255, 209, 102, .09); }
.callout-fun-challenge .callout-label { color: var(--accent); }
.callout-pro-move { border-color: rgba(108, 147, 255, .34); background: rgba(108, 147, 255, .09); }
.callout-pro-move .callout-label { color: #b9caff; }
.callout-quick-decision { border-color: rgba(85, 214, 160, .32); background: rgba(85, 214, 160, .08); }
.callout-quick-decision .callout-label { color: var(--good); }

/* Markdown tables */
.table-wrap { margin: 16px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.article table, .table-wrap table {
  width: 100%; min-width: 560px; border-collapse: collapse;
  margin: 0 !important; font-size: 14px; background: rgba(255,255,255,.025);
}
.table-wrap th, .table-wrap td {
  padding: 11px 13px; text-align: left; vertical-align: top;
  border-bottom: 1px solid rgba(42, 49, 82, .85);
}
.table-wrap th { color: #fff; background: rgba(108, 147, 255, .11); font-weight: 900; }
.table-wrap tr:last-child td { border-bottom: 0; }

/* Prev/next guide navigation */
.pager {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin: 22px 0 4px;
}
.pager-link {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px;
  color: inherit; background: rgba(255,255,255,.035);
  transition: border-color .14s var(--ease-out), background-color .14s var(--ease-out), transform .14s var(--ease-out);
}
.pager-link:hover { text-decoration: none; border-color: rgba(108,147,255,.65); background: rgba(108,147,255,.08); }
.pager-link span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.pager-link strong { color: #fff; font-size: 14px; line-height: 1.35; }
.pager-next { text-align: right; }
.pager-placeholder { visibility: hidden; }
@media (max-width: 620px) { .pager { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* Continue exploring and recent local reading history */
.continue-reading { border-top: 1px solid rgba(42,49,82,.65); }
.continue-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 8px;
}
.continue-head h2 { margin: 4px 0 0; }
.continue-head .meta { max-width: 430px; margin: 0; text-align: right; }
.continue-row { border-color: rgba(108,147,255,.25); }
.continue-row .guide-meta { color: #b8c8ff; font-weight: 900; }
@media (max-width: 720px) {
  .continue-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .continue-head .meta { text-align: left; }
}
/* Player checklist, saved guides, and local progress */
.guide-badges {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px;
}
.badge {
  display: none; align-items: center; border-radius: 999px;
  padding: 2px 8px; font-size: 10px; font-weight: 900;
  letter-spacing: .05em; text-transform: uppercase;
}
.badge-saved { color: #c8d6ff; background: rgba(108, 147, 255, .16); border: 1px solid rgba(108, 147, 255, .28); }
.badge-cleared { color: #c5ffe8; background: rgba(85, 214, 160, .14); border: 1px solid rgba(85, 214, 160, .28); }
.catalog-guide.is-saved { border-color: rgba(108, 147, 255, .68); }
.catalog-guide.is-completed { border-color: rgba(85, 214, 160, .58); background: rgba(85, 214, 160, .045); }
.catalog-guide.is-saved .badge-saved,
.catalog-guide.is-completed .badge-cleared { display: inline-flex; }

.player-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 18px 0 8px; padding: 15px 16px; border-radius: 16px;
  border: 1px solid rgba(108, 147, 255, .28);
  background: linear-gradient(135deg, rgba(108, 147, 255, .12), rgba(154, 108, 255, .07)), rgba(255,255,255,.03);
}
.tool-kicker {
  margin: 0 0 2px !important; color: #c9d6ff; font-size: 11px; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase;
}
.tool-text { margin: 0 !important; color: var(--muted); font-size: 13px; line-height: 1.45; }
.tool-actions { display: flex; flex: 0 0 auto; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.tool-button {
  min-height: 42px; border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 13px; color: var(--text); background: rgba(255,255,255,.07);
  font-size: 13px; font-weight: 850; cursor: pointer; touch-action: manipulation;
  transition: transform .14s var(--ease-out), border-color .14s var(--ease-out), background-color .14s var(--ease-out);
}
.tool-button:active { transform: scale(.98); }
.tool-button.is-active { border-color: rgba(108,147,255,.7); background: rgba(108,147,255,.22); color: #fff; }
.tool-button-success.is-active { border-color: rgba(85,214,160,.72); background: rgba(85,214,160,.2); color: #dffff2; }

.progress-card {
  margin: 20px 0 2px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 16px; background: rgba(255,255,255,.035);
}
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.progress-heading strong { font-size: 16px; color: #fff; }
.progress-percent { color: var(--accent); font-weight: 900; }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); margin: 11px 0 8px; }
.progress-track span {
  display: block; width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--good));
  transition: width .28s var(--ease-out);
}
.player-dashboard { border-top: 1px solid rgba(42,49,82,.65); }
.dashboard-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin: 16px 0;
}
.dashboard-stats div {
  padding: 13px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,.035); text-align: center;
}
.dashboard-stats strong { display: block; color: #fff; font-size: 24px; line-height: 1; }
.dashboard-stats span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.dashboard-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 16px; }
.dashboard-columns h3 { font-size: 14px; margin: 0 0 9px; color: #fff; }
.dashboard-empty { margin: 4px 0 !important; }
.dashboard-reset { min-height: 40px; padding: 8px 13px; }
@media (max-width: 720px) {
  .player-tools { align-items: stretch; flex-direction: column; }
  .tool-actions { justify-content: stretch; }
  .tool-button { flex: 1 1 auto; }
  .dashboard-columns { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .dashboard-stats { grid-template-columns: 1fr; }
}

/* Daily mini challenge and local badges */
.daily-challenge {
  padding-top: 12px;
}
.daily-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 22px; padding: clamp(20px, 4vw, 28px);
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% -20%, rgba(255, 209, 102, .20), transparent 18rem),
    linear-gradient(135deg, rgba(108, 147, 255, .15), rgba(154, 108, 255, .10)),
    rgba(255,255,255,.035);
  box-shadow: 0 14px 42px rgba(0,0,0,.18);
}
.daily-copy h2 { margin: 0 0 9px; color: #fff; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.025em; }
.daily-task { color: #eef2ff; margin: 0 0 10px; }
.daily-copy .meta { margin: 0; }
.daily-side { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.daily-date {
  margin: 0 !important; color: var(--accent); font-size: 12px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .08em;
}
.daily-actions { display: flex; flex-direction: column; gap: 10px; }
.daily-actions .btn { width: 100%; }
.daily-card.is-complete { border-color: rgba(85, 214, 160, .52); }
.daily-card.is-complete .daily-date { color: var(--good); }
.daily-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin-top: 14px;
}
.daily-stats div {
  padding: 12px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,.035); text-align: center;
}
.daily-stats strong { display: block; color: #fff; font-size: 22px; line-height: 1; }
.daily-stats span {
  display: block; margin-top: 4px; color: var(--muted); font-size: 11px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
}
.daily-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.daily-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: rgba(255,255,255,.03);
  font-size: 12px; font-weight: 850;
}
.daily-badge .badge-icon {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(255,255,255,.08); font-size: 11px; font-weight: 900;
}
.daily-badge.is-unlocked {
  color: #fff5d4; border-color: rgba(255, 209, 102, .55);
  background: rgba(255, 209, 102, .12);
}
.daily-badge.is-unlocked .badge-icon { background: var(--accent); color: #251a05; }

.daily-roadmap {
  margin-top: 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255,255,255,.03);
}
.daily-roadmap-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; margin-bottom: 12px;
}
.daily-roadmap-head .tool-kicker { margin-bottom: 3px; }
.daily-roadmap-head h3 { margin: 0; color: #fff; font-size: 15px; }
.daily-roadmap-count {
  flex: 0 0 auto; margin: 0 !important; color: var(--muted);
  font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em;
}
.daily-roadmap-count strong { color: #fff; font-size: 22px; margin-right: 3px; }
.daily-roadmap-meter {
  height: 6px; margin: -2px 0 12px; overflow: hidden;
  border-radius: 999px; background: rgba(255,255,255,.08);
}
.daily-roadmap-meter span {
  display: block; width: 0; height: 100%;
  border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .32s var(--ease-out);
}
.daily-week {
  display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 9px; margin: 0; padding: 0 0 3px; list-style: none;
  overflow-x: auto; scroll-snap-type: x proximity;
}
.daily-week-item { min-width: 120px; scroll-snap-align: start; }
.daily-week-link {
  display: flex; flex-direction: column; gap: 5px; min-height: 138px;
  padding: 12px; border: 1px solid var(--line); border-radius: 15px;
  color: inherit; text-decoration: none; background: rgba(255,255,255,.025);
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out), transform .2s var(--ease-out);
}
.daily-week-link:hover { border-color: rgba(255,209,102,.42); background: rgba(255,209,102,.055); transform: translateY(-1px); }
.daily-week-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.daily-week-day { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.daily-week-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: #fff; font-size: 12.5px; line-height: 1.35;
}
.daily-week-game { color: var(--muted); font-size: 11px; font-weight: 750; }
.daily-week-status { margin-top: auto; color: var(--muted); font-size: 11px; font-weight: 900; }
.daily-week-item.is-today .daily-week-link {
  border-color: rgba(255,209,102,.65);
  background: linear-gradient(135deg, rgba(255,209,102,.14), rgba(108,147,255,.07));
  box-shadow: 0 8px 24px rgba(255,209,102,.08);
}
.daily-week-item.is-today .daily-week-status { color: var(--accent); }
.daily-week-item.is-complete .daily-week-link { border-color: rgba(85,214,160,.52); background: rgba(85,214,160,.075); }
.daily-week-item.is-complete .daily-week-status { color: var(--good); }
.daily-week-item.is-past { opacity: .68; }
@media (prefers-reduced-motion: no-preference) {
  .daily-badge.is-unlocked { animation: badge-pop .32s var(--ease-out) both; }
  @keyframes badge-pop {
    from { opacity: .4; transform: scale(.92); }
    to { opacity: 1; transform: scale(1); }
  }
}
@media (max-width: 760px) {
  .daily-card { grid-template-columns: 1fr; }
  .daily-side { justify-content: stretch; }
  .daily-roadmap-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .daily-week { grid-template-columns: repeat(7, minmax(148px, 1fr)); }
}
@media (max-width: 520px) {
  .daily-stats { grid-template-columns: 1fr; }
}

.language-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 14px 0 20px; padding: 11px 14px;
  border: 1px solid rgba(108, 147, 255, .32); border-radius: 14px;
  background: rgba(108, 147, 255, .09); color: #dfe6ff;
}
.language-notice span { font-size: 13px; line-height: 1.45; }
.language-notice a { flex: 0 0 auto; color: #fff; font-size: 13px; font-weight: 850; }
.daily-save-note {
  margin: 9px 0 0 !important; color: var(--muted);
  font-size: 11px; line-height: 1.4; text-align: right;
}
.daily-save-note.is-saved { color: #8ee6c2; }
.daily-save-note.is-warning { color: #ffb4a2; }
@media (max-width: 760px) {
  .language-notice { align-items: flex-start; flex-direction: column; }
  .daily-save-note { text-align: left; }
}

.guide-lang-chip {
  display: inline-flex; align-items: center; margin-left: 7px;
  padding: 1px 7px; border-radius: 999px; vertical-align: middle;
  font-size: 9px; font-weight: 900; letter-spacing: .06em;
}
.guide-lang-chip.is-chinese {
  color: #dffff2; background: rgba(85, 214, 160, .15);
  border: 1px solid rgba(85, 214, 160, .28);
}
.guide-lang-chip.is-english {
  color: #dfe6ff; background: rgba(108, 147, 255, .14);
  border: 1px solid rgba(108, 147, 255, .26);
}
