/* ==========================================================================
   Pikajuoksu – tyylit
   Teemat: data-theme = coral | teal | mint, tila: data-mode = light | dark
   ========================================================================== */

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --radius-sm: 14px;
  --gap: 16px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  /* Kategoriavärit – samat kaikissa teemoissa */
  --c-lammittely: #F2A33A;
  --c-nopeus: #F0484E;
  --c-hypyt: #8B5CF6;
  --c-voima: #2F8FEA;
  --c-juoksu: #16B57A;
  --c-verryttely: #2FB3BF;

  /* Vaalea pohja */
  --bg: #F5F4F9;
  --surface: #FFFFFF;
  --surface-2: #EEECF4;
  --surface-3: #E3E0EC;
  --text: #17151F;
  --text-2: #5C586B;
  --text-3: #8D899C;
  --border: rgba(23, 21, 31, 0.08);
  --shadow: 0 1px 2px rgba(23, 18, 40, 0.05), 0 10px 30px rgba(23, 18, 40, 0.07);
  --scrim: rgba(12, 10, 20, 0.45);
  --ok: #12A36B;
  --danger: #D93A42;
  --fig-line: rgba(23, 21, 31, 0.18);
  color-scheme: light;
}

/* Teemat */
[data-theme="coral"] { --accent: #FF5A5F; --accent-2: #7C4DFF; --accent-ink: #D7363D; --on-accent: #fff; --grad: linear-gradient(135deg, #FF6B5A 0%, #E2489B 52%, #7C4DFF 100%); }
[data-theme="teal"]  { --accent: #0FB5C9; --accent-2: #3D5AF1; --accent-ink: #087F8E; --on-accent: #fff; --grad: linear-gradient(135deg, #12C6C9 0%, #1A8EE0 50%, #3D4FF1 100%); }
[data-theme="mint"]  { --accent: #12C98E; --accent-2: #84CC16; --accent-ink: #087A57; --on-accent: #062A1D; --grad: linear-gradient(135deg, #2EE6A8 0%, #5BD86E 50%, #A3E635 100%); }

/* Tumma tila */
[data-mode="dark"] {
  --bg: #100E18;
  --surface: #1B1826;
  --surface-2: #252134;
  --surface-3: #312C44;
  --text: #F4F2FA;
  --text-2: #B3AEC6;
  --text-3: #7F7A93;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --scrim: rgba(0, 0, 0, 0.6);
  --fig-line: rgba(255, 255, 255, 0.2);
  color-scheme: dark;
}
[data-mode="dark"][data-theme="coral"] { --accent-ink: #FF8A8E; }
[data-mode="dark"][data-theme="teal"] { --accent-ink: #4FD8E8; }
[data-mode="dark"][data-theme="mint"] { --accent-ink: #4BE6B0; }

/* ---------- perusta ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.in-player { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--text-2); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.app { max-width: 520px; margin: 0 auto; min-height: 100dvh; }
.view {
  padding: calc(16px + var(--safe-t)) 16px calc(var(--nav-h) + 28px + var(--safe-b));
  outline: none;
  animation: view-in 0.28s ease-out;
}
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.boot { display: grid; place-items: center; min-height: 60vh; }
.boot-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--grad); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: 0.5; } }

/* ---------- alanavigaatio ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 520px; margin: 0 auto;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; color: var(--text-3); font-size: 12px; font-weight: 600;
  min-height: 48px; position: relative; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.tab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab[data-tab="today"] svg path { fill: currentColor; stroke-width: 1.2; }
.tab.active { color: var(--accent-ink); }
.tab.active::before { content: ""; position: absolute; top: 6px; width: 46px; height: 32px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 14%, transparent); z-index: -1; }
.tab.pressing { color: var(--accent-ink); }
.tab.pressing svg { animation: press-grow 0.9s linear forwards; }
@keyframes press-grow { to { transform: scale(1.35) rotate(90deg); } }

/* ---------- tekstit ja otsikot ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 18px; gap: 12px; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 26px 4px 10px; }

/* ---------- kortit ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.card + .card { margin-top: 12px; }
.card-title { font-size: 19px; font-weight: 750; }
.hero {
  position: relative; overflow: hidden;
  background: var(--grad); color: var(--on-accent);
  border-radius: 28px; padding: 22px 20px 20px;
  box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 35%, transparent);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 65%);
  pointer-events: none;
}
.hero-kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; opacity: 0.9; }
.hero-title { font-size: 32px; font-weight: 850; letter-spacing: -0.02em; margin-top: 4px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-chip { background: rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 650; }
[data-theme="mint"] .hero-chip { background: rgba(6, 42, 29, 0.12); }
.hero-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; font-weight: 550; }
.hero-list li { display: flex; align-items: center; gap: 8px; }
.hero-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.7; flex: none; }
.hero .btn { margin-top: 18px; }
.hero-text { font-size: 17px; margin-top: 10px; opacity: 0.95; }
.hero-icon { font-size: 44px; line-height: 1; }

/* ---------- painikkeet ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; border: 0;
  font-size: 17px; font-weight: 700; letter-spacing: 0.005em;
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; text-decoration: none;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; }
.btn-block { width: 100%; }
.btn-xl { min-height: 64px; font-size: 20px; border-radius: 20px; width: 100%; }
.btn-primary { background: var(--grad); color: var(--on-accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-white { background: #fff; color: #17151F; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); }
.btn-small { min-height: 44px; font-size: 15px; padding: 0 14px; border-radius: 12px; }
.link-btn { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.segmented button { min-height: 48px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; font-size: 15px; color: var(--text-2); line-height: 1.15; padding: 4px 6px; }
.segmented button small { display: block; font-weight: 550; font-size: 12px; opacity: 0.85; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.hero .segmented { background: rgba(255, 255, 255, 0.18); }
.hero .segmented button { color: inherit; opacity: 0.85; }
.hero .segmented button.on { background: #fff; color: #17151F; opacity: 1; }

.input {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px;
  border: 1.5px solid var(--surface-3); background: var(--surface); color: var(--text); font: inherit;
}
.input:focus { outline: none; border-color: var(--accent); }
.input-big { font-size: 26px; font-weight: 800; text-align: center; letter-spacing: 0.06em; }

/* ---------- viikkotähdet ---------- */
.week { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stars { display: flex; gap: 8px; }
.star { width: 38px; height: 38px; }
.star path { fill: var(--surface-3); stroke: none; transition: fill 0.3s; }
.star.on path { fill: url(#star-grad); }
.star.on { animation: star-pop 0.5s ease-out; }
@keyframes star-pop { 40% { transform: scale(1.25) rotate(-8deg); } }

/* ---------- pienet osat ---------- */
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--cat, var(--accent)); margin-right: 8px; flex: none; vertical-align: 1px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; background: var(--surface-2); font-size: 13px; font-weight: 650; color: var(--text-2); }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 12px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

.reminder {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
  background: color-mix(in srgb, #FFC53D 18%, var(--surface)); border: 1px solid color-mix(in srgb, #FFC53D 40%, transparent);
  margin-bottom: 14px; font-size: 15px;
}
.reminder b { display: block; }
.reminder .btn { flex: none; }
.reminder-x { background: none; border: 0; width: 44px; height: 44px; font-size: 22px; color: var(--text-3); flex: none; }

/* ---------- dialogit ja paneelit ---------- */
.modal-wrap, .sheet-wrap {
  position: fixed; inset: 0; z-index: 100; background: var(--scrim);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity 0.2s ease;
}
.modal-wrap.show, .sheet-wrap.show { opacity: 1; }
.modal {
  width: 100%; max-width: 420px; background: var(--surface); border-radius: 26px; padding: 24px 20px 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); transform: translateY(12px) scale(0.98); transition: transform 0.22s ease;
  max-height: calc(100dvh - 40px); overflow: auto;
}
.modal-wrap.show .modal { transform: none; }
.modal-title { font-size: 23px; font-weight: 800; margin-bottom: 10px; }
.modal-body { font-size: 17px; }
.modal-body p + p { margin-top: 8px; }
.modal-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 22px; }
.modal-actions .btn { padding: 0 10px; font-size: 16px; }
.modal-pain .modal-actions, .modal-pause .modal-actions { grid-auto-flow: row; }
.modal-pain .modal-actions .btn-primary, .modal-pause .modal-actions .btn-primary { order: -1; min-height: 60px; }
.pain-dlg { text-align: center; padding-top: 4px; }
.pain-icon { font-size: 56px; }
.pain-text { font-size: 21px; font-weight: 650; margin-top: 10px; line-height: 1.35; }
.gate-q { display: block; font-size: 24px; font-weight: 800; margin: 14px 0 12px; text-align: center; }
.gate-err { color: var(--danger); text-align: center; margin-top: 8px; font-weight: 650; }

.sheet-wrap { align-items: flex-end; padding: 0; }
.sheet {
  width: 100%; max-width: 520px; max-height: 88dvh; overflow: auto; background: var(--surface);
  border-radius: 28px 28px 0 0; padding: 8px 18px calc(22px + var(--safe-b));
  transform: translateY(40px); transition: transform 0.25s ease;
}
.sheet-wrap.show .sheet { transform: none; }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 4px auto 14px; }
.sheet h2 { font-size: 24px; font-weight: 800; }

.toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.in-player .toast-root { bottom: calc(120px + var(--safe-b)); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 480px; width: max-content;
  background: #211D2E; color: #fff; padding: 12px 16px; border-radius: 16px; font-size: 15px; font-weight: 550;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); transform: translateY(20px); opacity: 0; transition: all 0.22s ease;
}
.toast.show { transform: none; opacity: 1; }
.toast-action { background: none; border: 0; color: #FFD166; font-weight: 800; min-height: 40px; padding: 0 6px; }

.confetti { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.confetti i { position: absolute; width: 9px; height: 14px; border-radius: 3px; animation: confetti 1.2s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 120px)) rotate(var(--r)); opacity: 0; } }

/* ==========================================================================
   Harjoitussoitin
   ========================================================================== */
.player {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); color: var(--text);
  display: flex; flex-direction: column; max-width: 520px; margin: 0 auto;
  animation: player-in 0.25s ease-out;
}
.player.leaving { animation: player-out 0.2s ease-in forwards; }
@keyframes player-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes player-out { to { opacity: 0; transform: translateY(24px); } }

.pl-top { padding: calc(10px + var(--safe-t)) 16px 6px; flex: none; }
.pl-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pl-bar-fill { height: 100%; border-radius: 3px; background: var(--cat); transition: width 0.4s ease; }
.pl-toprow { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.pl-count { font-weight: 750; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pain-btn {
  min-height: 48px; padding: 0 16px; border-radius: 999px; border: 2px solid color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); font-weight: 750; font-size: 15px;
}
[data-mode="dark"] .pain-btn { color: #FF8F95; }

.pl-main { flex: 1; overflow-y: auto; padding: 8px 18px 18px; display: flex; flex-direction: column; -webkit-overflow-scrolling: touch; }
.pl-controls {
  flex: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px;
  padding: 10px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--border); background: var(--surface);
}
.pl-controls-wide { grid-auto-flow: row; }
.ctl {
  min-height: 64px; border: 0; border-radius: 18px; background: var(--surface-2); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 750; font-size: 14px;
  touch-action: manipulation; transition: transform 0.1s;
}
.ctl:active:not(:disabled) { transform: scale(0.96); }
.ctl svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ctl[data-act="skip"] svg path:first-child { fill: currentColor; stroke-width: 1.5; }
.ctl-main { background: var(--cat); color: #fff; font-size: 16px; }
.ctl:disabled { opacity: 0.4; }

.ex-head { text-align: center; margin-top: 6px; }
.ex-meta { font-size: 14px; font-weight: 650; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.ex-meta .cat-dot { background: var(--cat); margin-right: 2px; }
.ex-name { font-size: 30px; font-weight: 850; margin-top: 6px; letter-spacing: -0.02em; }
.ex-head.compact .ex-name { font-size: 24px; }
.ex-set { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--cat) 14%, transparent); color: var(--text); font-weight: 750; font-size: 15px; }

.fig { margin: 8px auto 0; width: 100%; max-width: 300px; }
.fig-running { max-width: 200px; margin-top: 0; }
.figure { display: block; width: 100%; height: auto; overflow: visible; }
.figure path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.figure .f-near { stroke: var(--fig); stroke-width: 7; }
.figure .f-far { stroke: var(--fig); stroke-width: 7; opacity: 0.45; }
.figure.flat .f-far { opacity: 1; }
.figure .f-head { fill: var(--fig); stroke: none; }
.figure .f-rope { stroke: var(--text-3); stroke-width: 2.5; }
.fig-floor, .fig-lane { stroke: var(--fig-line); stroke-width: 3; stroke-linecap: round; }
.fig-lane { stroke-dasharray: 8 10; stroke-width: 2; }
.fig-mat { fill: color-mix(in srgb, var(--fig) 22%, transparent); }
.fig-wall { fill: var(--fig-line); }
.fig-grid path { fill: color-mix(in srgb, var(--fig) 12%, transparent); stroke: var(--fig-line); stroke-width: 2; }
.fig-tape { stroke: #FFC53D; stroke-width: 5; stroke-linecap: round; }
.gs-cell { fill: color-mix(in srgb, var(--fig) 8%, transparent); stroke: #FFC53D; stroke-width: 4; }
.gs-num { font: 800 24px var(--font); fill: var(--text-2); text-anchor: middle; }
.gs-feet { fill: var(--fig); opacity: 0.85; }
.gs-dim { font: 600 11px var(--font); fill: var(--text-3); text-anchor: middle; }
@media (prefers-reduced-motion: reduce) { .figure * { animation: none !important; } }

.dose { display: flex; flex-direction: column; align-items: center; margin-top: 6px; }
.dose-big { font-size: 56px; font-weight: 900; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.dose-label { font-size: 16px; font-weight: 650; color: var(--text-2); margin-top: 6px; text-align: center; }

.ex-instr { font-size: 19px; font-weight: 550; margin-top: 16px; text-align: center; line-height: 1.4; }
.ex-note { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--cat) 12%, var(--surface)); border-left: 5px solid var(--cat); font-weight: 650; }
.ex-tip, .ex-safety { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); font-size: 15px; border: 1px solid var(--border); }
.cues { display: grid; gap: 10px; margin-top: 14px; }
.cue-box { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.cue-box h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.cue-box.remember h3 { color: var(--ok); }
.cue-box.avoid h3 { color: var(--danger); }
[data-mode="dark"] .cue-box.remember h3 { color: #4BE0A0; }
[data-mode="dark"] .cue-box.avoid h3 { color: #FF8F95; }
.cue-box ul { margin: 0; padding-left: 20px; }
.cue-box li + li { margin-top: 2px; }
.cues-compact { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cues-compact li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 15px; }
.setup-card { margin-top: 12px; border-radius: 16px; border: 2px dashed #FFC53D; overflow: hidden; }
.setup-toggle { width: 100%; min-height: 50px; border: 0; background: color-mix(in srgb, #FFC53D 14%, var(--surface)); font-weight: 750; text-align: left; padding: 0 14px; }
.setup-body { padding: 12px 14px; }
.setup-body p { margin-top: 8px; font-size: 15px; }
.fig-setup { max-width: 230px; }
.video-link { display: inline-block; margin-top: 12px; font-weight: 700; }
.start-btn { margin-top: 18px; position: sticky; bottom: 0; }
.hint-done { text-align: center; color: var(--text-2); margin-top: 14px; font-size: 15px; }

/* Ajastin */
.timer-wrap { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
.ring {
  --p: 0; width: min(64vw, 250px); aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--cat) calc(var(--p) * 360deg), var(--surface-3) 0);
  display: grid; place-items: center; transition: background 0.1s linear;
}
.ring-inner { width: 86%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-big { font-size: clamp(76px, 26vw, 112px); font-weight: 900; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.timer-run { font-size: clamp(64px, 22vw, 96px); margin-top: 30px; }
.timer-unit { font-size: 15px; font-weight: 650; color: var(--text-2); }
.run-go { text-align: center; font-size: 30px; font-weight: 850; margin-top: 18px; }

.countdown { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; }
.count-label { font-size: 26px; font-weight: 800; color: var(--text-2); }
.count-num { font-size: 180px; font-weight: 900; line-height: 1; color: var(--cat); font-variant-numeric: tabular-nums; min-height: 180px; }
.count-num.pop { animation: count-pop 0.9s ease-out; }
@keyframes count-pop { 0% { transform: scale(1.5); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 100% { opacity: 0.85; } }

/* Lepo */
.player[data-phase="rest"] .pl-main { justify-content: flex-start; }
.rest-head { text-align: center; font-size: 30px; font-weight: 850; margin-top: 10px; }
.ring-rest { background: conic-gradient(var(--c-verryttely) calc(var(--p) * 360deg), var(--surface-3) 0); }
.rest-text { text-align: center; margin-top: 14px; font-size: 18px; font-weight: 600; }
.rest-lock { text-align: center; font-size: 14px; margin-top: 6px; }
.next-card { display: flex; align-items: center; gap: 14px; margin-top: auto; padding: 12px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.next-fig { width: 84px; flex: none; }
.next-label { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.next-name { font-size: 19px; font-weight: 800; }
.next-sub { font-size: 14px; color: var(--text-2); }

/* Reaktiomerkit: koko näyttö näkyy 1–2 metrin päähän */
.player[data-phase^="rx-"] .pl-main { padding: 0; }
.rx { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; min-height: 100%; }
.rx-wait { background: #1A1726; color: #CFCBE0; }
.rx-dot { width: 40px; height: 40px; border-radius: 50%; background: #5E5875; animation: pulse 1.4s ease-in-out infinite; margin-bottom: 18px; }
.rx-label { font-size: 26px; font-weight: 750; }
.rx-small { font-size: 18px; font-weight: 650; opacity: 0.8; margin: 8px 0; }
.rx-prep { background: #1A1726; color: #fff; }
.rx-pos { font-size: clamp(48px, 15vw, 72px); font-weight: 900; margin-top: 8px; color: #FFD166; }
.rx-go { background: #19C463; color: #fff; }
.rx-nogo { background: #E5383F; color: #fff; }
.rx-sym { font-size: clamp(96px, 34vw, 170px); font-weight: 950; line-height: 1; letter-spacing: -0.03em; }
.rx-arrow { font-size: clamp(170px, 60vw, 280px); }
.rx-word { font-size: clamp(30px, 10vw, 48px); font-weight: 900; margin-top: 10px; }
.rx-count { font-size: 40px; font-weight: 900; margin-top: 16px; opacity: 0.85; font-variant-numeric: tabular-nums; }
.player[data-phase="rx-go"], .player[data-phase="rx-signal"] { background: #19C463; }
.player[data-phase="rx-nogo"] { background: #E5383F; }
.player[data-phase="rx-wait"], .player[data-phase="rx-prep"] { background: #1A1726; }
.player[data-phase^="rx-"] .pl-top { color: #fff; }
.player[data-phase^="rx-"] .pl-count { color: rgba(255, 255, 255, 0.75); }
.player[data-phase^="rx-"] .pl-controls { background: rgba(0, 0, 0, 0.18); border-top-color: transparent; }
.player[data-phase^="rx-"] .ctl { background: rgba(255, 255, 255, 0.16); color: #fff; }
.player[data-phase^="rx-"] .pain-btn { background: rgba(255, 255, 255, 0.92); color: #C42830; border-color: transparent; }

/* Juoksu */
.run-start { text-align: center; font-size: 22px; margin-top: 10px; }
.run-start b { color: var(--cat); }
.run-chase { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--cat) 14%, var(--surface)); font-weight: 700; text-align: center; }

/* Arviointi ja yhteenveto */
.pl-rating, .pl-summary { padding-top: calc(16px + var(--safe-t)); }
.rate-head { text-align: center; margin: 10px 0 18px; }
.rate-emoji { font-size: 52px; }
.rate-head h1 { font-size: 32px; font-weight: 850; margin: 6px 0; }
.rate-list { display: grid; gap: 12px; }
.rate-row { background: var(--surface); border-radius: 20px; padding: 14px; border: 1px solid var(--border); }
.rate-name { font-weight: 750; font-size: 17px; display: flex; align-items: center; flex-wrap: wrap; column-gap: 6px; }
.rate-name .cat-dot { background: var(--cat); margin-right: 2px; }
.rate-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.rate-opt { min-height: 66px; border-radius: 16px; border: 2px solid transparent; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; gap: 2px; transition: transform 0.12s, border-color 0.15s, background 0.15s; }
.rate-e { font-size: 28px; line-height: 1; }
.rate-opt.on { border-color: var(--cat); background: color-mix(in srgb, var(--cat) 14%, var(--surface)); transform: scale(1.03); }
.pain-note { margin-top: 6px; }

.sum-hero { position: relative; text-align: center; padding: 26px 18px 20px; border-radius: 28px; background: var(--grad); color: var(--on-accent); }
.sum-check { width: 66px; height: 66px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); margin: 0 auto 10px; display: grid; place-items: center; animation: star-pop 0.6s ease-out; }
.sum-check svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sum-hero h1 { font-size: 32px; font-weight: 850; }
.sum-msg { margin-top: 8px; font-size: 17px; opacity: 0.95; }
.sum-stats { display: flex; justify-content: center; gap: 28px; margin-top: 16px; }
.sum-stats div { display: flex; flex-direction: column; }
.sum-stats b { font-size: 34px; font-weight: 900; line-height: 1; }
.sum-stats span { font-size: 13px; font-weight: 650; opacity: 0.9; }
.sum-block { margin-top: 18px; }
.sum-block h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 8px; }
.sum-hint { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.sum-hint + .sum-hint { margin-top: 8px; }
.sum-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 18px; border: 1px solid var(--border); }
.sum-list li { display: flex; align-items: center; padding: 11px 14px; gap: 4px; }
.sum-list li + li { border-top: 1px solid var(--border); }
.sum-list .cat-dot { background: var(--cat); }
.sum-n { flex: 1; font-weight: 600; }
.saved-ok { text-align: center; color: var(--ok); font-weight: 750; margin: 16px 0 4px; }
.badge-new { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.badge-new + .badge-new { margin-top: 8px; }
.badge-ico { font-size: 36px; }

/* Leveämpi näyttö: soitin keskellä */
@media (min-width: 560px) {
  .player { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ==========================================================================
   Tänään
   ========================================================================== */
.hero + .card, .card + .hero, .resume-card + .hero, .welcome-card + .hero { margin-top: 14px; }
.hero + .week-card { margin-top: 14px; }
.resume-card { border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); margin-bottom: 14px; }
.welcome-card { margin-bottom: 14px; }
.hero-link { color: inherit; opacity: 0.95; margin-top: 8px; }
.hero-hobby-ico .ico { width: 54px; height: 54px; }
.hero-hobby { background: linear-gradient(135deg, #4B3B8F 0%, #7C4DFF 55%, #B57BFF 100%); color: #fff; }
.hero-rest { background: linear-gradient(135deg, #24324F 0%, #34508A 55%, #4C6FC4 100%); color: #fff; }
.hero-rest .hero-icon, .hero-hobby .hero-icon { margin-bottom: 8px; }
.ico { width: 22px; height: 22px; display: inline-block; vertical-align: middle; }

.week-card .card-title { font-size: 18px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; }
.wd { display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px; border-radius: 14px; gap: 2px; min-width: 0; }
.wd-name { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; }
.wd-num { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wd.today { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.wd.today .wd-num { color: var(--accent-ink); }
.wd-marks { display: flex; align-items: center; justify-content: center; gap: 2px; min-height: 16px; }
.wd-marks i { width: 7px; height: 7px; border-radius: 50%; }
.wd-hobby { color: #8B6CF6; display: inline-flex; }
.wd-hobby .ico { width: 15px; height: 15px; }
.wd.trained .wd-num { color: var(--text); }
.hero-rest, .hero-hobby { box-shadow: 0 16px 40px rgba(40, 50, 110, 0.3); }

/* Testitila */
.debug-bar { border: 2px dashed #FFC53D; border-radius: 18px; padding: 10px; margin-bottom: 14px; display: grid; gap: 8px; background: color-mix(in srgb, #FFC53D 8%, var(--surface)); }
.debug-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; font-size: 14px; }
.debug-row .btn { flex: 1; padding: 0 6px; min-width: 0; }

/* ==========================================================================
   Kalenteri
   ========================================================================== */
.icon-btn { width: 48px; height: 48px; border-radius: 14px; border: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--text); }
.icon-btn .ico { width: 22px; height: 22px; }
.cal-card { padding: 14px 10px 12px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.cal-title { font-size: 21px; font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head div { text-align: center; font-size: 12px; font-weight: 750; color: var(--text-3); text-transform: uppercase; padding: 4px 0 6px; }
.cal-cell {
  position: relative; aspect-ratio: 1 / 1.12; min-height: 46px; border: 0; border-radius: 12px; background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 6px 2px 4px; min-width: 0;
}
.cal-cell.empty { background: transparent; }
.cal-cell.future { opacity: 0.55; }
.cal-cell.today { box-shadow: inset 0 0 0 2.5px var(--accent); }
.cal-cell.has { background: color-mix(in srgb, var(--accent) 9%, var(--surface-2)); }
.cal-num { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1; }
.cal-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: auto; max-width: 100%; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; }
.cal-hobby { display: flex; color: #8B6CF6; margin-top: 3px; }
.cal-hobby .ico { width: 13px; height: 13px; }
.cal-pain { position: absolute; top: 2px; left: 2px; font-size: 10px; line-height: 1; }
.cal-sum { display: flex; justify-content: space-around; margin-top: 12px; padding: 14px; }
.cal-stat { display: flex; flex-direction: column; align-items: center; }
.cal-stat b { font-size: 30px; font-weight: 900; line-height: 1; }
.cal-stat span { font-size: 14px; color: var(--text-2); font-weight: 600; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 14px 6px 0; font-size: 13px; color: var(--text-2); font-weight: 600; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lg-hobby .ico { width: 16px; height: 16px; color: #8B6CF6; }

.day-hobbies { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip-hobby { color: #6E4FE0; background: color-mix(in srgb, #8B6CF6 15%, transparent); }
[data-mode="dark"] .chip-hobby { color: #BBA8FF; }
.chip-hobby .ico { width: 16px; height: 16px; }
.day-sess { margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--surface-2); }
.day-sess-name { font-size: 18px; font-weight: 800; }
.day-sess-meta { font-size: 14px; }
.day-items { list-style: none; margin: 10px 0 0; padding: 0; }
.day-items li { display: flex; align-items: center; padding: 6px 0; font-size: 15px; gap: 4px; }
.day-items li + li { border-top: 1px solid var(--border); }
.day-items .cat-dot { background: var(--cat); }
.day-it-name { flex: 1; }
.day-empty { margin-top: 12px; }
.del-btn { margin-top: 10px; color: var(--danger); }
.hobby-ov { display: flex; flex-wrap: wrap; gap: 8px; }
.hobby-ov .ico { width: 16px; height: 16px; }
.small { font-size: 13px; margin-top: 8px; }
.adult-link { color: var(--text-2); font-size: 15px; margin-top: 8px; }

/* Tasonnosto */
.offer { text-align: center; }
.offer-ico { font-size: 44px; margin-bottom: 6px; }
.offer p { font-size: 19px; font-weight: 600; }
.modal-levelup { position: relative; overflow: visible; text-align: center; }
.lvl-up { padding: 8px 0 2px; }
.lvl-up h2 { font-size: 30px; font-weight: 900; margin-top: 12px; }
.lvl-up p { color: var(--text-2); font-weight: 650; margin-top: 4px; }
.lvl-badge {
  width: 96px; height: 96px; margin: 0 auto; border-radius: 30px; background: var(--grad); color: var(--on-accent);
  display: grid; place-items: center; font-size: 54px; font-weight: 950; transform: rotate(-6deg);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 40%, transparent);
  animation: lvl-in 0.7s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes lvl-in { 0% { transform: scale(0.2) rotate(-40deg); opacity: 0; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }

/* ==========================================================================
   Oma kehitys
   ========================================================================== */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 30px; font-weight: 900; line-height: 1.05; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 13px; color: var(--text-2); font-weight: 650; }
.lvl-card { padding: 6px 16px; }
.lvl-group { padding: 12px 0; }
.lvl-group + .lvl-group { border-top: 1px solid var(--border); }
.lvl-cat { font-size: 15px; font-weight: 800; display: flex; align-items: center; margin-bottom: 6px; }
.lvl-cat .cat-dot { background: var(--cat); }
.lvl-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.lvl-name { flex: 1; font-size: 15px; font-weight: 600; min-width: 0; }
.steps { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.steps i { width: 12px; border-radius: 4px; background: var(--surface-3); }
.steps i.on { background: var(--cat); }
.lvl-num { width: 22px; text-align: right; font-weight: 850; font-variant-numeric: tabular-nums; }

.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge {
  border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 12px 6px 10px; min-height: 104px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; text-align: center;
}
.badge .badge-ico { font-size: 32px; line-height: 1.1; filter: grayscale(1); opacity: 0.45; }
.badge.earned { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.badge.earned .badge-ico { filter: none; opacity: 1; }
.badge-name { font-size: 12.5px; font-weight: 700; line-height: 1.2; color: var(--text-2); }
.badge.earned .badge-name { color: var(--text); }
.badge-dlg { text-align: center; }
.badge-big { font-size: 64px; }
.badge-dlg h2 { font-size: 24px; font-weight: 850; margin: 6px 0; }
.badge-date { margin-top: 10px; font-weight: 650; }

.test-card .chart + .chart, .test-card .chart-empty + .chart, .test-card .chart + .chart-empty, .test-card .chart-empty + .chart-empty { margin-top: 14px; }
.chart-head { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 4px; }
.chart-head span { color: var(--text-2); font-weight: 650; }
.chart svg { width: 100%; height: auto; display: block; }
.chart-empty { display: flex; justify-content: space-between; padding: 10px 0; }
.ch-grid { stroke: var(--border); stroke-width: 1.5; }
.ch-line { fill: none; stroke: var(--c-juoksu); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.ch-pt { fill: var(--surface); stroke: var(--c-juoksu); stroke-width: 3; }
.ch-pt.best { fill: var(--c-juoksu); }
.ch-ax, .ch-date { font: 600 10px var(--font); fill: var(--text-3); }
.ch-date { text-anchor: middle; }
.ch-val { font: 800 11px var(--font); fill: var(--text); text-anchor: middle; }
.test-note { margin: 12px 0; font-size: 15px; }

.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-sw { border: 2px solid transparent; background: var(--surface-2); border-radius: 18px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; min-height: 92px; }
.theme-sw span { width: 46px; height: 46px; border-radius: 50%; }
.theme-sw.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

/* ---------- Muistutus ---------- */
.reminder.card { flex-wrap: wrap; box-shadow: none; }
.reminder-text { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.reminder-text .small { margin-top: 0; }
.reminder-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------- Asetukset ---------- */
.locked-card { padding-top: 28px; padding-bottom: 22px; }
.lock-ico { font-size: 44px; margin-bottom: 6px; }
.field-label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.field-label .muted { font-weight: 550; }

.hobby-edit { padding: 10px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.hobby-edit .row { gap: 8px; }
.hobby-edit .input { flex: 1; min-width: 0; }
.hobby-ico-btn {
  width: 48px; height: 48px; flex: none; border-radius: 14px; border: 0;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-ink);
  display: grid; place-items: center;
}
.hobby-ico-btn .ico { width: 26px; height: 26px; }
.wd-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.wd-pick button {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  font-weight: 700; font-size: 14px; color: var(--text-2); padding: 0;
}
.wd-pick button.on { background: var(--accent); border-color: transparent; color: var(--on-accent); }

.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin-top: 12px; }
.icon-pick button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; min-height: 88px;
  border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 650; font-size: 13px;
}
.icon-pick .ico { width: 30px; height: 30px; color: var(--accent-ink); }

.toggles { padding-top: 6px; padding-bottom: 12px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--border); font-weight: 650; cursor: pointer; }
.toggle:last-of-type { border-bottom: 0; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 999px; background: var(--surface-3); flex: none; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.toggle input:checked + .switch { background: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(20px); }
.toggle input:focus-visible + .switch { outline: 3px solid var(--accent); outline-offset: 2px; }

.lvl-adj { display: flex; align-items: center; gap: 8px; min-height: 56px; border-bottom: 1px solid var(--border); }
.lvl-adj:last-child { border-bottom: 0; }
.lvl-adj .cat-dot { background: var(--cat); }
.lvl-adj-name { flex: 1; min-width: 0; font-weight: 650; }
.lvl-adj-num { width: 22px; text-align: center; font-size: 18px; }
.icon-btn.small { width: 44px; height: 44px; font-size: 22px; font-weight: 700; }
.icon-btn:disabled { opacity: 0.35; }

.protect { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 15px; }
.protect .ico { width: 26px; height: 26px; flex: none; }
.protect.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--text); }
.protect.ok .ico { color: var(--ok); }
.protect.warn { background: color-mix(in srgb, #FFC53D 20%, var(--surface)); }
.info-box { margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-size: 14px; line-height: 1.45; color: var(--text-2); }
.file-btn { position: relative; cursor: pointer; }
.btn-danger-outline { background: transparent; color: var(--danger); border: 2px solid color-mix(in srgb, var(--danger) 55%, transparent); }

.snap-list { list-style: none; margin: 0; padding: 0; }
.snap-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.snap-list li:last-child { border-bottom: 0; }
.snap-list .small { margin-top: 0; }
.restore-preview { font-size: 20px; padding: 14px; border-radius: 16px; background: var(--surface-2); text-align: center; margin-bottom: 10px; }
.modal-restore .modal-actions { grid-auto-flow: row; }
.modal-restore .modal-actions .btn-primary { order: -1; }

.tab.pressing { transform: scale(0.94); transition: transform 0.9s; }
