/* =====================================================================
   AI Hide & Seek – light, mobile-first layout
   ===================================================================== */
:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e3e7ee;
  --text: #1f2633;
  --muted: #6b7486;
  --accent: #3b5bdb;
  --accent-soft: #e8edff;
  --ok: #10b981;
  --bad: #ef4444;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.logo { width: 26px; height: 26px; display: block; }
.head-tools { flex-wrap: wrap; justify-content: flex-end; }
.title { font: 700 15px/1 var(--mono); letter-spacing: 2px; }
.title b { color: #f59e0b; }
.pill { font: 600 12px/1 var(--mono); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; white-space: nowrap; }
.pill.muted { color: var(--muted); }
.status.on { color: var(--ok); border-color: #b7ecd8; background: #ecfdf5; }
.status.off { color: var(--bad); border-color: #fbd0d0; background: #fef2f2; }

/* ---------- layout ---------- */
.layout { display: grid; gap: 14px; padding: 14px; max-width: 1400px; margin: 0 auto; }
.side { display: grid; gap: 14px; align-content: start; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); padding: 20px; gap: 20px; }
  .field-card { position: sticky; top: 70px; align-self: start; }
}
@media (max-width: 599px) {
  .mode-hide-sm { display: none; }
  #mode { display: none; }
}

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 1px 2px rgba(31,38,51,0.04), 0 6px 18px rgba(31,38,51,0.04);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
h2 { margin: 0; font: 700 12px/1 var(--mono); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.head-tools { display: flex; align-items: center; gap: 10px; }
.chip { font: 600 12px/1 var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 5px 8px; border-radius: 8px; }
.chip.warn { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.chip.bad { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.chip.good { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }

details.card > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
details.card[open] > summary { margin-bottom: 12px; }
details.card > summary::-webkit-details-marker { display: none; }
.toggle-text::after { content: "Show ▾"; font: 600 12px var(--mono); color: var(--accent); }
details[open] > summary .toggle-text::after { content: "Hide ▴"; }

/* ---------- field ---------- */
.canvas-wrap { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #e7eaf0; }
canvas#field { display: block; width: 100%; aspect-ratio: 1 / 1; image-rendering: pixelated; touch-action: manipulation; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 12px 2px 0; }
.legend li { display: flex; align-items: center; gap: 6px; font: 600 13px var(--mono); color: var(--muted); }
.legend li.me { color: var(--text); }
.legend canvas { width: 22px; height: 22px; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--mono); color: var(--muted); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch span { width: 34px; height: 20px; border-radius: 999px; background: #d5dae3; position: relative; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { left: 17px; }

/* ---------- my character ---------- */
select, input, textarea, .btn {
  font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
select, input { padding: 8px 10px; min-height: 40px; }
.me-grid { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; align-items: start; }
@media (min-width: 600px) and (max-width: 899px) { .me-grid { grid-template-columns: minmax(0, 380px) 1fr; } }
.myview-wrap { position: relative; }   /* round radar: the canvas draws its own circle */
.myview-wrap .overlay-label { position: static; display: block; text-align: center; background: none; margin-top: 4px; }
canvas#myView { display: block; width: 100%; aspect-ratio: 1 / 1; image-rendering: pixelated; }
.overlay-label { position: absolute; left: 8px; bottom: 8px; font: 600 11px var(--mono); color: var(--muted); background: rgba(255,255,255,.85); padding: 3px 6px; border-radius: 6px; }
.me-side { display: grid; gap: 8px; justify-items: center; }
canvas#compass { width: 120px; height: 120px; }
.compass-caption { font: 600 13px var(--mono); color: var(--muted); }
.compass-caption b { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
@media (max-width: 420px) {
  .me-grid { grid-template-columns: 1fr; }
  .me-side { grid-template-columns: 96px 1fr; justify-items: start; align-items: center; }
  canvas#compass { width: 96px; height: 96px; grid-row: span 2; }
  .chips { justify-content: flex-start; }
}

.sees { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.sees li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg); border-radius: 10px; font-size: 14px; }
.sees .k { font: 700 11px var(--mono); letter-spacing: 1px; color: var(--muted); min-width: 78px; text-transform: uppercase; }
.sees .v { flex: 1; }
.sees canvas { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.tag { display: inline-block; font: 600 12px var(--mono); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; margin: 2px 4px 2px 0; }

.preview { margin-top: 12px; }
.preview summary { cursor: pointer; font: 600 13px var(--mono); color: var(--accent); }
.preview .hint { color: var(--muted); font-weight: 400; }
.preview pre { white-space: pre-wrap; word-break: break-word; font: 12.5px/1.5 var(--mono); background: #0f172a08; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0 0; max-height: 340px; overflow: auto; }

/* ---------- prompt ---------- */
.tabs { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 12px; margin-bottom: 12px; }
.tab { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font: 600 13px var(--mono); color: var(--muted); cursor: pointer; }
.tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(31,38,51,0.12); }
.standard { border: 1px dashed #cfd5df; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fafbfc; }
.check { display: flex; align-items: center; gap: 8px; font: 600 13px var(--mono); }
.check input { min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); }
.locked { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }
.locked::before { content: "🔒 "; }
.standard.off .locked { text-decoration: line-through; opacity: .55; }
textarea { width: 100%; padding: 10px 12px; resize: vertical; min-height: 110px; line-height: 1.45; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.prompt-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.count { font: 600 12px var(--mono); color: var(--muted); }
.count.over { color: var(--bad); }
.saved { font: 12px var(--mono); color: var(--ok); margin-right: auto; }
.btn { padding: 9px 16px; min-height: 40px; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }

/* ---------- map ---------- */
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.form-row label { display: grid; gap: 4px; font: 600 12px var(--mono); color: var(--muted); }
#seed { width: 130px; text-transform: uppercase; }
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 13.5px; }
.info dt { color: var(--muted); font: 600 12px var(--mono); }
.info dd { margin: 0; }

/* ---------- round bar ---------- */
.roundbar {
  position: sticky; top: 49px; z-index: 4;
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  padding: 8px 16px 10px; background: rgba(244,246,249,0.95); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); font: 600 13px var(--mono);
}
.roundbar .clock { font-size: 18px; letter-spacing: 1px; }
.roundbar .clock.low { color: var(--bad); }
.progress { grid-column: 1 / -1; height: 6px; background: #e3e7ee; border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3b5bdb, #8b5cf6); transition: width .45s linear; }
@media (min-width: 900px) { .field-card { top: 120px; } }

/* ---------- overlay on the field (call panel, round results) ---------- */
.canvas-wrap { position: relative; }
.overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 14px;
  background: rgba(244,246,249,0.55); backdrop-filter: blur(2px);
}
.overlay[hidden] { display: none; }
.panel {
  width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; box-shadow: 0 12px 40px rgba(31,38,51,0.18); text-align: center;
  max-height: 100%; overflow: auto; box-sizing: border-box;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.panel h3 { margin: 0 0 4px; font: 700 15px var(--mono); letter-spacing: 1px; }
.panel p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.opt { position: relative; aspect-ratio: 1; border: 2px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: #fafbfc; }
.opt canvas { width: 70%; height: 70%; }
.opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.opt.right { border-color: var(--ok); background: #ecfdf5; }
.opt.wrong { border-color: var(--bad); background: #fef2f2; }
.opt .mark { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; color: #fff; font: 700 12px/20px var(--mono); }
.opt.right .mark { background: var(--ok); }
.opt.wrong .mark { background: var(--bad); }
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; text-align: left; }
.result-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; font-size: 14px; }
.result-list canvas { width: 22px; height: 22px; }
.result-list b { font-family: var(--mono); }

/* ---------- scoreboard ---------- */
.scores { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.5px; }
.scores th { text-align: left; font: 600 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 6px; border-bottom: 1px solid var(--line); }
.scores td { padding: 7px 6px; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
.scores tr.me td { background: var(--accent-soft); }
.scores .num { text-align: right; font-family: var(--mono); }
.scores .who { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.scores canvas { width: 22px; height: 22px; flex: none; }
.scores .type { font: 600 10px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 4px; }
.st { font: 600 12px var(--mono); }
.st.saved { color: var(--ok); } .st.caught { color: var(--bad); } .st.spotted { color: var(--bad); } .st.exposed { color: #b45309; }
@media (max-width: 420px) { .scores th:nth-child(4), .scores td:nth-child(4) { display: none; } }

/* ---------- event feed ---------- */
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.feed li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; font-size: 13.5px; padding: 6px 8px; border-radius: 8px; background: var(--bg); }
.feed .t { font: 600 11px var(--mono); color: var(--muted); padding-top: 2px; }
.feed canvas { width: 16px; height: 16px; vertical-align: -3px; margin: 0 2px; }
.feed li.good { background: #ecfdf5; } .feed li.bad { background: #fef2f2; } .feed li.warn { background: #fffbeb; } .feed li.big { background: var(--accent-soft); font-weight: 600; }

.tag.grey { color: #6b7486; background: #eef0f4; border-style: dashed; }
.muted { color: var(--muted); }

/* ---------- AI ---------- */
.ai-panel { margin-top: 12px; display: grid; gap: 8px; }
.label { font: 700 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.memory-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfc; }
.mem { margin-top: 6px; font: 13.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }
.mem b { background: #fff7d6; font-weight: 700; }
.reasons { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; max-height: 170px; overflow: auto; }
.reasons li { display: grid; grid-template-columns: 82px 1fr; gap: 8px; font-size: 13.5px; padding: 5px 8px; border-radius: 8px; background: var(--bg); }
.reasons .st { color: var(--muted); }
.ai-stats { font: 12px var(--mono); color: var(--muted); }
.scores select { min-height: 28px; padding: 2px 6px; font: 600 11px var(--mono); border-radius: 6px; }
.switch.block { display: flex; margin-bottom: 6px; }
.help { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.chip.think { color: var(--accent); background: var(--accent-soft); border-color: #c9d4ff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.pill.warn { color: #b45309; border-color: #fde68a; background: #fffbeb; }

/* chat */
.chat { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 240px; overflow: auto; }
.chat li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; font-size: 14px; }
.chat li.empty { display: block; color: var(--muted); font-size: 13px; }
.chat canvas { width: 20px; height: 20px; margin-top: 2px; }
.chat .bubble { background: var(--bg); border-radius: 4px 12px 12px 12px; padding: 6px 10px; }
.chat .who { font: 600 11px var(--mono); color: var(--muted); display: block; margin-bottom: 2px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20; background: #1f2633; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 92vw; }

.pill.clickable { cursor: pointer; }

.scores tr.off td { opacity: .5; }

.bar-right { display: flex; align-items: center; gap: 10px; }
.btn.small { min-height: 30px; padding: 4px 10px; font: 600 12px var(--mono); }
.btn.small.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); background: var(--bad); }
.admin { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.admin .help { margin: 6px 0 10px; }
#adminToken { width: 180px; }

/* ---------- field fits the screen, with a size slider ---------- */
:root { --fs: 1; }
.field-card .canvas-wrap { width: min(100%, calc((100vh - 264px) * var(--fs) * var(--ar, 1))); margin: 0 auto; }
@media (max-width: 899px) { .field-card .canvas-wrap { width: min(100%, calc((100svh - 190px) * var(--fs) * var(--ar, 1))); } }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); }
  .field-card { position: sticky; top: 120px; align-self: start; }
}
.size { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--mono); color: var(--muted); }
.size input { width: 90px; min-height: 0; padding: 0; accent-color: var(--accent); }

/* ---------- collapsible side sections ---------- */
details.fold > summary h2 { display: flex; align-items: center; gap: 8px; }
details.fold > summary h2 .chip { letter-spacing: 0; text-transform: none; }
.me-pick { margin-bottom: 12px; }
.me-pick label { display: flex; align-items: center; gap: 10px; font: 600 12px var(--mono); color: var(--muted); }
.me-pick select { flex: 1; }

/* ---------- players editor ---------- */
.roster { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.roster li { display: grid; grid-template-columns: 44px 1fr 108px; gap: 8px; align-items: center; }
.roster .pick { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; display: grid; place-items: center; cursor: pointer; padding: 0; }
.roster .pick canvas { width: 32px; height: 32px; }
.roster input { min-height: 40px; width: 100%; }
.shape-picker { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.shape-picker[hidden] { display: none; }
.shape-picker button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.shape-picker button canvas { width: 70%; height: 70%; }
.shape-picker button:disabled { opacity: .3; cursor: not-allowed; }
.shape-picker button.current { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- phone fixes ---------- */
.layout > *, .side > * { min-width: 0; }
.title { white-space: nowrap; }
#aiChip { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.card-head { flex-wrap: wrap; }
@media (max-width: 599px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .title { font-size: 13px; letter-spacing: 1px; }
  .logo { width: 22px; height: 22px; }
  .roundbar { top: 43px; padding: 6px 12px 8px; font-size: 12px; }
  .layout { padding: 10px; gap: 10px; }
  .card { padding: 12px; }
  .head-tools { gap: 8px; width: 100%; justify-content: flex-start; }
  .size input { width: 70px; }
  .scores { font-size: 13px; }
  .scores select { display: none; }               /* change player types in the Players section */
  .scores th:nth-child(4), .scores td:nth-child(4) { display: none; }
  .scores td, .scores th { padding: 6px 4px; }
  .roster li { grid-template-columns: 44px 1fr 100px; }
}

.reason-now { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfc; }
.reason-text { margin-top: 6px; font-size: 14.5px; }
.reason-text.bad { color: var(--bad); }

/* ---------- rooms ---------- */
body:not(.is-host) .host-only { display: none !important; }
body.is-host .not-host { display: none !important; }
body.is-demo .room-only { display: none !important; }
body:not(.is-demo) .demo-only { display: none !important; }
.roombar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 6px 14px; font-size: 13px; background: var(--card, #fff); border-bottom: 1px solid var(--line, #e3e7ee); }
.roombar .bar-right { display: flex; gap: 6px; }
.roombar a.btn { text-decoration: none; }
.seats li { display: flex; align-items: center; gap: 8px; }
.seats li > span:nth-child(2) { flex: 1; }
.overlay input#seatName { padding: 6px 8px; border: 1px solid var(--line, #d5dbe5); border-radius: 8px; font: inherit; }
.room-settings { margin-top: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.form-grid label { display: flex; flex-direction: column; font-size: 12px; gap: 3px; }
.form-grid input { padding: 6px 8px; border: 1px solid var(--line, #d5dbe5); border-radius: 8px; font: inherit; width: 100%; box-sizing: border-box; }
.roster li.row { display: flex; align-items: center; gap: 8px; }
.roster li.row .who { flex: 1; display: flex; align-items: center; gap: 8px; }
.roster li.row .grow { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }

.topbar .tour-btn { margin-left: auto; }
.topbar .tour-btn, .topbar .rules-link { white-space: nowrap; }
.topbar a.rules-link { text-decoration: none; color: var(--accent); }
.topbar a.rules-link + .pill { margin-left: 0; }

.field-row { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 6px 0; }
.field-row select { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font: inherit; background: #fff; }

/* ---------- welcome + tour ---------- */
.tour-shade { position: fixed; inset: 0; z-index: 60; background: transparent; }
.tour-spot { position: fixed; z-index: 61; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(20, 26, 38, 0.55), 0 0 0 3px #fff, 0 0 0 6px var(--accent);
  transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease; }
.tour-box { position: fixed; z-index: 62; width: min(360px, calc(100vw - 20px)); box-sizing: border-box;
  background: #fff; border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 18px 50px rgba(15, 20, 30, .35);
  font-size: 15px; line-height: 1.5; color: var(--text); animation: pop .25s ease-out; }
.tour-box.center { inset: 0 !important; margin: auto; height: fit-content; width: min(440px, calc(100vw - 24px)); text-align: center; }
.tour-box.sheet { left: 10px !important; right: 10px; top: auto !important; bottom: 10px; width: auto; }
.tour-box h3 { margin: 0 0 8px; font: 700 17px var(--mono); letter-spacing: .5px; }
.tour-box p { margin: 0 0 10px; }
.tour-box .muted { color: var(--muted); }
.tour-count { font: 600 11px var(--mono); color: var(--muted); letter-spacing: 1px; margin-bottom: 4px; }
.tour-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 6px; }
.tour-box.center .tour-actions { justify-content: center; }
.tour-actions .grow { flex: 1; }
.tour-actions .btn.link { background: none; border: none; color: var(--muted); padding-left: 0; }
.tour-logo { margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } .tour-box { animation: none; } }
@media (max-width: 520px) {                  /* phones: keep the top bar inside the screen */
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .topbar .title { font-size: 13px; }
  .topbar .pill, .topbar .btn.small { padding: 4px 8px; font-size: 11px; }
}
