/* Thereaway's demo. The values are the Android app's own (ui/theme/Color.kt,
   Dimens.kt, Type.kt and the canvas screens), so the page looks like the
   phone, in px where the app has dp. */

:root {
  --primary: #0F766E; --primary-pressed: #115E59; --primary-soft: #E3F3F0;
  --on-primary-soft: #115E59; --on-primary: #FFFFFF;
  --text: #14171A; --text-secondary: #64748B; --text-muted: #7A889D; --text-inverse: #FFFFFF;
  --surface: #FFFFFF; --surface-alt: #F8FAFC; --surface-field: #F1F5F9; --surface-search: #E6EBF2;
  --surface-track: #F1F5F9; --surface-raised: #FFFFFF; --surface-card: #F1F5F9;
  --border: #E2E8F0; --border-strong: #CBD5E1; --map-chrome-edge: transparent;
  --danger: #DC2626; --status-done: #16A34A; --warning: #B45309;
  --chat-fill: #E2E8F0;
  --stage: #E9EEF3; --stage-text: #14171A;
  --font: "Manrope", "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #14B8A6; --primary-pressed: #0F766E; --primary-soft: #042F2E;
    --on-primary-soft: #14B8A6; --on-primary: #0F172A;
    --text: #F1F5F9; --text-secondary: #94A3B8; --text-muted: #7A889D; --text-inverse: #0F172A;
    --surface: #15181D; --surface-alt: #1D212A; --surface-field: #2A2F3A; --surface-search: #2E3440;
    --surface-track: #262B35; --surface-raised: #48505F; --surface-card: #1F232B;
    --border: #404755; --border-strong: #4B5466; --map-chrome-edge: #404755;
    --danger: #F87171; --status-done: #22C55E; --warning: #FBBF24;
    --chat-fill: #2A2F3A;
    --stage: #0C0E12; --stage-text: #F1F5F9;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #14B8A6; --primary-pressed: #0F766E; --primary-soft: #042F2E;
  --on-primary-soft: #14B8A6; --on-primary: #0F172A;
  --text: #F1F5F9; --text-secondary: #94A3B8; --text-muted: #7A889D; --text-inverse: #0F172A;
  --surface: #15181D; --surface-alt: #1D212A; --surface-field: #2A2F3A; --surface-search: #2E3440;
  --surface-track: #262B35; --surface-raised: #48505F; --surface-card: #1F232B;
  --border: #404755; --border-strong: #4B5466; --map-chrome-edge: #404755;
  --danger: #F87171; --status-done: #22C55E; --warning: #FBBF24;
  --chat-fill: #2A2F3A;
  --stage: #0C0E12; --stage-text: #F1F5F9;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--stage); color: var(--stage-text);
  font-family: var(--font); font-size: 16px; letter-spacing: -0.1px;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg.i { width: 1em; height: 1em; flex: none; }

/* ---- The stage: a phone beside a few words on a wide screen, the app alone on a phone */
.stage { height: 100%; display: flex; align-items: center; justify-content: center; gap: 72px; padding: 24px; }
.intro { max-width: 330px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.4px; }
.brand img { background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--border); }
.intro h1 { font-size: 34px; line-height: 1.25; letter-spacing: -1.2px; margin: 28px 0 14px; font-weight: 700; }
.intro p { font-size: 16px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 16px; word-break: keep-all; }
.intro .fine { font-size: 13px; color: var(--text-muted); }
.phone {
  position: relative; width: 390px; height: min(844px, calc(100vh - 48px)); flex: none;
  border-radius: 44px; overflow: hidden; background: var(--surface);
  box-shadow: 0 0 0 10px #0B0D10, 0 0 0 11px #2A2F3A, 0 30px 80px rgba(15, 23, 42, .35);
  isolation: isolate;
}
@media (max-width: 760px) {
  .stage { padding: 0; display: block; }
  .intro { display: none; }
  .phone { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
}
@media (min-width: 761px) and (max-height: 600px) { .phone { height: calc(100vh - 24px); } }

/* ---- The map and what floats over it */
.map { position: absolute; inset: 0; }
.maplibregl-ctrl-attrib { font-family: var(--font); font-size: 10px; }
.maplibregl-ctrl-top-left { top: 52px; }
.demo-chip {
  position: absolute; top: 16px; left: 16px; z-index: 2; height: 30px; padding: 0 12px;
  display: flex; align-items: center; border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .16), 0 0 0 1px var(--map-chrome-edge);
}
.locate {
  position: absolute; top: 12px; right: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); color: var(--primary); display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .18), 0 0 0 1px var(--map-chrome-edge);
}
.pin {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 0 0 2px var(--surface), 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer; transition: width .2s, height .2s, font-size .2s, box-shadow .2s;
}
.pin.sel { width: 36px; height: 36px; font-size: 15px; box-shadow: 0 0 0 3px var(--surface), 0 2px 8px rgba(0,0,0,.3); }
.pin.done { opacity: .55; }
.browse-pin {
  width: 30px; height: 40px; cursor: pointer;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.3));
}

/* ---- The sheet */
.sheet, .card-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: var(--surface); color: var(--text);
  border-radius: 34px 34px 0 0;
  box-shadow: 0 -2px 24px rgba(15, 23, 42, .14);
  display: flex; flex-direction: column;
  transition: height .25s cubic-bezier(.16, 1, .3, 1);
}
.sheet.dragging, .card-sheet.dragging { transition: none; }
.grabber { height: 20px; flex: none; display: grid; place-items: center; cursor: grab; touch-action: none; }
.grabber span { width: 36px; height: 4px; border-radius: 2px; background: var(--border-strong); }

.rail {
  position: relative; flex: none; margin: 4px 16px 8px; padding: 3px; border-radius: 999px;
  background: var(--surface-track); display: grid; grid-template-columns: repeat(4, 1fr);
  touch-action: none;
}
.rail button {
  position: relative; z-index: 1; height: 30px; font-size: 13px; font-weight: 600; letter-spacing: -0.1px;
  color: var(--text-secondary); transition: color .2s;
}
.rail button.on { color: var(--text); }
.thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 4); border-radius: 999px;
  background: var(--surface-raised); box-shadow: 0 1px 3px rgba(15, 23, 42, .14);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}

.page { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.page::-webkit-scrollbar { display: none; }
.tail { height: 140px; }

/* ---- Itinerary */
.toolbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 16px 8px; position: relative; }
.tpill {
  height: 30px; border-radius: 999px; border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.tpill svg { font-size: 15px; color: var(--text-secondary); }
.daymenu {
  position: absolute; top: 40px; left: 16px; z-index: 5; min-width: 150px; padding: 6px;
  background: var(--surface); border-radius: 14px; box-shadow: 0 8px 28px rgba(15, 23, 42, .2), 0 0 0 1px var(--border);
}
.daymenu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border-radius: 10px; font-size: 14px; text-align: left; }
.daymenu button:hover, .daymenu button.on { background: var(--surface-field); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.list { padding: 0 8px; }
.dayhead { display: flex; align-items: baseline; gap: 8px; padding: 16px 16px 8px; }
.dayhead:first-child { padding-top: 4px; }
.dayhead .dot { align-self: center; }
.dayhead b { font-weight: 600; font-size: 16px; letter-spacing: -0.2px; }
.dayhead .date { font-size: 12px; color: var(--text-muted); }
.dayhead .sum { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.daytitle { padding: 0 16px 6px 32px; margin-top: -4px; font-size: 13px; color: var(--text-secondary); }

.row { display: flex; position: relative; }
.rail-col { width: 22px; margin-left: 16px; flex: none; position: relative; }
.rail-col::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.row.first .rail-col::before { top: 26px; }
.row.last .rail-col::before { bottom: auto; height: 26px; }
.row.first.last .rail-col::before { display: none; }
.node {
  position: absolute; left: -2px; top: 13px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; z-index: 1;
}
.stop {
  flex: 1; min-width: 0; margin: 3px 8px 3px 12px; padding: 12px; border-radius: 22px; background: var(--surface-card);
  cursor: pointer; text-align: left; display: block; width: auto;
  transition: background .2s;
}
.stop .top { display: flex; gap: 12px; align-items: flex-start; }
.stop .txt { flex: 1; min-width: 0; }
.stop .name { font-weight: 600; font-size: 16px; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop .meta { margin-top: 2px; font-size: 14px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop.open .meta { white-space: normal; }
.stop .ph { width: 48px; height: 48px; border-radius: 10px; flex: none; background: var(--surface-field) center/cover no-repeat; }
.stop.sel { background: var(--primary-soft); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent); }
.stop.done .name { color: var(--text-secondary); }
.stop .check { color: var(--status-done); }
.stop .more { display: none; margin-top: 10px; }
.stop.open .more { display: block; }
.note { font-size: 14px; line-height: 1.5; color: var(--text-secondary); margin: 0 0 10px; word-break: keep-all; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-secondary); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.act { font-size: 12px; padding: 6px 10px; border-radius: 999px; background: var(--surface-raised); color: var(--text); font-weight: 500; }
.act.danger { background: none; color: var(--danger); }

.leg { display: flex; align-items: center; height: 38px; }
.leg .rail-col { height: 100%; }
.leg .mode {
  position: absolute; left: -1px; top: 7px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; color: var(--text-secondary); font-size: 16px; z-index: 1;
}
.leg .what { margin-left: 24px; font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.leg .what svg { font-size: 12px; }
.leg .dir { margin-left: 14px; font-size: 12px; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; text-decoration: none; }
.leg .dir svg { font-size: 11px; }

.stay { display: flex; align-items: center; min-height: 52px; }
.stay .node { background: var(--surface-field); color: var(--text-secondary); font-size: 14px; top: 13px; }
.stay .txt { margin-left: 24px; padding: 8px 12px 8px 0; font-size: 16px; font-weight: 500; color: var(--text-secondary); }
.stay .txt span { font-size: 14px; font-weight: 400; color: var(--text-muted); }

/* ---- Cards used on Places and in the assistant */
.pcard {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 22px; background: var(--surface-card);
  cursor: pointer; text-align: left; width: 100%;
}
.pcard .ph { width: 64px; height: 64px; border-radius: 10px; flex: none; background: var(--surface-field) center/cover no-repeat; }
.pcard .txt { flex: 1; min-width: 0; }
.pcard .name { font-weight: 600; font-size: 16px; letter-spacing: -0.2px; }
.pcard .meta { font-size: 13px; color: var(--text-secondary); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .on-day { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.pcard .on-day .dot { width: 6px; height: 6px; }
.add {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; font-size: 16px; flex: none;
}
.add.done { background: var(--primary-soft); color: var(--on-primary-soft); }

/* ---- Places */
.places { padding: 4px 16px 0; }
.search {
  height: 44px; border-radius: 999px; background: var(--surface-search); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; color: var(--text-muted); font-size: 15px; margin-bottom: 14px;
}
.search svg { font-size: 17px; }
.label { font-size: 12px; letter-spacing: .8px; color: var(--text-muted); margin: 18px 0 10px; font-weight: 500; }
.label:first-of-type { margin-top: 4px; }
.stack { display: grid; gap: 8px; }

/* ---- Assistant */
.chat { padding: 4px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.chat-top { display: flex; justify-content: space-between; }
.circ { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-secondary); font-size: 14px; }
.bubble {
  max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: 15px; line-height: 1.55; word-break: keep-all;
}
.bubble.me { align-self: flex-end; background: var(--primary); color: var(--text-inverse); border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--chat-fill); color: var(--text); border-bottom-left-radius: 4px; }
.bubble.ai b { font-weight: 600; }
.under { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-secondary); margin-top: -4px; padding-left: 4px; }
.under button { display: flex; align-items: center; gap: 5px; color: var(--text-secondary); }
.receipt { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary); }
.receipt svg { font-size: 15px; }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3 } 40% { opacity: 1 } }
.composer {
  flex: none; display: flex; gap: 8px; align-items: center; padding: 8px 16px 12px; border-top: 1px solid var(--border); background: var(--surface);
}
.composer input {
  flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; border-radius: 14px; background: var(--chat-fill); padding: 0 12px; font-size: 15px;
}
.composer input::placeholder { color: var(--text-muted); }
.composer .mic { width: 44px; height: 44px; border-radius: 50%; background: var(--chat-fill); display: grid; place-items: center; font-size: 19px; color: var(--text-secondary); }
.composer .send { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: 18px; opacity: .4; transition: opacity .15s; }
.composer .send.ready { opacity: 1; }

/* ---- Menu and Wallet */
.menu { padding: 4px 16px 0; }
.menu h2 { font-size: 23px; font-weight: 700; letter-spacing: -0.6px; margin: 6px 0 4px; }
.menu .sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; }
.mrow { display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 0; text-align: left; }
.mrow .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-alt); display: grid; place-items: center; font-size: 22px; color: var(--text-secondary); flex: none; }
.mrow .t { flex: 1; }
.mrow .t b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.3px; }
.mrow .t span { font-size: 14px; color: var(--text-secondary); }
.mrow .chev { color: var(--text-secondary); font-size: 18px; }
.back { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; }
.back button { font-size: 20px; width: 32px; height: 32px; display: grid; place-items: center; }
.back h2 { margin: 0; }
.wsum { background: var(--surface-card); border-radius: 22px; padding: 12px 12px 14px 16px; }
.wsum .r1 { display: flex; align-items: center; gap: 8px; }
.caps { font-size: 12px; letter-spacing: .8px; color: var(--text-muted); font-weight: 500; }
.chip { font-size: 12px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 7px; color: var(--text-secondary); display: flex; align-items: center; gap: 3px; }
.logbtn { margin-left: auto; background: var(--primary); color: var(--on-primary); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.money { font-size: 32px; font-weight: 600; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.money small { font-size: 14px; font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
.bar { height: 6px; border-radius: 999px; background: var(--border-strong); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.wline { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }
.wline.muted { color: var(--text-muted); margin-top: 2px; }
.links { display: flex; gap: 18px; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--primary); }
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.dtile { min-width: 104px; border-radius: 14px; padding: 12px; }
.dtile span { font-size: 12px; font-weight: 600; }
.dtile b { display: block; font-weight: 600; font-size: 16px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.exp { background: var(--surface-card); border-radius: 22px; overflow: hidden; }
.erow { display: flex; align-items: center; gap: 12px; padding: 12px; }
.erow + .erow { border-top: 1px solid var(--surface); }
.erow .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex: none; }
.erow .t { flex: 1; min-width: 0; }
.erow .t b { display: block; font-weight: 500; font-size: 16px; }
.erow .t span, .erow .amt span { font-size: 12px; color: var(--text-secondary); }
.erow .amt { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.erow .amt span { display: block; font-weight: 400; }

/* ---- The place card */
.card-sheet { z-index: 4; transform: translateY(105%); transition: height .25s cubic-bezier(.16, 1, .3, 1), transform .25s cubic-bezier(.16, 1, .3, 1); }
.card-sheet.open { transform: none; }
.card-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 16px; scrollbar-width: none; }
.card-head { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.card-head h2 { flex: 1; font-size: 23px; font-weight: 700; letter-spacing: -0.6px; margin: 0; line-height: 1.25; }
.close { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-field); display: grid; place-items: center; font-size: 17px; flex: none; margin-top: 2px; }
.kind { font-size: 14px; color: var(--text-secondary); }
.already { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-secondary); margin-top: 6px; }
.already .dot { width: 6px; height: 6px; }
.photo { margin-top: 14px; border-radius: 14px; aspect-ratio: 1080 / 640; background: var(--surface-field) center/cover no-repeat; }
.credit { font-size: 11px; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }
.credit a { color: inherit; }
.about { font-size: 16px; line-height: 1.6; margin: 14px 0 0; word-break: keep-all; }
.pills { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.opill { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text); }
.opill svg { font-size: 15px; }
.card-foot { flex: none; display: flex; gap: 12px; padding: 12px 16px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.cta { flex: 1; height: 50px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 16px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cta svg { font-size: 18px; }
.cta.quiet { background: var(--primary-soft); color: var(--on-primary-soft); }
.save { width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid var(--border); display: grid; place-items: center; font-size: 20px; }
.save.on { color: var(--primary); }

/* ---- Toast */
.toast {
  position: absolute; left: 50%; bottom: 28px; z-index: 9; transform: translate(-50%, 20px); opacity: 0;
  background: var(--text); color: var(--surface); font-size: 14px; padding: 10px 16px; border-radius: 999px;
  white-space: nowrap; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.16, 1, .3, 1);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
