/* Layout: a full-bleed particle globe on Space Black; one left column carries the live overview or one country's summary; mono labels frame the edges */
:root {
  color-scheme: dark;
  --bg: #121212;
  --bg-2: #1a1a1a;
  --surface: #202020;
  --text: #ffffff;
  --muted: #a8a29a;
  --faint: #6e6a63;
  --border: rgba(255, 255, 255, .10);
  --border-2: rgba(255, 255, 255, .20);
  --accent: #ffc83c;
  --accent-wash: rgba(255, 200, 60, .10);
  --display: "Helvetica Now Display", "Geist", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --ui: "Geist", "Helvetica Now Display", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gl: max(clamp(16px, 3.4vw, 48px), env(safe-area-inset-left, 0px));
  --gr: max(clamp(16px, 3.4vw, 48px), env(safe-area-inset-right, 0px));
  --col: min(500px, 40vw);
  --top: calc(env(safe-area-inset-top, 0px) + 76px);
  --bot: calc(env(safe-area-inset-bottom, 0px) + 64px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; }
[hidden] { display: none !important; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--ui); font-size: 16px; line-height: 1.5; letter-spacing: .01em;
  overflow: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--bg); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

#globe { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#globe.over { cursor: pointer; }
#globe:active { cursor: grabbing; }
.nogl { position: fixed; top: 40%; right: var(--gr); max-width: 30ch; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tip {
  position: fixed; z-index: 6; pointer-events: none; transform: translate(14px, -50%);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.tip b { color: var(--accent); font-weight: 500; }

/* ---- frame ---- */
.top, .bottom {
  position: fixed; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-left: var(--gl); padding-right: var(--gr);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.top { top: 0; padding-block: calc(env(safe-area-inset-top, 0px) + 18px) 18px; background: linear-gradient(to bottom, var(--bg) 55%, rgba(18, 18, 18, 0)); }
.bottom { bottom: 0; padding-block: 14px calc(env(safe-area-inset-bottom, 0px) + 18px); color: var(--faint); background: linear-gradient(to top, var(--bg) 55%, rgba(18, 18, 18, 0)); }
.brand { display: flex; align-items: center; gap: 14px; white-space: nowrap; color: var(--muted); }
.wordmark { display: block; height: 16px; width: auto; aspect-ratio: 302 / 64; flex: none; }
.brand-name { padding-left: 14px; border-left: 1px solid var(--border-2); line-height: 16px; }
.actions { display: flex; align-items: center; gap: 10px; }
.chip { white-space: nowrap; padding: 6px 12px; border: 1px dashed var(--accent); border-radius: 999px; color: var(--accent); font-size: 11px; }
.hint { margin: 0; }
.hint kbd { font-family: inherit; color: var(--muted); }
.clock { font-variant-numeric: tabular-nums; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap;
  font-family: var(--ui); font-size: 14px; letter-spacing: .01em; line-height: 1;
  padding: 12px 18px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border-2);
  transition: border-color .2s ease;
}
.btn:hover { border-color: var(--muted); }
.btn-accent {
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  background: transparent; color: var(--accent); border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-wash); border-color: var(--accent); }
.btn-small { padding: 9px 14px; font-size: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--border-2);
}
.icon-btn:hover { border-color: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; }
.linkish {
  background: none; border: 0; padding: 0 0 3px; cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--border-2);
}
.linkish:hover { color: var(--text); border-color: var(--text); }

/* ---- left column ---- */
.panel {
  position: fixed; z-index: 2; left: var(--gl); top: var(--top); bottom: var(--bot); width: var(--col);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 24px; min-width: 0; padding-block: 12px 40px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 40px), transparent 100%);
}
.panel::-webkit-scrollbar { display: none; }
.panel > * { margin: 0; }
.panel.enter > * { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.panel.enter > :nth-child(2) { animation-delay: .04s; }
.panel.enter > :nth-child(3) { animation-delay: .08s; }
.panel.enter > :nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding-left: 10px; border-left: 2px solid var(--accent); display: flex; align-items: center; gap: 10px;
}
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.h1, .h2 { font-family: var(--display); font-weight: 400; text-wrap: balance; }
.h1 { font-size: clamp(2.6rem, 5.2vw, 5rem); line-height: 1.04; letter-spacing: -.03em; }
.h2 { font-size: clamp(2.2rem, 3.8vw, 3.4rem); line-height: 1.05; letter-spacing: -.025em; }
.lede { color: var(--muted); max-width: 46ch; }
.span-line { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: var(--muted); line-height: 1.6; }
.span-line b { color: var(--text); font-weight: 400; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tz-block { display: grid; gap: 10px; }
.tz-strip { position: relative; height: 28px; margin-inline: 2px; }
.tz-strip::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border-2); }
.tz-dot { position: absolute; top: 50%; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--bg); }
.tz-hq { position: absolute; top: 50%; width: 11px; height: 11px; border: 1.5px solid var(--text); background: var(--bg); transform: translate(-50%, -50%) rotate(45deg); z-index: 1; }
.tz-ends { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.tz-ends b { color: var(--text); font-weight: 400; }
.tzs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.tzs li { display: grid; grid-template-columns: 3.6em minmax(0, 1fr) auto 5.2em; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tzs .t { font-family: var(--display); font-weight: 400; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.tzs .p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tzs .n, .tzs .d { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.tzs .d { text-align: right; font-variant-numeric: tabular-nums; }
.tzs li.hq .p, .tzs li.hq .d { color: var(--text); }
.tzs li.hq .sw { margin-right: 4px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 16px 12px 14px 0; display: grid; gap: 6px; min-width: 0; }
.stat + .stat { padding-left: 14px; border-left: 1px solid var(--border); }
.stat b { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.section-label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.feed { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.feed li + li { border-top: 1px solid var(--border); }
.person {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; padding: 14px 6px 14px 0; align-items: start;
}
div.person { cursor: default; }
button.person:hover { background: rgba(255, 255, 255, .025); }
.thumb {
  grid-row: span 3; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--surface);
  display: grid; place-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--accent);
  border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.who { font-size: 1.02rem; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.who img { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.where { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.where em { font-style: normal; color: var(--faint); }
.bits { font-size: 14px; color: var(--muted); letter-spacing: .02em; overflow-wrap: anywhere; }
.bits b { color: var(--text); font-weight: 400; }
.empty { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--muted); padding: 16px 0; letter-spacing: .02em; }

.back { align-self: flex-start; }
.times { display: grid; gap: 8px; }
.time { display: flex; align-items: baseline; gap: 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.time b { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--text); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border: 1px solid var(--border-2); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.chips span.hot { border-color: var(--accent); color: var(--accent); }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos button { padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); cursor: zoom-in; max-width: 100%; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.photos button:hover img { transform: scale(1.04); }
.diaspora { font-size: 14px; color: var(--muted); border-left: 2px solid var(--border-2); padding-left: 12px; }

.btn-amini .sw { margin-right: 2px; }
/* ---- spin the globe ---- */
/* The pin stuck in the top of the globe is the spin button. JS moves it to the globe's top
   edge every frame; the negative margins put the pin's tip on that point. */
.spin-pin {
  position: fixed; left: 0; top: 0; z-index: 3; width: 48px; height: 64px; margin: -64px 0 0 -24px;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px;
}
.spin-pin svg {
  display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 100%;
  animation: pin-bob 2.4s ease-in-out infinite; transition: transform .2s ease, opacity .2s ease;
  /* translucent with a soft glow, like the pins on the globe; solid when pointed at */
  opacity: .72; filter: drop-shadow(0 0 10px rgba(255, 200, 60, .35));
}
.spin-pin .pin-body { fill: var(--accent); fill-opacity: .82; stroke: var(--accent); stroke-width: 1.2; }
.spin-pin .pin-hole { fill: var(--bg); fill-opacity: .85; }
.spin-pin .pin-dot { fill: var(--accent); }
.spin-pin-label {
  position: absolute; left: 52px; top: 12px; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  background: rgba(18, 18, 18, .55); border: 1px solid rgba(255, 200, 60, .55); border-radius: 999px; padding: 4px 10px;
  opacity: .85; transition: opacity .2s ease;
}
.spin-pin:hover svg, .spin-pin:focus-visible svg { animation: none; transform: translateY(-6px) scale(1.06); opacity: 1; }
.spin-pin:hover .spin-pin-label, .spin-pin:focus-visible .spin-pin-label { opacity: 1; }
.spin-pin.spinning svg { opacity: .9; }
.spin-pin.spinning svg { animation: pin-wiggle .3s ease-in-out infinite; }
.spin-pin.spinning .spin-pin-label { visibility: hidden; }
.spin-pin[disabled] { cursor: not-allowed; }
.spin-pin[disabled]:not(.spinning) { opacity: .5; }
.spin-pin[disabled]:not(.spinning) svg { animation: none; }
@keyframes pin-bob { 50% { transform: translateY(-5px); } }
@keyframes pin-wiggle { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .spin-pin svg, .spin-pin.spinning svg { animation: none; } }
.spin-name { color: var(--accent); min-height: 1.04em; }
.spin-callout { display: grid; gap: 6px; padding: 16px 18px; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent-wash); }
.spin-callout p { margin: 0; }
.spin-k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.spin-who { font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.spin-hint { color: var(--muted); font-size: 14px; }
.spin-left { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.spin-callout .row { margin-top: 6px; }

/* ---- tour controls: a slideshow the presenter drives ---- */
.tourbar {
  position: fixed; z-index: 6; bottom: calc(env(safe-area-inset-bottom, 0px) + 58px);
  left: calc(var(--gl) + var(--col) + (100% - var(--gl) - var(--col)) / 2); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 6px; max-width: calc(100vw - 32px);
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 999px;
}
.tb-btn { min-height: 44px; }
.tb-hint { display: none; color: var(--accent) !important; }
.tourbar.nofocus .tb-hint { display: block; }
.tourbar.nofocus #tourNextName { display: none; }
.tb-btn svg { width: 14px; height: 14px; }
.tb-btn[disabled] { opacity: .35; }
.tb-end { width: 44px; height: 44px; }
.tb-status { display: grid; gap: 2px; padding-inline: 8px; min-width: 0; flex: 1 1 auto; text-align: center; }
.tb-status b { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-status span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Amini's footprint: white, so it never reads as people ---- */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.legend-item {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; cursor: default;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--muted);
}
button.legend-item { cursor: pointer; }
button.legend-item:hover { color: var(--text); }
button.legend-item[aria-pressed="false"] { opacity: .4; }
.sw { display: inline-block; width: 10px; height: 10px; flex: none; }
.sw.people { border-radius: 50%; background: var(--accent); }
.sw.work { border-radius: 50%; border: 1.5px solid var(--text); }
.sw.pipe { border-radius: 50%; border: 1.5px dashed var(--muted); }
.sw.office { width: 8px; height: 8px; margin: 0 1px; border: 1.5px solid var(--text); transform: rotate(45deg); }
.office-label {
  position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; opacity: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text);
  background: rgba(18, 18, 18, .78); border: 1px solid var(--border-2); border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.footprint { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; color: var(--muted); align-items: baseline; }
.footprint dt { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.footprint dd { margin: 0; min-width: 0; }
.cc-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); font: inherit; border-bottom: 1px solid var(--border-2); }
.cc-link:hover { border-color: var(--text); }
.office-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--border-2); border-radius: 999px; padding: 7px 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.work { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.work li { padding: 12px 0; border-bottom: 1px solid var(--border); display: grid; gap: 4px; }
.work li > span:last-child { font-size: 14px; color: var(--muted); }
.work-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-head b { font-weight: 400; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.tag-live { border: 1px solid var(--text); color: var(--text); }
.tag-pipeline { border: 1px dashed var(--muted); color: var(--muted); }

/* ---- arrival card ---- */
.arrival {
  position: fixed; z-index: 4; right: var(--gr); bottom: calc(var(--bot) + 8px); width: min(340px, calc(100vw - 32px));
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 14px; padding: 16px 18px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 14px; align-items: center;
  animation: slide .5s cubic-bezier(.2, .7, .2, 1) both;
}
.arrival .thumb { width: 44px; height: 44px; grid-row: span 2; }
.arrival p { margin: 0; }
.arrival .k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
@keyframes slide { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---- dialogs ---- */
dialog {
  color: var(--text); background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 14px; padding: 0;
  max-width: calc(100vw - 32px); max-height: calc(100% - 32px); overflow-y: auto;
}
dialog::backdrop { background: rgba(12, 12, 12, .78); }
.sheet { width: min(600px, calc(100vw - 32px)); }
.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(560px, 100vw); max-width: 100vw; border-radius: 0; border-width: 0 0 0 1px; }
.dlg { display: flex; flex-direction: column; gap: 18px; padding: 28px; }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dlg-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 2rem; letter-spacing: -.02em; line-height: 1.1; }
.dlg p { margin: 0; }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field > span { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field small { font-size: 13px; color: var(--faint); letter-spacing: .02em; }
input[type="text"], select {
  width: 100%; height: 46px; background: var(--bg); color: var(--text); border: 1px solid var(--border-2); border-radius: 8px;
  padding: 0 13px; font-family: var(--ui); font-size: 16px; line-height: 44px;
}
select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a8a29a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
input[list]::-webkit-calendar-picker-indicator { display: none !important; }
dialog:focus, dialog:focus-visible { outline: none; }
#addForm { padding-bottom: 0; gap: 16px; }
.dlg-actions {
  position: sticky; bottom: 0; z-index: 1; margin-inline: -28px; padding: 14px 28px 22px;
  background: var(--bg-2); border-top: 1px solid var(--border);
}
.photo-pick { display: flex; align-items: center; gap: 16px; }
.photo-pick img, .photo-empty { width: 120px; height: 90px; flex: none; border-radius: 8px; border: 1px solid var(--border-2); object-fit: cover; }
.photo-empty {
  display: grid; place-items: center; border-style: dashed;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
}
.photo-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.vh:focus-visible + .pick { outline: 2px solid var(--accent); outline-offset: 3px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.check { display: flex; gap: 10px; align-items: center; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.status { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--muted); min-height: 1.6em; letter-spacing: .02em; }
.status.err { color: var(--accent); }
.preview { display: flex; gap: 14px; align-items: center; }
.preview img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-2); }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list .main { min-width: 0; display: grid; gap: 2px; }
.list .main span { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .02em; overflow-wrap: anywhere; }
.confirm { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--accent); border-radius: 12px; }
.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; }
.kbd-list kbd { font-family: inherit; color: var(--text); border: 1px solid var(--border-2); border-radius: 6px; padding: 2px 7px; }
.kbd-list dd { margin: 0; }
.note { font-size: 14px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 12px; }

.lightbox { width: min(1100px, calc(100vw - 32px)); background: var(--bg); }
.lightbox figure { margin: 0; display: grid; gap: 14px; padding: 16px; }
.lightbox img { width: 100%; max-height: calc(100vh - 220px); object-fit: contain; display: block; border-radius: 8px; background: var(--bg-2); }
.lightbox figcaption { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.lightbox .cap { display: grid; gap: 2px; min-width: 0; }
.lightbox .cap b { font-weight: 400; font-size: 1.1rem; overflow-wrap: anywhere; }
.lightbox .cap span { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bot) + 8px); transform: translateX(-50%); z-index: 20;
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; max-width: calc(100vw - 32px);
}

/* ---- narrow screens: globe on top, text below ---- */
@media (max-width: 900px) {
  :root { --col: auto; --top: calc(env(safe-area-inset-top, 0px) + 64px); --bot: calc(env(safe-area-inset-bottom, 0px) + 16px); }
  .bottom { display: none; }
  .panel { right: var(--gr); top: 46%; gap: 18px; }
  body::after {
    content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 58%; z-index: 1; pointer-events: none;
    background: linear-gradient(to top, var(--bg) 78%, rgba(18, 18, 18, 0));
  }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats:not(.three) .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats:not(.three) .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .brand-name { display: none; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .arrival { bottom: auto; top: calc(var(--top) + 4px); }
  .tip { display: none; }
  .tourbar { left: var(--gl); right: var(--gr); transform: none; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); justify-content: space-between; }
  .touring .panel { bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); }
}
@media (max-width: 520px) {
  #fsBtn { display: none; }
  .hide-sm { display: none; }
  .tourbar { gap: 6px; }
  .tb-status { padding-inline: 2px; }
  .tb-status b { font-size: 11px; letter-spacing: .04em; }
  .tourbar .btn-accent { padding-inline: 14px; }
  .actions .btn-small { padding: 9px 12px; }
  .dlg { padding: 22px 18px; }
  #addForm { padding-bottom: 0; }
  .dlg-actions { margin-inline: -18px; padding: 12px 18px 18px; }
}
@media (min-width: 901px) and (max-height: 760px) {
  .h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
  .h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
  .panel { gap: 16px; }
  .lede { font-size: 15px; }
  .stat { padding-block: 10px; }
  .stat b { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
}
@media (prefers-reduced-motion: reduce) {
  .panel.enter > *, .arrival, .live::before { animation: none; }
}
