/* Trips — clickable wireframe. Lo-fi on purpose: grayscale + one accent. */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #eceae6; --panel: #f7f6f3; --card: #ffffff; --line: #d9d6d0;
  --ink: #1c1b18; --dim: #8a867e; --accent: #0f766e; --accent-ink: #ffffff;
  --warn: #b45309; --danger: #b91c1c; --ok: #15803d;
  --radius: 12px;
}
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex; justify-content: center;
}
#phone {
  width: 100%; max-width: 430px; min-height: 100dvh; background: var(--panel);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,.12);
}
#ribbon {
  position: absolute; top: 14px; right: -34px; transform: rotate(45deg);
  background: var(--ink); color: #fff; font-size: 10px; letter-spacing: .12em;
  padding: 3px 40px; z-index: 60; pointer-events: none; opacity: .85;
}
#screen { flex: 1; overflow-y: auto; padding-bottom: 76px; }
#screen.no-tabs { padding-bottom: 16px; }

/* header */
.hdr {
  display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px;
  position: sticky; top: 0; background: var(--panel); z-index: 5;
}
.hdr .spacer { flex: 1; }
.trip-chip {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 17px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
}
.trip-chip .dis { color: var(--dim); font-weight: 400; }
.phase-chip {
  font-size: 12px; color: var(--dim); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; background: var(--card); cursor: pointer; white-space: nowrap;
}
.hdr .icon-btn { border: none; background: none; font-size: 20px; cursor: pointer; padding: 4px; }

/* generic */
.pad { padding: 0 14px 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; margin-bottom: 10px;
}
.card.hero { border-width: 1.5px; border-color: #b9b5ad; }
.card h3 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; font-weight: 650; }
.row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.row + .row { border-top: 1px solid #efedea; }
.row .grow { flex: 1; min-width: 0; }
.row .sub, .sub { color: var(--dim); font-size: 13px; }
.row .chev { color: var(--dim); }
.quiet-row { color: var(--dim); }
.tick { width: 22px; height: 22px; border: 1.5px solid #b9b5ad; border-radius: 7px; background: #fff;
  cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center; font-size: 14px; color: transparent; }
.tick.done { background: var(--ink); border-color: var(--ink); color: #fff; }
.done-label { text-decoration: line-through; color: var(--dim); }
.pill { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: #fff; cursor: pointer; white-space: nowrap; }
.pill.claimed { border-style: solid; color: var(--ink); background: var(--panel); cursor: default; }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.badge { font-size: 11px; color: var(--dim); }
.money { font-variant-numeric: tabular-nums; }
.gbp-sub { font-size: 12px; color: var(--dim); margin-left: 5px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 10px; padding: 10px 14px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%;
}
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { width: auto; padding: 7px 12px; font-size: 13px; }
.btn.ghost { border: none; background: none; color: var(--dim); font-weight: 500; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.hint { font-size: 12px; color: var(--dim); text-align: center; margin: 4px 0 10px; }
.section-label { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); margin: 16px 2px 6px; font-weight: 650; }

/* tab bar */
#tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; display: flex;
  background: var(--card); border-top: 1px solid var(--line); z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}
#tabbar button {
  flex: 1; border: none; background: none; padding: 9px 0 10px; cursor: pointer;
  font-size: 10.5px; color: var(--dim); display: flex; flex-direction: column; gap: 2px; align-items: center;
}
#tabbar button .ti { font-size: 19px; line-height: 1; }
#tabbar button.on { color: var(--ink); font-weight: 700; }

/* poll strip */
#strip {
  position: absolute; bottom: 58px; left: 0; right: 0; z-index: 39;
  background: var(--ink); color: #fff; padding: 9px 14px; font-size: 13.5px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
}
#strip .grow { flex: 1; }
#strip .vote { background: #fff; color: var(--ink); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 12px; }

/* fab */
.fab {
  position: absolute; right: 16px; bottom: 74px; z-index: 38;
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: 12px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); display: flex; gap: 6px; align-items: center;
}

/* sheets */
#overlay {
  position: absolute; inset: 0; background: rgba(20,18,14,.45); z-index: 50;
  display: none; align-items: flex-end;
}
#overlay.open { display: flex; }
#sheet {
  background: var(--panel); width: 100%; border-radius: 18px 18px 0 0;
  max-height: 88%; overflow-y: auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  animation: up .18s ease-out;
}
@keyframes up { from { transform: translateY(30%); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-grab { width: 36px; height: 4px; background: var(--line); border-radius: 4px; margin: 2px auto 12px; }
.sheet-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.sheet-title .x { margin-left: auto; border: none; background: none; font-size: 18px; color: var(--dim); cursor: pointer; }
.sheet-title .back { border: none; background: none; font-size: 18px; cursor: pointer; }

/* inputs */
input[type=text], textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font: inherit; background: #fff; margin-bottom: 10px;
}
textarea { min-height: 130px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chips .chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 13px;
  font-size: 14px; cursor: pointer;
}
.chips .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.faces { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.face {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; cursor: pointer; color: var(--dim);
}
.face b { font-size: 13px; color: var(--ink); }
.face.on { border-color: var(--ink); background: var(--ink); }
.face.on b, .face.on { color: #fff; }

/* keypad */
.amount-display { text-align: center; font-size: 40px; font-weight: 700; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.amount-display .cur { font-size: 22px; color: var(--dim); margin-right: 4px; }
.amount-gbp { text-align: center; color: var(--dim); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 8px 0 12px; }
.keypad button {
  padding: 13px 0; font-size: 21px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; font-weight: 600;
}
.mini-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.mini-chips .chip { font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; background: #fff; cursor: pointer; }
.mini-chips .chip.on { background: var(--panel); border-color: var(--ink); font-weight: 650; }

/* home hero */
.hero-emoji { font-size: 28px; }
.hero-top { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.hero-top .t { font-size: 19px; font-weight: 750; }
.countdown { font-size: 30px; font-weight: 750; margin: 4px 0; }
.shelf { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; }
.shelf .tile {
  flex: none; width: 96px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; cursor: pointer; text-align: center;
}
.shelf .tile .e { font-size: 24px; }
.shelf .tile .n { font-size: 12px; font-weight: 650; margin-top: 3px; }
.shelf .tile .y { font-size: 11px; color: var(--dim); }

/* itinerary */
.dayhdr { display: flex; align-items: baseline; gap: 8px; margin: 14px 2px 4px; }
.dayhdr .d { font-weight: 750; font-size: 14px; }
.itin-time { color: var(--dim); font-size: 13px; width: 46px; flex: none; font-variant-numeric: tabular-nums; }

/* review import */
.review-cat { margin: 12px 0 4px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.pin-bar {
  position: sticky; bottom: 0; background: var(--panel); padding: 10px 0 4px; margin-top: 14px;
}
.shimmer { text-align: center; color: var(--dim); padding: 40px 0; }
.shimmer .dot { animation: pulse 1s infinite; display: inline-block; }
@keyframes pulse { 50% { opacity: .3; } }

/* toast */
#toast {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 120px; z-index: 70;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 18px; font-size: 13.5px;
  display: none; align-items: center; gap: 10px; white-space: nowrap; max-width: 92%;
}
#toast.show { display: flex; }
#toast button { background: none; border: none; color: #8fd3cc; font-weight: 700; cursor: pointer; font-size: 13.5px; }

/* stat grid (memory) */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.stat .v { font-size: 20px; font-weight: 750; }
.stat .k { font-size: 11.5px; color: var(--dim); }

/* segmented */
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.seg button { flex: 1; border: none; background: none; padding: 9px 0; font-size: 13.5px; color: var(--dim); cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; font-weight: 700; }

.ballot { margin-bottom: 8px; }
.ballot .opt {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 12px; margin-bottom: 8px; cursor: pointer; width: 100%; font: inherit; text-align: left;
}
.ballot .opt.chosen { border-color: var(--ink); background: var(--panel); font-weight: 650; }
.bar { height: 5px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; background: var(--ink); }

a { color: var(--accent); text-decoration: none; }
.copy-val { font-variant-numeric: tabular-nums; user-select: all; }
.center { text-align: center; }
.mt { margin-top: 12px; }
