:root {
  color-scheme: light dark;
  font-family: Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: #f6f9fd;
  --surface: #fff;
  --soft: #eef4fa;
  --ink: #0b1f3a;
  --muted: #526276;
  --border: #d7dfea;
  --blue: #086bd6;
  --purple: #673bcf;
  --nav: #f0ebf7;
  --select: #d8f6ee;
  --warning: #803c00;
  --error: #a71c1c;
  --shadow: 0 2px 6px #0b1f3a14;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #101720; --surface: #18212c; --soft: #222e3b;
    --ink: #eaf1fa; --muted: #b7c4d5; --border: #4b5a6d;
    --nav: #242135; --select: #234947; --warning: #ffca8e; --error: #ffb4ab;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 2.7rem); line-height: 1.08; letter-spacing: -.025em; }
h2 { font-size: 1.32rem; line-height: 1.25; }
h3 { font-size: 1.05rem; }
p { line-height: 1.45; }
button, select, input, textarea { font: inherit; }
button, input, textarea, select, summary { touch-action: manipulation; }
button, .file-button, .button {
  border: 0; background: var(--soft); color: var(--ink); border-radius: 999px;
  padding: .65rem 1rem; min-height: 44px; font-weight: 650; cursor: pointer; text-align: center;
  overflow-wrap: anywhere;
}
button:disabled { opacity: .58; cursor: wait; }
button:focus-visible, a:focus-visible, .file-button:focus-within { outline: 3px solid #337cce; outline-offset: 3px; }
.primary { background: var(--blue); color: white; }
.start { background: var(--purple); color: white; }
.danger { color: var(--error); }
.outline { border: 1px solid var(--border); background: transparent; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.site-list { max-height: 34dvh; overflow-y: auto; overscroll-behavior: contain; }
.site-choice { border-radius: .85rem; display: grid; gap: .2rem; text-align: start; }
.site-choice[aria-pressed="true"] { background: var(--select); }
.site-choice small { color: var(--muted); }
.company-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .7rem; margin: 0; }
.company-settings dd { margin: 0; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.app-shell {
  width: min(100%, 51rem); min-height: 100dvh; display: flex; flex-direction: column;
  margin: 0 auto; padding-top: env(safe-area-inset-top);
}
.masthead { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; padding: 1.7rem 1.25rem 1rem; }
.masthead p { margin-top: .45rem; }
.icon-button { min-width: 44px; padding: .4rem; font-size: 1.25rem; }
main { flex: 1; padding: .25rem 1rem 1.25rem; }
.stack { display: grid; align-content: start; gap: .85rem; min-width: 0; }
.compact { gap: .5rem; }
.row { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.row > *, .grid > * { min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.card { background: var(--surface); border-radius: 1.45rem; padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.card .primary, .full { width: 100%; }
.muted { color: var(--muted); }
.status { color: var(--warning); }
.banner { padding: .7rem .85rem; border: 1px solid var(--border); border-radius: .9rem; background: var(--surface); }
.selection { display: flex; justify-content: space-between; background: none; text-align: left; padding: 0; gap: .75rem; width: 100%; }
.selection > span:last-child { color: var(--muted); font-size: 1.25rem; }
.clock { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.amount { font-size: 1.7rem; font-weight: 700; }
.bottom { position: sticky; bottom: 0; z-index: 2; background: var(--background); margin-top: auto; }
.quick { padding: .6rem 1rem; }
.quick .start { min-height: 3.2rem; font-size: 1.1rem; }
nav { background: var(--nav); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: .4rem .3rem max(.5rem, env(safe-area-inset-bottom)); }
nav button { background: none; color: var(--muted); padding: .35rem .1rem; display: grid; align-content: center; justify-items: center; gap: .2rem; font-size: .79rem; }
nav button[aria-current="page"] { color: var(--ink); }
nav .glyph { min-width: min(100%, 3.5rem); min-height: 1.65rem; display: grid; place-items: center; border-radius: 1rem; font-size: 1.24rem; line-height: 1; }
nav button[aria-current="page"] .glyph { background: var(--select); }
label.field { display: grid; gap: .35rem; min-width: 0; font-weight: 600; }
input:not([type=checkbox],[type=radio]), select, textarea {
  color: var(--ink); background: var(--surface); border: 1px solid var(--border); min-height: 44px;
  border-radius: .85rem; padding: .6rem .65rem; max-width: 100%; min-width: 0; font-size: 1rem;
}
label.field > :is(input,textarea,select) { width: 100%; }
textarea { resize: vertical; min-height: 6rem; }
input[type=checkbox] { inline-size: 1.2rem; block-size: 1.2rem; accent-color: var(--purple); }
label.check { gap: .6rem; display: flex; align-items: center; min-height: 40px; }
.file-button { position: relative; display: inline-grid; place-items: center; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; inline-size: 100%; }
dialog {
  background: var(--surface); color: var(--ink); width: min(calc(100% - 1rem), 34rem); max-height: 88dvh;
  padding: 1.15rem; overflow: auto; border: 0; border-radius: 1.4rem; overscroll-behavior: contain;
  box-shadow: 0 1rem 4rem #0005;
}
dialog::backdrop { background: #10172078; }
body:has(dialog[open]) { overflow: hidden; }
dialog footer { justify-content: flex-end; position: sticky; bottom: -.08rem; background: var(--surface); padding-block: .4rem; z-index: 1; }
dialog .grow { flex: 1; }
img.attachment { max-width: 100%; height: auto; max-height: 15rem; object-fit: contain; border-radius: .6rem; }
audio { width: min(100%, 28rem); }
.activation { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.activation > section { width: min(100%, 30rem); padding: clamp(1.15rem, 4vw, 2rem); }
.app-icon { width: 3.5rem; height: 3.5rem; border-radius: .9rem; }
.guide { outline: 2px solid var(--purple); }
.guide-focus { outline: 3px solid #a68afb; outline-offset: 3px; }
#messages {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); top: max(.45rem, env(safe-area-inset-top));
  width: max-content; max-width: calc(100vw - 1rem); color: white; background: #19304c; border-radius: .85rem;
  box-shadow: 0 2px 12px #0003; padding: .6rem .9rem; pointer-events: none;
}
#messages:empty { display: none; }
dialog #messages, dialog .form-status { min-height: 1.3rem; }
@media (min-width: 700px) {
  .app-shell { margin-block: 1rem; min-height: calc(100dvh - 2rem); }
  .masthead { padding-inline: 1.6rem; }
  main, .quick { padding-inline: 1.6rem; }
  nav { border-radius: 1.4rem; }
  nav button { font-size: .9rem; }
}
.policy{width:min(100% - 2rem,48rem);margin:1rem auto 3rem}
.policy article{scroll-margin-top:1rem}
.policy p{overflow-wrap:anywhere}
.home-clock { text-align:center; font-size:clamp(2.6rem,12vw,4rem); font-variant-numeric:tabular-nums; }
.help-action summary { cursor:pointer; padding:.7rem; font-weight:600; }
.recording { color:var(--danger,#b12235); font-variant-numeric:tabular-nums; }
progress { width:100%; }

.settings-actions button { min-height:3.25rem; }
[data-daily] { min-width:0; overflow-wrap:anywhere; }
[data-daily] > * { min-width:0; }
[hidden] { display:none !important; }
