/* Kiwiland · "Forest night" theme (tokens from docs/DESIGN.md) */
:root {
  --bg-today: #0A231E;
  --card-today: #133A32;
  --line-today: #22524A;
  --chip-today: #1A443B;
  --text2-today: #A9C7BD;
  --bg: #111615;
  --card: #1B2220;
  --card-2: #252D2B;
  --line: #2A3330;
  --seg: #161C1B;
  --seg-on: #2F3936;
  --tab: #161B1A;
  --tab-line: #262E2C;
  --text: #F2F5F4;
  --text-2: #A6B0AC;
  --text-3: #8E9995;
  --muted-ink: #C2CAC7;
  --accent: #9BE3C4;
  --accent-soft: #1E312C;
  --yellow: #FFD27A;
  --coral: #FF9A7A;
  --danger: #C62828;
  --danger-bg: #3A1512;
  --danger-line: #6B2620;
  --danger-ink: #FFB4A8;
  /* iPhone status bar / rounded corner area: nothing scrolls underneath it, content starts below. */
  --sat: env(safe-area-inset-top, 0px);
  --top: max(calc(24px - var(--sat)), 14px);
  --bottom: max(env(safe-area-inset-bottom, 0px), 10px);
  --head: calc(var(--top) + 64px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  height: 100%;
  height: 100dvh;
  height: 100lvh;
  margin: 0;
  background: var(--bg);
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
body, #app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: 100lvh;
  margin: 0;
  overflow: hidden;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  overscroll-behavior: none;
}
@media (min-width: 600px) {
  /* Desktop preview: phone-sized column */
  #app { left: 50%; width: 430px; margin-left: -215px; box-shadow: 0 0 0 1px #1f2826, 0 20px 60px rgba(0,0,0,.5); }
  body { background: #0b0f0e; }
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { flex-shrink: 0; display: block; }

/* ---------- Shell ---------- */
.shell { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); padding-top: var(--sat); }
/* Pages with a big photo on top: the photo runs up behind the iPhone status bar. */
.shell.hero-page { padding-top: 0; }
.shell.today { background: var(--bg-today); }
.scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; overscroll-behavior: contain;
  /* Own compositing layer: page swaps repaint only this area, not the header and tab bar. */
  transform: translateZ(0);
  contain: paint;
}
.scroll::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; }
.page { padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 16px; }

.head {
  flex-shrink: 0; height: var(--head); padding: var(--top) 20px 12px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  background: var(--bg); border-bottom: 1px solid var(--tab-line);
}
.head.overlay { position: absolute; left: 0; right: 0; top: 0; background: none; border: none; z-index: 2; height: calc(var(--sat) + var(--head)); padding-top: calc(var(--sat) + var(--top)); }
.head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.head-eyebrow { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head h1 { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head.overlay .head-eyebrow { color: #D6EAE2; }
.info-btn {
  flex-shrink: 0; height: 40px; margin-bottom: 2px; padding: 0 13px 0 10px; border-radius: 999px;
  border: 1px solid #34403D; background: var(--card); font-size: 13px; font-weight: 800;
  display: flex; align-items: center; gap: 6px;
}
.info-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.head.overlay .info-btn { border-color: rgba(255,255,255,.35); background: rgba(10,35,30,.55); color: #fff; }
.avatar-btn { flex-shrink: 0; margin-bottom: 2px; padding: 0; border: none; background: none; border-radius: 50%; }

.av {
  --s: 40px; width: var(--s); height: var(--s); flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: calc(var(--s) * .4); line-height: 1;
  background-size: cover; background-position: center;
}
.av.ring { border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.14); }
.av-stack { display: flex; min-height: 20px; padding-left: 5px; }
.av-stack .av { margin-left: -5px; border: 2px solid var(--card-today); }

.tabbar {
  flex-shrink: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--tab); border-top: 1px solid var(--tab-line); padding: 6px 4px var(--bottom);
}
.tab {
  position: relative; min-height: 50px; border: none; background: none; color: var(--text-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 700; padding: 4px 0;
}
.tab.on { color: var(--accent); }
.tab .badge {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--coral); color: #2A0F07; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.sync-pill {
  position: fixed; z-index: 60; top: max(calc(env(safe-area-inset-top, 0px) - 16px), 4px); left: 50%; transform: translateX(-50%);
  padding: 3px 10px; border-radius: 999px; background: rgba(17,22,21,.92); border: 1px solid #34403D;
  font-size: 11px; font-weight: 700; color: var(--yellow); display: flex; align-items: center; gap: 6px; white-space: nowrap;
  pointer-events: none;
}
.sync-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(var(--bottom) + 76px); transform: translateX(-50%);
  max-width: calc(100% - 40px); padding: 10px 16px; border-radius: 12px; background: #2F3936; color: var(--text);
  font-size: 13px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

/* ---------- Generic components ---------- */
.card { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.today .card { background: var(--card-today); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line-today); }
.card.tight { gap: 6px; }
.card.flush { padding: 0; overflow: hidden; gap: 0; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.row.base { align-items: baseline; }
.col { display: flex; flex-direction: column; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.gap-2 { gap: 2px; } .gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h2 { font-size: 16px; font-weight: 800; line-height: 1.3; }
.h2.lg { font-size: 17px; }
.group-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.sub { font-size: 12px; color: var(--text-2); }
.today .sub { color: var(--text2-today); }
.label { font-size: 12px; font-weight: 700; color: var(--text-2); }
.small { font-size: 13px; }
.body { font-size: 14px; line-height: 1.5; }
.muted { color: var(--text-2); }
.accent { color: var(--accent); }
.yellow { color: var(--yellow); }
.coral { color: var(--coral); }
.strong { font-weight: 800; }
.b7 { font-weight: 700; }
.center { text-align: center; }
.note { font-size: 12px; line-height: 1.45; color: var(--text-2); }

.link-btn { flex-shrink: 0; min-height: 32px; padding: 0; border: none; background: none; color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; }
.btn {
  min-height: 46px; padding: 0 16px; border-radius: 12px; border: none; background: var(--accent); color: var(--bg);
  font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  position: relative; overflow: hidden;
}
.btn.ghost { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.btn.neutral { background: var(--card-2); color: var(--text); }
.btn.danger { background: var(--danger-bg); color: #FF8A7A; }
.btn.sm { min-height: 44px; font-size: 14px; padding: 0 12px; }
.btn:disabled { opacity: .5; }
.btn input[type=file], .upload-label input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: none; border: none;
  align-self: flex-start; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.today .chip { background: var(--chip-today); }
.pill { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.stat { padding: 8px 0; border-radius: 10px; background: var(--card-2); font-size: 12px; font-weight: 700; text-align: center; }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: none; background: var(--card-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.icon-btn.round { border-radius: 50%; }
.icon-btn:disabled { color: #3E4845; }
.x-btn { width: 44px; height: 44px; flex-shrink: 0; border: none; background: none; color: #6E7A76; display: flex; align-items: center; justify-content: center; }

.input, .select, .textarea {
  width: 100%; min-width: 0; min-height: 44px; border: 1.5px solid #34403D; border-radius: 12px; padding: 0 12px;
  background: var(--seg); color: var(--text); font-size: 16px; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.today .input { background: #0F2E28; border-color: var(--line-today); }
.textarea { min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239BE3C4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.add-row { display: flex; gap: 8px; min-width: 0; }
.add-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: none; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.add-btn.yellow { background: var(--yellow); }

.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 14px; background: var(--seg); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { min-height: 40px; border: none; border-radius: 10px; background: transparent; color: var(--muted-ink); font-size: 14px; font-weight: 700; padding: 0 4px; }
.seg button.on { background: var(--seg-on); color: var(--accent); }
.seg button.on.yellow { color: var(--yellow); }
.seg button.on.coral { color: var(--coral); }
.seg button.on.sos { background: var(--danger); color: #fff; }
.seg.grid4 { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid #34403D; background: transparent; color: var(--muted-ink); font-size: 13px; font-weight: 700; }
.cat-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.progress { height: 8px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.progress.yellow > span { background: var(--yellow); }
.progress.thin { height: 6px; }

.check-row { display: flex; align-items: center; gap: 6px; margin-left: -8px; min-width: 0; }
.check { width: 44px; height: 44px; flex-shrink: 0; border: none; background: none; padding: 0; display: flex; align-items: center; justify-content: center; }
.check > span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #5D6A66; display: flex; align-items: center; justify-content: center; color: var(--bg); }
.check.sq > span { border-radius: 8px; }
.check.on > span { border-color: var(--accent); background: var(--accent); }
.check.sq.on > span { border-color: var(--yellow); background: var(--yellow); }
.check-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.check-text b { font-size: 14px; font-weight: 700; }
.check-row.done .check-text b { color: #6E7A76; text-decoration: line-through; }

.empty { padding: 18px 14px; border-radius: 14px; border: 1px dashed #34403D; color: var(--text-2); font-size: 14px; text-align: center; }
.today .empty { border-color: var(--line-today); color: var(--text2-today); }

/* ---------- Splash ---------- */
@keyframes nzc-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes nzc-road { from { background-position: 0 0; } to { background-position: -96px 0; } }
@keyframes nzc-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes nzc-spin { to { transform: rotate(360deg); } }
@keyframes nzc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes nzc-load { from { width: 0; } to { width: 100%; } }
@keyframes nzc-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes nzc-sun { from { transform: translateY(16px); } to { transform: translateY(0); } }
@keyframes nzc-dust { 0% { opacity: .5; transform: translate(0,0) scale(.6); } 100% { opacity: 0; transform: translate(-46px,-10px) scale(1.4); } }
.splash {
  position: absolute; inset: 0; border: none; padding: 0; color: #fff; overflow: hidden; text-align: left; width: 100%;
  background: linear-gradient(180deg, #071A16 0%, #0E3A33 30%, #2F6B5E 50%, #E39A6A 66%, #FFD27A 74%);
}
.splash .stage { position: absolute; left: 0; right: 0; top: 0; height: 844px; }
@media (max-height: 800px) { .splash .stage { top: calc(100% - 844px); } }
.splash .star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: nzc-twinkle 3s ease-in-out infinite; }
.splash .sun { position: absolute; left: calc(50% + 41px); top: 380px; width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle, #FFF1C9 0%, #FFD27A 45%, rgba(255,210,122,0) 72%); animation: nzc-sun 3.4s ease-out both; }
.splash .layer { position: absolute; left: 0; right: 0; height: 240px; overflow: hidden; }
.splash .layer svg { position: absolute; left: 0; top: 0; height: 240px; width: 780px; }
.splash .road { position: absolute; left: 0; right: 0; top: 640px; height: 64px; background: #20282A; }
.splash .dash { position: absolute; left: 0; right: 0; top: 669px; height: 5px; background-image: repeating-linear-gradient(90deg, #FFD27A 0 48px, transparent 48px 96px); animation: nzc-road .55s linear infinite; }
.splash .ground { position: absolute; left: 0; right: 0; top: 704px; height: 400px; background: #0A231E; }
.splash .van { position: absolute; left: 50%; top: 528px; margin-left: -125px; }
.splash .title { position: absolute; left: 28px; right: 28px; top: calc(var(--sat) + var(--top) + 72px); display: flex; flex-direction: column; gap: 10px; animation: nzc-rise 1s ease-out .3s both; z-index: 1; }
.splash .kicker { font-size: 12px; font-weight: 800; letter-spacing: .2em; color: var(--accent); }
.splash .big { font-size: 44px; line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; }
.splash .names { font-size: 15px; color: #CFE3DB; }
.splash .loader { position: absolute; left: 60px; right: 60px; bottom: calc(var(--bottom) + 30px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.splash .bar { width: 100%; height: 4px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.splash .bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); animation: nzc-load 3.4s ease-in-out both; }
.splash .skip { font-size: 12px; font-weight: 600; color: var(--text2-today); }
@media (prefers-reduced-motion: reduce) {
  .splash *, .splash { animation: none !important; }
  .splash .bar span { width: 100%; }
}

/* ---------- Sign in / picker / PIN ---------- */
.auth { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; color: #fff; background: #0A231E; }
.auth .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth .bgimg.blur { filter: blur(16px); transform: scale(1.2); }
.auth .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,22,18,.10) 0%, rgba(6,22,18,.30) 38%, rgba(6,22,18,.94) 70%); }
.auth .shade.solid { background: rgba(6,26,21,.80); }
.auth .inner { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--sat) + var(--top)) 24px calc(var(--bottom) + 30px); gap: 24px; overflow-y: auto; scrollbar-width: none; }
.auth .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #CFE8DF; }
.auth h1 { font-size: 38px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; }
.auth .lead { font-size: 16px; line-height: 1.5; color: #E3EEEA; }
.auth .glass { display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 64px; min-width: 0; border: 1px solid rgba(255,255,255,.26); border-radius: 16px; background: rgba(10,35,30,.55); color: #fff; text-align: left; font-size: 15px; font-weight: 700; }
.auth .glass .av { border: 2px solid rgba(255,255,255,.75); }
.auth .hint { font-size: 12px; color: #B9CEC7; text-align: center; }
.auth .err { min-height: 20px; font-size: 14px; font-weight: 600; color: var(--danger-ink); text-align: center; }
.auth .pw-input { width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; padding: 0 16px; font-size: 17px; outline: none; }
.auth .pw-input::placeholder { color: #B9CEC7; }
.auth .pw-input:focus { border-color: var(--accent); }
.pin { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + var(--top) - 4px) 32px calc(var(--bottom) + 20px); overflow-y: auto; scrollbar-width: none; }
.pin .back { align-self: flex-start; display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0; background: none; border: none; color: #CFE8DF; font-size: 15px; font-weight: 600; }
.pin .who { margin-top: 20px; border: 3px solid rgba(255,255,255,.8); }
.pin h1 { margin: 16px 0 4px; font-size: 24px; font-weight: 800; }
.pin .ask { font-size: 15px; color: #CFE8DF; text-align: center; }
.pin .dots { display: flex; gap: 18px; margin: 24px 0 12px; }
.pin .dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; }
.pin .dots span.on { background: #fff; }
.pin .keys { margin-top: auto; display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 28px; padding-top: 16px; }
.pin .key { width: 76px; height: 76px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 28px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.pin .key:active { background: rgba(255,255,255,.3); }
.pin .key.plain { background: none; }
@media (max-height: 700px) { .pin .keys { grid-template-columns: repeat(3, 64px); gap: 10px 24px; } .pin .key { width: 64px; height: 64px; font-size: 24px; } .pin .dots { margin: 14px 0 8px; } }

/* ---------- Heroes ---------- */
.hero { position: relative; flex-shrink: 0; overflow: hidden; background: #0B3B32; }
.hero.today-hero { height: calc(var(--sat) + var(--head) + 256px); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,35,30,.55) 0%, rgba(10,35,30,.05) 30%, rgba(10,35,30,.35) 62%, var(--bg-today) 100%); }
.hero .fade.neutral { background: linear-gradient(180deg, rgba(17,22,21,.55) 0%, rgba(17,22,21,0) 30%, rgba(17,22,21,.45) 62%, var(--bg) 100%); }
.hero .caption { position: absolute; left: 20px; right: 20px; bottom: 18px; padding: 0; border: none; background: none; color: #F1F7F4; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.hero .kick { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--bg-today); font-size: 12px; font-weight: 800; }
.hero .kick.dark { background: rgba(17,22,21,.75); color: var(--accent); }
.hero .place { font-size: 38px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.hero .place.stop { font-size: 32px; }
.hero .meta { font-size: 14px; color: #CFE3DB; }
.hero .noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #2F6B5E; background: radial-gradient(120% 90% at 70% 20%, #17463D 0%, #0B2B25 70%); }
.stop-hero { height: calc(var(--sat) + 320px); }
.suite-hero { height: calc(var(--sat) + 360px); }

.day-switch { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.today .day-switch { background: var(--card-today); box-shadow: inset 0 0 0 1px var(--line-today); }
.day-switch .icon-btn { border-radius: 14px; }
.today .day-switch .icon-btn { background: var(--chip-today); }
.day-switch .mid { flex: 1; min-width: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-2); display: flex; flex-direction: column; }
.today .day-switch .mid { color: var(--text2-today); }
.day-switch .mid b { color: var(--text); font-size: 14px; }

/* ---------- Today ---------- */
.tile { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--card-today); box-shadow: inset 0 0 0 1px var(--line-today); min-width: 0; }
/* Driving days: warm sunset tile, so the km/drive block stands apart from the mint accents. */
.tile.drive { background: linear-gradient(135deg, #FFD27A 0%, #F4A259 100%); color: #2A1A05; box-shadow: none; }
.tile .t { font-size: 12px; font-weight: 700; }
.tile .v { font-size: 15px; font-weight: 800; line-height: 1.3; }

.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 10px; align-items: stretch; }
.tl-item.off { opacity: .45; }
.tl-item.off .tl-body > span:first-child { text-decoration: line-through; }
.tl-time { width: 62px; flex-shrink: 0; padding-top: 8px; }
.tl-time span { font-size: 11.5px; font-weight: 800; color: var(--accent); line-height: 1.3; display: block; overflow-wrap: normal; word-break: normal; }
.tl-rail { width: 34px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.tl-rail i { flex: 1; width: 2px; margin: 4px 0; background: var(--line); min-height: 8px; }
.today .tl-rail i { background: var(--line-today); }
.tl-item:last-child .tl-rail i { visibility: hidden; }
.tl-body { flex: 1; min-width: 0; padding: 6px 0 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.tl-item.own .tl-body > span:first-child { font-weight: 700; }
.act-ic { --s: 34px; width: var(--s); height: var(--s); flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.today .act-ic { box-shadow: 0 0 0 2px var(--card-today); }
.plan-tools { display: flex; gap: 8px; flex-wrap: wrap; padding: 2px 0 4px; }
.plan-tools .chip { min-height: 36px; padding: 0 12px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--bg); }
.act-fields { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.act-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding-bottom: 6px; }
.act-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; border: 2px solid transparent; background: transparent; min-height: 72px; }
.act-pick span { font-size: 10.5px; font-weight: 700; color: var(--muted-ink); line-height: 1.15; text-align: center; overflow-wrap: normal; word-break: normal; }
.act-pick.on { border-color: var(--accent); background: var(--accent-soft); }
.act-pick.on span { color: var(--accent); }
.sheet.act-sheet { max-height: min(62vh, 420px); }
.stay-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.today .stay-row { background: var(--chip-today); }
.stay-row .col span:first-child { font-size: 11px; font-weight: 700; color: var(--text-2); }
.stay-row .col span:last-child { font-size: 13px; font-weight: 700; }
/* Stay tonight: photo card that reads as "the campsite" at a glance */
.stay-card { position: relative; min-height: 150px; border-radius: 16px; overflow: hidden; background: #16463D; color: #fff; display: flex; box-shadow: 0 0 0 1.5px rgba(255, 210, 122, .55); }
.stay-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stay-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,26,22,.15) 0%, rgba(7,26,22,.35) 40%, rgba(7,26,22,.92) 100%); }
.stay-hit { position: absolute; inset: 0; z-index: 1; border: none; background: none; padding: 0; }
.stay-badge { position: absolute; z-index: 2; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--yellow); color: #2A2003; font-size: 12px; font-weight: 800; letter-spacing: .02em; pointer-events: none; }
.stay-link { position: absolute; z-index: 3; right: 10px; top: 8px; width: 40px; height: 40px; border-radius: 50%; background: rgba(7,26,22,.7); color: #fff; display: flex; align-items: center; justify-content: center; }
.stay-txt { position: relative; z-index: 2; margin-top: auto; padding: 48px 14px 12px; display: flex; flex-direction: column; gap: 2px; width: 100%; pointer-events: none; }
.stay-txt b { font-size: 19px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.stay-txt > span { font-size: 13px; color: #E3EEEA; }
.stay-txt em { font-style: normal; color: var(--yellow); font-weight: 700; }
.stay-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px !important; font-weight: 700; color: #E3EEEA; }
.stay-foot i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stay-go { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 800; }
.alt-box { padding: 12px; border-radius: 12px; border: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.today .alt-box { border-color: var(--line-today); }
.alt-box b { font-size: 13px; font-weight: 800; color: var(--yellow); }
.alt-box p { font-size: 13px; line-height: 1.45; }

.photo-card { position: relative; border: none; border-radius: 20px; overflow: hidden; padding: 0; color: #fff; text-align: left; background: var(--card-today); min-width: 0; display: block; width: 100%; }
.photo-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-card .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.78) 100%); }
.photo-card .shade.side { background: linear-gradient(90deg, rgba(10,35,30,.94) 0%, rgba(10,35,30,.7) 50%, rgba(10,35,30,.1) 100%); }
.photo-card .badge { position: absolute; top: 12px; left: 12px; min-width: 26px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.photo-card .txt { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.photo-card .txt b { font-size: 17px; font-weight: 800; }
.photo-card .txt span { font-size: 12px; line-height: 1.35; color: #E6F0EC; }
.photo-card.tall { min-height: 168px; }
.photo-card.suite { height: 132px; }
.photo-card.suite .txt { top: 14px; bottom: 14px; right: 40%; justify-content: center; gap: 4px; }
.photo-card.suite .txt .k { font-size: 12px; font-weight: 700; color: var(--accent); }
.photo-card.suite .txt b { font-size: 22px; line-height: 1.1; }

.cam-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.cam-row .dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; }
.cam-row b { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.button-card { border: none; text-align: left; color: inherit; width: 100%; font: inherit; }

.moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mood { min-height: 92px; padding: 10px 6px; border-radius: 16px; border: 2px solid transparent; background: #0F2E28; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.mood.on { background: #1A443B; }
.mood > span:not(.av-stack) { font-size: 12px; font-weight: 800; }

.sos-bar { text-decoration: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-ink); font-size: 14px; font-weight: 700; min-height: 52px; }

/* ---------- Route ---------- */
.map-wrap { position: relative; width: 100%; aspect-ratio: 943 / 1300; background: radial-gradient(120% 80% at 70% 30%, #17302B 0%, #121918 70%); overflow: hidden; }
.map-wrap > img, .map-wrap > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid var(--bg); color: var(--bg); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; z-index: 2; }
.map-pin::after { content: ''; position: absolute; inset: -10px; }
.map-fly { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: var(--coral); border: 2px solid var(--bg); display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1; }
.map-sea { position: absolute; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #5D6A66; pointer-events: none; }
.map-legend { position: absolute; left: 12px; top: 34px; padding: 10px 12px; border-radius: 12px; background: rgba(17,22,21,.88); display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; pointer-events: none; z-index: 3; }
.map-legend span { display: flex; align-items: center; gap: 8px; }

.leg { display: flex; align-items: center; gap: 10px; padding: 6px 0 6px 19px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.leg.inset { padding-left: 39px; }
.leg i { width: 2px; height: 24px; flex-shrink: 0; background: repeating-linear-gradient(#3B4744 0 4px, transparent 4px 8px); }
.endpoint { display: flex; align-items: center; gap: 12px; }
.endpoint .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.stop-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 10px; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.thumb { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.thumb.ph { background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.stop-card .open { flex: 1; min-width: 0; min-height: 56px; background: none; border: none; padding: 0; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.stop-card .open .d { font-size: 12px; font-weight: 700; color: var(--accent); }
.stop-card .open b { font-size: 16px; font-weight: 800; }
.stop-card .open .r { font-size: 13px; color: var(--text-2); }
.updown { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.updown button { width: 44px; height: 28px; border-radius: 8px; border: none; background: var(--card-2); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.updown button:disabled { color: #3E4845; }
.del-btn { flex-shrink: 0; width: 44px; height: 60px; border-radius: 10px; border: none; background: var(--danger-bg); color: #FF8A7A; display: flex; align-items: center; justify-content: center; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding: 6px 8px 6px 14px; background: var(--card-2); border-radius: 12px; font-size: 13px; font-weight: 700; color: #D0D7D4; }
.stepper.plain { margin-top: 0; }
.stepper .ctl { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--card); color: var(--accent); font-size: 20px; font-weight: 800; }
.stepper button:disabled { color: #3E4845; }
.stepper b { min-width: 18px; text-align: center; font-weight: 800; color: var(--text); }

/* ---------- Sheets, lightbox ---------- */
.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.backdrop.mid { align-items: center; padding: 16px; }
.sheet {
  width: 100%; max-width: 430px; max-height: min(50vh, 340px); display: flex; flex-direction: column;
  background: var(--card); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.4);
  padding: 14px 16px calc(var(--bottom) + 12px);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.sheet-body { overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.dialog { width: 100%; max-width: 400px; background: var(--card); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.94); display: flex; flex-direction: column; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(var(--sat) + var(--top)) 12px 8px 20px; color: #fff; font-size: 13px; font-weight: 700; }
.lb-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-img.white img { background: #fff; }
.lb-img iframe { width: 100%; height: 100%; border: none; background: #fff; border-radius: 6px; }
.lb-foot { padding: 10px 20px calc(var(--bottom) + 10px); display: flex; align-items: center; gap: 12px; color: #fff; }
.lb-foot .col span:first-child { font-size: 15px; font-weight: 700; }
.lb-foot .col span:last-child { font-size: 12px; color: #A6B0AC; }
.lb-nav { width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Stop detail ---------- */
.back-fab { position: absolute; left: 16px; top: calc(var(--sat) + var(--top) + 6px); z-index: 3; height: 44px; padding: 0 14px 0 8px; border-radius: 999px; border: none; background: rgba(17,22,21,.82); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.highlight { display: flex; gap: 12px; }
.highlight .n { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tip { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.tip::before { content: ''; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gal { position: relative; border: none; padding: 0; overflow: hidden; border-radius: 14px; background: var(--card); min-width: 0; }
.gal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gal .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.8)); color: #fff; font-size: 13px; font-weight: 700; text-align: left; }
.map-card { background: #fff; border-radius: 16px; padding: 8px; border: none; display: block; width: 100%; }
.map-card img { width: 100%; height: auto; border-radius: 10px; }
.dump { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.dump i { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.camp-docs { margin-top: 4px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); display: flex; flex-direction: column; gap: 8px; }

/* ---------- Journal ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.jphoto { position: relative; aspect-ratio: 1; border: none; padding: 0; border-radius: 14px; overflow: hidden; background: var(--card-2); }
.jphoto img { width: 100%; height: 100%; object-fit: cover; }
.jphoto .by { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; background: rgba(17,22,21,.8); font-size: 12px; font-weight: 700; color: #fff; }
.jphoto .pending { position: absolute; right: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(17,22,21,.85); color: var(--yellow); font-size: 11px; font-weight: 800; }

/* ---------- Camper ---------- */
.cam-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.log-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }

/* ---------- Docs ---------- */
.doc { display: flex; align-items: center; gap: 12px; min-width: 0; }
.doc-thumb { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; overflow: hidden; border: none; padding: 0; background: var(--card-2); color: var(--accent); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-thumb.icon { background: transparent; overflow: visible; }
.priv-chip { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: #2A2410; color: var(--yellow); font-size: 11px; font-weight: 800; }
.priv-av { flex-shrink: 0; }
.priv-av .av { border-color: var(--card); }
.priv-toggle { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid #34403D; background: transparent; text-align: left; width: 100%; }
.priv-toggle .box { width: 24px; height: 24px; flex-shrink: 0; border-radius: 8px; border: 2px solid #5D6A66; display: flex; align-items: center; justify-content: center; color: var(--bg); }
.priv-toggle b { font-size: 14px; font-weight: 700; }
.priv-toggle.on { border-color: var(--yellow); background: #2A2410; }
.priv-toggle.on .box { border-color: var(--yellow); background: var(--yellow); }
.priv-toggle > svg { color: var(--text-2); }
.slot { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed #34403D; min-width: 0; }
.upload-label { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; flex-shrink: 0; position: relative; overflow: hidden; cursor: pointer; }
.camp-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 9px; border-radius: 999px; border: none; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; align-self: flex-start; max-width: 100%; }

/* ---------- Info ---------- */
.big-sos { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 72px; border-radius: 20px; background: var(--danger); color: #fff; font-size: 22px; font-weight: 800; text-decoration: none; }
.num-row { display: flex; align-items: center; gap: 12px; min-height: 56px; text-decoration: none; color: var(--text); padding: 6px 0; border-top: 1px solid var(--line); }
.num-row:first-child { border-top: none; }
.num-row .num { color: var(--accent); font-weight: 800; font-size: 14px; white-space: nowrap; }
.num-row.todo .num { color: var(--yellow); }
.tips-box { padding: 14px; border-radius: 16px; background: var(--danger-bg); border: 1px solid var(--danger-line); display: flex; flex-direction: column; gap: 8px; }
.tips-box .tip { color: var(--danger-ink); }
.tips-box .tip::before { background: var(--danger-ink); }

/* ---------- Profile ---------- */
.prof-top { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.prof-av { position: relative; border: none; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.prof-av .cam { position: absolute; right: 0; bottom: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; border: 3px solid var(--bg); }
.prof-av input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.ins-card { position: relative; width: 100%; aspect-ratio: 85.6 / 54; border-radius: 16px; overflow: hidden; border: none; padding: 0; background: linear-gradient(135deg, #1D4E89 0%, #2F6DB5 55%, #4B8BD6 100%); color: #fff; text-align: left; display: block; }
.ins-card img { width: 100%; height: 100%; object-fit: cover; }
.ins-card .shine { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.22) 45%, rgba(255,255,255,0) 60%); pointer-events: none; }
.ins-card .chipm { position: absolute; left: 20px; top: 44px; width: 42px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #E9D18A, #B8963F); }
.ins-card .ph { position: absolute; left: 20px; right: 20px; bottom: 18px; display: flex; flex-direction: column; gap: 2px; }
.ins-card .tag { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.55); font-size: 11px; font-weight: 700; }
.ins-card input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* ---------- The Suite ---------- */
.dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dims .stat { display: flex; flex-direction: column; padding: 10px 2px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.dims .stat b { font-size: 17px; font-weight: 800; }
.dims .stat span { font-size: 11px; color: var(--text-2); font-weight: 700; }
.warn-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #3A2A14; color: var(--yellow); font-size: 13px; font-weight: 700; line-height: 1.4; }
.gal-main { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--card); }
.gal-main > img { width: 100%; height: 100%; object-fit: cover; }
.gal-main .nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); }
.gal-main .nav.l { left: 8px; } .gal-main .nav.r { right: 8px; }
.gal-main .cnt { position: absolute; right: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 12px; font-weight: 700; }
.gal-main .cap { position: absolute; left: 12px; bottom: 10px; right: 60px; font-size: 14px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.thumbs button { aspect-ratio: 4/3; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--card); opacity: .6; }
.thumbs button.on { border-color: var(--accent); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 4px; border-radius: 999px; border: none; background: var(--card-2); font-size: 14px; font-weight: 700; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.spec-row:first-of-type { border-top: none; }
.spec-row span:last-child { text-align: right; font-weight: 700; }
.inc-chip { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: var(--card-2); font-size: 13px; font-weight: 600; }
.inc-chip.no { background: var(--danger-bg); color: #FF8A7A; }
.floorplan { background: #fff; border-radius: 14px; padding: 8px; border: none; width: 100%; display: block; }

/* Strip behind the iPhone status bar: invisible over a top photo, solid once the photo has scrolled away. */
#status-shield { position: fixed; z-index: 55; left: 0; right: 0; top: 0; height: env(safe-area-inset-top, 0px); pointer-events: none; opacity: 1; transition: opacity .15s ease; }
@media (min-width: 600px) { #status-shield { left: 50%; right: auto; width: 430px; margin-left: -215px; } }
/* ---------- Packing lists ---------- */
.pack-pick { min-height: 128px; box-shadow: inset 0 0 0 2px transparent; opacity: .75; }
.pack-pick.on { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.pack-pick .txt b { font-size: 18px; }
.pack-owner { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.pack-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pack-cat { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px 4px 4px; border-radius: 12px; border: 1.5px solid #34403D; background: transparent; text-align: left; }
.pack-cat span:last-child { font-size: 12px; font-weight: 700; color: var(--muted-ink); line-height: 1.2; overflow-wrap: normal; }
.pack-cat.on { border-color: var(--accent); background: var(--accent-soft); }
.pack-cat.on span:last-child { color: var(--accent); }
.pack-group { gap: 8px; }
.pack-group > .row b { font-size: 16px; font-weight: 800; }
.pack-item { display: flex; align-items: center; gap: 8px; margin-left: -8px; min-height: 52px; }
.pack-item .col b { font-size: 14px; font-weight: 700; }
.pack-item.done .col b { color: #6E7A76; text-decoration: line-through; }
.pack-item.done .pack-thumb { opacity: .55; }
span.check { cursor: default; }
.pack-thumb { position: relative; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: none; padding: 0; background: none; display: flex; align-items: center; justify-content: center; overflow: visible; }
.pack-thumb img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(255,255,255,.15); }
.pack-thumb.add { cursor: pointer; }
.pack-thumb .cam { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; border: 2px solid var(--card); }
.pack-thumb input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
/* Packing: own list on top of the shared base */
.pack-crew { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 4px 0; }
.pack-mate { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-radius: 12px; }
.pack-mate.me { background: var(--accent-soft); }
.pm-bar { width: 100%; max-width: 64px; height: 5px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.pm-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pm-n { font-size: 11px; font-weight: 800; color: var(--text-2); }
.pack-qty { font-size: 12px; font-weight: 800; color: var(--yellow); }
.pack-tag { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--text-2); }
.pack-tag.me { color: var(--yellow); }
.pack-item.skipped .col b, .pack-item.skipped .pack-thumb { opacity: .45; }
.pack-item.skipped .col b { text-decoration: line-through; }
.check:disabled { opacity: .35; }
/* ---------- Uh-oh: connection lost ---------- */
.offline-backdrop { z-index: 95; background: rgba(4, 14, 12, .72); }
.offline-dialog { max-width: 420px; padding: 0; overflow: hidden; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0; box-shadow: 0 0 0 1.5px rgba(255,154,122,.45), 0 20px 60px rgba(0,0,0,.5); animation: uh-pop .35s cubic-bezier(.2,1.4,.4,1) both; }
.uhoh-art { background: #0E3A33; display: flex; align-items: center; justify-content: center; padding: 10px 6px; }
.uhoh-art svg { display: block; width: 100px; height: auto; }
.uhoh-body { padding: 14px 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.uhoh-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--coral); line-height: 1.05; }
.uhoh-text { font-size: 13px; line-height: 1.45; color: var(--muted-ink); }
.uhoh-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.uhoh-actions .btn { min-height: 44px; font-size: 14px; padding: 0 10px; }
.uh-bubble { transform-origin: 112px 66px; animation: uh-wobble 1.6s ease-in-out infinite; }
.uh-van { animation: nzc-bounce 1.2s ease-in-out infinite; }
@keyframes uh-pop { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes uh-wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .offline-dialog, .uh-bubble, .uh-van { animation: none; } }
.sync-pill.tap { pointer-events: auto; cursor: pointer; min-height: 30px; font: inherit; font-size: 11px; font-weight: 700; color: var(--yellow); }
/* ---------- Documents: in-app viewer and offline marks ---------- */
.offline-ok { display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; font-size: 11px; font-weight: 800; color: var(--accent); }
.offline-wait { font-size: 11px; font-weight: 700; color: var(--yellow); }
.docv { background: #0B100F; }
.docv-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 700; }
.docv-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docv-body { flex: 1; min-height: 0; display: flex; padding: 0 8px; }
.docv-frame { flex: 1; width: 100%; height: 100%; border: none; border-radius: 8px; background: #fff; }
.docv-msg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: var(--text); }
.docv-msg p { max-width: 300px; font-size: 14px; line-height: 1.5; color: var(--muted-ink); }
.docv-msg b { font-size: 16px; }