@font-face { font-family: 'Arquitecta'; src: url('/fonts/arquitecta-book.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Arquitecta'; src: url('/fonts/arquitecta-medium.otf') format('opentype'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Arquitecta'; src: url('/fonts/arquitecta-bold.otf') format('opentype'); font-weight: 650 700; font-display: swap; }
@font-face { font-family: 'Arquitecta'; src: url('/fonts/arquitecta-black.otf') format('opentype'); font-weight: 800 900; font-display: swap; }

:root {
  --font: 'Arquitecta', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #1c2330;
  --ink-2: #5b6474;
  --line: #e2e5ea;
  --accent: #3a6ea5;
  --accent-ink: #ffffff;
  --danger: #c23b3b;
  --ok: #1f9d55;
  --warn: #c98a12;
  --slot: #8a94a6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 50, 0.06), 0 2px 8px rgba(20, 30, 50, 0.05);
  --tabs-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #1a2029;
    --ink: #e8ebf0;
    --ink-2: #9aa3b2;
    --line: #2b3340;
    --accent: #6c9fd8;
    --accent-ink: #0d1520;
    --danger: #ef6a6a;
    --slot: #6d7789;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
/* 18px base: every rem in this file scales with it. */
html { -webkit-text-size-adjust: 100%; font-size: 18px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem/1.4 var(--font); /* Arquitecta Medium: bigger and bolder than the default Book */
  /* Arquitecta sets its word spaces tight; small text runs together without this. */
  word-spacing: 0.2em;
  padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 16px);
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; word-spacing: inherit; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); margin: 20px 0 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.booting { padding: 40px; text-align: center; color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: 0.85rem; }
.error { color: var(--danger); min-height: 1em; }
.empty { color: var(--ink-2); padding: 8px 2px; margin: 0; }
.lede { color: var(--ink-2); margin: 4px 16px 12px; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tripname {
  border: 0; background: none; padding: 0; font-size: 1.15rem; font-weight: 800;
  display: flex; gap: 6px; align-items: center; min-width: 0; cursor: pointer;
}
.tripname span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caret { color: var(--ink-2); font-size: 0.8rem; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--slot); }
.sync.on i { background: var(--ok); }
.sync.busy i { background: var(--warn); }
.sync.off { color: var(--danger); }
.sync.off i { background: var(--danger); }

/* ------------------------------------- the bottom bar: backlit keycaps */
/* Six keycaps from the artwork in public/keys/. Each image carries its own
   label and blue glow; the screen you're on is the lit key, the rest sit
   dimmed like an unlit keyboard. Pressing sinks a key and lights it. */
.keys {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(6, 1fr); justify-items: center; align-items: center;
  gap: 4px; padding: 6px 6px calc(6px + var(--safe-b));
  background: linear-gradient(180deg, #161b25, #0f1219);
  border-top: 1px solid #0b0d12;
}
.key {
  display: block; width: 100%; max-width: 76px; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.07s ease-out, filter 0.15s ease-out;
  filter: brightness(0.72) saturate(0.8);
}
.key img {
  display: block; width: 100%; height: 100%; pointer-events: none;
  /* the crop's edge is the key's glow: round it into a lit tile */
  border-radius: 20%;
}
.key.on { filter: none; }
.key:hover { filter: brightness(0.88); }
.key.on:hover { filter: none; }
.key:active, .key.pressed { transform: translateY(2px) scale(0.96); filter: none; }
.key:disabled { opacity: 0.4; cursor: default; }
.key:focus-visible { outline: 2px solid #4aa8ff; outline-offset: -4px; border-radius: 14px; }

/* ----------------------------------------------------------------- dots */
.dot {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent;
  color: #fff; font-size: 0.75rem; font-weight: 800; padding: 0;
}
button.dot { cursor: pointer; }
.dot.sm { width: 18px; height: 18px; font-size: 0.6rem; border-width: 1.5px; }
.dot.lg { width: 40px; height: 40px; font-size: 1rem; }
.dot.ghost { background: transparent; border-style: dashed; font-size: 1rem; }
.dots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

/* ----------------------------------------------------------------- chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 0.9rem;
}
.chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 700; }
.chip.clear { padding-left: 12px; color: var(--ink-2); }

/* ------------------------------------------------------------------ plan */
.daystrip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; scrollbar-width: none; }
.daystrip::-webkit-scrollbar { display: none; }
.daychip {
  flex: none; display: flex; flex-direction: column; align-items: center; width: 46px; padding: 6px 0;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.daychip .dow { font-size: 0.7rem; color: var(--ink-2); text-transform: uppercase; }
.daychip .dom { font-size: 1.1rem; font-weight: 800; }
.daychip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.daychip.on .dow { color: inherit; }
.daychip.today:not(.on) { border-color: var(--accent); }

.days {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; align-items: flex-start;
}
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 100%; scroll-snap-align: start; padding: 8px 16px 24px; min-width: 0; }
@media (min-width: 900px) {
  .days { scroll-snap-type: x proximity; padding: 0 8px; gap: 4px; scrollbar-width: thin; }
  .day { flex: 0 0 330px; padding: 8px; }
  .daystrip { display: none; }
}
.dayhead { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px 10px; }
.dayhead h2 { font-size: 1.05rem; }
.daynum { color: var(--ink-2); font-size: 0.85rem; }
.day.today .daynum { color: var(--accent); font-weight: 800; }

.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 10px;
}
article.card { cursor: pointer; }
article.card:focus-visible, .banner:focus-visible, .slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card.pending { border-style: dashed; }
.card .time { font-size: 0.85rem; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.card .title { font-weight: 700; display: flex; gap: 8px; align-items: baseline; margin-top: 2px; }
.card .sub { color: var(--ink-2); font-size: 0.9rem; margin-top: 2px; }
.icon { flex: none; }
.tzlabel { font-size: 0.7rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--line); color: var(--ink); }


.banner {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer;
  border: 0; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink);
}
.banner.pending { outline: 1px dashed var(--accent); }
.banner .btitle { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner .bwhen { font-size: 0.8rem; color: var(--ink-2); white-space: nowrap; }
.banner { flex-wrap: wrap; }
.banner .dots { margin: 0; flex-basis: 100%; padding-left: 30px; }

/* -------------------------------------------------- the day's timeline */
/* One pixel per minute. Hour labels sit in a left gutter; everything else is
   placed absolutely by plan.js. */
.grid {
  position: relative; margin-left: 46px; border-left: 1px solid var(--line);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  cursor: cell;
}
.hour { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.hour span {
  position: absolute; left: -46px; width: 40px; top: -0.6em; text-align: right;
  font-size: 0.7rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.slot {
  position: absolute; left: 3px; right: 3px; pointer-events: none;
  border: 1.5px dashed var(--slot); border-radius: 10px; padding: 6px 10px;
  display: flex; flex-wrap: wrap; gap: 0 8px; align-content: flex-start; color: var(--ink-2); overflow: hidden;
}
.slottime { font-weight: 700; color: var(--ink); font-size: 0.8rem; }
.slotwho { font-size: 0.75rem; }
.now { position: absolute; left: -4px; right: 0; height: 2px; background: #e5484d; pointer-events: none; z-index: 3; }
.now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }

.ev {
  position: absolute; z-index: 2; overflow: hidden; cursor: pointer;
  padding: 4px 8px; border-radius: 8px; font-size: 0.8rem; line-height: 1.25;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  touch-action: pan-x pan-y;
}
.ev.leg { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.ev.locked { cursor: default; }
.ev.movable { cursor: grab; }
.ev.pending { border-style: dashed; }
.ev:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.evhead { display: flex; gap: 4px; align-items: baseline; }
.evtitle { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evtitle .icon { margin-right: 4px; }
.lock { font-size: 0.7rem; opacity: 0.75; }
.evtime { color: var(--ink-2); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.short { display: flex; gap: 6px; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.ev.short .evhead { flex: 0 1 auto; min-width: 0; }
.ev .dots { margin-top: 4px; }
.ev .resize { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; cursor: ns-resize; }
.ev.movable:hover .resize { background: linear-gradient(transparent 4px, color-mix(in srgb, var(--accent) 50%, transparent) 4px 6px, transparent 6px); }
.ev.dragging { opacity: 0.35; }
.ev.moving { outline: 3px solid var(--accent); outline-offset: 1px; touch-action: none; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { outline-color: transparent; } }

.dragghost {
  position: absolute; left: 3px; right: 3px; z-index: 4; pointer-events: none;
  border-radius: 8px; padding: 4px 8px; font-size: 0.8rem; font-weight: 800;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); opacity: 0.92;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.dragghost.new { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--ink); border: 2px solid var(--accent); }
body:has(.ev.dragging) { cursor: grabbing; }

.movebar {
  position: sticky; top: 58px; z-index: 15; margin: 8px 16px; padding: 10px 14px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700;
}

/* ---------------------------------------------------------------- sheet */
.scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 15, 25, 0); display: flex;
  align-items: flex-end; justify-content: center; transition: background 0.15s;
}
.scrim.show { background: rgba(10, 15, 25, 0.45); }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(24px + var(--safe-b));
  transform: translateY(16px); transition: transform 0.15s;
}
.scrim.show .sheet { transform: none; }
@media (min-width: 700px) {
  .scrim { align-items: center; }
  .sheet { border-radius: 18px; max-height: 86vh; }
}
.sheethead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.sheethead h2 { font-size: 1.3rem; }
.kindlabel { font-size: 0.8rem; color: var(--ink-2); margin-bottom: 4px; }
.iconbtn { border: 0; background: none; padding: 4px 6px; cursor: pointer; color: var(--ink-2); font-size: 1rem; }
.when { margin: 4px 0; font-weight: 700; }
.route, .place { margin: 4px 0; color: var(--ink-2); }
.conf {
  display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 12px 14px;
  border-radius: 12px; background: var(--bg);
}
.conf .label { font-size: 0.8rem; color: var(--ink-2); }
.conf strong { font-size: 1.3rem; letter-spacing: 0.06em; flex: 1; font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 12px 0; }
.facts dt { color: var(--ink-2); font-size: 0.9rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.who { display: flex; flex-wrap: wrap; gap: 8px; }
.whobtn {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.whobtn.in { font-weight: 700; border-color: var(--ink-2); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.byline { color: var(--ink-2); font-size: 0.8rem; margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; font-weight: 700;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }
.link { border: 0; background: none; color: var(--accent); font-weight: 800; cursor: pointer; padding: 0 0 0 12px; }

.field { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; min-width: 0; }
.field .label { font-size: 0.85rem; color: var(--ink-2); font-weight: 700; }
.field input, .field select, .field textarea, .addemail input, .devlogin input, .uploadrow select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .field { margin: 6px 0; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.check input { width: 18px; height: 18px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; }
.kindgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 4px; }
.kindbtn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 0.75rem; cursor: pointer;
}
.kindbtn span { font-size: 1.3rem; }
.kindbtn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 800; }

.files .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.thumbwrap { position: relative; }
.thumb {
  width: 100%; aspect-ratio: 3 / 4; display: flex; flex-direction: column; overflow: hidden; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
.thumb img { width: 100%; flex: 1; object-fit: cover; min-height: 0; }
.thumb .fileicon { flex: 1; }
.thumblabel { font-size: 0.7rem; padding: 4px; color: var(--ink-2); text-align: center; }
.thumbdel {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.7rem; cursor: pointer;
}
.fileicon { display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--ink-2); letter-spacing: 0.05em; }
.uploadrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- wallet */
.wgroup { margin: 16px; }
.wgroup h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 10px; }
.wlist { display: grid; gap: 10px; }
@media (min-width: 700px) { .wlist { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.wcard {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.wcard img, .wcard .fileicon { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--bg); flex: none; }
.wtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wtext span { color: var(--ink-2); font-size: 0.85rem; }
.emptystate { margin: 40px 24px; text-align: center; color: var(--ink-2); }
.emptystate h2 { color: var(--ink); margin-bottom: 8px; }

.viewer {
  position: fixed; inset: 0; z-index: 80; background: #fff; color: #111; display: flex; flex-direction: column;
  color-scheme: light;
}
.viewer header {
  display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
  border-bottom: 1px solid #e5e5e5;
}
.vtitle { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vtitle span { font-size: 0.85rem; color: #555; }
.viewer .btn { background: #f2f2f2; color: #111; border-color: #ddd; }
.viewer .btn.primary { background: #3a6ea5; color: #fff; }
.vbody { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px; min-height: 0; }
.vbody img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vbody object { width: 100%; height: 100%; }
.vfile { text-align: center; }

/* ------------------------------------------------------------------ feed */
.feed { list-style: none; margin: 8px 16px; padding: 0; }
.feedrow {
  width: 100%; display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 12px 4px;
  border: 0; border-bottom: 1px solid var(--line); background: none;
}
button.feedrow { cursor: pointer; }
.ftext { flex: 1; }
.feedrow time { color: var(--ink-2); font-size: 0.8rem; white-space: nowrap; }
.view-feed > .btn { margin: 12px 16px; }

/* ---------------------------------------------------------------- people */
main > .card { margin: 12px 16px; }
.person header { display: flex; align-items: center; gap: 12px; }
.person header > div { flex: 1; min-width: 0; }
.person h2 { font-size: 1.05rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.person .hint { margin: 2px 0 0; }
.tag { font-size: 0.7rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.tag.muted { background: var(--line); color: var(--ink-2); }
.emails { list-style: none; padding: 0; margin: 10px 0 6px; }
.emails li { display: flex; align-items: center; gap: 8px; padding: 4px 0; overflow-wrap: anywhere; }
.emails li > span:first-child { flex: 1; min-width: 0; }
.addemail { display: flex; gap: 8px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--ink); }
.swatch:disabled { opacity: 0.25; cursor: not-allowed; }
.signout { text-align: center; }

/* ----------------------------------------------------------------- trips */
.triplist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tripbtn {
  width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
}
.tripbtn.on { border-color: var(--accent); }
.tripbtn span { color: var(--ink-2); font-size: 0.85rem; }

/* --------------------------------------------------------------- sign-in */
.signin { max-width: 380px; margin: 12vh auto 0; padding: 0 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.signin img { border-radius: 18px; }
.signin h1 { font-size: 1.6rem; }
.signin p { margin: 0; color: var(--ink-2); }
.gsi { min-height: 44px; display: flex; justify-content: center; }
.devlogin { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--line); }

/* ----------------------------------------------------------------- toast */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: 0.2s;
  background: #1c2330; color: #fff; padding: 10px 16px; border-radius: 12px; max-width: calc(100vw - 32px);
  display: flex; align-items: center; font-size: 0.9rem;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

.pagelinks { display: flex; gap: 16px; justify-content: center; margin-top: 16px; font-size: 0.85rem; }
.pagelinks a { color: var(--ink-2); }

.btn.ghostbtn { background: transparent; color: var(--ink-2); }

/* Moves that are staged (not committed) and the bar that commits them. */
.ev.staged { border-style: dashed; border-left-style: solid; background: color-mix(in srgb, #e8a33d 22%, var(--surface)); border-color: #e8a33d; }
.commitbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 10px); z-index: 28;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid #e8a33d; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.commitbar span { flex: 1; font-weight: 700; font-size: 0.9rem; }
body:has(.commitbar) #toast { bottom: calc(var(--tabs-h) + var(--safe-b) + 80px); }

/* Peek: something cut off, tapped once, shown in full for a few seconds. */
.ev.peek {
  height: auto !important; z-index: 10; left: 1px !important; width: calc(100% - 3px) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); outline: 2px solid var(--accent);
}
.ev.peek.short { display: block; }
.ev.peek .evtitle, .ev.peek .evtime, .banner.peek .btitle, .tripname.peek span:first-child {
  white-space: normal; overflow: visible; text-overflow: clip;
}
.tripname.peek { position: relative; z-index: 21; }

/* ------------------------------------------------ Add: screenshot first */
.dropzone {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 34px 18px; margin: 4px 0 14px; border-radius: 18px;
  border: 2px dashed color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--ink);
}
.dropzone strong { font-size: 1.3rem; font-weight: 900; }
.dropzone span { color: var(--ink-2); max-width: 30ch; }
.dropzone .dzicon { font-size: 2.6rem; line-height: 1; color: inherit; }
.dropzone.small { padding: 14px; flex-direction: row; justify-content: center; }
.dropzone.small .dzicon { font-size: 1.4rem; }
.dropzone.small strong { font-size: 1rem; }
.typein { display: block; margin: 8px auto 0; padding: 8px; }
.batch { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.shotthumb { width: 64px; height: 86px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.batchbody { min-width: 0; }
.reading { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin: 6px 0; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.draft { background: var(--bg); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.draft + .draft { margin-top: 4px; }
.drafttitle { font-weight: 900; display: flex; gap: 8px; align-items: baseline; }
.draftwhen { font-size: 0.9rem; margin-top: 2px; }
.draft .sub { color: var(--ink-2); font-size: 0.85rem; }
.draft .actions { margin-top: 10px; gap: 8px; }
.draft .actions .btn { padding: 8px 12px; }
.notime { color: #e8a33d; font-weight: 800; }

/* placing a new item on the timeline */
.placebar { background: #e8a33d; color: #1c1408; }
.placemark {
  position: absolute; left: 0; right: 0; z-index: 5; pointer-events: none;
  border-top: 3px solid #e8a33d; font-size: 0.75rem; font-weight: 800;
}
.placemark span { display: inline-block; background: #e8a33d; color: #1c1408; padding: 2px 10px; border-radius: 0 0 10px 0; }

/* ------------------------------------------------------- an item's guide */
.guide {
  margin: 14px 0; padding: 14px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}
.guide.pending { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.guide h3 { margin: 14px 0 6px; }
.ghead { font-weight: 800; font-size: 1.05rem; margin: 0 0 8px; }
.gfacts { display: flex; flex-wrap: wrap; gap: 6px; }
.gfact { font-size: 0.8rem; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.gfact b { font-weight: 800; }
.groute { margin: 0; padding-left: 22px; }
.groute li { margin: 4px 0; }
.gentries { list-style: none; margin: 0; padding: 0; }
.gentries li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.gentries li:last-child { border-bottom: 0; }
.gline { display: flex; justify-content: space-between; gap: 10px; }
.gname { font-weight: 700; }
.gprice { font-weight: 800; white-space: nowrap; }
.gsub { color: var(--ink-2); font-size: 0.85rem; }
.glinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gfoot { color: var(--ink-2); font-size: 0.75rem; margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.gfoot .btn { margin-left: auto; }
