:root {
  color-scheme: light;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #122d37;
  --muted: #45616a;
  --paper: #fbfcf9;
  --edge: #c6d3cc;
  --accent: #b7efd1;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: #e8eee8;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
main { width: min(100%, 28rem); margin: clamp(0rem, 6vh, 3.8rem) auto 0; }
.brand { display: flex; align-items: center; gap: .65rem; font-size: 1.65rem; font-weight: 720; letter-spacing: -.06em; margin: 0 .25rem 1.4rem; }
.mark { display: flex; gap: 3px; align-items: center; justify-content: center; width: 37px; height: 37px; border-radius: 12px; background: var(--ink); }
.mark i { display: block; width: 3px; height: 8px; border-radius: 5px; background: var(--accent); }
.mark i:nth-child(even) { height: 16px; }
.mark i:nth-child(3) { height: 23px; }
.panel { padding: clamp(1.3rem, 5vw, 2rem); background: var(--paper); border: 1px solid #c9d5cd; border-radius: 22px; box-shadow: 0 12px 40px #1937290a; }
.status-row { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-weight: 650; font-size: .82rem; }
.signal { width: 9px; height: 9px; border-radius: 50%; background: #376858; }
#timer { margin-inline-start: auto; font: 600 .85rem/1.4 ui-monospace, Menlo, monospace; }
h1 { margin: 1.1rem 0 .6rem; font-size: clamp(1.9rem, 7.7vw, 2.45rem); line-height: 1.08; letter-spacing: -.052em; overflow-wrap: break-word; }
.lead { color: var(--muted); margin: 0 0 1.6rem; font-size: 1rem; }
button, input, textarea { font: inherit; }
button { width: 100%; padding: .8rem 1rem; margin: 0 0 .6rem; min-height: 48px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 640; }
button:disabled { opacity: .63; cursor: wait; }
button:last-child { margin-bottom: 0; }
.primary { background: var(--ink); color: #fff; }
.secondary { background: transparent; color: var(--ink); border-color: var(--edge); }
.end { background: #f7e9e5; color: #813823; margin: .4rem 0 0; }
:focus-visible { outline: 3px solid #00755e; outline-offset: 3px; }
h1:focus:not(:focus-visible) { outline: none; }
label, .field-title { display: block; margin: 0 0 .5rem; font-size: .9rem; font-weight: 650; }
input, textarea { width: 100%; border: 1px solid #839a90; color: var(--ink); border-radius: 8px; background: white; padding: .65rem; min-height: 46px; }
textarea { resize: vertical; overflow-wrap: anywhere; }
.hint { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
details { margin-top: 1rem; border-top: 1px solid var(--edge); }
summary { display: list-item; cursor: pointer; padding: .95rem 0 .55rem; min-height: 44px; font-size: .9rem; font-weight: 600; }
details label { margin-top: .5rem; }
details p:last-child { margin-bottom: 0; }
#error { color: #7f291d; background: #fbeeea; padding: .75rem; border-radius: 8px; }
#code { display: block; padding: .85rem .65rem; margin: 0 0 1.25rem; border-radius: 10px; background: #dfefe4; font: 650 clamp(.96rem, 4.1vw, 1.22rem)/1.4 ui-monospace, Menlo, monospace; letter-spacing: .03em; text-align: center; }
footer { margin: 1rem .25rem 0; color: var(--muted); font-size: .8rem; }
footer span { padding: 0 .4rem; }
@media (max-height: 620px) { main { margin-top: 0; } .brand { margin-bottom: .8rem; } }
