/* ============================================================
   Auren — premium focus & calm
   Design language: night glass + living aurora + glowing orb
   ============================================================ */

:root {
  --bg-0: #0a0912;
  --bg-1: #0d0b18;
  --ink: #f3f0ff;
  --ink-soft: rgba(243, 240, 255, 0.62);
  --ink-faint: rgba(243, 240, 255, 0.38);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-brd: rgba(255, 255, 255, 0.10);
  --glass-hi: rgba(255, 255, 255, 0.14);
  --radius: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* scene accents (overridden by [data-scene]) */
  --a1: #8b7bff;
  --a2: #5ad1e6;
  --accent: #a78bfa;
  --accent-2: #67e8f9;
  --glow: rgba(167, 139, 250, 0.55);
}

/* ---- Scenes ---- */
body[data-scene="aurora"] { --c1:#7c5cff; --c2:#3fd8c8; --c3:#c56bff; --c4:#2a6bff; --accent:#a78bfa; --accent-2:#67e8f9; --glow:rgba(167,139,250,.55); }
body[data-scene="dusk"]   { --c1:#ff5c9d; --c2:#ff9a5c; --c3:#c56bff; --c4:#ff5c6e; --accent:#ff8fb0; --accent-2:#ffb27a; --glow:rgba(255,124,157,.5); }
body[data-scene="ocean"]  { --c1:#3fb6ff; --c2:#3fd8c8; --c3:#5c7bff; --c4:#22d3ee; --accent:#5ec8ff; --accent-2:#67e8f9; --glow:rgba(94,200,255,.5); }
body[data-scene="ember"]  { --c1:#ff8a3d; --c2:#ff5c5c; --c3:#ffb03d; --c4:#ff4d7d; --accent:#ff9d5c; --accent-2:#ffcf6b; --glow:rgba(255,140,80,.5); }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg-0);
  color: var(--ink);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  transition: background 0.8s var(--ease);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Living aurora background
   ============================================================ */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-1), var(--bg-0) 60%); }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
.b1 { width: 55vmax; height: 55vmax; background: radial-gradient(circle, var(--c1), transparent 62%); top: -18%; left: -12%; animation: drift1 26s var(--ease) infinite; }
.b2 { width: 48vmax; height: 48vmax; background: radial-gradient(circle, var(--c2), transparent 62%); bottom: -20%; right: -14%; animation: drift2 32s var(--ease) infinite; }
.b3 { width: 40vmax; height: 40vmax; background: radial-gradient(circle, var(--c3), transparent 60%); top: 30%; right: -10%; animation: drift3 30s var(--ease) infinite; }
.b4 { width: 34vmax; height: 34vmax; background: radial-gradient(circle, var(--c4), transparent 60%); bottom: 8%; left: -8%; animation: drift1 36s var(--ease) infinite reverse; }

@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(12%,10%) scale(1.15)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1.05)} 50%{transform:translate(-14%,-8%) scale(0.9)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(0.95)} 50%{transform:translate(-10%,12%) scale(1.2)} }

.grain {
  position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,0.55) 100%); }

/* ============================================================
   Phone frame
   ============================================================ */
.phone {
  position: relative;
  z-index: 2;
  width: min(430px, 100vw);
  height: min(920px, 100dvh);
  display: flex;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top)) 22px max(28px, calc(18px + env(safe-area-inset-bottom)));
}

/* ---- Top bar ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 4px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.pro-chip {
  height: 40px; padding: 0 15px; border-radius: 14px; cursor: pointer; white-space: nowrap;
  font-family: "Sora", sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.3px;
  color: var(--ink); border: 1px solid var(--glass-brd);
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: 0.25s var(--ease);
}
.pro-chip:hover { border-color: var(--glass-hi); transform: translateY(-1px); box-shadow: 0 6px 18px -6px var(--glow); }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff, var(--accent) 55%, var(--accent-2));
  box-shadow: 0 0 16px var(--glow), 0 0 3px #fff;
}
.brand-name { font-family: "Sora", sans-serif; font-weight: 600; font-size: 19px; letter-spacing: 0.3px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 14px; border: 1px solid var(--glass-brd);
  background: var(--glass); color: var(--ink-soft);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  cursor: pointer; transition: 0.25s var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--glass-hi); transform: translateY(-1px); }
.icon-btn .sound-off { display: none; }
.icon-btn.muted .sound-on { display: none; }
.icon-btn.muted .sound-off { display: inline; }
/* ambient-sound toggle lives on the Focus view (it's a timer feature) */
.focus-sound { align-self: flex-end; margin: -2px 0 -6px; }

/* ============================================================
   Views
   ============================================================ */
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; }
.view.hidden { display: none; }
.view-focus { justify-content: flex-start; padding-top: 14px; animation: fadeUp 0.6s var(--ease); }
.view-stats { padding-top: 6px; gap: 16px; animation: fadeUp 0.5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============================================================
   The orb
   ============================================================ */
.orb-wrap { position: relative; width: 300px; height: 300px; display: grid; place-items: center; margin: 8px 0 26px; }

.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 4; }
.ring-progress {
  fill: none; stroke: url(#g); stroke: var(--accent); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 754; stroke-dashoffset: 754;
  filter: drop-shadow(0 0 6px var(--glow));
  transition: stroke-dashoffset 0.4s linear;
}

.orb {
  position: relative; width: 212px; height: 212px; border-radius: 50%;
  display: grid; place-items: center;
  animation: breathe 8s ease-in-out infinite;
  will-change: transform;
}
.orb-core {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.15) 22%, transparent 42%),
    radial-gradient(circle at 50% 55%, var(--accent-2), var(--accent) 45%, transparent 78%),
    radial-gradient(circle at 50% 120%, var(--c1), transparent 70%);
  box-shadow: inset 0 0 40px rgba(255,255,255,0.18), inset 0 -20px 60px rgba(0,0,0,0.35);
  opacity: 0.92;
}
.orb-glow {
  position: absolute; inset: -34px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, var(--glow), transparent 66%);
  filter: blur(14px);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{transform:scale(0.9)} 50%{transform:scale(1.06)} }
@keyframes pulse   { 0%,100%{opacity:0.55; transform:scale(0.95)} 50%{opacity:0.95; transform:scale(1.12)} }
body.running .orb { animation-duration: 9s; }
/* Breath mode: orb inflates/deflates in sync with the 4-4-4-4 guided cycle (16s) */
body.breath-mode.running .orb, body.breath-mode.running .orb-glow { animation-duration: 16s; }
body.paused .orb, body.paused .orb-glow { animation-play-state: paused; }

.orb-content { position: relative; z-index: 3; text-align: center; pointer-events: none; }
.time {
  font-family: "Sora", sans-serif; font-weight: 300; font-size: 52px; letter-spacing: 1px;
  font-variant-numeric: tabular-nums; text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  pointer-events: auto; cursor: pointer;
}
body.running .time { cursor: default; }
.cue { margin-top: 4px; font-size: 13px; color: rgba(255,255,255,0.72); letter-spacing: 0.4px; min-height: 16px; transition: opacity 0.6s ease; }

/* ---- End-of-session hint ---- */
.end-hint {
  font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.4px;
  margin: -14px 0 14px; font-variant-numeric: tabular-nums;
}

/* ---- Presets ---- */
.presets { display: flex; gap: 9px; margin-bottom: 22px; flex-wrap: wrap; justify-content: center; }
.pill {
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  border: 1px solid var(--glass-brd); background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: 0.28s var(--ease);
}
.pill:hover { color: var(--ink); }
.pill.active {
  color: #0a0912; font-weight: 600;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.86));
  border-color: transparent; box-shadow: 0 6px 22px rgba(255,255,255,0.16);
}
.presets.locked { opacity: 0.35; pointer-events: none; filter: saturate(0.6); }

/* ---- CTA ---- */
.cta {
  position: relative; width: 100%; max-width: 300px; height: 60px; border: none; cursor: pointer;
  border-radius: 20px; color: #0a0912; font-family: "Sora", sans-serif; font-weight: 600; font-size: 16px;
  letter-spacing: 0.3px; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, var(--c3));
  box-shadow: 0 12px 34px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}
.cta::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  transform: translateX(-120%); transition: none;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,0.5); }
.cta:hover::after { animation: sheen 0.9s var(--ease); }
.cta:active { transform: translateY(0) scale(0.985); }
@keyframes sheen { to { transform: translateX(120%); } }
body.running .cta { background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.07)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-hi); }

.ghost-btn {
  margin-top: 14px; background: none; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: 13px; letter-spacing: 0.3px; padding: 6px 12px;
  transition: color 0.25s var(--ease);
}
.ghost-btn:hover { color: var(--ink-soft); }
.hidden { display: none !important; }

/* ---- Scenes ---- */
.scenes { display: flex; gap: 8px; margin-top: auto; padding-top: 20px; flex-wrap: wrap; justify-content: center; }
.scene-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 13px; border-radius: 999px; font-size: 12.5px; color: var(--ink-faint);
  border: 1px solid transparent; background: rgba(255,255,255,0.03); transition: 0.28s var(--ease);
}
.scene-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 0 8px var(--glow); }
.scene-chip[data-scene="dusk"]  .dot { background: linear-gradient(135deg,#ffb27a,#ff5c9d); }
.scene-chip[data-scene="ocean"] .dot { background: linear-gradient(135deg,#67e8f9,#3fb6ff); }
.scene-chip[data-scene="ember"] .dot { background: linear-gradient(135deg,#ffcf6b,#ff5c5c); }
.scene-chip[data-scene="aurora"] .dot { background: linear-gradient(135deg,#67e8f9,#a78bfa); }
.scene-chip:hover { color: var(--ink-soft); }
.scene-chip.active { color: var(--ink); border-color: var(--glass-brd); background: var(--glass); }
.scene-chip[data-scene="minimal"] .dot { background: linear-gradient(135deg,#cfd6e4,#8a93a6); }
.scene-chip[data-scene="blue"] .dot { background: linear-gradient(135deg,#a7d6ff,#3f74e6); }
.scene-chip[data-scene="forest"] .dot { background: linear-gradient(135deg,#a7e8b0,#3fae7a); }
.scene-chip[data-scene="rose"] .dot { background: linear-gradient(135deg,#ffd0e0,#ff6f9c); }
.scene-chip[data-scene="mono"] .dot { background: linear-gradient(135deg,#e5e9f0,#6b7280); }
.scene-more { color: var(--accent-2); font-weight: 600; }
.theme-grid { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.theme-grid .scene-chip { justify-content: flex-start; }
.theme-grid .scene-chip.locked { opacity: 0.7; }

/* ============================================================
   Glass primitive
   ============================================================ */
.glass {
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 10px 40px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ============================================================
   Stats view
   ============================================================ */
.view-title { font-family: "Sora", sans-serif; font-weight: 600; font-size: 26px; align-self: flex-start; margin: 6px 2px 2px; }

.stat-hero { width: 100%; padding: 20px; display: flex; align-items: center; gap: 18px; }
.streak { display: flex; align-items: center; gap: 12px; }
.flame { font-size: 34px; filter: drop-shadow(0 0 10px rgba(255,140,60,0.55)); }
.streak-num { font-family: "Sora", sans-serif; font-weight: 700; font-size: 34px; line-height: 1; }
.streak-label { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.hero-divider { width: 1px; align-self: stretch; background: var(--glass-brd); }
.hero-metrics { display: flex; gap: 14px; margin-left: auto; }
.metric-num { font-family: "Sora", sans-serif; font-weight: 600; font-size: 21px; }
.metric-label { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }

.chart-card { width: 100%; padding: 18px 18px 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.chart-total { color: var(--accent-2); font-weight: 600; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 96px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%; max-width: 26px; border-radius: 8px 8px 4px 4px; min-height: 5px;
  background: linear-gradient(to top, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px -2px var(--glow);
  transition: height 0.7s var(--ease);
}
.bar.empty { background: rgba(255,255,255,0.07); box-shadow: none; }
.bar-day { font-size: 10.5px; color: var(--ink-faint); }
.bar-col.today .bar-day { color: var(--ink); font-weight: 600; }

.quote-card { width: 100%; padding: 18px 20px; }
.quote-card p { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }

/* Add-widget CTA + how-to sheet */
.widget-cta {
  width: 100%; padding: 14px 16px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; text-align: left; color: var(--ink); transition: 0.25s var(--ease);
}
.widget-cta:hover { border-color: rgba(103,232,249,0.35); }
.widget-cta:active { transform: scale(0.99); }
.wcta-ic { font-size: 24px; filter: drop-shadow(0 0 8px rgba(255,140,60,0.5)); }
.wcta-txt { display: flex; flex-direction: column; gap: 2px; }
.wcta-txt b { font-size: 14px; font-weight: 600; }
.wcta-txt small { font-size: 11.5px; color: var(--ink-soft); }
.wcta-plus { margin-left: auto; font-size: 24px; line-height: 1; color: var(--accent-2); font-weight: 300; }
.widget-desc { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); align-self: flex-start; }
.widget-steps { align-self: flex-start; margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--ink-soft); }
.widget-steps li { line-height: 1.4; }

/* ============================================================
   Tab bar
   ============================================================ */
.tabbar {
  display: flex; gap: 6px; padding: 7px; margin-top: 14px; border-radius: 22px;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  padding: 9px 0; border: none; background: none; border-radius: 16px;
  color: var(--ink-faint); font-size: 11px; font-weight: 500; letter-spacing: 0.2px;
  transition: 0.25s var(--ease);
}
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--ink); background: var(--glass); }
.tab.active svg { filter: drop-shadow(0 0 8px var(--glow)); color: var(--accent); }

/* ============================================================
   Overlay
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  background: rgba(8,7,15,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.4s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay-card {
  width: min(340px, 86vw); padding: 34px 28px 26px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: fadeUp 0.5s var(--ease);
  /* near-opaque: the page must not bleed through the card */
  background: linear-gradient(180deg, rgba(24,21,40,0.97), rgba(13,11,24,0.99));
  box-shadow: 0 24px 70px -24px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.08);
}
.overlay-orb {
  width: 90px; height: 90px; border-radius: 50%; margin-bottom: 10px;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent-2) 40%, var(--accent) 75%);
  box-shadow: 0 0 40px var(--glow); animation: pulse 3.5s ease-in-out infinite;
}
.overlay-card h2 { font-family: "Sora", sans-serif; font-weight: 600; font-size: 26px; }
.overlay-card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 12px; }
.overlay-card .overlay-streak { font-size: 13.5px; color: var(--accent-2); margin: -8px 0 12px; }
.overlay-card .cta { max-width: 100%; }

/* Rewarded-ad gate ("watch N ads to unlock a test") — above sheets (z 30) */
.reward-ov, .adsim-ov { z-index: 40; }
.reward-ic { font-size: 40px; line-height: 1; }
.reward-card h2 { font-size: 21px; }
.reward-sub { font-size: 14px; line-height: 1.5; }
.reward-dots { display: flex; gap: 9px; justify-content: center; margin: 2px 0 4px; }
.rw-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.12); transition: 0.25s var(--ease); }
.rw-dot.on { background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 0 10px var(--glow); }
.reward-watch.loading { opacity: 0.55; pointer-events: none; }
.reward-pro, .reward-cancel { margin-top: 2px; }
/* Simulated ad (web only; native uses a real AdMob rewarded ad) */
.adsim { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 32px 36px; }
.adsim-tag { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-faint); }
.adsim-logo { font-family: "Sora", sans-serif; font-size: 30px; font-weight: 700; }
.adsim-sub { font-size: 13px; color: var(--ink-soft); }
.adsim-count { margin-top: 4px; font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ============================================================
   Custom time sheet
   ============================================================ */
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8,7,15,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn 0.3s var(--ease); }
.sheet-card {
  position: relative; width: min(430px, 100vw); border-radius: 30px 30px 0 0;
  padding: 14px 26px calc(26px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: sheetUp 0.45s var(--ease);
  /* never taller than the screen: a tall sheet scrolls inside itself so its
     title, controls and CTA stay reachable and the backdrop stays tappable */
  max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  /* near-opaque: the page must not bleed through the sheet */
  background: linear-gradient(180deg, rgba(24,21,40,0.97), rgba(13,11,24,0.99));
  border-bottom: none;
  box-shadow: 0 -18px 60px -20px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.08);
}
.sheet-card::-webkit-scrollbar { display: none; }
@keyframes sheetUp { from { transform: translateY(60%); opacity: 0.4; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 42px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.18); }
.sheet-title { font-family: "Sora", sans-serif; font-weight: 600; font-size: 17px; }
.sheet-value { display: flex; align-items: baseline; gap: 7px; font-family: "Sora", sans-serif; }
.sheet-num {
  font-family: "Sora", sans-serif; font-size: 54px; font-weight: 300;
  font-variant-numeric: tabular-nums; color: var(--ink);
  background: none; border: none; outline: none; text-align: center;
  width: 3.2ch; caret-color: var(--accent);
  border-bottom: 2px dashed rgba(255,255,255,0.22);
  transition: border-color 0.25s var(--ease);
}
.sheet-num:focus { border-bottom-color: var(--accent); }
.sheet-num::-webkit-outer-spin-button, .sheet-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sheet-num { -moz-appearance: textfield; appearance: textfield; }
.sheet-unit { font-size: 15px; color: var(--ink-soft); }
.sheet-hint { font-size: 11.5px; color: var(--ink-faint); margin-top: -6px; }

.sheet-range { width: 100%; appearance: none; -webkit-appearance: none; height: 34px; background: transparent; cursor: pointer; }
.sheet-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 12px -2px var(--glow);
}
.sheet-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; margin-top: -10px;
  background: radial-gradient(circle at 35% 30%, #fff, #e8e4ff 70%);
  border: none; box-shadow: 0 0 14px var(--glow), 0 2px 8px rgba(0,0,0,0.4);
}
.sheet-range::-moz-range-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.sheet-range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: none; box-shadow: 0 0 14px var(--glow); }

.sheet-chips { display: flex; gap: 8px; }
.chip {
  padding: 8px 15px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--ink-soft); border: 1px solid var(--glass-brd); background: var(--glass);
  transition: 0.25s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--glass-hi); }

/* ============================================================
   Ad banner (non-Pro) — sits above the tab bar, never covers controls
   ============================================================ */
.ad-banner {
  position: absolute; left: 22px; right: 22px; bottom: 96px; z-index: 15;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(26,23,44,0.97), rgba(15,13,27,0.98));
  border: 1px solid var(--glass-brd);
  box-shadow: 0 14px 40px -14px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.07);
  animation: adIn 0.5s var(--ease);
}
@keyframes adIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.ad-tag {
  font-size: 9px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--glass-brd); border-radius: 6px; padding: 3px 6px;
}
.ad-body { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.ad-text { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-cta {
  padding: 6px 12px; border-radius: 999px; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: #0a0912; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 4px 14px -4px var(--glow);
}
.ad-timer {
  min-width: 26px; height: 26px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--glass-brd); border-radius: 50%;
  font-variant-numeric: tabular-nums;
}
.ad-x {
  min-width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer;
  font-size: 12px; color: var(--ink-soft); border: 1px solid var(--glass-brd);
  border-radius: 50%; background: var(--glass); transition: 0.2s var(--ease);
}
.ad-x:hover { color: var(--ink); border-color: var(--glass-hi); }

/* ============================================================
   Pro sheet plans
   ============================================================ */
.pro-perks { font-size: 13.5px; color: var(--ink-soft); text-align: center; margin-top: -4px; }
.plans { display: flex; gap: 10px; width: 100%; }
.plan {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 18px 10px 14px; border-radius: 20px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-brd); color: var(--ink);
  transition: 0.25s var(--ease);
}
.plan:hover { border-color: var(--glass-hi); }
.plan.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 26px -10px var(--glow); }
.plan-price { font-family: "Sora", sans-serif; font-weight: 600; font-size: 24px; }
.plan-period { font-size: 12px; color: var(--ink-soft); }
.plan-badge {
  position: absolute; top: -9px; right: 12px;
  font-size: 10.5px; font-weight: 700; color: #0a0912;
  padding: 3px 9px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 4px 12px -4px var(--glow);
}
.pro-note { font-size: 11.5px; color: var(--ink-faint); text-align: center; }

/* ============================================================
   Scrollable list views
   ============================================================ */
.view-stats, .view-plan, .view-train, .view-focus { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.view-stats::-webkit-scrollbar, .view-plan::-webkit-scrollbar, .view-train::-webkit-scrollbar, .view-focus::-webkit-scrollbar { display: none; }
.view-plan, .view-train { padding-top: 6px; gap: 14px; align-items: stretch; animation: fadeUp 0.5s var(--ease); }

/* ============================================================
   Month summary (stats)
   ============================================================ */
.month-card { width: 100%; padding: 18px; }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.month-title { font-family: "Sora", sans-serif; font-weight: 600; font-size: 16px; }
.mnav {
  width: 34px; height: 34px; border-radius: 12px; cursor: pointer; font-size: 20px; line-height: 1;
  color: var(--ink-soft); border: 1px solid var(--glass-brd); background: var(--glass); transition: 0.2s var(--ease);
}
.mnav:hover:not(:disabled) { color: var(--ink); }
.mnav:disabled { opacity: 0.3; cursor: default; }
.month-metrics { display: flex; gap: 18px; justify-content: space-between; margin-bottom: 14px; }
.month-heat { display: flex; gap: 4px; flex-wrap: wrap; }
.heat-dot { width: 9px; height: 9px; border-radius: 3px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.heat-dot.off { background: rgba(255,255,255,0.09); }

/* ============================================================
   Calendar
   ============================================================ */
.plan-head { display: flex; align-items: center; justify-content: space-between; }
.notif-chip {
  padding: 9px 14px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 500;
  color: var(--ink-soft); border: 1px solid var(--glass-brd); background: var(--glass); transition: 0.25s var(--ease);
}
.notif-chip.on { color: var(--accent-2); border-color: rgba(103,232,249,0.35); }
.cal-card { padding: 16px 14px 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { margin-bottom: 6px; }
.cal-dow span { text-align: center; font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.06em; }
.cal-day {
  position: relative; aspect-ratio: 1; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; background: rgba(255,255,255,0.03); color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: 0.2s var(--ease); padding: 0;
}
.cal-day:hover { border-color: var(--glass-brd); color: var(--ink); }
.cal-day.empty { background: none; pointer-events: none; }
.cal-day.today { border-color: var(--accent); box-shadow: 0 0 12px -4px var(--glow); color: var(--ink); }
.cal-num { font-size: 13px; font-variant-numeric: tabular-nums; }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.ev-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.t-sprawdzian { background: #ff5c7a; }
.t-kartkowka { background: #ffb03d; }
.t-zadanie { background: #3fd8c8; }
.t-praca { background: #8b7bff; }
.t-inne { background: rgba(255,255,255,0.5); }
.plan-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; border: 1.5px solid var(--accent-2); }
.plan-dot.done { opacity: 0.35; }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--ink-faint); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.plan-hint { font-size: 12px; color: var(--ink-faint); text-align: center; }

/* ---- Day sheet ---- */
.sheet-date { font-weight: 400; font-size: 13px; color: var(--ink-soft); margin-left: 6px; }
.day-list { width: 100%; display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; }
.day-empty { font-size: 13px; color: var(--ink-faint); text-align: center; padding: 10px 0; }
.day-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-radius: 14px; border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.03);
}
.day-item .di-main { flex: 1; min-width: 0; font-size: 13.5px; }
.day-item .di-main b { font-weight: 600; }
.day-item .di-main small { display: block; color: var(--ink-faint); font-size: 11.5px; margin-top: 1px; }
.day-item.done .di-main { text-decoration: line-through; opacity: 0.5; }
.di-btn {
  flex: none; padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: 11.5px; font-weight: 600;
  color: var(--ink-soft); border: 1px solid var(--glass-brd); background: var(--glass); transition: 0.2s var(--ease);
}
.di-btn:hover { color: var(--ink); }
.di-btn.go { color: #0a0912; background: linear-gradient(135deg, var(--accent-2), var(--accent)); border: none; }
.day-actions { display: flex; gap: 10px; }
.sheet-label { font-size: 12px; color: var(--ink-faint); align-self: flex-start; margin-bottom: -6px; }
.text-input {
  width: 100%; padding: 13px 15px; border-radius: 14px; outline: none;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.04);
  color: var(--ink); font-size: 15px; font-family: "Inter", sans-serif; transition: border-color 0.25s var(--ease);
}
.text-input:focus { border-color: var(--accent); }
.text-input::placeholder { color: var(--ink-faint); }
.chip.active { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---- Today strip (focus view) ---- */
.today-strip { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 2px; margin-top: auto; scrollbar-width: none; }
.today-strip::-webkit-scrollbar { display: none; }
.today-strip:not(.hidden) ~ .scenes { margin-top: 12px; }
.today-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 9px 13px; border-radius: 999px; font-size: 12.5px; color: var(--ink-soft);
  border: 1px solid var(--glass-brd); background: var(--glass); transition: 0.25s var(--ease);
}
.today-chip:hover { color: var(--ink); border-color: var(--glass-hi); }
.today-chip b { color: var(--ink); font-weight: 600; }
.today-chip .ev-dot { flex: none; }

/* ============================================================
   Trainer
   ============================================================ */
.train-sub { font-size: 13.5px; color: var(--ink-soft); margin-top: -6px; }
.bank-list { display: flex; flex-direction: column; gap: 10px; }
.bank-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
  padding: 16px 18px; border-radius: 18px; text-align: left;
  border: 1px solid var(--glass-brd); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  color: var(--ink); transition: 0.25s var(--ease);
}
.bank-card:hover { border-color: var(--glass-hi); transform: translateY(-1px); }
.bank-card b { font-family: "Sora", sans-serif; font-size: 15px; font-weight: 600; display: block; }
.bank-card small { color: var(--ink-faint); font-size: 12px; }
.bank-card .arrow { color: var(--accent); font-size: 18px; }
.ai-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; opacity: 0.75;
}
.ai-card b { font-family: "Sora", sans-serif; font-size: 15px; }
.ai-card p { font-size: 12px; color: var(--ink-faint); margin-top: 3px; line-height: 1.5; }
.soon-badge {
  flex: none; font-size: 11px; font-weight: 600; color: var(--gold, #f3cd7e);
  color: var(--accent-2); border: 1px solid var(--glass-brd); border-radius: 999px; padding: 5px 10px;
}
.quiz-head { display: flex; align-items: center; justify-content: space-between; }
.quiz-progress { font-family: "Sora", sans-serif; font-weight: 600; font-size: 14px; color: var(--accent-2); }
.quiz-card { padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.quiz-q { font-family: "Sora", sans-serif; font-weight: 600; font-size: 17px; line-height: 1.45; }
.quiz-fig { display: flex; justify-content: center; padding: 6px 0 2px; }
.quiz-fig svg { max-width: 240px; width: 100%; height: auto; border-radius: 12px; background: rgba(255,255,255,0.04); padding: 10px; }
.quiz-calc { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--accent-2); background: rgba(103,232,249,0.10); border: 1px solid rgba(103,232,249,0.25); border-radius: 999px; padding: 4px 11px; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.q-opt {
  width: 100%; text-align: left; padding: 13px 15px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.03);
  color: var(--ink-soft); font-size: 14.5px; font-family: "Inter", sans-serif; transition: 0.2s var(--ease);
}
.q-opt:hover { color: var(--ink); border-color: var(--glass-hi); }
.q-opt.correct { color: #3fd8c8; border-color: rgba(63,216,200,0.6); background: rgba(63,216,200,0.08); }
.q-opt.wrong { color: #ff5c7a; border-color: rgba(255,92,122,0.6); background: rgba(255,92,122,0.08); }
.quiz-opts.locked .q-opt { pointer-events: none; }
.quiz-why { font-size: 13px; color: var(--ink-soft); line-height: 1.55; border-top: 1px solid var(--glass-brd); padding-top: 12px; }
#trainQuiz { display: flex; flex-direction: column; gap: 14px; }
#trainQuiz .cta { align-self: center; }
.score-card { padding: 34px 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.score-big { font-family: "Sora", sans-serif; font-weight: 700; font-size: 46px;
  background: linear-gradient(120deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.score-text { color: var(--ink-soft); font-size: 15px; margin-bottom: 8px; }

/* ============================================================
   Pro perks (list) + language sheet + onboarding + new trainer
   ============================================================ */
.pro-intro { font-size: 13.5px; color: var(--ink-soft); text-align: center; margin-top: -4px; line-height: 1.5; }
.pro-perks { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 9px; margin: 4px 0 2px; text-align: left; }
.pro-perks li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); }
.perk-ic { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #0a0912; background: linear-gradient(135deg, var(--accent-2), var(--accent)); font-weight: 700; }

.sheet-sub { font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: -6px; line-height: 1.5; }
.lang-list { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.lang-item { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-radius: 14px; cursor: pointer; border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.03); color: var(--ink-soft); font-size: 15px; transition: 0.2s var(--ease); }
.lang-item:hover { color: var(--ink); border-color: var(--glass-hi); }
.lang-item.active { color: var(--ink); border-color: var(--accent); }
.lang-check { opacity: 0; color: var(--accent-2); font-weight: 700; }
.lang-item.active .lang-check { opacity: 1; }

.country-grid { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.country-chip { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; border-radius: 14px; cursor: pointer; border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.03); color: var(--ink-soft); transition: 0.2s var(--ease); }
.country-chip:hover { color: var(--ink); }
.country-chip.active { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cc-flag { font-size: 24px; line-height: 1; }
.cc-name { font-size: 12px; }
#onboardGrades { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.grade-row { display: flex; flex-direction: column; gap: 6px; }
.grade-row-label { font-size: 11.5px; color: var(--ink-faint); }
.grade-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* onboarding accordion (system -> grade -> level) */
.ob-steps { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ob-step { border: 1px solid var(--glass-brd); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,0.02); }
.ob-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 13px 15px; cursor: pointer; background: none; border: none; color: var(--ink); font-size: 14px; }
.ob-lbl { color: var(--ink-soft); font-size: 12.5px; }
.ob-val { margin-left: auto; color: var(--ink); font-weight: 600; font-size: 13px; }
.ob-caret { color: var(--ink-faint); font-size: 11px; transition: transform 0.25s var(--ease); }
.ob-step.open .ob-caret { transform: rotate(180deg); }
.ob-body { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.3s var(--ease), opacity 0.25s var(--ease), padding 0.25s var(--ease); padding: 0 13px; }
.ob-step.open .ob-body { max-height: 44vh; opacity: 1; padding: 0 13px 13px; overflow-y: auto; }
.level-grid { display: flex; gap: 8px; }
.level-chip { flex: 1; padding: 12px; border-radius: 14px; cursor: pointer; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.03); transition: 0.2s var(--ease); }
.level-chip:hover { color: var(--ink); }
.level-chip.active { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.edu-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--ink); border: 1px solid var(--glass-brd); background: var(--glass); transition: 0.25s var(--ease); }
.edu-chip:hover { border-color: var(--glass-hi); }
.edu-caret { color: var(--ink-faint); font-size: 11px; }
.curriculum-note { align-self: flex-start; font-size: 11.5px; color: var(--ink-faint); margin: -6px 2px 0; }
#trainHome { display: flex; flex-direction: column; gap: 14px; }
.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.subject-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 18px; cursor: pointer; text-align: left; border: 1px solid var(--glass-brd); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); color: var(--ink); transition: 0.25s var(--ease); }
.subject-card:hover { border-color: var(--glass-hi); transform: translateY(-1px); }
.subject-card .subj-ic { font-size: 24px; }
.subject-card b { font-family: "Sora", sans-serif; font-size: 15px; font-weight: 600; }
.subject-card small { color: var(--ink-faint); font-size: 11.5px; }
.subject-card.soon { opacity: 0.55; }
.subject-card.soon small { color: var(--accent-2); }

.train-back { align-self: flex-start; background: none; border: none; color: var(--ink-soft); font-size: 14px; cursor: pointer; padding: 4px 0; }
.train-back:hover { color: var(--ink); }
.topics-title { font-family: "Sora", sans-serif; font-weight: 600; font-size: 20px; align-self: flex-start; }
#trainTopics { display: flex; flex-direction: column; gap: 12px; }
.topic-list { display: flex; flex-direction: column; gap: 10px; }
.topic-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.topic-main b { font-family: "Sora", sans-serif; font-size: 14.5px; font-weight: 600; display: block; }
.topic-main small { color: var(--ink-faint); font-size: 11.5px; }
.topic-acts { display: flex; gap: 8px; flex: none; }
.topic-btn { padding: 9px 13px; border-radius: 12px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink); border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.05); transition: 0.2s var(--ease); white-space: nowrap; }
.topic-btn:hover { border-color: var(--glass-hi); }
.topic-btn.locked::after { content: "🔒"; margin-left: 5px; font-size: 11px; }
.year-test { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; text-align: left; color: var(--ink); border: 1px solid var(--glass-brd); }
.year-test:hover { border-color: var(--glass-hi); }
.yt-txt b { font-family: "Sora", sans-serif; font-size: 15px; font-weight: 600; display: block; }
.yt-txt small { color: var(--ink-faint); font-size: 11.5px; }
.yt-ic { font-size: 18px; color: var(--accent-2); }
.year-test.locked .yt-ic { color: var(--ink-faint); }
.topic-btn.accent { color: var(--accent-2); border-color: rgba(103,232,249,0.3); }

/* test-variant sheet */
.test-variants { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.tv-row { display: flex; align-items: center; gap: 10px; }
.tv-lbl { width: 66px; flex: none; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.tv-btns { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.tv-btn { flex: 1; min-width: 66px; padding: 11px 10px; border-radius: 12px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink); border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.05); transition: 0.2s var(--ease); }
.tv-btn:hover { border-color: var(--glass-hi); }
.tv-btn.locked::after { content: " 🔒"; font-size: 10px; }
.test-free-note { font-size: 12px; color: var(--accent-2); text-align: center; margin-top: 2px; }

/* typed custom day/minute inputs in the event sheet */
.ev-custom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; align-self: flex-start; }
.ev-custom-lbl { font-size: 12px; color: var(--ink-faint); }
.ev-num { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.ev-num input { width: 54px; padding: 8px; border-radius: 10px; border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.04); color: var(--ink); font-size: 14px; text-align: center; outline: none; }
.ev-num input:focus { border-color: var(--accent); }

.scene-chip.locked { opacity: 0.7; }
.scene-chip.locked::after { content: "🔒"; margin-left: 5px; font-size: 10px; }

.toast { position: fixed; left: 50%; bottom: 118px; transform: translateX(-50%) translateY(10px); z-index: 60; max-width: 82%; padding: 11px 18px; border-radius: 999px; font-size: 13px; color: var(--ink); background: rgba(20,18,30,0.94); border: 1px solid var(--glass-brd); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.8); opacity: 0; pointer-events: none; transition: 0.3s var(--ease); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Extra palettes (premium) + minimalist theme ---- */
body[data-scene="forest"]  { --c1:#3fae7a; --c2:#7fd08b; --c3:#2f8f6b; --c4:#1f6b52; --accent:#5ec98a; --accent-2:#a7e8b0; --glow:rgba(94,201,138,.5); }
body[data-scene="rose"]    { --c1:#ff6f9c; --c2:#ff9ec2; --c3:#ff5c8a; --c4:#c85c9c; --accent:#ff9ec2; --accent-2:#ffd0e0; --glow:rgba(255,120,160,.5); }
body[data-scene="mono"]    { --c1:#6b7280; --c2:#9aa3af; --c3:#4b5563; --c4:#374151; --accent:#c5cbd6; --accent-2:#e5e9f0; --glow:rgba(160,170,190,.4); }
body[data-scene="mono"] .blob { opacity: 0.3; }
body[data-scene="minimal"] { --c1:#4a5568; --c2:#5a6478; --c3:#3a4256; --c4:#2a3040; --accent:#aab2c4; --accent-2:#cfd6e4; --glow:rgba(160,170,190,.26); }
body[data-scene="minimal"] .blob { opacity: 0.14; filter: blur(96px); }
body[data-scene="minimal"] .grain { opacity: 0.025; }
/* Blue — calm, universal default (subtle motion, no heavy effects) */
body[data-scene="blue"] { --c1:#3f74e6; --c2:#57b0ef; --c3:#4b8bff; --c4:#2f5fd6; --accent:#7bb0ff; --accent-2:#a7d6ff; --glow:rgba(95,140,235,.30); }
body[data-scene="blue"] .blob { opacity: 0.20; filter: blur(92px); }
body[data-scene="blue"] .grain { opacity: 0.03; }
body[data-scene="blue"] .scene-chip[data-scene="blue"] .dot { background: linear-gradient(135deg,#a7d6ff,#3f74e6); }

/* ============================================================
   v12 — coming-soon systems · per-subject extension · theory · syllabus gaps
   ============================================================ */
/* "coming soon" country chips (visible but not enterable) */
.country-chip { position: relative; }
.country-chip.soon { opacity: 0.5; cursor: default; }
.country-chip.soon:hover { color: var(--ink-soft); transform: none; }
.cc-soon {
  position: absolute; top: 5px; right: 5px;
  font-size: 8px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--accent-2); background: rgba(103,232,249,0.12);
  border: 1px solid rgba(103,232,249,0.25); border-radius: 999px; padding: 2px 5px;
}

/* onboarding — per-subject rozszerzenie picker */
.ob-hint { font-size: 12px; color: var(--ink-faint); line-height: 1.45; margin: 2px 0 10px; }
.ext-list { display: flex; flex-direction: column; gap: 8px; }
.ext-toggle {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 14px;
  border-radius: 14px; cursor: pointer; text-align: left; color: var(--ink-soft);
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.03); transition: 0.2s var(--ease);
}
.ext-toggle:hover { color: var(--ink); border-color: var(--glass-hi); }
.ext-toggle .et-ic { font-size: 20px; flex: none; }
.ext-toggle .et-name { flex: 1; font-size: 14px; font-weight: 500; }
.ext-toggle .et-check {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: transparent;
  border: 1.5px solid var(--glass-brd); transition: 0.2s var(--ease);
}
.ext-toggle.active { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: rgba(167,139,250,0.08); }
.ext-toggle.active .et-check { color: #0a0912; border-color: transparent; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }

/* extended-subject badge on the subject card */
.ext-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
  color: #0a0912; background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-radius: 999px; padding: 2px 6px; vertical-align: middle;
}
.subject-card.ext { border-color: rgba(167,139,250,0.4); }

/* syllabus placeholder (dział in the podstawa, questions in preparation) */
.topic-card.prep { opacity: 0.74; }
.topic-card.prep .topic-main small { color: var(--accent-2); }
.prep-tag {
  font-size: 10.5px; font-weight: 600; color: var(--accent-2); white-space: nowrap;
  border: 1px solid rgba(103,232,249,0.25); background: rgba(103,232,249,0.08);
  border-radius: 999px; padding: 5px 10px;
}
.topic-btn.theory { color: var(--ink); border-color: rgba(167,139,250,0.35); background: rgba(167,139,250,0.10); }

/* theory reading sheet */
.theory-card { align-items: stretch; max-height: 84vh; }
.theory-title { text-align: left; }
.theory-body {
  width: 100%; overflow-y: auto; max-height: 62vh; display: flex; flex-direction: column;
  gap: 9px; padding-right: 4px; text-align: left; scrollbar-width: thin;
}
.theory-body .th-h { font-family: "Sora", sans-serif; font-size: 14px; font-weight: 600; color: var(--accent-2); margin-top: 6px; }
.theory-body .th-h:first-child { margin-top: 0; }
.theory-body .th-p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.theory-body .th-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.theory-body .th-list li { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.theory-body strong { color: var(--ink); font-weight: 600; }
/* "Practice" learn view: worked examples (read-only, solved + explained) */
.theory-body .wex-head { margin-top: 14px; }
.wex { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-brd); display: flex; flex-direction: column; gap: 5px; }
.wex-q { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.wex-fig { align-self: center; max-width: 220px; margin: 2px 0; }
.wex-fig svg { width: 100%; height: auto; }
.wex-o { font-size: 13px; color: var(--ink-faint); padding: 6px 11px; border-radius: 9px; border: 1px solid transparent; line-height: 1.4; }
.wex-o.correct { color: var(--ink); background: rgba(103,232,180,0.13); border-color: rgba(103,232,180,0.42); font-weight: 600; }
.wex-o.correct::before { content: "✓ "; color: #59d3a8; font-weight: 700; }
.wex-why { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin-top: 3px; padding-left: 2px; }

/* subject topics header with a single "extended level" chip at the top */
.topics-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topics-ext {
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap;
  color: #0a0912; background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-radius: 999px; padding: 4px 11px; box-shadow: 0 4px 14px -4px var(--glow);
}

/* account box (in the Pro sheet; shown only when Supabase is configured) */
.account-box { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.03); transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.account-box.flash { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 22px -6px var(--glow); }
.account-hint { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; text-align: center; }
.account-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 12px 14px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--glass-brd); background: rgba(255,255,255,0.06); transition: 0.2s var(--ease); }
.account-btn:hover { border-color: var(--glass-hi); }
.account-btn.google { background: #fff; color: #1f2430; border-color: transparent; }
.account-email { display: flex; gap: 8px; }
.account-email .text-input { flex: 1; }
.account-email .account-btn { width: auto; flex: none; white-space: nowrap; }
#accountUser { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.account-who { font-size: 13.5px; color: var(--ink-soft); text-align: center; }
.account-who b { color: var(--ink); }
.account-delete { color: rgba(255,120,140,0.7); font-size: 12px; }
.account-delete:hover { color: #ff5c7a; }

/* Short viewports (e.g. Galaxy A35 and most phones inside the installed app):
   shrink the focus orb + tighten spacing so the timer, presets, "more styles"
   row and the tab bar all fit on screen without scrolling. The overflow-y:auto
   on .view-focus is the safety net; this keeps scrolling from being needed. */
@media (max-height: 860px) {
  .view-focus { padding-top: 4px; }
  .orb-wrap { width: 240px; height: 240px; margin: 2px 0 14px; }
  .orb { width: 168px; height: 168px; }
  .time { font-size: 44px; }
  .end-hint { margin: -10px 0 10px; }
  .presets { margin-bottom: 12px; }
  .cta { height: 54px; }
  .scenes { padding-top: 12px; }
}
@media (max-height: 720px) {
  .orb-wrap { width: 190px; height: 190px; margin: 0 0 10px; }
  .orb { width: 132px; height: 132px; }
  .time { font-size: 38px; }
  .presets { margin-bottom: 10px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blob, .orb, .orb-glow, .overlay-orb { animation: none !important; }
}

/* ============================================================
   Languages tab ("Języki")
   ============================================================ */
/* 5 tabs now share the bar — tighten so labels never clip on ~360px */
.tabbar.five { gap: 3px; padding: 6px; }
.tabbar.five .tab { font-size: 10px; padding: 8px 0; gap: 3px; }
.tabbar.five .tab svg { width: 20px; height: 20px; }

.view-lang { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-top: 6px; gap: 14px; align-items: stretch; animation: fadeUp 0.5s var(--ease); }
.view-lang::-webkit-scrollbar { display: none; }

.lang-course .subj-ic { font-size: 28px; }
.ll-tagline { align-self: flex-start; color: var(--ink-soft); font-size: 13px; margin: -6px 2px 2px; }
.ll-sub { align-self: flex-start; color: var(--ink-faint); font-size: 12.5px; margin: -6px 2px 4px; }

/* level list rows: CEFR tag + title/sub + chevron */
.level-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; }
.level-card:hover { border-color: var(--glass-hi); transform: translateY(-1px); }
.level-card .lvl-tag { flex: 0 0 auto; min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 12px; font-family: "Sora", sans-serif; font-weight: 700; font-size: 15px; color: var(--accent); background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.28); }
.level-card .lvl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.level-card .lvl-main b { font-family: "Sora", sans-serif; font-size: 15px; font-weight: 600; }
.level-card .lvl-main small { color: var(--ink-faint); font-size: 11.5px; }
.level-card .lvl-go { flex: 0 0 auto; color: var(--ink-faint); font-size: 22px; line-height: 1; }
.level-card.prep { opacity: 0.6; }
.level-card.prep .lvl-main small { color: var(--accent-2); }

/* phrasebook rows inside the (reused) theory sheet */
.ph-intro { color: var(--ink-soft); font-style: italic; margin-bottom: 6px; }
.ph-hearhint { font-size: 12.5px; color: var(--ink-faint); margin: 0 0 4px; }
.phrase-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--glass-brd); }
.phrase-row:first-of-type { border-top: none; }
.phrase-row.sayable { cursor: pointer; }
.ph-text { flex: 1 1 auto; min-width: 0; }
.ph-target { font-family: "Sora", sans-serif; font-size: 16px; font-weight: 600; color: var(--ink); }
.ph-gloss { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.ph-pron { font-size: 12px; color: var(--accent-2); margin-top: 3px; letter-spacing: 0.2px; }
.ph-speak { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--glass-brd); background: rgba(167,139,250,0.10); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.18s var(--ease); }
.ph-speak:hover { border-color: var(--accent); background: rgba(167,139,250,0.20); }
.ph-speak:active, .ph-speak.playing { background: var(--accent); color: #0a0912; transform: scale(1.08); }

/* ---- Languages: grammar tables + level test + richer quiz feedback ---- */
.topic-card.lang-gram { border-color: rgba(103,232,249,0.28); }
.ph-speak.sm { width: 38px; height: 38px; font-size: 17px; }

.gram-cap { margin: 12px 0 6px; font-family: "Sora", sans-serif; font-weight: 600; font-size: 13.5px; color: var(--accent-2); }
.gram-table { display: flex; flex-direction: column; border: 1px solid var(--glass-brd); border-radius: 12px; overflow: hidden; }
.gram-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--glass-brd); }
.gram-row:first-child { border-top: none; }
.gram-row.sayable { cursor: pointer; }
.gram-row.sayable:hover { background: rgba(255,255,255,0.03); }
.gram-pf { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.gram-p { color: var(--ink-faint); font-size: 13px; min-width: 42px; }
.gram-f { font-family: "Sora", sans-serif; font-weight: 600; font-size: 15.5px; color: var(--ink); }
.gram-g { flex: 0 1 auto; color: var(--ink-soft); font-size: 12.5px; text-align: right; }
.gram-ex { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--glass-brd); }
.gram-ex.sayable { cursor: pointer; }
.gram-ex-t { flex: 1 1 auto; font-family: "Sora", sans-serif; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.gram-ex-g { flex: 0 1 auto; color: var(--ink-soft); font-size: 12.5px; text-align: right; }

/* wrong-answer feedback: correct answer spelled out, then the explanation */
.lq-correct { color: #3fd8c8; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.lq-whytext { color: var(--ink-soft); font-size: 13px; line-height: 1.55; }

/* ---- Languages: write-it-yourself (typing) drill ---- */
.lq-type { display: flex; flex-direction: column; gap: 10px; }
.lq-input { width: 100%; box-sizing: border-box; text-align: center; font-family: "Sora", sans-serif; font-size: 18px; }
.lq-input.ok { border-color: rgba(63,216,200,0.7); color: #3fd8c8; }
.lq-input.wrong { border-color: rgba(255,92,122,0.7); color: #ff5c7a; }
.lq-check { height: 50px; }
.lq-skip { align-self: center; }
.lq-correct.wrongc { color: #ff5c7a; }
