:root {
  --bg: #f4f8f7;
  --bg-2: #e9f3f0;
  --surface: #ffffff;
  --surface-2: #f8fbfa;
  --ink: #0e2a32;
  --ink-2: #3c5a62;
  --muted: #647f86;
  --line: #d8e6e2;
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --brand-ink: #043a36;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --shadow: 0 10px 30px -12px rgba(9, 50, 58, .22);
  --shadow-lg: 0 30px 70px -30px rgba(9, 50, 58, .35);
  --radius: 18px;
  --radius-sm: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --max: 1180px;
}
[data-theme="forest"] { --bg:#f2f7ee; --bg-2:#e3efd9; --surface:#fffef8; --surface-2:#f8fbf1; --ink:#1d2c1a; --ink-2:#3f523a; --muted:#61755b; --line:#dbe7d2; --brand:#3f6212; --brand-2:#65a30d; --accent:#d97706; }
[data-theme="dusk"] { --bg:#111827; --bg-2:#0b1220; --surface:#182233; --surface-2:#1e2a3d; --ink:#eef4ff; --ink-2:#c3d0e3; --muted:#93a4bd; --line:#2c3a51; --brand:#5eead4; --brand-2:#2dd4bf; --brand-ink:#042f2e; --accent:#fbbf24; --accent-soft:#3a2f10; --shadow:0 10px 30px -12px rgba(0,0,0,.5); --shadow-lg:0 30px 70px -30px rgba(0,0,0,.7); }
[data-theme="sand"] { --bg:#fbf6ef; --bg-2:#f4eadb; --surface:#fffdf9; --surface-2:#fdf8f1; --ink:#33291f; --ink-2:#584a3b; --muted:#82705c; --line:#e9dece; --brand:#9a3412; --brand-2:#ea580c; --brand-ink:#fff7ed; --accent:#0f766e; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 3px; }
img, svg, canvas { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.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; }
.noscript { padding: 2rem; text-align: center; }

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 68px; flex-wrap: nowrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(145deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -6px var(--brand); }
.brand-mark svg { width: 21px; height: 21px; }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a.navlink { color: var(--ink-2); text-decoration: none; padding: .4rem .55rem; border-radius: 9px; font-size: .88rem; font-weight: 550; white-space: nowrap; }
.nav a.navlink:hover, .nav a.navlink[aria-current="page"] { background: var(--bg-2); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.chip.xp { background: var(--accent-soft); border-color: transparent; color: var(--warn); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(150deg, #ccfbf1, #5eead4); display: grid; place-items: center; font-size: 19px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.btn.menu-btn { display: none; }
.icon-btn { padding: .45rem .55rem; font-size: 1.05rem; line-height: 1; }
footer.site-footer { margin-top: 5rem; border-top: 1px solid var(--line); background: var(--surface-2); padding: 3rem 0 2rem; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer-grid h4 { color: var(--ink); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
.footer-grid a { color: var(--muted); display: block; text-decoration: none; padding: .2rem 0; }
.footer-grid a:hover { color: var(--brand); }
.disclaimer-bar { margin-top: 2rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: .86rem; border: 1px solid color-mix(in srgb, var(--warn) 22%, transparent); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: 12px; border: 1px solid transparent; background: var(--brand); color: #fff; font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px var(--brand); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn.danger { background: var(--danger); }
.btn.small { padding: .42rem .75rem; font-size: .85rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.accent { background: var(--accent); color: #3b2500; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 4.5rem 0 3rem; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 420px at 78% -10%, color-mix(in srgb, var(--brand-2) 26%, transparent), transparent 65%), radial-gradient(700px 400px at 0% 110%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--brand); letter-spacing: .02em; margin-bottom: 1.1rem; }
.hero h1 em { font-style: normal; color: var(--brand); background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 1.12rem; color: var(--ink-2); max-width: 34rem; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.hero-note { font-size: .82rem; color: var(--muted); display: flex; gap: .4rem; align-items: flex-start; }
.hero-art { position: relative; aspect-ratio: 1 / .92; border-radius: 30px; background: linear-gradient(160deg, #d7f3ee 0%, #b9e7e0 40%, #7dd3c7 100%); box-shadow: var(--shadow-lg); overflow: hidden; }
[data-theme="dusk"] .hero-art { background: linear-gradient(160deg, #0f2e33, #123c43 45%, #0b6b63); }
.island-float { position: absolute; border-radius: 22px; background: color-mix(in srgb, #fff 78%, transparent); backdrop-filter: blur(6px); padding: .8rem; box-shadow: 0 12px 30px -14px rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.7); animation: float 7s ease-in-out infinite; width: 46%; }
.island-float:nth-child(1) { top: 8%; left: 6%; }
.island-float:nth-child(2) { top: 33%; right: 5%; animation-delay: -1.4s; }
.island-float:nth-child(3) { bottom: 6%; left: 12%; animation-delay: -2.6s; }
.island-float .mini-island { height: 74px; border-radius: 14px; background: linear-gradient(160deg, #fef3c7, #fdba74); display: grid; place-items: center; font-size: 2rem; margin-bottom: .5rem; }
.island-float:nth-child(2) .mini-island { background: linear-gradient(160deg, #e0f2fe, #7dd3fc); }
.island-float:nth-child(3) .mini-island { background: linear-gradient(160deg, #ede9fe, #c4b5fd); }
.island-float b { font-size: .82rem; display: block; color: #123c43; }
.island-float span { font-size: .7rem; color: #3c5a62; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* sections */
.section { padding: 3.2rem 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.section-head p { color: var(--muted); margin: 0; max-width: 42rem; }
.grid { display: grid; gap: 1.1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .76rem; }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); margin: 1.4rem 0; border: 0; }
.pill { display: inline-flex; padding: .22rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.level-minimal { background: var(--ok-soft); color: var(--ok); }
.level-mild { background: #eff8ff; color: #175cd3; }
.level-moderate { background: var(--warn-soft); color: var(--warn); }
.level-moderately_severe, .level-severe { background: var(--danger-soft); color: var(--danger); }
[data-theme="dusk"] .level-mild { background: #102a4c; color: #b2ddff; }
[data-theme="dusk"] .level-minimal { background: #08331f; color: #a6f4c5; }

/* island map */
.map-shell { position: relative; border-radius: 28px; background: linear-gradient(170deg, #e6f7f3 0%, #d5f0eb 35%, #bfe8e2 100%); padding: 2rem; overflow: hidden; border: 1px solid var(--line); }
[data-theme="dusk"] .map-shell { background: linear-gradient(170deg, #0c2529, #0d3036 50%, #0a3d3a); }
.map-shell::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.5) 0 2px, transparent 3px), radial-gradient(circle at 70% 70%, rgba(255,255,255,.35) 0 2px, transparent 3px); background-size: 90px 90px, 130px 130px; opacity: .5; pointer-events: none; }
.island-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.island { position: relative; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid rgba(255,255,255,.6); border-radius: 20px; padding: 1.1rem; text-decoration: none; color: var(--ink); box-shadow: 0 14px 34px -22px rgba(4,58,54,.5); transition: transform .16s ease, box-shadow .16s ease; display: flex; flex-direction: column; gap: .6rem; backdrop-filter: blur(6px); }
.island:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 22px 40px -22px rgba(4,58,54,.55); }
.island-art { height: 110px; border-radius: 14px; display: grid; place-items: center; font-size: 3rem; position: relative; overflow: hidden; }
.island:nth-child(1) .island-art { background: linear-gradient(150deg, #fef3c7, #fdba74); }
.island:nth-child(2) .island-art { background: linear-gradient(150deg, #dbeafe, #93c5fd); }
.island:nth-child(3) .island-art { background: linear-gradient(150deg, #dcfce7, #86efac); }
.island:nth-child(4) .island-art { background: linear-gradient(150deg, #fae8ff, #f0abfc); }
.island:nth-child(5) .island-art { background: linear-gradient(150deg, #e0e7ff, #a5b4fc); }
.island:nth-child(6) .island-art { background: linear-gradient(150deg, #ccfbf1, #5eead4); }
.island-art::after { content: ""; position: absolute; bottom: -18px; left: 10%; right: 10%; height: 40px; border-radius: 50%; background: rgba(255,255,255,.55); filter: blur(6px); }
.island b { font-size: 1rem; }
.island .meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; }
.island .done { position: absolute; top: .7rem; right: .7rem; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: .8rem; box-shadow: 0 4px 10px -4px var(--ok); }
.island.locked { opacity: .65; filter: grayscale(.4); }

/* forms */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.input, select.input, textarea.input { width: 100%; padding: .7rem .85rem; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
.input:focus { border-color: var(--brand-2); }
textarea.input { min-height: 100px; resize: vertical; }
.auth-card { max-width: 470px; margin: 3rem auto; }
.auth-alt { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 1rem; }
.error { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); padding: .65rem .85rem; border-radius: 10px; font-size: .88rem; margin-bottom: 1rem; }
.notice { background: #eff8ff; border: 1px solid #b2ddff; color: #175cd3; padding: .8rem 1rem; border-radius: 12px; font-size: .88rem; }
.notice.warn { background: var(--warn-soft); border-color: #fedf89; color: var(--warn); }
.notice.ok { background: var(--ok-soft); border-color: #abefc6; color: var(--ok); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--ink-2); margin: .8rem 0; }
.check input { margin-top: .22rem; width: 18px; height: 18px; accent-color: var(--brand); }

/* dashboard */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.score-card { border-left: 5px solid var(--brand); }
.score-row { display: flex; align-items: baseline; gap: .5rem; }
.score-num { font-size: 2.4rem; font-weight: 800; letter-spacing: -.04em; }
.score-max { color: var(--muted); font-weight: 600; }
.trend-chart { width: 100%; height: auto; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.gallery .thumb { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; padding: 0; }
.gallery canvas { display: block; width: 100%; height: 120px; background: #fff; }
.gallery .cap { padding: .45rem .6rem; font-size: .76rem; color: var(--muted); text-align: left; }
.badge-grid { display: flex; flex-wrap: wrap; gap: .6rem; }
.badge { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .7rem; font-size: .8rem; background: var(--surface-2); }
.badge .ico { font-size: 1.1rem; }

/* game */
.game-shell { display: grid; grid-template-columns: 1fr 320px; gap: 1.4rem; align-items: start; }
.board-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.board-stage { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; touch-action: none; }
.board-stage canvas, .board-stage .overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.board-stage .overlay { pointer-events: none; opacity: .55; object-fit: contain; padding: 8%; }
.board-stage canvas { cursor: crosshair; }
.board-stage canvas:focus-visible { outline: 3px solid var(--brand-2); outline-offset: -3px; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .8rem; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.toolbar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 .2rem; }
.game-side { display: flex; flex-direction: column; gap: 1rem; }
.hint-list { margin: 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .88rem; }
.hint-list li { margin-bottom: .4rem; }
.step-dots { display: flex; gap: 5px; }
.step-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.step-dots span.on { background: var(--brand); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); }

/* quest */
.quest-card { max-width: 700px; margin: 2rem auto; }
.quest-progress { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-bottom: 1.4rem; }
.quest-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .3s ease; }
.quest-item { font-size: 1.18rem; font-weight: 600; margin: 1rem 0 1.2rem; min-height: 3.2rem; }
.answers { display: grid; gap: .6rem; }
.answer { text-align: left; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 550; display: flex; justify-content: space-between; align-items: center; }
.answer:hover { border-color: var(--brand-2); background: var(--surface-2); }
.answer .n { color: var(--muted); font-size: .8rem; }
.mdq-list { display: grid; gap: .5rem; max-height: 46vh; overflow: auto; padding-right: .3rem; }
.mdq-q { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; }
.mdq-q input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--brand); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(5, 30, 35, .55); backdrop-filter: blur(4px); z-index: 80; display: grid; place-items: center; padding: 1rem; }
.modal { background: var(--surface); border-radius: 20px; padding: 1.6rem; max-width: 560px; width: 100%; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal h2 { font-size: 1.45rem; }
.crisis { border-top: 5px solid var(--danger); }
.crisis .hotline { display: block; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 11px; margin-bottom: .5rem; text-decoration: none; color: var(--ink); background: var(--surface-2); }
.crisis .hotline b { display: block; }
.crisis .hotline span { color: var(--muted); font-size: .86rem; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .6rem .8rem; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

/* plans */
.plan { position: relative; display: flex; flex-direction: column; }
.plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; margin: .3rem 0 .2rem; }
.plan .price span { font-size: .85rem; font-weight: 500; color: var(--muted); }
.plan ul { padding-left: 1.1rem; color: var(--ink-2); font-size: .88rem; flex: 1; }
.plan.featured { border: 2px solid var(--brand); }
.plan .tag { position: absolute; top: -11px; left: 1.4rem; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }

/* misc */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 30px); background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 12px; font-size: .88rem; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 100; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; padding: 2rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.loading-page { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.legal { max-width: 800px; margin: 2rem auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 1.8rem; }
.legal table { font-size: .85rem; }
.kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .05rem .35rem; font-size: .8rem; background: var(--surface-2); }
.mobile-nav { display: none; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .game-shell { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .island-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .header-inner { flex-wrap: wrap; gap: 6px 8px; padding: .5rem 0; min-height: 0; }
  .brand { flex: 0 0 auto; min-width: 0; }
  .brand span { font-size: .92rem; }
  .btn.menu-btn { display: inline-flex; order: 2; margin-left: auto; }
  .nav { display: none; }
  .nav.open { display: flex; position: static; order: 4; flex: 1 0 100%; width: 100%; background: var(--surface); padding: .7rem; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .nav-actions { order: 3; flex: 1 0 100%; width: 100%; justify-content: flex-end; padding-top: 2px; }
  .nav-actions .chip.xp { display: none; }
  .nav-actions .input { max-width: 120px; }
  .btn.menu-btn { display: inline-flex; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .hero { padding-top: 2.5rem; }
  .island-grid { grid-template-columns: 1fr 1fr; }
  .island-art { height: 84px; font-size: 2.2rem; }
  .wrap { padding: 0 14px; }
  .card { padding: 1.1rem; }
  .legal { padding: 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .brand span { font-size: .95rem; }
  .site-header .wrap { padding: 0 12px; }
}
@media (max-width: 420px) { .island-grid { grid-template-columns: 1fr; } }
