@font-face {
  font-family: Inter;
  src: url("assets/inter.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  --bg: #0b0d0c;
  --surface: #151916;
  --control: #171c19;
  --line: #303a33;
  --text: #f0f2f1;
  --muted: #aab5af;
  --mint: #24ef96;
  --selected: #162e22;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
header {
  min-height: 80px;
  padding: 0 clamp(20px, 4.45vw, 64px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
}
.brand img { display: block; }
header span, .help { font-size: 14px; color: var(--muted); }
main { width: min(800px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 64px; }
.intro h1 { margin: 0; font-size: clamp(26px, 5vw, 32px); line-height: 1.24; font-weight: 650; }
.intro p { margin: 10px 0 0; color: var(--muted); }
.settings { margin: 36px 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.settings > *, legend { color: var(--muted); font-size: 13px; }
fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
legend { padding: 0; }
.select-wrap { position: relative; display: block; }
select, .segments {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  background: var(--control);
  border: 1px solid var(--line);
  border-radius: 12px;
}
select { appearance: none; color: var(--text); padding: 0 80px 0 17px; font-size: 16px; }
.change { position: absolute; right: 22px; top: calc(50% + 4px); transform: translateY(-50%); pointer-events: none; }
.segments { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; gap: 4px; }
.segments label, .popover label { position: relative; display: block; cursor: pointer; }
.segments input, .popover input, .sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.segments span { display: grid; place-items: center; min-height: 44px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; text-align: center; }
.segments input:checked + span { color: var(--mint); background: var(--selected); border-color: #296847; font-weight: 600; }
.segments input:focus-visible + span, .popover input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 1px; }
fieldset:disabled label { cursor: default; opacity: .64; }
.card, .progress-panel, .take {
  background: var(--surface);
  border: 1px solid var(--line);
}
.card { border-radius: 20px; padding: 26px 31px 30px; }
.eyebrow { margin: 0; color: var(--mint); font-size: 12px; text-transform: uppercase; font-weight: 600; }
h2 { font-size: clamp(25px, 5vw, 34px); line-height: 1.21; margin: 20px 0 27px; font-weight: 650; overflow-wrap: anywhere; }
.points-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
h3 { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.text-button { border: 0; border-radius: 8px; background: transparent; color: var(--muted); padding: 8px 10px; font-weight: 600; }
.text-button:hover:not(:disabled) { color: var(--text); background: var(--line); }
.edit-icon { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 13px; }
#points li { display: grid; grid-template-columns: 32px 96px minmax(0, 1fr); gap: 16px; align-items: center; overflow-wrap: anywhere; }
.number { border-radius: 8px; min-height: 32px; display: grid; place-items: center; color: var(--mint); background: var(--selected); font-size: 12px; font-weight: 600; }
.point-name { color: var(--muted); font-size: 14px; }
#editor input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: var(--text); background: var(--bg); }
.edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.actions { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr) 56px; gap: 16px; margin-top: 24px; }
.primary, .secondary { min-height: 56px; border-radius: 12px; border: 1px solid transparent; padding: 10px 14px; font-weight: 650; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
.primary { background: var(--mint); color: #08130e; }
.primary:hover:not(:disabled) { background: #56f6ae; }
.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.secondary:hover:not(:disabled) { background: var(--control); border-color: #566359; }
.primary:active:not(:disabled), .secondary:active:not(:disabled) { transform: translateY(1px); }
.options { position: relative; }
.icon { width: 100%; display: grid; place-items: center; padding: 8px; }
.popover { position: absolute; z-index: 2; width: 225px; top: calc(100% + 10px); right: 0; padding: 9px; border: 1px solid #536057; border-radius: 12px; background: var(--control); box-shadow: 0 10px 26px #0006; animation: enter 140ms ease-out both; }
.mode-title { display: block; padding: 7px 9px; color: var(--muted); font-size: 13px; }
.popover label span { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 8px 9px; border-radius: 7px; }
.popover label:hover span { background: var(--line); }
.popover input:checked + span { color: var(--mint); }
.popover input:checked + span::after { content: '✓'; }
.help, .error { line-height: 1.5; text-align: center; margin: 22px 0 0; }
.help:empty { display: none; }
.error { color: #ffb8ae; }
.takes { display: grid; gap: 10px; margin-top: 18px; }
.take { display: grid; grid-template-columns: 44px 52px minmax(0, 1fr) auto; gap: 13px; align-items: center; border-radius: 14px; padding: 10px 15px; animation: enter 180ms ease-out both; }
.play { border: 0; background: var(--selected); color: var(--text); width: 44px; height: 44px; border-radius: 50%; }
.play:hover { color: var(--mint); }
.take input { width: 100%; min-width: 0; accent-color: var(--mint); }
.take time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.progress-panel { margin-top: 18px; padding: 14px 16px; border-radius: 12px; }
.progress-panel div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
#clock { font-size: 25px; font-weight: 650; font-variant-numeric: tabular-nums; }
progress { width: 100%; height: 6px; display: block; margin-top: 12px; accent-color: var(--mint); }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 580px) {
  header { min-height: 62px; }
  header span { display: none; }
  main { padding-top: 26px; }
  .settings { grid-template-columns: 1fr; gap: 14px; margin: 24px 0 20px; }
  .card { padding: 20px; }
  #points li { grid-template-columns: 28px minmax(0, 1fr); gap: 3px 10px; }
  .number { min-height: 28px; grid-row: span 2; }
  .actions { grid-template-columns: minmax(0, 1fr) auto 44px; gap: 8px; }
  .actions button { min-height: 48px; padding: 6px 8px; font-size: 13px; }
  .take { padding: 8px 10px; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
