@font-face {
  font-family: 'Barlow Semi Condensed';
  src: url('/timer-digits.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-003A;
}
:root {
  color-scheme: light;
  --bg: #f4f8fc;
  --paper: #fff;
  --ink: #192433;
  --screen-ink: #132f48;
  --muted: #536379;
  --line: #d8e5ef;
  --control-line: #c7d7e6;
  --blue: #2d6295;
  --wash: #eaf3fa;
  --surface: #f5f8fb;
  --error: #87442d;
  --sans: 'Noto Sans SC', 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', sans-serif;
  --mono: 'Cascadia Mono', 'Consolas', monospace;
  --digits: 'Barlow Semi Condensed', 'Bahnschrift', 'Aptos Narrow', sans-serif;
  --dock: calc(68px + env(safe-area-inset-bottom, 0px));
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p { margin: 0; }
body { overflow-wrap: anywhere; }
::selection { background: #c4def1; color: var(--screen-ink); }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; touch-action: manipulation; user-select: none; }
button:disabled { cursor: default; }
button:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
button:active:not(:disabled) { filter: brightness(.93); }
input { caret-color: var(--blue); }
input, .selector, textarea { scroll-margin-bottom: calc(var(--dock) + 16px); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.page {
  --gutter: 16px;
  width: min(100%, 532px);
  margin-inline: auto;
  padding: env(safe-area-inset-top, 0px) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(var(--dock) + 4px) max(var(--gutter), env(safe-area-inset-left, 0px));
}
.topbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.identity, .top-actions, .switch { display: flex; align-items: center; min-width: 0; }
.identity { gap: 8px; flex: 1; }
.identity h1 { font-size: clamp(15px, 4.35vw, 18px); font-weight: 750; white-space: nowrap; letter-spacing: -.015em; }
.mark { width: 29px; height: 29px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: #dfedf8; }
.mark .icon { width: 20px; height: 20px; }
.top-actions { justify-content: flex-end; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; color: var(--blue); border-radius: 10px; }
.history-button { display: inline-flex; justify-content: center; align-items: center; width: auto; padding-inline: 8px; gap: 6px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.switch { gap: 6px; min-height: 44px; max-width: min(38vw, 224px); padding: 0 2px 0 4px; color: var(--blue); font-size: 14px; font-weight: 650; }
.switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch .caret { width: 14px; }
.switch:disabled .caret { visibility: hidden; }
.desk, .forms { display: grid; gap: 14px; min-width: 0; }
.instrument, .card { min-width: 0; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.instrument { position: relative; display: flex; flex-direction: column; border-color: #c7deef; border-radius: 20px; }
.screen {
  flex: 1;
  min-height: 143px;
  display: grid;
  grid-template-rows: auto 1fr 16px;
  padding: 16px 18px 0;
  border-radius: 19px 19px 0 0;
  background: linear-gradient(115deg, #edf6fe 0%, #dfeefa 100%);
  color: var(--screen-ink);
}
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.screen-head h2 { color: #244565; font-size: 15px; font-weight: 700; letter-spacing: .045em; }
.screen-status { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pause-total { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { flex: none; display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #f8fbfe; color: #365671; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.desk[data-state="running"] .badge { color: #2b6a5d; }
.desk[data-state="paused"] .badge { color: #8a5724; }
.desk[data-state="interrupted"] .badge { color: var(--error); }
.clock { min-width: 0; align-self: center; container-type: inline-size; }
#digits { display: inline-block; padding-bottom: .08em; font: 600 clamp(46px, 17.2vw, 74px)/.97 var(--digits); letter-spacing: .01em; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
#digits[data-length="9"] { font-size: clamp(37px, 21cqi, 78px); }
#digits[data-length="long"] { font-size: clamp(30px, 14cqi, 59px); }
.ruler { align-self: end; }
.ruler svg { display: block; width: 100%; height: 16px; }
.times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 56px; padding-inline: 16px; }
.times button { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; gap: 0 4px; text-align: left; padding: 4px 10px 5px 0; color: var(--blue); }
.times button + button { padding-left: 14px; }
.times button + button::before { content: ''; position: absolute; inset: 11px auto 11px 0; width: 1px; background: var(--line); }
.times span { grid-column: 1/-1; color: var(--muted); font-size: 12px; }
.times strong { font: 600 17px/1.25 var(--mono); }
.times .icon { width: 13px; height: 13px; align-self: center; }
.times button:disabled .icon { visibility: hidden; }
.times button:focus-visible { outline-offset: -2px; border-radius: 4px; }
.dock { position: fixed; inset: auto 0 0; z-index: 2; border-top: 1px solid var(--line); background: var(--paper); }
.dock-inner { width: min(100%, 532px); margin: auto; display: flex; align-items: center; gap: 8px; min-height: calc(var(--dock) - 1px); padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(9px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; border-radius: 12px; font-size: 16px; font-weight: 700; padding: 7px 12px; }
.primary { background: var(--blue); color: white; }
.secondary { background: var(--wash); color: #284f76; }
.primary:disabled { color: #4d667c; background: #e2edf5; }
.secondary:disabled { opacity: .58; }
.dock .primary { flex: 1; }
.dock .secondary { flex: 0 0 33%; }
.forms { grid-template-rows: auto auto; }
.card-head { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 15px 0; }
.card-head h2 { font-size: 19px; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
.card-body { padding: 0 15px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; min-height: 44px; color: var(--blue); font-size: 14px; text-align: left; }
.card-head .text-button { font-size: 13px; }
.card-head .text-button .icon { width: 14px; height: 14px; }
.text-button:disabled { color: #5d7084; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { min-width: 0; display: block; font-weight: 600; font-size: 14px; }
.wide { grid-column: 1/-1; }
.box { min-width: 0; min-height: 44px; display: flex; align-items: center; border: 1px solid var(--control-line); border-radius: 8px; background: var(--surface); padding-inline: 10px; margin-top: 5px; gap: 4px; }
.box:focus-within { outline: 2px solid var(--blue); outline-offset: 1px; background: white; }
.box input { padding: 0; border: 0; outline: none; background: none; min-width: 0; width: 100%; min-height: 42px; font-size: 16px; font-weight: 400; }
.box :read-only { color: #485c71; }
input::placeholder { color: #5c6d80; opacity: 1; }
.selector { color: var(--blue); font-size: 16px; font-weight: 400; width: 100%; justify-content: space-between; text-align: left; }
.selector span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selector .icon { width: 13px; height: 13px; }
.selector[data-empty="true"], .selector:disabled { color: #54677b; }
.disclosure { min-height: 48px; }
.extra { padding-bottom: 14px; }
.clubFields { padding-top: 12px; }
.pricing-head { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); text-align: right; }
.circle { position: relative; }
.circle::before { content: ''; position: absolute; width: 27px; height: 27px; border: 1px solid #cfdfed; border-radius: 50%; background: var(--wash); }
.circle .icon { position: relative; width: 15px; height: 15px; }
.unit { flex: none; font-size: 12px; color: var(--muted); font-weight: 500; }
.round-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; font-weight: 650; }
.stepper { display: flex; align-items: center; min-height: 44px; border: 1px solid var(--control-line); border-radius: 10px; overflow: hidden; }
.stepper button { display: grid; place-items: center; width: 42px; min-height: 42px; background: var(--wash); color: var(--blue); border-radius: 0; }
.stepper button:focus-visible { outline-offset: -3px; }
.stepper button:disabled { color: #67819a; }
.stepper input { min-width: 0; width: 64px; border: 0; min-height: 42px; text-align: center; background: white; padding: 0 2px; font-weight: 600; }
.stepper input:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
input[aria-invalid="true"], .box:has([aria-invalid="true"]), .selector[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 1px; }
.price-foot { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 13px; }
#due { flex: none; font: 650 clamp(16px, 3.65vw, 22px)/1.2 var(--mono); color: var(--blue); }
#due[data-pending="true"] { font: 650 14px/1.2 var(--sans); }
.page-foot { display: flex; flex-wrap: wrap; justify-content: end; gap: 4px 12px; padding-block: 12px 8px; color: var(--muted); font-size: 12px; }
.page-foot a { color: inherit; text-underline-offset: .18em; }
.toast { position: fixed; inset: auto auto calc(var(--dock) + 9px) 50%; transform: translateX(-50%); z-index: 4; width: max-content; max-width: calc(100% - 32px); pointer-events: none; padding: 9px 14px; border-radius: 10px; color: white; background: #23384e; font-size: 14px; box-shadow: 0 4px 16px #172f4529; }
dialog { color: var(--ink); background: var(--paper); overflow: hidden auto; overscroll-behavior: none contain; border: 0; padding: 0; width: min(100%, 478px); max-width: 100%; max-height: min(88dvh, 760px); margin: auto auto 0; border-radius: 20px 20px 0 0; box-shadow: 0 14px 52px #162c4530; }
dialog::backdrop { background: #13233260; }
.sheet-head { position: sticky; top: 0; z-index: 1; background: white; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 13px 4px 20px; }
.sheet-head h2 { font-size: 21px; font-weight: 750; letter-spacing: -.025em; }
.sheet-body { padding: 0 20px max(20px, env(safe-area-inset-bottom, 0px)); }
.sheet-body > * + *, .sheet-form > * + * { margin-top: 10px; }
.sheet-body .hint { font-size: 14px; color: var(--muted); }
.sheet-body .error { color: var(--error); font-size: 14px; }
.sheet-body .primary, .sheet-body .secondary { width: 100%; }
.sheet-body textarea, .sheet-body input:not([type="checkbox"]), .sheet-body select { width: 100%; min-width: 0; display: block; padding: 8px 10px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--surface); min-height: 44px; font-size: 16px; }
.sheet-body textarea { min-height: 140px; resize: vertical; line-height: 1.65; }
.sheet-body .manual-text { min-height: 220px; }
.option, .history-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; min-height: 48px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.option[aria-pressed="true"] { color: var(--blue); font-weight: 700; }
.option small, .history-item small { display: block; color: var(--muted); font-size: 13px; }
.history-item strong { flex: none; color: var(--blue); }
.value-list { margin: 0; }
.value-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding-block: 11px; border-bottom: 1px solid var(--line); }
.value-list dt { color: var(--muted); flex: none; }
.value-list dd { margin: 0; text-align: right; }
.sheet-result { background: var(--wash); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--muted); }
.sheet-result strong { display: block; margin-top: 2px; font: 650 26px/1.3 var(--mono); color: var(--blue); }
.template-preview { white-space: pre-wrap; padding: 12px; border-radius: 8px; background: var(--wash); font: inherit; }
.template-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.template-tools .secondary { width: auto; flex: 1; }
.template-tools h3 { font-size: 16px; }
.noscript { text-align: center; padding: 14px; }
@media (hover: hover) and (pointer: fine) {
  .text-button:hover:not(:disabled) { color: #204d77; }
  .icon-button:hover:not(:disabled), .option:hover, .history-item:hover { background-color: var(--wash); }
  .primary:hover:not(:disabled) { background: #275987; }
  .secondary:hover:not(:disabled), .selector:hover:not(:disabled) { background: #e2eef7; }
}
@media (max-width: 350px) {
  .page { --gutter: 12px; }
  .screen { padding-inline: 14px; }
  .card-head, .card-body { padding-inline: 12px; }
  .pair { gap: 8px; }
  .box { padding-inline: 8px; }
  .switch .icon:first-child { display: none; }
  .switch { gap: 2px; }
  .dock-inner .primary, .dock-inner .secondary { padding-inline: 6px; }
}
@media (min-width: 680px), (min-width: 540px) and (max-height: 500px), (horizontal-viewport-segments: 2) {
  .page { --gutter: clamp(16px, 3.5vw, 40px); width: min(100%, 1112px); padding-bottom: 24px; }
  .topbar { min-height: clamp(66px, 6vw, 80px); border-bottom: 1px solid var(--line); margin-bottom: clamp(18px, 2vw, 28px); }
  .mark { width: 34px; height: 34px; }
  .top-actions { gap: 6px; }
  .switch { background: white; padding-inline: 12px; border: 1px solid var(--line); border-radius: 10px; }
  .desk { grid-template-columns: minmax(0, .90fr) minmax(0, 1.10fr); gap: clamp(16px, 2.2vw, 30px); align-items: stretch; }
  .forms { gap: 16px; }
  .screen { padding: clamp(16px, 2.2vw, 28px) clamp(15px, 2vw, 24px) 0; }
  #digits { font-size: clamp(37px, 24cqi, 90px); }
  .times { min-height: clamp(58px, 6vw, 72px); padding-inline: clamp(14px, 1.7vw, 24px); }
  .dock { position: static; border-radius: 0 0 19px 19px; }
  .dock-inner { width: 100%; min-height: 0; padding: clamp(10px, 1.3vw, 18px) clamp(10px, 1.6vw, 22px); }
  .card { border-radius: 18px; }
  .card-head { min-height: clamp(52px, 5vw, 60px); }
  .card-head, .card-body { padding-inline: clamp(14px, 1.8vw, 22px); }
  .card-head h2 { font-size: clamp(19px, 2.2vw, 21px); }
  .pair { gap: clamp(10px, 1.2vw, 14px); }
  .box { min-height: 46px; }
  .price-foot { min-height: 48px; }
  .toast { bottom: 20px; }
  input, .selector, textarea { scroll-margin-bottom: 16px; }
  dialog { margin: auto; border-radius: 18px; }
}
@media (min-width: 540px) and (max-height: 500px) {
  .page { --gutter: 14px; }
  .topbar { min-height: 48px; margin-bottom: 10px; }
  .screen { min-height: 128px; padding-top: 12px; }
  #digits { font-size: clamp(36px, 23cqi, 72px); }
  .times { min-height: 52px; }
  dialog { max-height: calc(100dvh - 16px); }
}
@media (horizontal-viewport-segments: 2) {
  .page { --fold-left: env(viewport-segment-width 0 0); --fold-next: env(viewport-segment-left 1 0); --fold-right: env(viewport-segment-width 1 0); --fold-gutter: clamp(10px, 2vw, 24px); width: 100%; padding-inline: 0; }
  .topbar { border-bottom: 0; display: grid; grid-template-columns: minmax(0, calc(var(--fold-left) - 2 * var(--fold-gutter))) minmax(0, calc(var(--fold-right) - 2 * var(--fold-gutter))); gap: calc(var(--fold-next) - var(--fold-left) + 2 * var(--fold-gutter)); padding-inline: var(--fold-gutter); }
  .desk { grid-template-columns: minmax(0, calc(var(--fold-left) - 2 * var(--fold-gutter))) minmax(0, calc(var(--fold-right) - 2 * var(--fold-gutter))); gap: calc(var(--fold-next) - var(--fold-left) + 2 * var(--fold-gutter)); padding-inline: var(--fold-gutter); }
  dialog { inset-inline: calc(env(viewport-segment-left 1 0) + 12px) auto; width: calc(env(viewport-segment-width 1 0) - 24px); margin-inline: 0; }
  .page-foot { padding-inline: var(--fold-gutter); }
}
@media (vertical-viewport-segments: 2) {
  .page { --top-pane: env(viewport-segment-height 0 0); --bottom-start: env(viewport-segment-top 0 1); width: 100%; padding-bottom: 0; }
  .topbar { min-height: 48px; margin: 0; border: 0; }
  .desk { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: max(0px, calc(var(--top-pane) - 48px - env(safe-area-inset-top, 0px))) auto; row-gap: max(10px, calc(var(--bottom-start) - var(--top-pane) + 10px)); }
  .instrument { overflow: hidden auto; overscroll-behavior-x: none; }
  .screen { flex: 1; min-height: 115px; padding-top: 10px; }
  #digits { font-size: clamp(38px, 11cqi, 64px); }
  .times { flex: none; min-height: 48px; }
  .dock { position: static; border-radius: 0 0 19px 19px; }
  .dock-inner { width: 100%; min-height: 0; padding: 6px 12px; }
  dialog { inset-block: calc(env(viewport-segment-top 0 1) + 8px) 8px; max-height: calc(env(viewport-segment-height 0 1) - 16px); margin: auto; border-radius: 18px; }
  .toast { bottom: 10px; }
}
