:root {
  --ink: #09254A;
  --ink-muted: #4E6380;
  --ink-soft: #A3B4C8;
  --divider: #B9D2E6;
  --surface: #FFFFFF;
  --surface-alt: #F3F8FC;
  --green: #49DF3F;
  --emerald: #02C87C;
  --teal: #00B9B9;
  --action: #0C65F2;
  --navy-line: #3A5576;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--surface); color: var(--ink); font: 400 16px/1.4 var(--font);
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
#screen {
  min-height: 100%; padding: calc(20px + var(--safe-top)) 16px calc(96px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 18px; outline: none; max-width: 560px; margin: 0 auto;
}
a { color: var(--action); }
button { font: inherit; color: inherit; }
h1 { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; }
h2 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 600; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--ink-muted); text-transform: uppercase; }
.muted { color: var(--ink-muted); font-size: 14px; }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.card { border: 1px solid var(--divider); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
button.card { text-align: left; width: 100%; cursor: pointer; }
.card.selected { border: 2px solid var(--action); padding: 13px 15px; }
.topbar { display: flex; justify-content: space-between; align-items: center; }
.topbar img { height: 30px; width: auto; }
.place { font-size: 13px; color: var(--ink-muted); display: flex; align-items: center; gap: 4px; }

/* ELSIA speaks */
.hero { background: var(--ink); color: #fff; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.hero .says { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--ink-soft); }
.hero p { margin: 0; font-size: 17px; line-height: 24px; }
.hero .big { font-size: 48px; line-height: 52px; font-weight: 800; letter-spacing: -.01em; color: var(--green); }
.hero .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.hero .facts span + span::before { content: "·"; color: var(--ink-soft); margin-right: 14px; }
.hero a { color: #fff; align-self: center; font-size: 14px; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-muted); }
.note svg { flex-shrink: 0; margin-top: 2px; }
.note.dark { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 14px 16px; font-size: 15px; line-height: 22px; }

/* Buttons */
.btn { height: 52px; border: 0; border-radius: 14px; background: var(--action); color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; width: 100%; cursor: pointer; }
.btn.teal { background: var(--teal); color: var(--ink); height: 48px; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--divider); }
.btn:disabled { opacity: .45; }
.link { background: none; border: 0; color: var(--action); text-decoration: underline; font-size: 15px; padding: 6px; align-self: center; cursor: pointer; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--divider); background: var(--surface); font-size: 13px; }

/* Lists */
.lines { display: flex; flex-direction: column; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.line:last-child { border-bottom: 0; }
.line .name { font-size: 15px; font-weight: 600; }
.line .price { font-size: 16px; font-weight: 700; white-space: nowrap; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 2px 6px; border-radius: 6px; }
.tag.sale { background: var(--green); color: var(--ink); }
.tag.best { background: var(--action); color: #fff; padding: 3px 8px; }
.tag.outline { border: 1px solid var(--divider); color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-muted); margin-left: 6px; vertical-align: middle; }
.qty { display: flex; align-items: center; border: 1px solid var(--divider); border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.qty button { width: 34px; height: 34px; border: 0; background: var(--surface); font-size: 18px; cursor: pointer; }
.qty span { min-width: 26px; text-align: center; font-size: 15px; font-weight: 600; }
.add { display: flex; gap: 8px; }
.add input { flex: 1; height: 48px; border: 1px solid var(--divider); border-radius: 12px; padding: 0 14px; font: inherit; color: var(--ink); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }

/* Controls */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--divider); border-radius: 10px; overflow: hidden; min-width: 156px; }
.seg button { height: 36px; border: 0; background: var(--surface); font-size: 15px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 700; }
input[type=range] { width: 100%; accent-color: var(--action); }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.switch:last-child { border-bottom: 0; }
.switch input { width: 22px; height: 22px; accent-color: var(--action); }
select { height: 40px; border: 1px solid var(--divider); border-radius: 10px; padding: 0 10px; font: inherit; color: var(--ink); background: var(--surface); max-width: 60%; }

/* Plan amounts */
.amt { font-size: 22px; font-weight: 800; white-space: nowrap; }
.amt.win { color: var(--action); }

/* Trip */
.trip-head { background: var(--ink); color: #fff; margin: calc(-20px - var(--safe-top)) -16px 0; padding: calc(20px + var(--safe-top)) 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.trip-head .muted { color: var(--ink-soft); }
.trip-head a { color: #fff; font-size: 14px; }
.go { height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--teal); color: var(--ink); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; text-decoration: none; flex-shrink: 0; }
.bar { height: 8px; border-radius: 4px; background: var(--navy-line); overflow: hidden; }
.bar div { height: 8px; background: var(--green); transition: width .2s; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--divider); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--emerald); flex-shrink: 0; }
.check .name { flex: 1; font-size: 15px; font-weight: 600; }
.check .price { font-size: 15px; font-weight: 700; }
.check.done { color: var(--ink-muted); }
.check.done .name { text-decoration: line-through; font-weight: 400; }
.check.done .price { font-weight: 400; }

.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; align-self: center; }
.center { text-align: center; align-items: center; }
.empty { text-align: center; padding: 40px 12px; color: var(--ink-muted); }

/* Tabs */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; height: calc(68px + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  border-top: 1px solid var(--divider); background: var(--surface); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 5; }
#tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--ink-muted); text-decoration: none; }
#tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#tabs a[aria-current="page"] { color: var(--action); font-weight: 600; }

#toast { position: fixed; left: 16px; right: 16px; bottom: calc(84px + var(--safe-bottom)); background: var(--ink); color: #fff; border-radius: 12px;
  padding: 12px 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 6; max-width: 528px; margin: 0 auto; }
#toast.show { opacity: 1; }
.field { height: 48px; border: 1px solid var(--divider); border-radius: 12px; padding: 0 14px; font: inherit; color: var(--ink); width: 100%; background: var(--surface); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg button { padding: 0 10px; }
