/* LD Studios Work Tracker — app stylesheet.
   Tokens mirror ldstudios.it (read from the live stylesheet, 2026-11-07). */

@font-face {
  font-family: "Monument";
  src: url("../fonts/MonumentExtended-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Monument";
  src: url("../fonts/MonumentExtended-Ultrabold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #000;
  --s1: #0c0c0e;
  --teal-glow: rgba(8, 76, 97, .92); /* page background glow only */
  --s2: #151517;
  --s3: #232326;
  --s4: #3a3a3f;
  --hair: rgba(255, 255, 255, .09);
  --hair2: rgba(255, 255, 255, .16);
  --t: #f5f5f7;
  --t2: #a1a1a6;
  --t3: #86868b;
  --idle: #5e5e64;
  --amber: #ffc247;
  --amber-hi: #ffd47a;
  --amber-soft: rgba(255, 194, 71, .14);
  --red: #ff6b5e;
  --red-soft: rgba(255, 107, 94, .12);
  --ink-soft: rgba(0, 0, 0, .66);

  --display: "Monument", "Helvetica Neue", Arial, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --fast: 180ms;

  --r-plate: 28px;
  --r-card: 20px;
  --r-inset: 16px;
  --gutter: 16px;
  --tab-h: 58px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --col: 560px;

  color-scheme: dark;
  background: var(--s1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Page atmosphere from ldstudios.it cards: teal glow top-right over s1. Fixed layer so it
   stays put while scrolling (background-attachment: fixed is ignored by iOS Safari). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(165% 125% at 100% 0%, var(--teal-glow) 0%, rgba(8, 76, 97, .5) 42%, rgba(8, 76, 97, .14) 68%, transparent 88%), var(--s1);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: transparent;
  color: var(--t);
  font: 400 17px/1.45 var(--text);
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
  caret-color: var(--amber);
}
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { flex: none; }
[hidden] { display: none !important; }
::selection { background: var(--amber); color: #000; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--s4); border-radius: 10px; border: 2px solid var(--bg); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */

.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 22px; border-radius: 980px;
  font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease), opacity var(--fast);
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn--sm { --h: 40px; padding: 0 16px; font-size: 15px; }
.btn--lg { --h: 56px; padding: 0 30px; font-size: 17px; }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--amber); color: #000; }
.btn--light { background: var(--t); color: #000; }
.btn--ghost { background: var(--s2); color: var(--t); box-shadow: inset 0 0 0 1px var(--hair2); }
.btn--danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px rgba(255, 107, 94, .32); }
.btn--danger[data-armed="true"] { background: var(--red); color: #000; box-shadow: none; }
.btn[aria-busy="true"] { opacity: .65; pointer-events: none; }
.btn:disabled { cursor: not-allowed; }
@media (hover: hover) {
  .btn--primary:hover { background: var(--amber-hi); }
  .btn--light:hover { background: #fff; }
  .btn--ghost:hover { background: var(--s3); }
}

.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--t2); transition: background-color var(--fast), color var(--fast);
}
.iconbtn .ic { width: 22px; height: 22px; }
@media (hover: hover) { .iconbtn:hover { background: var(--s2); color: var(--t); } }

/* ---------- App frame ---------- */

.views {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: calc(var(--safe-t) + 8px) var(--gutter) calc(var(--tab-h) + var(--safe-b) + 28px);
}
.view { display: flex; flex-direction: column; gap: 14px; }
/* Home: fill the space between the top of the screen and the tab bar and centre the action block
   (clock plate → Registra pausa) in it; the date row stays on top. Auto margins collapse to 0
   when the content is taller than the screen, so nothing is ever pushed out of reach. */
.view--home { min-height: calc(100dvh - var(--safe-t) - 8px - var(--tab-h) - var(--safe-b) - 28px); }
.view--home > .clock { margin-top: auto; }
.view--home > .breaks { margin-bottom: auto; }
.view:focus { outline: none; }

/* ---------- Home ---------- */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.topbar__date { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.topbar__date:focus { outline: none; }
.status {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: 99px; box-shadow: inset 0 0 0 1px var(--hair2);
  font-size: 13px; font-weight: 600; color: var(--t2); white-space: nowrap;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--idle); }
.status[data-on="true"] { color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255, 194, 71, .45); }
.status[data-on="true"] .status__dot { background: var(--amber); }

/* The instrument: one plate that is the state. */
.clock {
  position: relative;
  display: grid;
  grid-template: "timer icon" auto "space space" 1fr "verb verb" auto "meta meta" auto / minmax(0, 1fr) auto;
  width: 100%;
  min-height: clamp(184px, 27vh, 228px);
  padding: 22px 22px 20px;
  border-radius: var(--r-plate);
  background: var(--amber);
  color: #000;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  touch-action: manipulation;
  transition: background-color 240ms var(--ease), transform var(--fast) var(--ease), box-shadow 240ms var(--ease);
  user-select: none; -webkit-user-select: none;
}
.clock:active { transform: scale(.985); }
.clock:focus-visible { outline-offset: 4px; border-radius: var(--r-plate); }
.clock__icon {
  grid-area: icon; width: 30px; height: 30px; margin: -2px -2px 0 0;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.clock__timer {
  grid-area: timer; align-self: start;
  font: 800 clamp(36px, 11.6vw, 48px)/1 var(--display);
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.clock__verb {
  grid-area: verb;
  font: 800 clamp(30px, 9.6vw, 40px)/1 var(--display);
  letter-spacing: -.02em;
}
.clock__meta { grid-area: meta; margin-top: 8px; font-size: 15px; font-weight: 500; color: var(--ink-soft); min-height: 1.45em; }
.clock__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .55), transparent) 0 0 / 40% 100% no-repeat;
  opacity: 0; transition: opacity var(--fast);
}
.clock[aria-busy="true"] { pointer-events: none; }
.clock[aria-busy="true"] .clock__progress { opacity: 1; animation: sweep 1s linear infinite; }
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.clock[data-state="on"] {
  background: var(--t);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5);
}
.clock[data-state="on"] .clock__verb { font-size: clamp(24px, 7.4vw, 30px); }
.clock[data-state="off"] .clock__timer { display: none; }
.clock[data-state="off"] { grid-template-areas: "space icon" "space space" "verb verb" "meta meta"; }
@media (hover: hover) {
  .clock[data-state="off"]:hover { background: var(--amber-hi); }
  .clock[data-state="on"]:hover { background: #fff; }
}

.early { display: grid; gap: 8px; }
.early__legend { font-size: 14px; color: var(--t2); margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 99px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--hair); }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg__opt span { display: grid; place-items: center; min-height: 44px; padding: 6px 12px; border-radius: 99px; font-size: 15px; font-weight: 600; color: var(--t2); text-align: center; line-height: 1.2; transition: background-color var(--fast), color var(--fast); }
.seg__opt input:checked + span { background: var(--t); color: #000; }
.seg__opt input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }

.today {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
  padding: 12px 4px; border-bottom: 1px solid var(--hair);
}
.today__label { font-size: 15px; color: var(--t3); }
.today__net { font: 800 20px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.today__more { margin-left: auto; font-size: 15px; color: var(--t2); }

/* Switch (iOS-sized, LD look) */
.switch {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 16px;
  border-radius: var(--r-card); background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair);
  cursor: pointer;
}
.switch__text { display: grid; flex: 1; min-width: 0; }
.switch__label { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.switch__state { font-size: 14px; color: var(--t2); }
.switch__input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track { position: relative; width: 51px; height: 31px; border-radius: 99px; background: var(--s4); transition: background-color 240ms var(--ease); }
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .35); transition: transform 280ms var(--ease);
}
.switch__input:checked ~ .switch__track { background: var(--amber); }
.switch__input:checked ~ .switch__track::after { transform: translateX(20px); }
.switch__input:focus-visible ~ .switch__track { outline: 2px solid var(--amber); outline-offset: 3px; }
.switch__lock { display: none; width: 18px; height: 18px; fill: none; stroke: var(--t3); stroke-width: 1.8; stroke-linecap: round; }
.switch[data-locked="true"] { cursor: default; }
.switch[data-locked="true"] .switch__lock { display: block; }
.switch[data-locked="true"] .switch__track { background: transparent; box-shadow: inset 0 0 0 1.5px var(--s4); }
.switch[data-locked="true"] .switch__track::after { background: var(--t2); box-shadow: none; }
.switch[data-locked="true"] .switch__input:checked ~ .switch__track::after { background: var(--amber); }
.switch[data-locked="true"] .switch__input { cursor: default; }
.switch[data-locked="true"] .switch__state { color: var(--t); }
.switch--plain { background: var(--s2); }

/* Breaks */
.breaks { display: grid; gap: 10px; padding-top: 4px; }
.breaks__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.breaks__title { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.breaks__preview { font: 400 13px/1 var(--display); color: var(--amber); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: grid; place-items: center; align-content: center; gap: 1px; height: 58px;
  border-radius: var(--r-inset); background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair);
  transition: background-color var(--fast), box-shadow var(--fast), color var(--fast);
}
.chip b { font: 800 18px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chip small { font-size: 12px; color: var(--t3); }
.chip input:checked + span { background: var(--amber-soft); box-shadow: inset 0 0 0 1.5px var(--amber); color: var(--amber); }
.chip input:checked + span small { color: var(--amber); }
.chip input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn--break { scroll-margin-bottom: calc(var(--tab-h) + var(--safe-b) + 16px); --h: 54px; background: var(--s2); color: var(--t3); box-shadow: inset 0 0 0 1px var(--hair); font-size: 17px; }
.btn--break:not(:disabled) { background: var(--amber); color: #000; box-shadow: none; }
.btn--break:disabled { color: var(--idle); }
.breaks__hint { font-size: 13px; color: var(--t3); text-align: center; }
.breaks__list { display: flex; flex-wrap: wrap; gap: 6px; }
.breaks__list li {
  padding: 5px 12px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--hair2);
  font-size: 13px; color: var(--t2); font-variant-numeric: tabular-nums;
}

/* Durations in the display face: digits in Monument, units in the text face (Monument's
   round zero would otherwise read as the letter "o"). */
.dur { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dur b { font-weight: inherit; }
.dur i { font: 600 .56em/1 var(--text); font-style: normal; letter-spacing: 0; margin: 0 .28em 0 .1em; color: inherit; opacity: .78; }
.dur i:last-child { margin-right: 0; }

/* ---------- Shared view header ---------- */

.viewhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.viewhead__title { font: 400 26px/1 var(--display); letter-spacing: -.04em; }
.viewhead__title:focus { outline: none; }
.viewhead .btn .ic { width: 18px; height: 18px; }

/* ---------- History ---------- */

.history { display: grid; gap: 10px; }
.history__month {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 4px 2px; font-size: 13px; font-weight: 600; color: var(--t3); letter-spacing: .02em;
}
.history__month:first-child { padding-top: 0; }
.day { border-radius: var(--r-card); background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.day[data-open-session="true"] { box-shadow: inset 0 0 0 1px rgba(255, 194, 71, .4); }
.day__head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 2px 12px;
  width: 100%; min-height: 72px; padding: 14px 14px 14px 18px; text-align: left;
}
.day__date { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.day__meta { grid-column: 1; font-size: 14px; color: var(--t2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.day__live { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 600; }
.day__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.day__total { grid-column: 2; grid-row: 1 / span 2; font: 800 19px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.day__chev { grid-column: 3; grid-row: 1 / span 2; width: 18px; height: 18px; fill: none; stroke: var(--t3); stroke-width: 2; stroke-linecap: round; transition: transform 240ms var(--ease); }
.day__head[aria-expanded="true"] .day__chev { transform: rotate(90deg); }
.day__body { border-top: 1px solid var(--hair); padding: 4px 0 14px; }
.day__add { margin: 6px 18px 0; }

.session { padding: 14px 18px; border-bottom: 1px solid var(--hair); display: grid; gap: 10px; }
.session__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.session__n {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--s3); font: 800 11px/1 var(--display); font-variant-numeric: tabular-nums;
}
.session__time { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.session__time sup { margin-left: 2px; font-size: 11px; font-weight: 700; color: var(--amber); vertical-align: super; }
.tag { margin-left: auto; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--hair2); color: var(--t2); }
.tag--remote { color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255, 194, 71, .45); }
.tag--live { color: #000; background: var(--amber); box-shadow: none; }
.session__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.session__nums dt { font-size: 12px; color: var(--t3); }
.session__nums dd { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.session__nums div:last-child dd { color: var(--amber); }
.session__breaks { font-size: 13px; color: var(--t2); font-variant-numeric: tabular-nums; }
.session__notes { font-size: 14px; color: var(--t2); white-space: pre-wrap; overflow-wrap: anywhere; }
.session__actions { display: flex; gap: 8px; }
.session__actions .btn { --h: 38px; padding: 0 14px; font-size: 14px; }
.session__actions .ic { width: 16px; height: 16px; }

.empty { padding: 36px 20px; border-radius: var(--r-card); background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair); text-align: center; color: var(--t2); display: grid; gap: 14px; justify-items: center; }
.empty b { color: var(--t); font-weight: 600; font-size: 17px; }

.skel { height: 72px; border-radius: var(--r-card); background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair); position: relative; overflow: hidden; }
.skel--tall { height: 320px; border-radius: var(--r-plate); }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .04), transparent); animation: shimmer 1.4s infinite; transform: translateX(-100%); }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Summary ---------- */

.monthpick { display: grid; grid-template-columns: 44px minmax(0, 1fr) 6.2rem 44px; align-items: center; gap: 6px; }
.select {
  height: 44px; width: 100%; padding: 0 14px; border-radius: 99px; border: 0;
  background: var(--s2); box-shadow: inset 0 0 0 1px var(--hair2); color: var(--t);
  font-size: 16px; font-weight: 600; -webkit-appearance: none; appearance: none; text-align: center; text-align-last: center;
}
.summary { display: grid; gap: 14px; }
.ledger { border-radius: var(--r-plate); background: var(--s1); box-shadow: inset 0 0 0 1px var(--hair); padding: 6px 20px; }
.ledger__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); }
.ledger dl:not(.ledger__total) .ledger__row:last-child { border-bottom: 0; }
.ledger__row dt { font-size: 16px; color: var(--t2); }
.ledger__row dd { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.ledger__row small { display: block; font-size: 13px; font-weight: 400; color: var(--t3); }
.ledger__head { padding: 16px 0 8px; font: 400 18px/1.1 var(--display); letter-spacing: -.03em; }
.ledger__total { display: grid; gap: 4px; padding: 18px 0 16px; border-top: 1px solid var(--hair2); }
.ledger__total dt { font-size: 15px; color: var(--t2); }
.ledger__total dd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ledger__total b { font: 800 clamp(32px, 9.6vw, 42px)/1 var(--display); letter-spacing: -.03em; color: var(--amber); font-variant-numeric: tabular-nums; }
.ledger__total span { font-size: 15px; color: var(--t2); font-variant-numeric: tabular-nums; }

.daily { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.daily caption { text-align: left; padding: 6px 4px 10px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.daily th { text-align: left; font-size: 12px; font-weight: 600; color: var(--t3); padding: 0 4px 8px; }
.daily td { padding: 11px 4px; border-top: 1px solid var(--hair); font-size: 15px; }
.daily .r { text-align: right; }
.daily td.r:last-child { font-weight: 600; }
.daily .mute { color: var(--t3); }

.export { display: grid; gap: 10px; padding-top: 6px; }
.export__title { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.export__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.export__actions .btn { padding: 0 12px; }
.export__actions .ic { width: 18px; height: 18px; }

.about { display: grid; justify-items: center; gap: 8px; padding: 28px 0 8px; color: var(--t3); font-size: 13px; text-align: center; }
.about__line { display: flex; align-items: center; gap: 10px; }
.about__mark { width: 44px; height: 22px; }
.about b { color: var(--t2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Tab bar ---------- */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  height: calc(var(--tab-h) + var(--safe-b)); padding: 0 max(8px, calc((100vw - var(--col)) / 2)) var(--safe-b);
  background: var(--bg); border-top: 1px solid var(--hair);
}
.tab {
  display: grid; justify-items: center; align-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--t3);
  transition: color var(--fast);
}
.tab__ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--amber); }

/* ---------- Toast & banner ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 40;
  max-width: min(calc(100vw - 32px), 460px); width: max-content;
  padding: 12px 18px; border-radius: 99px; background: var(--t); color: #000;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; text-align: center;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .7);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity 200ms var(--ease), transform 260ms var(--ease);
}
.toast[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }

/* In flow above the active view: it pushes content down, never covers the state. */
.banner {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 8px 12px 14px; margin-bottom: 12px;
  border-radius: var(--r-inset); background: #1a0f0e; box-shadow: inset 0 0 0 1px rgba(255, 107, 94, .5);
  color: var(--t);
}
.banner > .ic { color: var(--red); margin-top: 1px; }
.banner__text { flex: 1; font-size: 15px; line-height: 1.35; }
.banner__close { display: grid; place-items: center; width: 32px; height: 32px; margin: -6px 0; color: var(--t2); }

.setup-ok { padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); box-shadow: inset 0 0 0 1px rgba(255, 194, 71, .45); color: var(--t); font-size: 15px; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 14px; font-weight: 600; color: var(--t2); }
.field__opt { font-weight: 400; color: var(--t3); }
.field__hint { font-size: 13px; color: var(--t3); }
.input {
  width: 100%; min-width: 0; height: 50px; padding: 0 14px;
  border: 0; border-radius: 14px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--hair2);
  color: var(--t); font-size: 17px; font-variant-numeric: tabular-nums;
  -webkit-appearance: none; appearance: none;
  transition: box-shadow var(--fast);
}
.input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--amber); }
.input--area { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.input::-webkit-date-and-time-value { text-align: left; }
.input::-webkit-calendar-picker-indicator { filter: invert(.8); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--red); }
.form__error {
  padding: 12px 14px; border-radius: 14px; background: var(--red-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 94, .45); color: #ffb3ab; font-size: 15px;
}

.check { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; color: var(--t2); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.check__box { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--hair2); transition: background-color var(--fast); }
.check__box svg { width: 16px; height: 16px; fill: none; stroke: #000; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.check input:checked + .check__box { background: var(--amber); box-shadow: none; }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- Sheet (editor) ---------- */

.sheet {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0;
  background: var(--s1); color: var(--t);
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in 280ms var(--ease); }
.sheet__form, .sheet__body { background: var(--s1); }
.sheet::backdrop { background: rgba(0, 0, 0, .72); }
@keyframes sheet-in { from { transform: translateY(32px); } }
.sheet__form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet__head {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 8px) 12px 10px; border-bottom: 1px solid var(--hair); background: var(--s1);
}
.sheet__title { font-size: 17px; font-weight: 600; text-align: center; letter-spacing: -.02em; }
.sheet__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: grid; align-content: start; gap: 16px; padding: 18px var(--gutter) calc(var(--safe-b) + 28px); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 7.4rem; gap: 6px 8px; }
.pair__label { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: var(--t2); }
.pair[data-disabled="true"] { opacity: .45; }
.sheet__breaks { display: grid; gap: 10px; }
.brklist { display: grid; gap: 8px; }
.brk { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 44px; align-items: center; gap: 6px; }
.brk__sep { color: var(--t3); }
.brk .iconbtn { color: var(--red); }
.sheet__total { font-size: 15px; color: var(--t2); font-variant-numeric: tabular-nums; }
.sheet__total b { color: var(--t); }

/* ---------- Login ---------- */

.login { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--safe-t) + 32px) 24px calc(var(--safe-b) + 32px); }
.login__inner { width: 100%; max-width: 380px; display: grid; gap: 10px; }
.login__mark { width: 140px; height: 70px; margin-left: -6px; }
.login__title { font: 800 30px/1.05 var(--display); letter-spacing: -.03em; margin-top: 10px; }
.login__sub { color: var(--t3); margin-bottom: 18px; }

/* ---------- Offline page ---------- */

.offline { min-height: 100dvh; display: grid; place-content: center; gap: 16px; padding: 32px 24px; max-width: 440px; margin: 0 auto; }
.offline h1 { font: 800 26px/1.1 var(--display); letter-spacing: -.03em; }
.offline p { color: var(--t2); }

/* ---------- Larger screens ---------- */

@media (min-width: 720px) {
  :root { --gutter: 24px; --col: 600px; }
  .sheet { max-width: 560px; height: auto; max-height: min(88vh, 900px); margin: auto; border-radius: var(--r-plate); box-shadow: inset 0 0 0 1px var(--hair2); }
  .sheet__head { padding-top: 12px; border-radius: var(--r-plate) var(--r-plate) 0 0; }
  .sheet__body { padding-bottom: 28px; }
}

@media (max-height: 700px) {
  .clock { min-height: 150px; padding: 18px 18px 16px; }
  .view { gap: 11px; }
  .chip span { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
