/* MindSwitch – dunkles Glas, violette Akzente, blaue Reflexe */
:root {
  --bg: #060608;
  --bg-2: #0d0d12;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.085);
  --glass-hover: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f3f8;
  --text-2: rgba(244, 243, 248, 0.68);
  --text-3: rgba(244, 243, 248, 0.42);
  --violet: #8b5cf6;
  --violet-2: #a78bfa;
  --violet-3: #c4b5fd;
  --blue: #60a5fa;
  --pink: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 22px;
  --radius-s: 14px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 3px; border-radius: 10px; }
::selection { background: rgba(139, 92, 246, .45); }

/* ---------- Hintergrund ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, #15121f 0%, var(--bg) 55%); }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; will-change: transform; }
.orb-a { width: 520px; height: 520px; background: #4c1d95; top: -180px; left: -140px; animation: drift 26s var(--ease) infinite alternate; }
.orb-b { width: 420px; height: 420px; background: #1e3a8a; top: 30%; right: -160px; opacity: .38; animation: drift 32s var(--ease) infinite alternate-reverse; }
.orb-c { width: 360px; height: 360px; background: #6d28d9; bottom: -160px; left: 20%; opacity: .25; animation: drift 38s var(--ease) infinite alternate; }
body[data-mood="reset"] .orb-a { background: #134e4a; opacity: .45; }
body[data-mood="fun"] .orb-a { background: #92400e; opacity: .35; }
body[data-mood="mind"] .orb-b { background: #0e7490; }
body[data-mood="escape"] .orb-b { background: #0369a1; opacity: .5; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.12); } }

/* ---------- Layout ---------- */
.view { position: relative; z-index: 1; max-width: 760px; margin: 0 auto;
  padding: calc(22px + var(--safe-t)) 16px calc(110px + var(--safe-b)); min-height: 100%; outline: none; }
.view.wide { max-width: 1040px; }
.page { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.page-out { animation: pageOut .18s ease forwards; }
@keyframes pageOut { to { opacity: 0; transform: translateY(-6px); filter: blur(3px); } }

.boot { display: grid; place-items: center; height: 60vh; }
.boot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--violet-2); box-shadow: 0 0 30px var(--violet); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }

/* ---------- Typografie ---------- */
.eyebrow { font-size: 13px; letter-spacing: .02em; color: var(--text-3); font-weight: 500; }
h1 { font-size: clamp(30px, 6.5vw, 42px); line-height: 1.08; letter-spacing: -.025em; margin: 4px 0 0; font-weight: 700; }
h2 { font-size: 22px; letter-spacing: -.015em; margin: 0; font-weight: 650; }
h3 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.grad { background: linear-gradient(100deg, #fff 10%, var(--violet-3) 55%, var(--blue) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 2px 12px; }
.section-title h2 { font-size: 19px; }

/* ---------- Glas & Karten ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 40px -24px rgba(0,0,0,.7); }
.card { padding: 20px; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.08), transparent 35%); }
.tap { transition: transform .35s var(--spring), background .25s, border-color .25s; }
.tap:hover { background: var(--glass-hover); border-color: var(--line-strong); }
.tap:active { transform: scale(.97); }

/* ---------- Startseite ---------- */
.hero { margin-top: 8px; }
.hero .quote { margin: 14px 0 0; font-size: 16px; color: var(--text-2); max-width: 36ch; min-height: 2.9em; }
.switch-btn { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
  margin-top: 22px; padding: 22px 22px 22px 24px; border-radius: 26px; text-align: left; overflow: hidden;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 45%, #1d4ed8 120%);
  box-shadow: 0 18px 50px -14px rgba(124, 58, 237, .65), 0 1px 0 rgba(255,255,255,.25) inset;
  transition: transform .4s var(--spring), box-shadow .3s; }
.switch-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translateX(-100%); animation: shine 4.5s ease-in-out infinite 1.2s; }
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.switch-btn:hover { box-shadow: 0 22px 60px -12px rgba(124, 58, 237, .8), 0 1px 0 rgba(255,255,255,.25) inset; }
.switch-btn:active { transform: scale(.975); }
.switch-btn .t { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.switch-btn .s { font-size: 13px; opacity: .78; margin-top: 2px; }
.switch-btn .arrow { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 20px; }

.now-card { margin-top: 16px; }
.now-card .kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--violet-3); text-transform: uppercase; letter-spacing: .06em; }
.now-card .txt { font-size: 19px; line-height: 1.38; margin-top: 10px; letter-spacing: -.01em; font-weight: 500; }
.now-card .row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mode { display: flex; flex-direction: column; justify-content: space-between; min-height: 132px; padding: 18px; text-align: left; }
.mode .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; }
.mode h3 { margin-top: 18px; }
.mode p { margin: 3px 0 0; font-size: 13px; color: var(--text-3); }
.mode.featured { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.mode.featured h3 { margin-top: 0; }
.ic-reset { background: linear-gradient(135deg, rgba(45,212,191,.28), rgba(96,165,250,.25)); }
.sos { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 20px; margin-bottom: 16px; text-align: left; }
.sos .ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: rgba(45,212,191,.18); }
.sos-step { text-align: center; padding: 10px 0; }
.sos-step .n { font-size: 64px; font-weight: 700; letter-spacing: -.04em; line-height: 1; background: linear-gradient(135deg, #5eead4, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sos-step .t { font-size: 20px; font-weight: 600; margin-top: 10px; }
.ic-fun { background: linear-gradient(135deg, rgba(251,191,36,.28), rgba(244,114,182,.2)); }
.ic-mind { background: linear-gradient(135deg, rgba(96,165,250,.3), rgba(139,92,246,.25)); }
.ic-game { background: linear-gradient(135deg, rgba(52,211,153,.25), rgba(96,165,250,.25)); }
.ic-escape { background: linear-gradient(135deg, rgba(56,189,248,.3), rgba(52,211,153,.2)); }
.ic-ki { background: linear-gradient(135deg, rgba(167,139,250,.4), rgba(96,165,250,.3)); }

/* ---------- Buttons & Chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); font-weight: 560; font-size: 15px;
  transition: transform .3s var(--spring), background .2s, border-color .2s, opacity .2s; white-space: nowrap; }
.btn:hover { background: var(--glass-hover); border-color: var(--line-strong); }
.btn:active { transform: scale(.95); }
.btn.primary { background: linear-gradient(135deg, var(--violet), #6d28d9); border-color: transparent; box-shadow: 0 10px 26px -10px rgba(139,92,246,.8); }
.btn.primary:hover { background: linear-gradient(135deg, #9b70f8, #7c3aed); }
.btn.ghost { background: transparent; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.icon { width: 44px; padding: 0; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.liked { color: var(--pink); border-color: rgba(244,114,182,.4); background: rgba(244,114,182,.12); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass); border: 1px solid var(--line); color: var(--text-2); transition: all .2s; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.on { background: rgba(139,92,246,.22); border-color: rgba(167,139,250,.5); color: #fff; }

/* ---------- Kopfzeile Unterseiten ---------- */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.back { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; flex: none; }
.topbar .ttl { flex: 1; min-width: 0; }
.topbar .ttl h1 { font-size: 28px; margin: 0; }

/* ---------- Content-Deck ---------- */
.deck { position: relative; min-height: 340px; perspective: 1200px; }
.deck-card { min-height: 320px; padding: 26px 24px 22px; display: flex; flex-direction: column; }
.deck-card.enter { animation: cardIn .55s var(--spring) both; }
.deck-card.leave-left { animation: cardOutL .32s var(--ease) forwards; }
.deck-card.leave-up { animation: cardOutU .32s var(--ease) forwards; }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) rotateX(-8deg) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes cardOutL { to { opacity: 0; transform: translateX(-60px) rotate(-4deg) scale(.96); } }
@keyframes cardOutU { to { opacity: 0; transform: translateY(-30px) scale(1.02); filter: blur(4px); } }
.deck-card .kind { font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--violet-3); display: flex; justify-content: space-between; }
.deck-card .txt { font-size: clamp(20px, 4.6vw, 25px); line-height: 1.34; font-weight: 550; letter-spacing: -.015em; margin: 18px 0 0; flex: 1; }
.deck-card .sub { margin-top: 14px; font-size: 15px; color: var(--text-2); }
.answer { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-s); background: rgba(139,92,246,.12); border: 1px solid rgba(167,139,250,.25); font-size: 16px; animation: pageIn .4s var(--ease) both; }
.options { display: grid; gap: 8px; margin-top: 18px; }
.opt { text-align: left; padding: 13px 16px; border-radius: var(--radius-s); background: var(--glass); border: 1px solid var(--line); transition: all .2s; font-size: 16px; }
.opt:hover { background: var(--glass-hover); }
.opt.right { background: rgba(52,211,153,.16); border-color: rgba(52,211,153,.55); }
.opt.wrong { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.5); }
.opt[disabled] { cursor: default; }
.deck-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.deck-actions .spacer { flex: 1; }
.hint { font-size: 13px; color: var(--text-3); margin-top: 12px; text-align: center; }

/* ---------- Listen ---------- */
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; padding: 15px 16px; text-align: left; width: 100%; }
.item .ic { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: var(--glass-strong); }
.item .body { flex: 1; min-width: 0; }
.item .body p { margin: 2px 0 0; font-size: 13px; color: var(--text-3); }
.item .chev { color: var(--text-3); font-size: 18px; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(139,92,246,.2); color: var(--violet-3); white-space: nowrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .view.wide .grid-2 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Spiele ---------- */
.game-stage { min-height: 360px; padding: 24px; display: flex; flex-direction: column; }
.reaction-pad { flex: 1; min-height: 300px; border-radius: var(--radius); display: grid; place-items: center; text-align: center; padding: 20px; cursor: pointer; user-select: none;
  transition: background .12s; border: 1px solid var(--line); }
.reaction-pad.idle { background: rgba(139,92,246,.12); }
.reaction-pad.wait { background: rgba(248,113,113,.14); }
.reaction-pad.go { background: rgba(52,211,153,.35); }
.reaction-pad .big { font-size: 46px; font-weight: 700; letter-spacing: -.03em; }
.scoreline { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.vs { display: flex; gap: 10px; }
.vs .p { flex: 1; text-align: center; padding: 12px; border-radius: var(--radius-s); background: var(--glass); border: 1px solid var(--line); }
.vs .p b { display: block; font-size: 28px; }
.progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--blue)); transition: width .4s var(--ease); }
.scramble { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 28px 0; }
.tile { width: 46px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; font-weight: 700; background: var(--glass-strong); border: 1px solid var(--line-strong); animation: cardIn .5s var(--spring) both; }
.field { width: 100%; height: 50px; padding: 0 16px; border-radius: var(--radius-s); background: rgba(255,255,255,.06); border: 1px solid var(--line); outline: none; font-size: 17px; transition: border-color .2s; }
.field:focus { border-color: rgba(167,139,250,.6); }
textarea.field { height: auto; min-height: 90px; padding: 12px 16px; resize: vertical; }
.dice { font-size: 84px; text-align: center; line-height: 1; margin: 24px 0; }
.dice.roll { animation: roll .6s var(--ease); }
@keyframes roll { 0% { transform: rotate(0) scale(.6); opacity: .3; } 70% { transform: rotate(380deg) scale(1.1); } 100% { transform: rotate(360deg) scale(1); } }
.result-big { text-align: center; font-size: 26px; font-weight: 650; margin: 20px 0; min-height: 70px; letter-spacing: -.015em; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pop { animation: popIn .45s var(--spring); }
@keyframes popIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Escape ---------- */
.place { position: relative; min-height: 150px; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; text-align: left; overflow: hidden; }
.place .scene { position: absolute; inset: 0; opacity: .9; }
.place .body { position: relative; }
.place p { margin: 3px 0 0; font-size: 13px; color: var(--text-2); }
.story { padding: 0; overflow: hidden; }
.story .scene { height: 190px; position: relative; }
.story .scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,10,14,.9)); }
.story .content { padding: 4px 22px 22px; position: relative; margin-top: -30px; z-index: 1; }
.story .content .txt { font-size: 18px; line-height: 1.55; color: rgba(244,243,248,.9); }
.story .content .txt p { margin: 0 0 12px; }
.story .choices { display: grid; gap: 8px; margin-top: 18px; }
.sc-maldives { background: radial-gradient(60% 50% at 70% 25%, rgba(255,240,200,.75), transparent 60%), linear-gradient(180deg, #38bdf8 0%, #0ea5e9 45%, #14b8a6 70%, #f5deb3 100%); }
.sc-city { background: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(2px 2px at 70% 20%, #fff, transparent), radial-gradient(40% 30% at 50% 100%, rgba(244,114,182,.6), transparent), linear-gradient(180deg, #0b1026 0%, #1e1b4b 50%, #581c87 100%); }
.sc-villa { background: radial-gradient(40% 35% at 25% 30%, rgba(253,186,116,.85), transparent 60%), linear-gradient(180deg, #fb923c 0%, #f472b6 35%, #6d28d9 70%, #1e3a8a 100%); }
.sc-italy { background: radial-gradient(50% 40% at 80% 20%, rgba(255,250,220,.8), transparent 60%), linear-gradient(180deg, #fde68a 0%, #fdba74 35%, #84cc16 70%, #3f6212 100%); }
.sc-mountains { background: linear-gradient(160deg, transparent 55%, rgba(255,255,255,.12) 55.5%, transparent 62%), linear-gradient(200deg, transparent 50%, rgba(15,23,42,.6) 50.5%), linear-gradient(180deg, #93c5fd 0%, #c7d2fe 40%, #334155 100%); }
.sc-space { background: radial-gradient(1.5px 1.5px at 15% 25%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 70%, #fff, transparent), radial-gradient(2px 2px at 85% 35%, #c4b5fd, transparent), radial-gradient(50% 40% at 30% 80%, rgba(96,165,250,.5), transparent), linear-gradient(180deg, #020617, #1e1b4b); }
.sc-tokyo { background: radial-gradient(30% 25% at 30% 80%, rgba(56,189,248,.6), transparent), radial-gradient(30% 25% at 75% 70%, rgba(244,114,182,.6), transparent), linear-gradient(180deg, #0f172a 0%, #312e81 60%, #0f172a 100%); }
.sc-cabin { background: radial-gradient(35% 30% at 50% 75%, rgba(251,146,60,.75), transparent 70%), linear-gradient(180deg, #1e293b 0%, #334155 40%, #e2e8f0 100%); }
.breath { width: 110px; height: 110px; border-radius: 50%; margin: 24px auto; background: radial-gradient(circle, rgba(167,139,250,.5), rgba(96,165,250,.1)); animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.7); } 40%, 50% { transform: scale(1.15); } }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 216px - var(--safe-b) - var(--safe-t)); min-height: 380px; }
@media (min-width: 760px) { .chat { height: calc(100dvh - 240px - var(--safe-b)); } }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px 14px; scroll-behavior: smooth; }
.msg { max-width: 84%; padding: 11px 15px; border-radius: 20px; font-size: 16px; line-height: 1.42; animation: msgIn .4s var(--spring) both; white-space: pre-wrap; word-wrap: break-word; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.msg.ai { align-self: flex-start; background: var(--glass-strong); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: linear-gradient(135deg, var(--violet), #6d28d9); border-bottom-right-radius: 6px; }
.msg.err { align-self: center; font-size: 13px; color: var(--red); background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.25); }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-quick { margin-bottom: 10px; }
.chat-input { display: flex; gap: 8px; padding: 6px; border-radius: 999px; }
.chat-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; padding: 0 14px; font-size: 16px; height: 44px; }
.ai-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.ai-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.ai-status.warn i { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* ---------- Profil ---------- */
.stat-row { display: grid; grid-template-columns: 90px 1fr 34px; gap: 10px; align-items: center; font-size: 14px; margin: 9px 0; }
.bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--violet), var(--blue)); transition: width .8s var(--ease); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { padding: 14px; text-align: center; }
.kpi b { display: block; font-size: 24px; letter-spacing: -.02em; }
.kpi span { font-size: 12px; color: var(--text-3); }
.fav { padding: 14px 16px; font-size: 15px; display: flex; gap: 12px; align-items: flex-start; }
.fav .x { color: var(--text-3); flex: none; font-size: 18px; line-height: 1; padding: 2px 4px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch.on { background: var(--violet); }
.switch.on::after { transform: translateX(20px); }
.empty { text-align: center; padding: 28px 20px; color: var(--text-3); font-size: 14px; }
.stack { display: grid; gap: 12px; }

/* ---------- Tabbar ---------- */
.tabbar { position: fixed; z-index: 20; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 6px; border-radius: 26px; width: min(440px, calc(100% - 24px));
  background: rgba(22, 20, 30, .62); border: 1px solid var(--line);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 20px 50px -14px rgba(0,0,0,.8); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 20px; font-size: 11px; color: var(--text-3); transition: color .2s, background .25s; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: #fff; background: rgba(139, 92, 246, .22); }
.tabbar a.on svg { stroke: var(--violet-3); }
.tabbar a:hover { color: var(--text); }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 40; left: 50%; top: calc(16px + var(--safe-t)); transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 999px; font-size: 14px; background: rgba(30,28,40,.85); border: 1px solid var(--line-strong);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all .4s var(--spring); max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.err-box { padding: 26px; text-align: center; }
.noscript { padding: 40px; text-align: center; }

/* ---------- Desktop ---------- */
@media (min-width: 760px) {
  .view { padding-top: 46px; }
  .modes { grid-template-columns: repeat(3, 1fr); }
  .mode.featured { grid-column: span 3; }
  .hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: end; }
  .hero .now-card { margin-top: 0; }
  .view:has(.home) { max-width: 1000px; }
}
@media (max-width: 380px) {
  .modes { gap: 10px; }
  .mode { padding: 15px; min-height: 120px; }
  .kpis { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
