/* Colors follow docs/wireframes/2026-10-26-screens-phone.html */
:root {
  --bg: #111; --fg: #e8e8e6; --muted: #9a9a96; --border: #555; --big: #6a6a66;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; }
body { font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; }

.screen {
  flex: 1; width: 100%; max-width: 430px; margin: 0 auto; position: relative;
  background: var(--bg); color: var(--fg); text-align: center;
  transition: background .3s;
}
.screen section { display: none; flex-direction: column; align-items: center; height: 100%; padding: 32px 20px 24px; }
.screen[data-phase="idle"]    section[data-phase="idle"],
.screen[data-phase="sitting"] section[data-phase="sitting"],
.screen[data-phase="check"]   section[data-phase="check"],
.screen[data-phase="away"]    section[data-phase="away"],
.screen[data-phase="early"]   section[data-phase="early"],
.screen[data-phase="paused"]  section[data-phase="paused"] { display: flex; }

.status { font-size: 14px; color: var(--muted); }
.mid { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.big { font-size: 88px; font-variant-numeric: tabular-nums; color: var(--big); }
.line { font-size: 28px; }
.sub { font-size: 18px; color: var(--muted); }
h1 { font-size: 28px; font-weight: 500; margin: 0 0 16px; }
label { font-size: 18px; color: var(--muted); }
input { width: 4.5em; font: inherit; color: var(--fg); background: #222; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; margin: 0 6px; text-align: center; }

.btn {
  width: 100%; font: inherit; font-size: 18px; color: var(--fg); background: none;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 0; margin-top: 10px; cursor: pointer;
}
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.quiet { color: var(--muted); border-color: #333; }
.link { font: inherit; font-size: 15px; color: #777; background: none; border: none; padding: 14px; cursor: pointer; }

/* Phase colors */
.screen[data-phase="check"] { --bg: #4A1B0C; --fg: #FAECE7; --muted: #F0997B; --border: #993C1D; }
.screen[data-phase="check"].tier3 { animation: pulse 1.2s ease-in-out infinite; }
.screen[data-phase="check"].tier4 { animation: pulse .6s ease-in-out infinite; }
.screen[data-phase="away"]  { --bg: #04342C; --fg: #E1F5EE; --muted: #5DCAA5; --border: #1D9E75; --big: #E1F5EE; }
.screen[data-phase="early"] { --bg: #412402; --fg: #FAEEDA; --muted: #EF9F27; --border: #BA7517; }
@keyframes pulse { 50% { background: #7a2a12; } }

.picker {
  position: absolute; inset: 0; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; padding: 20px; gap: 4px;
}
.picker[hidden] { display: none; }

/* Test controls and camera preview. Deliberately not phone-styled. */
.testbar {
  width: 100%; max-width: 430px; margin: 0 auto; padding: 10px 12px;
  background: #fff3b0; color: #333; font: 13px ui-monospace, monospace;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.testrow { width: 100%; display: flex; gap: 8px; }
.testrow .toggle { min-width: 0; flex: 1; }
.toggle { font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 6px; border: 1px solid #333; background: #fff; cursor: pointer; min-width: 8em; }
.toggle.away { background: #333; color: #fff3b0; }
.camview { position: relative; width: 96px; height: 72px; background: #333; border-radius: 6px; overflow: hidden; }
.camview video, .camview canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.tuning label { font-size: 13px; color: #333; }
.tuning input { width: 4em; font-size: 16px; color: #333; background: #fff; border-color: #333; border-radius: 4px; padding: 4px; margin: 0 4px; }
