/* =============================================================================
   TimeNet — design system
   Palette is taken from the logo: navy ink, bright blue accent, warm paper.
   Light by default, dark via prefers-color-scheme, both overridable by a
   [data-theme] attribute on <html> so the header toggle can force either one.
   ========================================================================== */

:root{
  --bg:          #f4f6fa;
  --bg-grad:     radial-gradient(1200px 600px at 50% -10%, #e6edfa 0%, transparent 70%);
  --surface:     #ffffff;
  --surface-2:   #eef2f8;
  --surface-3:   #e3eaf4;
  --line:        #dde4ee;
  --line-strong: #c6d1e2;

  --ink:         #16233f;
  --ink-2:       #55637d;
  --ink-3:       #8593ab;

  --accent:      #2b7ff0;
  --accent-ink:  #ffffff;
  --accent-soft: #e4efff;
  --accent-line: #b9d5fb;

  --ok:          #17914d;
  --ok-soft:     #e2f6ea;
  --warn:        #b8770a;
  --warn-soft:   #fdf0d8;
  --danger:      #d32f3c;
  --danger-soft: #fdeaec;

  --track:       #e8edf5;
  --track-tick:  rgba(22,35,63,.10);

  --radius:      14px;
  --radius-sm:   9px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(22,35,63,.06), 0 1px 3px rgba(22,35,63,.04);
  --shadow-2: 0 4px 12px rgba(22,35,63,.08), 0 1px 3px rgba(22,35,63,.05);
  --shadow-3: 0 18px 48px rgba(22,35,63,.18), 0 4px 12px rgba(22,35,63,.10);

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg:          #0b1017;
    --bg-grad:     radial-gradient(1200px 600px at 50% -10%, #16243a 0%, transparent 70%);
    --surface:     #141b26;
    --surface-2:   #1b2431;
    --surface-3:   #232e3d;
    --line:        #27323f;
    --line-strong: #37455a;

    --ink:         #e9eff8;
    --ink-2:       #a2b2c9;
    --ink-3:       #6f8098;

    --accent:      #4f96f6;
    --accent-ink:  #06121f;
    --accent-soft: #16273d;
    --accent-line: #2b476b;

    --ok:          #43c07c;
    --ok-soft:     #12291d;
    --warn:        #e0a53c;
    --warn-soft:   #2b2314;
    --danger:      #f0666f;
    --danger-soft: #2e1519;

    --track:       #1d2734;
    --track-tick:  rgba(233,239,248,.10);

    --shadow-1: 0 1px 2px rgba(0,0,0,.30);
    --shadow-2: 0 4px 14px rgba(0,0,0,.36);
    --shadow-3: 0 20px 52px rgba(0,0,0,.55);
  }
}

/* Explicit override wins over the media query in both directions. */
:root[data-theme="light"]{
  --bg:#f4f6fa; --bg-grad:radial-gradient(1200px 600px at 50% -10%, #e6edfa 0%, transparent 70%);
  --surface:#fff; --surface-2:#eef2f8; --surface-3:#e3eaf4; --line:#dde4ee; --line-strong:#c6d1e2;
  --ink:#16233f; --ink-2:#55637d; --ink-3:#8593ab;
  --accent:#2b7ff0; --accent-ink:#fff; --accent-soft:#e4efff; --accent-line:#b9d5fb;
  --ok:#17914d; --ok-soft:#e2f6ea; --warn:#b8770a; --warn-soft:#fdf0d8; --danger:#d32f3c; --danger-soft:#fdeaec;
  --track:#e8edf5; --track-tick:rgba(22,35,63,.10);
  --shadow-1:0 1px 2px rgba(22,35,63,.06),0 1px 3px rgba(22,35,63,.04);
  --shadow-2:0 4px 12px rgba(22,35,63,.08),0 1px 3px rgba(22,35,63,.05);
  --shadow-3:0 18px 48px rgba(22,35,63,.18),0 4px 12px rgba(22,35,63,.10);
}
:root[data-theme="dark"]{
  --bg:#0b1017; --bg-grad:radial-gradient(1200px 600px at 50% -10%, #16243a 0%, transparent 70%);
  --surface:#141b26; --surface-2:#1b2431; --surface-3:#232e3d; --line:#27323f; --line-strong:#37455a;
  --ink:#e9eff8; --ink-2:#a2b2c9; --ink-3:#6f8098;
  --accent:#4f96f6; --accent-ink:#06121f; --accent-soft:#16273d; --accent-line:#2b476b;
  --ok:#43c07c; --ok-soft:#12291d; --warn:#e0a53c; --warn-soft:#2b2314; --danger:#f0666f; --danger-soft:#2e1519;
  --track:#1d2734; --track-tick:rgba(233,239,248,.10);
  --shadow-1:0 1px 2px rgba(0,0,0,.30); --shadow-2:0 4px 14px rgba(0,0,0,.36); --shadow-3:0 20px 52px rgba(0,0,0,.55);
}

/* ============================ base ============================ */
*, *::before, *::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  min-height:100dvh;
  font:400 16px/1.5 var(--sans);
  color:var(--ink);
  background:var(--bg-grad), var(--bg);
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3{ margin:0; font-weight:650; letter-spacing:-.01em; line-height:1.25; }
h1{ font-size:1.35rem; }
h2{ font-size:1.0rem; }
h3{ font-size:1.05rem; }
p{ margin:0 0 .75rem; }
a{ color:var(--accent); text-underline-offset:2px; }

.muted{ color:var(--ink-2); font-size:.875rem; }
.tiny{ font-size:.75rem; color:var(--ink-3); }
.break{ display:block; margin-top:6px; word-break:break-all; font-size:.8rem; }
.tnum{ font-variant-numeric:tabular-nums; }
[hidden]{ display:none !important; }

:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }

/* ============================ app bar ============================ */
.appbar{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
}
.appbar-inner{
  max-width:960px; margin:0 auto; padding:10px 16px;
  display:flex; align-items:center; gap:12px;
}
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; margin-right:auto; min-width:0; }
.brand-logo{ height:34px; width:auto; border-radius:7px; display:block; flex:0 0 auto; }
.brand-name{
  font-weight:700; letter-spacing:-.02em; font-size:1.05rem;
  /* The logo wordmark already says TimeNet; this is the narrow-screen fallback. */
  display:none;
}
.appbar-actions{ display:flex; align-items:center; gap:6px; flex:0 0 auto; }

.who{
  display:inline-flex; align-items:center; gap:8px;
  max-width:210px; padding:6px 10px;
  border:1px solid var(--line); border-radius:var(--radius-pill);
  background:var(--surface-2); color:var(--ink-2);
  font-size:.8125rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.who-org{ color:var(--ink-3); }

/* ============================ layout ============================ */
main{ max-width:960px; margin:0 auto; padding:18px 16px 64px; display:grid; gap:16px; }

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-1);
  padding:18px;
}
.card-head{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  margin-bottom:14px;
}
.card-head h2{ color:var(--ink); }

/* ============================ buttons ============================ */
.btn{
  --btn-bg:var(--surface); --btn-fg:var(--ink); --btn-line:var(--line-strong);
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:9px 15px; min-height:40px;
  font:600 .9375rem/1 var(--sans); color:var(--btn-fg);
  background:var(--btn-bg); border:1px solid var(--btn-line);
  border-radius:var(--radius-sm); cursor:pointer;
  transition:filter .12s ease, transform .06s ease, background-color .12s ease, border-color .12s ease;
  white-space:nowrap; text-decoration:none;
}
.btn:hover:not(:disabled){ filter:brightness(.97); }
.btn:active:not(:disabled){ transform:translateY(1px); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }

.btn-primary{ --btn-bg:var(--accent); --btn-fg:var(--accent-ink); --btn-line:transparent; }
.btn-primary:hover:not(:disabled){ filter:brightness(1.07); }
.btn-ghost{ --btn-bg:transparent; --btn-fg:var(--ink-2); --btn-line:var(--line); }
.btn-ghost:hover:not(:disabled){ --btn-bg:var(--surface-2); --btn-fg:var(--ink); }
.btn-quiet{ --btn-bg:transparent; --btn-fg:var(--ink-2); --btn-line:transparent; }
.btn-quiet:hover:not(:disabled){ --btn-bg:var(--surface-2); --btn-fg:var(--ink); }
.btn-danger{ --btn-bg:transparent; --btn-fg:var(--danger); --btn-line:color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover:not(:disabled){ --btn-bg:var(--danger-soft); }

.btn-sm{ padding:6px 11px; min-height:34px; font-size:.8125rem; }
.btn-icon{ padding:0; width:38px; min-height:38px; }
.btn-icon.btn-sm{ width:34px; min-height:34px; }
.btn-block{ width:100%; }

/* Transport controls — the one place colour is used as a signal, not decoration. */
.btn-transport{ flex:1 1 0; min-height:52px; font-size:1rem; border-radius:var(--radius-sm); }
.btn-start{ --btn-bg:var(--ok); --btn-fg:#fff; --btn-line:transparent; }
.btn-pause{ --btn-bg:var(--warn); --btn-fg:#fff; --btn-line:transparent; }
.btn-stop{  --btn-bg:var(--danger); --btn-fg:#fff; --btn-line:transparent; }
.btn-start:hover:not(:disabled), .btn-pause:hover:not(:disabled), .btn-stop:hover:not(:disabled){ filter:brightness(1.08); }

/* ============================ form controls ============================ */
select, input, textarea{
  font:400 .9375rem/1.4 var(--sans);
  color:var(--ink);
  background:var(--surface);
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  padding:9px 11px;
  min-height:40px;
  width:100%;
  transition:border-color .12s ease, box-shadow .12s ease;
}
textarea{ resize:vertical; min-height:88px; font-family:inherit; }
select{
  appearance:none; padding-right:34px; cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),
                   linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 17px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
}
input:focus, select:focus, textarea:focus{
  outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
input[readonly]{ background:var(--surface-2); color:var(--ink-2); cursor:default; }

.field{ display:block; margin-bottom:14px; }
.field-label{ display:block; font-size:.8125rem; font-weight:600; color:var(--ink-2); margin-bottom:6px; }
.field-hint{ display:block; font-size:.75rem; color:var(--ink-3); margin-top:6px; }
.field-row{ display:flex; gap:8px; align-items:center; }
.field-row > select{ flex:1 1 auto; min-width:0; }
.field-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* ============================ timer card ============================ */
.timer-card{ padding:20px 18px 18px; }

.timer-top{ display:flex; align-items:flex-end; gap:12px; margin-bottom:18px; }
.timer-top .field{ flex:1 1 auto; margin:0; min-width:0; }

.chip{
  display:inline-flex; align-items:center; gap:7px;
  padding:6px 12px; border-radius:var(--radius-pill);
  font-size:.75rem; font-weight:650; letter-spacing:.02em; text-transform:uppercase;
  background:var(--surface-2); color:var(--ink-2); border:1px solid var(--line);
  white-space:nowrap; flex:0 0 auto;
}
.chip .dot{ width:8px; height:8px; border-radius:50%; background:currentColor; flex:0 0 auto; }
.chip[data-state="running"]{ background:var(--ok-soft); color:var(--ok); border-color:color-mix(in srgb, var(--ok) 30%, transparent); }
.chip[data-state="running"] .dot{ animation:pulse 1.8s ease-in-out infinite; }
.chip[data-state="paused"]{ background:var(--warn-soft); color:var(--warn); border-color:color-mix(in srgb, var(--warn) 32%, transparent); }

@keyframes pulse{ 0%,100%{ opacity:1; transform:scale(1);} 50%{ opacity:.35; transform:scale(.82);} }
@media (prefers-reduced-motion: reduce){ .chip .dot{ animation:none !important; } }

.timer-display{ text-align:center; padding:8px 0 22px; }
.timer-main{
  font:700 clamp(2.75rem, 13vw, 4.25rem)/1 var(--mono);
  font-variant-numeric:tabular-nums;
  letter-spacing:-.03em;
  color:var(--ink);
  transition:color .2s ease;
}
.timer-card[data-state="running"] .timer-main{ color:var(--ok); }
.timer-card[data-state="paused"]  .timer-main{ color:var(--warn); }
.timer-card[data-state="idle"]    .timer-main{ color:var(--ink-3); }

.timer-meta{
  margin-top:10px; display:flex; justify-content:center; align-items:center;
  gap:8px; flex-wrap:wrap; font-size:.875rem; color:var(--ink-2);
}
.timer-meta strong{ color:var(--ink); font-family:var(--mono); font-variant-numeric:tabular-nums; font-weight:650; }
.timer-meta .sep{ color:var(--ink-3); }

.timer-actions{ display:flex; gap:10px; }

/* ============================ 7-day chart ============================ */
.chart{ display:flex; flex-direction:column; gap:7px; }

.chart-row{ display:flex; align-items:center; gap:10px; }
.chart-row .day{
  flex:0 0 46px; font-size:.75rem; font-weight:600; color:var(--ink-2);
  white-space:nowrap; text-align:right;
}
.chart-row.is-today .day{ color:var(--accent); }
.chart-row .total{
  flex:0 0 62px; text-align:right; font-family:var(--mono); font-size:.75rem;
  font-variant-numeric:tabular-nums; color:var(--ink-2); white-space:nowrap;
}
.chart-row.is-empty .total{ color:var(--ink-3); }

.track{
  position:relative; flex:1 1 auto; min-width:0; height:18px;
  background:var(--track); border-radius:5px; overflow:hidden;
}
/* Hour gridlines every 3h, heavier at noon. */
.track::before{
  content:""; position:absolute; inset:0; pointer-events:none; z-index:0;
  background-image:
    linear-gradient(to right, var(--track-tick) 1px, transparent 1px),
    repeating-linear-gradient(to right,
      transparent 0, transparent calc(100%/8 - 1px),
      var(--track-tick) calc(100%/8 - 1px), var(--track-tick) calc(100%/8));
  background-size:1px 100%, 100% 100%;
  background-position:50% 0, 0 0;
  background-repeat:no-repeat, repeat-x;
}
.track .seg{
  position:absolute; top:0; height:100%; z-index:1;
  min-width:2px; border-radius:2px;
}
.chart-row.is-today .track{ box-shadow:inset 0 0 0 1px var(--accent-line); }

.chart-axis{
  display:flex; justify-content:space-between;
  margin:8px 0 0; padding-left:56px; padding-right:72px;
  font-size:.6875rem; color:var(--ink-3); font-variant-numeric:tabular-nums;
}

/* ============================ entries ============================ */
.entries{ display:flex; flex-direction:column; }

.entry{
  display:flex; align-items:center; gap:12px;
  padding:11px 10px; margin:0 -10px;
  border-radius:var(--radius-sm);
  border-top:1px solid var(--line);
  transition:background-color .12s ease;
}
.entry:first-child{ border-top:none; }
.entry:hover{ background:var(--surface-2); }

.entry-main{ flex:1 1 auto; min-width:0; }
.entry-when{ font-size:.9375rem; color:var(--ink); }
.entry-range{ font-size:.75rem; color:var(--ink-3); white-space:nowrap; }
.entry-note{
  font-size:.8125rem; color:var(--ink-2); margin-top:2px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:46ch;
}
.entry-side{ display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.entry-dur{ font-family:var(--mono); font-variant-numeric:tabular-nums; font-size:.9375rem; color:var(--ink); }
.entry-live{ font-size:.8125rem; color:var(--ok); font-weight:600; }
.entry .btn{ opacity:0; transition:opacity .12s ease; }
.entry:hover .btn, .entry .btn:focus-visible{ opacity:1; }
@media (hover:none){ .entry .btn{ opacity:1; } }

.empty{ padding:26px 8px; text-align:center; color:var(--ink-3); font-size:.9375rem; }

/* ============================ dialogs ============================ */
dialog{
  padding:0; border:none; background:transparent;
  max-width:min(460px, calc(100vw - 32px));
  color:var(--ink);
}
dialog::backdrop{ background:rgba(11,16,23,.55); backdrop-filter:blur(3px); }
dialog .card{ box-shadow:var(--shadow-3); padding:22px; margin:0; }
dialog h3{ margin:0 0 4px; }
dialog .dialog-sub{ color:var(--ink-2); font-size:.875rem; margin:0 0 16px; }

.dialog-actions{
  display:flex; gap:8px; justify-content:flex-end; align-items:center;
  margin-top:18px; padding-top:16px; border-top:1px solid var(--line);
}
.dialog-actions .spacer{ margin-right:auto; }

.form-error{ color:var(--danger); font-size:.8125rem; min-height:1.2em; margin:2px 0 0; }

@media (max-width:520px){
  dialog{ max-width:100vw; width:100vw; margin:auto 0 0; }
  dialog .card{ border-radius:var(--radius) var(--radius) 0 0; border-bottom:none; }
  .dialog-actions{ flex-wrap:wrap; }
  .dialog-actions .btn{ flex:1 1 auto; }
}

/* colour swatches */
.swatches{ display:flex; gap:9px; flex-wrap:wrap; }
.swatch{
  width:32px; height:32px; padding:0; cursor:pointer;
  border-radius:8px; border:2px solid transparent;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.10);
  transition:transform .1s ease;
}
.swatch:hover{ transform:scale(1.08); }
.swatch[aria-checked="true"]{
  border-color:var(--ink);
  box-shadow:inset 0 0 0 2px var(--surface);
}

/* ============================ auth pages / overlay ============================ */
.page-centered{ display:grid; place-items:center; padding:24px 16px; }
.auth-panel{ width:min(420px, 100%); display:block; }
.auth-logo{ display:block; height:74px; width:auto; margin:0 auto 18px; border-radius:12px; }
.auth-title{ margin:0 0 6px; font-size:1.25rem; }
.auth-foot{ margin:16px 0 0; text-align:center; font-size:.875rem; }

.auth-alt{
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin-top:16px; padding-top:14px; border-top:1px solid var(--line);
  font-size:.875rem; flex-wrap:wrap;
}
.linklike{
  background:none; border:none; padding:0; cursor:pointer;
  color:var(--accent); font:inherit; font-size:.875rem; text-decoration:underline; text-underline-offset:2px;
}

.alert{ padding:11px 13px; border-radius:var(--radius-sm); font-size:.875rem; margin:0 0 14px; border:1px solid; }
.alert-error{ background:var(--danger-soft); border-color:color-mix(in srgb, var(--danger) 35%, transparent); color:var(--danger); }
.alert-ok{    background:var(--ok-soft);     border-color:color-mix(in srgb, var(--ok) 35%, transparent);     color:var(--ok); }
.alert-warn{  background:var(--warn-soft);   border-color:color-mix(in srgb, var(--warn) 35%, transparent);   color:var(--warn); }

/* Blocks the app until sign-in resolves. Must sit above the sticky app bar
   (z-index 50), or the header shows through the sign-in scrim. */
#authShield{ position:fixed; inset:0; z-index:100; background:var(--bg-grad), var(--bg); }

.dialog-logo{ display:block; height:56px; width:auto; margin:0 auto 14px; border-radius:10px; }

/* ============================ toasts ============================ */
.toasts{
  position:fixed; z-index:200; left:50%; bottom:22px; transform:translateX(-50%);
  display:flex; flex-direction:column-reverse; gap:8px; align-items:center;
  pointer-events:none; width:min(420px, calc(100vw - 32px));
}
.toast{
  pointer-events:auto;
  display:flex; align-items:center; gap:10px;
  padding:11px 15px; border-radius:var(--radius-pill);
  background:var(--surface); border:1px solid var(--line);
  box-shadow:var(--shadow-2); font-size:.875rem; color:var(--ink);
  animation:toast-in .18s ease-out;
  max-width:100%;
}
.toast[data-kind="error"]{ border-color:color-mix(in srgb, var(--danger) 45%, transparent); color:var(--danger); }
.toast[data-kind="ok"]{    border-color:color-mix(in srgb, var(--ok) 45%, transparent); }
.toast.is-out{ animation:toast-out .18s ease-in forwards; }

@keyframes toast-in{  from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@keyframes toast-out{ to{ opacity:0; transform:translateY(6px); } }
@media (prefers-reduced-motion: reduce){ .toast, .toast.is-out{ animation:none; } }

/* ============================ report output ============================ */
#reportOutput{ padding:0; overflow:hidden; }
.report{ background:#fff; color:#111; padding:26px; }
.report-head{ display:flex; justify-content:space-between; align-items:baseline; gap:16px; border-bottom:2px solid #16233f; padding-bottom:10px; margin-bottom:14px; }
.report-brand{ font-weight:700; font-size:1.05rem; color:#16233f; }
.report-ts{ font-size:.75rem; color:#666; }
.report-meta{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:6px 18px; font-size:.875rem; margin-bottom:18px; }
.report-meta strong{ color:#16233f; }
.report h4{ margin:0 0 8px; font-size:.8125rem; text-transform:uppercase; letter-spacing:.06em; color:#666; }
.report table{ border-collapse:collapse; width:100%; font-size:.875rem; }
.report th, .report td{ border-bottom:1px solid #e2e6ee; padding:7px 9px; text-align:left; }
.report thead th{ background:#f2f5fa; color:#16233f; font-weight:650; border-bottom:1px solid #c6d1e2; }
.report td.num, .report th.num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.report tr.day-row td{ background:#f7f9fc; font-weight:650; color:#16233f; }
.report tr.day-total td{ border-bottom:1px solid #c6d1e2; }
.report tfoot td{ border-top:2px solid #16233f; border-bottom:none; font-weight:700; padding-top:10px; }
.report-foot{ margin-top:18px; padding-top:10px; border-top:1px solid #e2e6ee; font-size:.6875rem; color:#888; }
.report-actions{ padding:12px 26px; background:var(--surface-2); display:flex; justify-content:flex-end; gap:8px; }

/* ============================ print ============================ */
@media print{
  body *{ visibility:hidden !important; }
  #reportOutput, #reportOutput *{ visibility:visible !important; }

  html, body{ background:#fff !important; }
  #reportOutput{
    position:absolute !important; inset:0 auto auto 0 !important;
    width:100% !important; border:none !important; box-shadow:none !important;
  }
  .report{ padding:0 !important; }
  dialog, dialog::backdrop, .appbar, .toasts{ display:none !important; }
  .no-print{ display:none !important; }
  .report tr{ break-inside:avoid; }
  .report thead{ display:table-header-group; }
}

/* ============================ responsive ============================ */
@media (max-width:640px){
  .appbar-inner{ padding:8px 12px; gap:8px; }
  .brand-logo{ height:28px; }
  .who{ max-width:120px; }
  .who-org{ display:none; }
  main{ padding:14px 12px 56px; gap:12px; }
  .card{ padding:15px; }
  .timer-top{ flex-direction:column; align-items:stretch; gap:10px; }
  .timer-top .chip{ align-self:flex-start; }
  .timer-actions{ flex-wrap:wrap; }
  .btn-transport{ flex:1 1 30%; }
  .chart-row .day{ flex-basis:38px; }
  .chart-row .total{ flex-basis:56px; }
  .chart-axis{ padding-left:48px; padding-right:66px; }
  .entry-note{ max-width:26ch; }
  /* The start–end range is redundant next to the duration once space is tight. */
  .entry-range{ display:none; }
  .field-grid{ grid-template-columns:1fr; }
}
