:root {
  --bg: #fffdf7;
  --ink: #1f2430;
  --accent: #e8a13c;
  --panel: #ffffff;
  --line: #e4ddcf;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.app-header { padding: 1.25rem 1.5rem; border-bottom: 2px solid var(--accent); }
.app-header h1 { margin: 0; font-size: 1.4rem; }
.tagline { margin: 0.2rem 0 0; color: #6b6455; font-size: 0.9rem; }
main { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; padding: 1.5rem; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
section h2 { margin-top: 0; font-size: 1rem; }
.empty-note { color: #8a8272; font-size: 0.9rem; }
.app-footer { padding: 0.75rem 1.5rem; color: #8a8272; font-size: 0.8rem; }
@media (max-width: 720px) { main { grid-template-columns: 1fr; } }

/* planner layout */
#setup-panel label { display: block; margin: 0.6rem 0 0.2rem; font-weight: 600; font-size: 0.85rem; }
#setup-panel input[type="text"], #setup-panel input[type="number"] {
  width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; background: #fffef9;
}
#setup-panel input[type="file"] { margin: 0.3rem 0; font-size: 0.85rem; width: 100%; }
.hint { color: #8a8272; font-size: 0.82rem; font-weight: 400; }
.error-text, .hint.error { color: #b3261e; font-size: 0.85rem; }
button {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 0.55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; margin-top: 0.4rem;
}
button:disabled { opacity: 0.45; cursor: default; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.rules { margin-top: 1.2rem; border-top: 1px dashed var(--line); padding-top: 0.6rem; }
.rules h3 { margin: 0 0 0.3rem; font-size: 0.85rem; }
.rules ul { margin: 0; padding-left: 1.1rem; color: #6b6455; font-size: 0.82rem; }
.rules li { margin: 0.15rem 0; }
.result-head { display: flex; justify-content: space-between; align-items: center; }
.trip { border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.8rem; margin: 0.8rem 0; }
.trip h3 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.trip .meta { font-weight: 400; color: #6b6455; font-size: 0.82rem; }
.trip table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.trip th, .trip td { text-align: left; padding: 0.3rem 0.5rem; border-top: 1px solid var(--line); }
.trip th { border-top: none; color: #8a8272; font-size: 0.78rem; }
.violations { background: #fdecea; border: 1px solid #f3b6b1; border-radius: 8px; padding: 0.6rem 0.9rem; }
.violations h3 { margin: 0 0 0.3rem; font-size: 0.9rem; color: #b3261e; }
.violations ul { margin: 0; padding-left: 1.1rem; font-size: 0.85rem; }
.summary-line { font-size: 0.9rem; font-weight: 600; }
#map { height: 420px; border-radius: 8px; margin-top: 1rem; }
.stop-label { background: transparent; border: none; box-shadow: none; font-weight: 700; font-size: 0.75rem; }
@media print {
  #setup-panel, .app-header, .app-footer, #map, #print-btn { display: none; }
  main { display: block; padding: 0; }
  section { border: none; }
}
.notes { background: #fef7e6; border: 1px solid #ecd9a8; border-radius: 8px; padding: 0.6rem 0.9rem; margin-top: 0.8rem; }
.notes h3 { margin: 0 0 0.3rem; font-size: 0.9rem; color: #8a6a12; }
.notes ul { margin: 0; padding-left: 1.1rem; font-size: 0.85rem; }
