:root {
  color-scheme: light;
  --ink: #142017;
  --paper: #fff7e8;
  --navy: #0e2744;
  --go: #ffd84a;
  --stop: #7a1414;
  --ok: #0f6b38;
  --line: #142017;
  --card: #fffdf8;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.2rem;
  line-height: 1.35;
}
button, input, textarea, a { font: inherit; }
button, .btn { cursor: pointer; }
:focus-visible { outline: 3px solid #0b5cab; outline-offset: 3px; }
.top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 14px 12px;
  background: var(--navy);
  color: #fff;
}
.top img { width: 48px; height: 48px; border-radius: 12px; background: #fff; }
.brand { margin: 0; font-size: 1.35rem; font-weight: 900; letter-spacing: 0; }
.company { margin: 2px 0 0; font-size: 1.05rem; font-weight: 800; }
.top-actions { flex: 1 1 100%; margin-left: 0; display: flex; gap: 8px; align-items: center; }
.lang, .ghost {
  min-height: 48px;
  padding: 0 12px;
  border: 3px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 12px;
  font-weight: 900;
}
.lang.active { background: var(--go); color: var(--ink); border-color: var(--go); }
#app { padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
.about {
  padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
  max-width: 720px;
  margin: 0 auto;
  font-size: 1rem;
  font-weight: 700;
}
.about p { margin: 4px 0; }
.about a { color: var(--navy); }
.gate, .stack { display: flex; flex-direction: column; gap: 12px; }
label, .label { font-weight: 900; }
input, textarea {
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 88px; }
.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 3px solid var(--line);
  font-weight: 900;
  color: var(--ink);
  background: #fff;
}
.btn small { font-weight: 800; }
.btn-go { background: var(--go); font-size: 1.6rem; }
.btn-stop { background: var(--stop); color: #fff; font-size: 1.5rem; border-color: #3d0909; }
.btn-ink { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-lunch { background: #fff; }
.btn-quiet { background: transparent; min-height: 56px; }
.btn.on { outline: 4px solid var(--go); }
.eyebrow { margin: 0 0 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.stop, .confirm, .lunch, .pin-box, .me, .week, .settings, .alerts {
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}
.stop h3, .report-stop h3 { margin: 0 0 4px; font-size: 1.45rem; }
.addr, .hint, .note, .times, .checks { margin: 6px 0; }
.chip {
  display: inline-block;
  margin: 4px 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
}
.stop-here { box-shadow: inset 8px 0 0 var(--ok); }
.stop-done { box-shadow: inset 8px 0 0 var(--navy); }
.drive, .gap {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #e7eef6;
  font-weight: 800;
}
.gap { background: #fff1c9; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 3px solid var(--line);
  background: #fff;
  font-weight: 900;
}
.check.on { background: var(--ok); color: #fff; }
.photo-row, .kind-row, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 3px solid var(--line); background: #eee; }
.actions { position: sticky; bottom: 0; z-index: 5; flex-direction: column; padding: 10px 0; background: linear-gradient(transparent, var(--paper) 20%); }
.actions .btn { width: 100%; }
.helper-row { display: flex; gap: 8px; align-items: center; }
.helper-row .name { flex: 1; font-weight: 900; overflow-wrap: anywhere; }
.btn-remove { min-width: 46%; min-height: 64px; background: var(--stop); color: #fff; border-color: #3d0909; }
.phone-stopped { color: var(--stop); font-weight: 900; }
.speeding { margin: 4px 0 8px; }
#gpsClosedNote { background: #fff1c9; border: 3px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.banner, .weather, .warn { font-weight: 900; }
.warn { color: var(--stop); }
.weather { background: #e7f6ee; border: 3px solid var(--ok); border-radius: 14px; padding: 10px 12px; }
.confirm { background: var(--go); }
#mapCanvas { width: 100%; height: auto; border-radius: 18px; background: var(--paper); }
.report-brand, .report-foot { font-weight: 900; }
.report-company { margin: 0; font-size: 1.8rem; }
.report-stop, .report-lunch { break-inside: avoid; }
#installBtn {
  width: min(692px, calc(100% - 28px));
  margin: 12px auto 0;
}
.install-panel {
  margin: 12px 14px;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.install-panel[hidden], [hidden] { display: none !important; }
.empty { font-weight: 800; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .top, .about, .btn, .settings, .week, #printBtn { display: none !important; }
  body { background: #fff; }
  #report { max-width: none; }
}

.ho-panel { margin-top: 10px; padding: 12px; border: 1px solid #c9d6c3; border-radius: 12px; background: #f6faf3; }
.ho-panel h4 { margin: 0 0 8px; }
.ho-panel label input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px; font-size: 16px; }
.ho-preview { white-space: pre-wrap; font: 14px/1.4 system-ui, sans-serif; background: #fff; border: 1px solid #ddd; border-radius: 10px; padding: 10px; }
.ho-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ho-actions .btn { text-decoration: none; text-align: center; }
.ho-status { min-height: 1em; color: #a33; }
