/* Temper. Mobile-first gym UI in the DarkForge look: deep violet night, lavender type,
   copper and sage accents, soft light orbs and film grain. Large touch targets for use between sets. */

:root {
  --bg: #120e1f;
  --bg-2: #1a1625;
  --surface: rgba(36, 30, 51, 0.62);
  --surface-2: rgba(18, 14, 31, 0.7);
  --line: rgba(224, 215, 240, 0.08);
  --line-strong: rgba(224, 215, 240, 0.16);
  --text: #e0d7f0;
  --text-hi: #f0e6ff;
  --muted: #9a91ad;
  --accent: #e28258;
  --accent-2: #ee9f7b;
  --accent-soft: rgba(226, 130, 88, 0.13);
  --accent-glow: rgba(226, 130, 88, 0.35);
  --sage: #7fb3a5;
  --sage-soft: rgba(127, 179, 165, 0.14);
  --lav: #b9a8ea;
  --load: #60a5fa;
  --load-soft: rgba(96, 165, 250, 0.13);
  --push: #e28258;
  --push-soft: rgba(226, 130, 88, 0.13);
  --deload: #b9a8ea;
  --ok: #7fb3a5;
  --warn: #e8b85c;
  --danger: #e5636b;
  --radius: 22px;
  --radius-sm: 14px;
  --display: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tabbar-h: 66px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; color: var(--text); font-family: var(--body); }
body {
  min-height: 100dvh; background: var(--bg);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--text); }
.hidden { display: none !important; }
::selection { background: var(--accent); color: var(--bg-2); }

/* Ambient light orbs and a faint forge grid behind everything. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 38% at 12% -4%, rgba(127, 179, 165, 0.16), transparent 70%),
    radial-gradient(48% 34% at 104% 34%, rgba(226, 130, 88, 0.12), transparent 70%),
    radial-gradient(60% 40% at 40% 108%, rgba(185, 168, 234, 0.1), transparent 70%),
    linear-gradient(to right, rgba(224, 215, 240, 0.025) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(to bottom, rgba(224, 215, 240, 0.025) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg);
}

/* Film grain, same recipe as darkforge.digital. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06; mix-blend-mode: overlay;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(127, 179, 165, 0.2); border-radius: 10px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  background: rgba(18, 14, 31, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; }
.brand-word {
  font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1;
  letter-spacing: -0.04em; text-transform: uppercase;
  background: linear-gradient(95deg, var(--text-hi) 0%, var(--lav) 30%, var(--sage) 65%, var(--text-hi) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-align: right; }

.view { max-width: 760px; margin: 0 auto; padding: 16px; }

/* ---------- Generic ---------- */
h2.section {
  font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 0.95;
  margin: 22px 0 8px; letter-spacing: -0.04em; text-transform: uppercase; color: var(--text-hi);
}
h3.sub {
  font-family: var(--body); font-weight: 400; font-size: 11px; margin: 24px 0 10px;
  color: var(--accent); text-transform: lowercase; letter-spacing: 0.4em;
}
p.lead { color: var(--muted); margin: 0 0 16px; font-size: 14px; line-height: 1.55; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
}
.row { display: flex; gap: 8px; align-items: center; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.btn {
  border: 0; border-radius: 999px; padding: 15px 18px; font-weight: 700; letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); color: var(--bg-2); width: 100%;
  box-shadow: 0 0 0 1px rgba(226, 130, 88, 0.4), 0 8px 28px -6px var(--accent-glow);
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn.secondary { background: transparent; color: var(--text); box-shadow: none; border: 1px solid var(--line-strong); }
.btn.danger { background: transparent; color: var(--danger); box-shadow: none; border: 1px solid rgba(229, 99, 107, 0.5); }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; font-size: 13px; }
.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line);
}
.badge.load { background: var(--load-soft); color: var(--load); border-color: rgba(96, 165, 250, 0.25); }
.badge.push { background: var(--push-soft); color: var(--push); border-color: rgba(226, 130, 88, 0.3); }
.badge.deload { background: rgba(185, 168, 234, 0.13); color: var(--deload); border-color: rgba(185, 168, 234, 0.25); }
.badge.caution { background: rgba(232, 184, 92, 0.12); color: var(--warn); border-color: rgba(232, 184, 92, 0.25); }
.badge.group { color: var(--sage); border-color: rgba(127, 179, 165, 0.22); background: var(--sage-soft); }

.banner { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; font-size: 14px; line-height: 1.5; }
.banner.warn { background: rgba(232, 184, 92, 0.08); border: 1px solid rgba(232, 184, 92, 0.3); }
.banner.info { background: var(--sage-soft); border: 1px solid rgba(127, 179, 165, 0.3); }

/* ---------- Week hero ---------- */
.hero {
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px; position: relative; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
}
.hero::before {
  content: ''; position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow, var(--accent-soft)) 0%, transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.hero > * { position: relative; }
.hero.load { --hero-color: var(--load); --hero-glow: rgba(96, 165, 250, 0.22); }
.hero.push { --hero-color: var(--push); --hero-glow: rgba(226, 130, 88, 0.26); }
.hero.deload { --hero-color: var(--deload); --hero-glow: rgba(185, 168, 234, 0.24); }
.hero-week {
  font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 0.95;
  letter-spacing: -0.04em; text-transform: uppercase;
  background: linear-gradient(95deg, var(--text-hi) 20%, var(--hero-color, var(--accent)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title { color: var(--muted); margin-top: 8px; font-size: 14px; }
.weekbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; }
.weekbar div { height: 4px; border-radius: 4px; background: var(--line-strong); }
.weekbar div.done { background: var(--muted); }
.weekbar div.current { background: var(--hero-color, var(--accent)); box-shadow: 0 0 12px var(--hero-color, var(--accent)); }

/* ---------- Segmented day picker ---------- */
.seg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
}
.seg button { border: 1px solid transparent; background: transparent; border-radius: 15px; padding: 10px 4px; text-align: center; transition: background 0.2s, border-color 0.2s; }
.seg button .k { font-family: var(--display); font-weight: 800; font-size: 24px; display: block; line-height: 1; color: var(--text-hi); }
.seg button .n { font-size: 11px; color: var(--muted); }
.seg button.active { background: var(--accent-soft); border-color: rgba(226, 130, 88, 0.45); box-shadow: 0 0 18px -4px var(--accent-glow); }
.seg button.active .k { color: var(--accent); }
.seg button.active .n { color: var(--text); }
.seg button.suggested:not(.active)::after { content: 'sledeći'; display: block; font-size: 10px; color: var(--sage); margin-top: 2px; letter-spacing: 0.1em; }

/* ---------- Warmup and cool-down ---------- */
details.warmup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
details.warmup summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--text-hi); }
details.warmup summary::-webkit-details-marker { display: none; }
details.warmup summary::after { content: '+'; margin-left: auto; color: var(--accent); font-size: 18px; line-height: 1; }
details.warmup[open] summary::after { content: '−'; }
.warm-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.warm-item a { text-decoration: none; }
.warm-item a:hover { color: var(--accent); }
.warm-item > span { white-space: nowrap; text-align: right; }
.warm-note { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.warm-sub { margin-top: 14px; padding-bottom: 8px; font-size: 10px; font-weight: 400; text-transform: lowercase; letter-spacing: 0.4em; color: var(--sage); }

/* ---------- Today, weekly plan, treadmill walk ---------- */
.today-day { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; text-transform: uppercase; color: var(--text-hi); }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.wd-n { font-size: 10px; color: var(--muted); letter-spacing: 0.06em; }
.wd-k { font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1; color: var(--muted); }
.wd.train .wd-k { color: var(--text-hi); }
.wd-w { font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); }
.wd-w.easy { color: var(--lav); }
.wd.today { border-color: rgba(226, 130, 88, 0.55); background: var(--accent-soft); box-shadow: 0 0 16px -6px var(--accent-glow); }
.wd.today .wd-n, .wd.today .wd-k { color: var(--accent); }

details.walk { scroll-margin-top: 80px; }
details.walk summary { flex-wrap: wrap; }
details.walk summary::after { order: 2; }
.walk-sum { order: 3; flex-basis: 100%; font-size: 12px; font-weight: 500; color: var(--sage); margin-top: 2px; }
.walk-phases { margin-top: 12px; display: grid; gap: 6px; }
.walk-phase {
  display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: baseline;
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px;
}
.walk-phase.main { border-color: rgba(127, 179, 165, 0.4); background: var(--sage-soft); }
.wp-min { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--muted); }
.walk-phase.main .wp-min { color: var(--sage); }
.wp-label { color: var(--text); }
.wp-kmh b, .wp-lvl b { font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--text-hi); }
.wp-kmh, .wp-lvl { color: var(--muted); white-space: nowrap; }
.wp-lvl small { margin-left: 4px; font-size: 11px; }

.plan-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.plan-row:first-child { border-top: 0; padding-top: 0; }
.plan-day { color: var(--muted); }
.plan-row.today .plan-day { color: var(--accent); font-weight: 700; }

/* ---------- Exercise card ---------- */
.ex {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden; position: relative; transition: border-color 0.3s;
}
.ex.caution { border-color: rgba(232, 184, 92, 0.28); }
.ex.complete { border-color: rgba(127, 179, 165, 0.45); box-shadow: 0 0 24px -10px rgba(127, 179, 165, 0.5); }
.ex-head { padding: 16px 16px 12px; }
.ex-num {
  display: inline-block; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; font-size: 10px;
  color: var(--muted); letter-spacing: 0.12em; margin-right: 8px; padding: 3px 8px; vertical-align: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
}
.ex-num::before { content: 'No. '; }
.ex-name { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; color: var(--text-hi); }
.ex-name:hover { color: var(--accent); }
.ex-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.ex-target { display: flex; gap: 4px 12px; flex-wrap: wrap; margin-top: 12px; align-items: baseline; }
.ex-target .big { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; letter-spacing: -0.03em; color: var(--text-hi); }
.ex-target .kg {
  background: linear-gradient(95deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ex-target .meta { font-size: 12px; color: var(--muted); }
.ex-note { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.ex-last { font-size: 12px; color: var(--muted); margin-top: 8px; }
.ex-last b { color: var(--sage); font-weight: 600; }

.sets { border-top: 1px solid var(--line); padding: 10px 12px 4px; }
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 56px; gap: 8px; align-items: center; padding: 5px 0; }
.set-row.nokg { grid-template-columns: 34px 1fr 56px; }
.set-row .sn { font-family: var(--display); font-weight: 700; color: var(--muted); text-align: center; font-size: 18px; }
.set-row.warm .sn { font-size: 11px; letter-spacing: 0.06em; }
.field { position: relative; }
.field input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 34px 12px 14px; font-size: 17px; font-weight: 600; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { outline: none; border-color: rgba(226, 130, 88, 0.6); box-shadow: 0 0 0 3px var(--accent-soft); }
.field span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted); pointer-events: none; }
.field.static { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; color: var(--muted); }
.check {
  height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-2);
  font-size: 20px; font-weight: 700; color: var(--muted); transition: all 0.2s;
}
.check.on { background: var(--sage); border-color: var(--sage); color: var(--bg-2); box-shadow: 0 0 18px -4px rgba(127, 179, 165, 0.7); }
.set-row.done input { color: var(--sage); }

.ex-foot { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; padding: 6px 12px 14px; align-items: center; }
.chip { border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 8px 10px; font-size: 13px; color: var(--muted); white-space: nowrap; transition: all 0.2s; }
.chip.on { background: var(--text); color: var(--bg-2); border-color: var(--text); }
.chip.pain.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.ex-foot .lbl { grid-column: 1 / -1; font-size: 10px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }
.ex-foot .spacer { display: none; }

.save-wrap { margin-top: 18px; }
.progress-line { height: 3px; background: var(--line); border-radius: 3px; margin: 4px 0 16px; overflow: hidden; }
.progress-line div { height: 100%; background: linear-gradient(90deg, var(--sage), var(--lav), var(--accent)); transition: width 0.3s; }

/* ---------- Tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl th.r, table.tbl td.tgt { text-align: right; }
table.tbl td.tgt b { display: block; font-weight: 700; }
table.tbl td.tgt span { font-size: 12px; color: var(--muted); }
table.tbl td:first-child { line-height: 1.35; }
table.tbl td.num { width: 1%; }
table.tbl input { width: 72px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 15px; font-weight: 600; }
table.tbl input:focus { outline: none; border-color: rgba(226, 130, 88, 0.6); }
.up { color: var(--sage); }
.down { color: var(--danger); }
.scroll-x { overflow-x: auto; }

/* ---------- Program overview ---------- */
.prog-day { margin-bottom: 18px; }
.prog-grid { display: grid; grid-template-columns: minmax(110px, 1fr) repeat(4, minmax(54px, auto)); gap: 0; font-size: 12px; }
.prog-grid > div { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.prog-grid .h { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.prog-grid .h.load { color: var(--load); }
.prog-grid .h.push { color: var(--push); }
.prog-grid .c { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prog-grid .c b { display: block; font-weight: 700; }
.prog-grid .c span { color: var(--muted); font-size: 11px; }
.prog-grid .cur { background: var(--accent-soft); }

/* ---------- Progress ---------- */
select {
  -webkit-appearance: none; appearance: none; max-width: 100%; min-width: 0;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23e28258' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px 38px 12px 14px; font-size: 15px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color-scheme: dark; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
select:focus { outline: none; border-color: rgba(226, 130, 88, 0.6); box-shadow: 0 0 0 3px var(--accent-soft); }
select option { background: var(--bg-2); color: var(--text); }
select.sel { width: 100%; }
.chart { width: 100%; height: auto; display: block; }
.sess { border-top: 1px solid var(--line); padding: 10px 0; }
.sess summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; }
.sess summary::-webkit-details-marker { display: none; }
.sess-body { font-size: 13px; color: var(--muted); padding: 8px 0 0; line-height: 1.6; }

/* ---------- Settings ---------- */
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.form-row:last-child { border-bottom: 0; }
.form-row > label:first-child { font-size: 14px; flex: 1; min-width: 0; line-height: 1.35; }
.form-row input[type='date'], .form-row input[type='number'] {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 15px; color-scheme: dark;
}
.form-row input[type='date'], .form-row select { flex: 0 0 auto; width: 168px; }
.form-row select { padding-top: 10px; padding-bottom: 10px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; transition: 0.2s; }
.switch span::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: var(--muted); border-radius: 50%; transition: 0.2s; }
.switch input:checked + span { background: var(--deload); border-color: var(--deload); }
.switch input:checked + span::before { transform: translateX(20px); background: #fff; }

/* ---------- Rest timer ---------- */
.timer {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 76px);
  z-index: 40; width: min(520px, calc(100% - 24px));
  background: rgba(26, 22, 37, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 130, 88, 0.5); border-radius: 20px;
  padding: 10px 12px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 0 30px -8px var(--accent-glow), 0 16px 40px rgba(0, 0, 0, 0.6);
}
.timer-label { font-size: 12px; color: var(--muted); max-width: 120px; line-height: 1.2; }
.timer-time { font-family: var(--display); font-weight: 800; font-size: 36px; letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; flex: 1; text-align: center; }
.timer.finished { border-color: var(--sage); box-shadow: 0 0 30px -8px rgba(127, 179, 165, 0.6), 0 16px 40px rgba(0, 0, 0, 0.6); }
.timer.finished .timer-time { color: var(--sage); }
.timer-actions { display: flex; gap: 6px; }
.timer-actions button { white-space: nowrap; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(18, 14, 31, 0.9); border-top: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tabbar button {
  border: 0; background: transparent; color: var(--muted); font-size: 10px; letter-spacing: 0.06em;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative;
}
.tabbar button .ti { font-size: 17px; line-height: 1; }
.tabbar button.active { color: var(--accent); }
.tabbar button.active::before {
  content: ''; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}

.toast {
  position: fixed; top: calc(env(safe-area-inset-top) + 72px); left: 50%; transform: translateX(-50%);
  background: var(--text-hi); color: var(--bg-2); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 60;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (min-width: 700px) {
  .view { padding: 24px; }
  .set-row { grid-template-columns: 40px 1fr 1fr 70px; }
  h2.section { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
