/* Portal layout: a top bar, then one working column (login, tour list, new-tour form, editor with a photo strip + stop panel, people and settings for the admin). The tour itself opens full screen on top.
   Look follows Wynwood House: white ground, black type and pill buttons, condensed uppercase headlines, WH yellow as the accent, pale blue bands. */
:root {
  --bg: #ffffff;             /* page ground */
  --band: #eff8fa;           /* pale blue sections: share box, photo picker, progress */
  --panel: #ffffff;          /* cards */
  --raised: #f2f2f2;         /* image placeholders, photo frame */
  --ink: #0a0a0a;            /* main text, primary buttons */
  --soft: #2b2b2b;           /* running text */
  --muted: #6b6b6b;          /* captions */
  --line: #e2e2e2;
  --line-strong: #cfcfcf;
  --accent: #ffae01;         /* WH yellow: "go there" points, selection, highlights */
  --accent-soft: #fff4d6;
  --danger: #c62828;
  --font-display: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible, label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; padding-block: 28px 72px; display: grid; gap: 28px; }

.eyebrow { margin: 0; font: 500 11px/1.2 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0; font: 400 clamp(40px, 9vw, 60px)/.95 var(--font-display); letter-spacing: .01em; text-transform: uppercase; text-wrap: balance; }
h2 { margin: 0; font: 600 12px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
h3 { margin: 0; font: 600 15px/1.3 var(--font-body); }
.lead { margin: 0; max-width: 60ch; font: 400 16px/1.55 var(--font-body); color: var(--soft); }
.note { margin: 0; font: 400 13px/1.5 var(--font-body); color: var(--muted); max-width: 70ch; }
.note.err { color: var(--danger); }
.hero { display: grid; gap: 14px; justify-items: start; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--bg); color: var(--ink);
  font: 500 13px/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
}
.btn:hover { background: var(--raised); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #2e2e2e; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--raised); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { padding: 9px 14px; font-size: 12px; }
.btn.tiny { padding: 7px 10px; font-size: 11px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.btn[data-armed] { background: var(--danger); color: #fff; border-color: var(--danger); }

/* home */
.sec { display: grid; gap: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; min-width: 0; }
.tcard .cover { aspect-ratio: 4 / 3; background: var(--raised); display: block; width: 100%; object-fit: cover; }
.tcard .tbody { padding: 16px; display: grid; gap: 10px; min-width: 0; }
.tcard h3 { font: 400 26px/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.tcard .meta { font: 400 12px/1.3 var(--font-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.empty { margin: 0; padding: 32px 20px; border-radius: 16px; background: var(--band); color: var(--soft); font-size: 15px; line-height: 1.5; text-align: center; }

/* photo tips */
.tips { border-radius: 16px; background: var(--band); padding: 4px 20px; }
.tips summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font: 400 26px/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.tips summary::-webkit-details-marker { display: none; }
.tips summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; flex: none; }
.tips[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.tips-list { list-style: none; counter-reset: tip; margin: 0; padding: 4px 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px 24px; }
.tips-list li { counter-increment: tip; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; align-content: start; }
.tips-list li::before { content: counter(tip); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; font: 400 20px/1 var(--font-display); padding-top: 2px; }
.tips-list strong { font: 600 15px/1.3 var(--font-body); }
.tips-list span { font: 400 14px/1.5 var(--font-body); color: var(--soft); }
@media (prefers-reduced-motion: reduce) { .tips summary::after { transition: none; } }

/* new tour */
.bar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.bar .status { font-size: 12px; color: var(--muted); margin-right: auto; }
.field { display: grid; gap: 6px; }
.field > span { font: 600 11px/1.2 var(--font-body); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.field input, .field textarea, .pt input, .pt select {
  width: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder, .pt input::placeholder, .inline-form input::placeholder { color: #9a9a9a; }
.field textarea { resize: vertical; line-height: 1.5; }
.title-field input { font: 400 30px/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.pick { display: grid; gap: 12px; justify-items: start; padding: 22px; border-radius: 16px; background: var(--band); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; width: 100%; }
.thumbs figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--raised); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs figcaption { position: absolute; left: 6px; top: 6px; font: 600 11px/1 var(--font-body); background: var(--ink); color: #fff; padding: 4px 6px; border-radius: 999px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; max-width: 62ch; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ink); flex: none; }
.progress { display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: var(--band); }
.progress ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.progress li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: 14px; }
.progress li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; transform: translateY(1px); }
.progress li.now { color: var(--ink); font-weight: 600; }
.progress li.now::before { border-color: var(--accent); background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.progress li.done { color: var(--soft); }
.progress li.done::before { border-color: var(--ink); background: var(--ink); }
@keyframes pulse { 50% { opacity: .35; } }

/* editor */
.editor { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.stops { display: grid; gap: 10px; position: sticky; top: 76px; max-height: calc(100vh - 90px); overflow: auto; padding-right: 2px; }
.stop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st { display: flex; align-items: center; gap: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.st.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.st-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; background: none; border: 0; cursor: pointer; text-align: left; }
.st-main img { width: 52px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; background: var(--raised); }
.st-num { font-size: 11px; color: var(--muted); flex: none; }
.st-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.st-moves { display: flex; flex-direction: column; padding-right: 4px; }
.st-moves button { background: none; border: 0; color: var(--soft); cursor: pointer; padding: 2px 6px; font-size: 13px; line-height: 1; }
.st-moves button:disabled { opacity: .25; cursor: default; }
.stop-edit { display: grid; gap: 16px; min-width: 0; }
.photo-box { display: grid; gap: 8px; justify-items: center; background: var(--raised); border-radius: 16px; padding: 10px; }
.photo { position: relative; width: 100%; border-radius: 10px; overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.placing { cursor: crosshair; outline: 3px dashed var(--accent); outline-offset: 3px; }
.mk { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; font: 700 14px/1 var(--font-body); }
.mk-go { background: var(--accent); color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 174, 1, .35), 0 3px 10px rgba(0, 0, 0, .35); }
.mk-pin { background: #fff; width: 16px; height: 16px; box-shadow: 0 0 0 4px rgba(0, 0, 0, .28), 0 3px 10px rgba(0, 0, 0, .35); }
.mk.sel { outline: 3px solid var(--ink); outline-offset: 3px; }
.place-hint { margin: 0; display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink); }
.points { display: grid; gap: 10px; }
.points-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.point-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pt { display: grid; grid-template-columns: 12px minmax(0, 1.2fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.pt.sel { border-color: var(--ink); }
.pt input, .pt select { padding: 9px 11px; font-size: 14px; border-radius: 10px; }
.pt .pt-dir { grid-column: 2 / 4; }
.pt-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.pt-dot.go { background: var(--accent); box-shadow: none; }
.stop-actions { display: flex; justify-content: flex-end; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 16px; }
.danger-zone summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.danger-zone[open] { display: grid; gap: 10px; justify-items: start; }
.danger-zone p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.brand { font: 400 26px/1 var(--font-display); letter-spacing: .02em; margin-right: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.wh { display: inline-block; background: var(--accent); color: var(--ink); border-radius: 999px; padding: 4px 9px 2px; font-size: 18px; line-height: 1; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { background: none; border: 0; color: var(--muted); padding: 9px 12px; border-radius: 999px; cursor: pointer; font: 500 12px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: #fff; background: var(--ink); }
.who { font-size: 12px; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); }

/* login */
.login { max-width: 440px; margin: 8vh auto 0; display: grid; gap: 22px; }
.login form { display: grid; gap: 12px; }
.code-input { font: 600 22px/1.2 var(--font-body) !important; letter-spacing: .12em; text-align: center; }

/* share box */
.share { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--band); }
.share-link { display: block; padding: 11px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font: 500 13px/1.4 var(--font-body); color: var(--soft); overflow-wrap: anywhere; user-select: all; }
.btn.wa { background: #25d366; color: #062b14; border-color: #25d366; }
.btn.wa:hover { background: #3ee07b; }
.tcard .owner { display: flex; align-items: center; gap: 6px; margin: 0; font: 600 11px/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.tcard .owner::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* people + settings */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 12px; min-width: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form input { flex: 1 1 200px; min-width: 0; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; padding: 12px 16px; color: var(--ink); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.person { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.person-main { flex: 1 1 200px; min-width: 0; display: grid; gap: 4px; }
.person-name { font-weight: 600; overflow-wrap: anywhere; }
.person-meta { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font: 600 11px/1.2 var(--font-body); background: #e6f4ea; color: #1e6b34; }
.badge.off { background: #fdecea; color: var(--danger); }
.code-box { display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--accent); }
.code-big { margin: 0; font: 700 30px/1.1 var(--font-body); letter-spacing: .14em; color: var(--ink); }
.models { display: grid; gap: 8px; }
.model { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.model:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.model input { margin-top: 3px; accent-color: var(--ink); }
.model strong { display: block; font-size: 15px; color: var(--ink); }
.model > span > span { font-size: 13px; color: var(--muted); }

@media (max-width: 760px) {
  .editor { grid-template-columns: 1fr; }
  .stops { position: static; max-height: none; overflow: visible; }
  .stop-list { grid-auto-flow: column; grid-auto-columns: 132px; overflow-x: auto; padding-bottom: 4px; }
  .st { flex-direction: column; align-items: stretch; }
  .st-main { flex-direction: column; align-items: stretch; gap: 6px; }
  .st-main img { width: 100%; height: 74px; }
  .st-moves { flex-direction: row; justify-content: space-between; padding: 0 4px 4px; }
  .pt { grid-template-columns: 12px minmax(0, 1fr) auto auto; }
  .pt .pt-to { grid-column: 2 / -1; grid-row: 2; }
  .pt .pt-dir { grid-column: 2 / -1; grid-row: 3; }
  .who { display: none; }
}
@media (max-width: 520px) {
  .top-in { gap: 6px; flex-wrap: nowrap; }
  .brand .brand-name { display: none; }
  .tab { padding: 9px 9px; letter-spacing: .03em; }
  .top-in > .btn { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) { .progress li.now::before { animation: none; } }
