/* QatarLayover -------------------------------------------------------------
   Palette taken from the Qatar Airways maroon and the sand/gold of the terminal
   interior. Serif display for anything that carries a number the traveller has
   to trust; sans for everything operational.
--------------------------------------------------------------------------- */
:root {
  --maroon-900: #540B22;
  --maroon: #7A0F30;
  --maroon-600: #8A1538;
  --maroon-tint: #F7EAEF;
  --gold: #B8913F;
  --gold-soft: #E7D6AE;
  --cream: #FAF6F1;
  --card: #FFFFFF;
  --ink: #2B1F23;
  --muted: #8B7E81;
  --line: #EFE6DE;
  --green: #2E7A5B;
  --red: #B5322F;
  --amber: #B07A1E;
  --shadow-sm: 0 1px 2px rgba(60, 20, 35, .05), 0 6px 18px rgba(60, 20, 35, .05);
  --shadow-md: 0 12px 34px rgba(60, 20, 35, .12);
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
}

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

html, body {
  margin: 0;
  background: #EDE6DE;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.phone {
  position: relative;
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(50, 20, 30, .18);
}

.screen { padding-bottom: 96px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.pad { padding: 0 18px; }
.spacer { height: 18px; }

/* ------------------------------------------------------------------ type */
.display { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--maroon-600); margin: 22px 0 10px;
}
.hero .section-label, .eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0;
}
.eyebrow.gold { color: var(--gold-soft); }
.muted { color: var(--muted); }
.muted-light { color: rgba(255, 255, 255, .72); font-size: 12px; margin: 0; }
.small { font-size: 12.5px; }
.link { color: var(--maroon-600); font-size: 13px; font-weight: 600; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  padding: 22px 18px 26px;
  background: radial-gradient(120% 80% at 88% 8%, #93204A 0%, transparent 55%),
              linear-gradient(158deg, var(--maroon) 0%, var(--maroon-900) 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -30px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255, 255, 255, .05);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gold-soft); color: var(--gold-soft);
  display: grid; place-items: center;
}
.brand-mark svg { width: 17px; height: 17px; }
.brand-name { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: #F3E7DC; }
.bell { position: relative; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; color: #fff; }
.bell svg { width: 18px; height: 18px; }
.bell .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-soft); }

.greeting { font-family: var(--serif); font-size: 29px; font-weight: 600; margin: 20px 0 4px; position: relative; z-index: 1; }
.flight-line { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .82); position: relative; z-index: 1; }
.rule { border: 0; height: 2px; width: 46px; background: var(--gold); margin: 16px 0; opacity: .9; }
.countdown { display: flex; align-items: flex-end; justify-content: space-between; position: relative; z-index: 1; }
.count { font-family: var(--serif); font-size: 42px; line-height: 1; margin: 6px 0 0; letter-spacing: -.02em; }
.count-right { text-align: right; }
.count-time { font-size: 17px; margin: 2px 0 0; font-weight: 600; }

.hero.compact { padding-bottom: 46px; }
.points { font-family: var(--serif); font-size: 42px; margin: 14px 0 6px; line-height: 1; }
.points small { font-size: 15px; font-family: var(--sans); margin-left: 6px; color: rgba(255, 255, 255, .8); }
.tier-badge {
  background: rgba(255, 255, 255, .14); border: 1px solid var(--gold-soft); color: var(--gold-soft);
  padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.tier-row { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .78); }
.progress { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .22); margin-top: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-soft), #fff); width: 0; transition: width .5s ease; }

/* ------------------------------------------------------------ agent card */
.agent-card {
  display: flex; align-items: center; gap: 12px; text-align: left;
  width: calc(100% - 36px); margin: -26px 18px 0; position: relative; z-index: 3;
  background: var(--card); border-radius: var(--r-md); padding: 13px 14px;
  box-shadow: var(--shadow-md);
}
.agent-avatar {
  position: relative; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #C79A4E, #8A1538);
  color: #fff; display: grid; place-items: center;
}
.agent-avatar svg { width: 17px; height: 17px; }
.agent-avatar.small { width: 30px; height: 30px; }
.agent-avatar .pulse {
  position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; border-radius: 50%;
  background: #4BB98A; border: 2px solid #fff;
}
.agent-body { display: block; flex: 1; min-width: 0; }
.agent-text { display: block; font-size: 13.5px; margin-top: 3px; color: var(--ink); }
.chev { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }

/* --------------------------------------------------------- quick actions */
.quick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.quick {
  background: var(--card); border-radius: var(--r-md); padding: 12px 6px 10px;
  display: grid; justify-items: center; gap: 7px; font-size: 11.5px; font-weight: 500;
  box-shadow: var(--shadow-sm); border: 1.5px solid transparent;
}
.quick.is-gold { border-color: var(--gold); color: var(--maroon-600); }
.quick-icon {
  width: 34px; height: 34px; border-radius: 50%; background: var(--maroon-tint);
  color: var(--maroon-600); display: grid; place-items: center;
}
.quick-icon svg { width: 17px; height: 17px; }
.quick.is-gold .quick-icon { background: #F7EFDD; color: var(--gold); }

/* ------------------------------------------------------------- time card */
.card {
  background: var(--card); border-radius: var(--r-md); padding: 15px 16px;
  box-shadow: var(--shadow-sm); margin-top: 14px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-head .section-label { margin-top: 0; }
.row-head { margin-top: 22px; }
.card .clock { width: 17px; height: 17px; color: var(--muted); }
.big { font-family: var(--serif); font-size: 31px; margin: 2px 0 0; display: inline-block; }
.big-sub { display: inline-block; margin: 0 0 0 8px; color: var(--muted); font-size: 13px; }
.tbar { display: flex; height: 9px; border-radius: 999px; overflow: hidden; margin: 13px 0 12px; background: var(--line); }
.tbar i { display: block; height: 100%; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.legend li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.legend b { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.legend span { color: var(--ink); }

.risk-note { margin: 10px 0 0; font-size: 12.5px; font-weight: 500; }
.risk-green { color: var(--green); }
.risk-amber { color: var(--amber); }
.risk-red { color: var(--red); }

/* ------------------------------------------------------------------ rail */
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 4px 18px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-card {
  flex: 0 0 172px; scroll-snap-align: start; background: var(--card);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); text-align: left;
}
.thumb { height: 96px; position: relative; display: grid; place-items: center; }
.thumb svg { width: 34px; height: 34px; color: rgba(255, 255, 255, .92); }
.thumb .price-pill {
  position: absolute; top: 8px; left: 8px; background: rgba(255, 255, 255, .92);
  color: var(--maroon-600); font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 999px;
}
.thumb .fits-pill {
  position: absolute; left: 8px; bottom: 8px; background: var(--gold); color: #fff;
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
}
.rail-body { padding: 10px 12px 12px; }
.place-name { font-family: var(--serif); font-size: 15.5px; font-weight: 600; margin: 0; }
.meta { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; margin-top: 5px; }
.meta svg { width: 13px; height: 13px; }
.meta .sep { opacity: .5; }

/* --------------------------------------------------------------- listing */
.place-card {
  background: var(--card); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.place-card .thumb { height: 128px; }
.place-main { padding: 12px 14px 0; display: flex; justify-content: space-between; gap: 10px; }
.rating { display: flex; align-items: center; gap: 3px; color: var(--gold); font-size: 12.5px; font-weight: 600; }
.rating svg { width: 13px; height: 13px; }
.place-foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); margin-top: 12px; padding: 10px 14px;
}
.btn {
  background: var(--maroon-600); color: #fff; border-radius: 999px; padding: 8px 15px;
  font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.btn svg { width: 14px; height: 14px; }
.btn.ghost { background: var(--maroon-tint); color: var(--maroon-600); }
.btn.block { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }
.btn[disabled] { opacity: .45; }
.tagline { padding: 0 14px; margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }

/* ----------------------------------------------------------------- chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 18px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.flat { flex-wrap: wrap; overflow: visible; padding: 0 0 4px; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; }
.chip.is-on { background: var(--maroon-600); color: #fff; border-color: var(--maroon-600); }
.chip.access.is-on { background: #FBF3E3; color: var(--gold); border-color: var(--gold); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-sm); padding: 10px; font-weight: 600; font-size: 13px; }
.seg button.is-on { background: var(--maroon-600); color: #fff; border-color: var(--maroon-600); }

.notice {
  display: flex; align-items: center; gap: 9px; background: #2B1F23; color: #F3EAE2;
  border-radius: var(--r-sm); padding: 10px 12px; font-size: 12.5px; margin: 14px 0 16px;
}
.notice svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--gold-soft); }

/* ------------------------------------------------------------------- map */
.topbar { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 18px 6px; }
.round { width: 38px; height: 38px; border-radius: 50%; background: var(--maroon-tint); color: var(--maroon-600); display: grid; place-items: center; }
.round svg { width: 18px; height: 18px; }
.searchrow { display: flex; gap: 9px; margin-top: 10px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: #F1EAE3; border-radius: var(--r-sm); padding: 0 12px; }
.search svg { width: 16px; height: 16px; color: var(--muted); }
.search input { flex: 1; border: 0; background: none; padding: 11px 0; outline: none; font-size: 13.5px; }
.filter-btn { width: 42px; border-radius: var(--r-sm); background: var(--maroon-600); color: #fff; display: grid; place-items: center; }
.filter-btn svg { width: 18px; height: 18px; }

.mapwrap {
  position: relative; border-radius: var(--r-md); overflow: hidden; background: #F0E7DC;
  aspect-ratio: 1 / .82; box-shadow: var(--shadow-sm);
}
#terminal-map { width: 100%; height: 100%; display: block; touch-action: none; }
.map-zoom { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; }
.map-zoom button { width: 32px; height: 32px; border-radius: 9px; background: #fff; box-shadow: var(--shadow-sm); font-size: 17px; color: var(--ink); }
.locate { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 10px; background: var(--maroon-900); color: #fff; display: grid; place-items: center; }
.locate svg { width: 17px; height: 17px; }

.near-row {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: var(--r-md); padding: 11px 13px; box-shadow: var(--shadow-sm); margin-bottom: 9px; width: 100%; text-align: left;
}
.near-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.near-icon svg { width: 17px; height: 17px; }
.near-main { flex: 1; min-width: 0; }
.near-main strong { font-family: var(--serif); font-weight: 600; font-size: 14.5px; display: block; }
.near-right { text-align: right; flex: 0 0 auto; }
.near-right b { color: var(--maroon-600); font-size: 13px; }
.near-right span { display: block; color: var(--muted); font-size: 11.5px; }

/* --------------------------------------------------------------- rewards */
.earn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: -30px; position: relative; z-index: 3; }
.earn {
  background: var(--card); border-radius: var(--r-md); padding: 14px; text-align: left;
  display: grid; gap: 6px; box-shadow: var(--shadow-md); border: 1.5px solid transparent;
}
.earn strong { font-size: 14px; }
.earn .muted { font-size: 11.5px; }
.earn.is-gold { border-color: var(--gold); }

.howto { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 6px 0 0; position: relative; }
.howto::before { content: ""; position: absolute; left: 12%; right: 12%; top: 15px; height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }
.howto li { display: grid; justify-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); position: relative; }
.howto i {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--maroon-600); color: #fff; font-style: normal; font-size: 12.5px; font-weight: 600;
}
.howto li:last-child i { background: var(--gold); }

.reward-row {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: var(--r-md); padding: 12px 13px; box-shadow: var(--shadow-sm); margin-bottom: 9px;
}
.reward-row.locked { opacity: .68; }
.reward-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--maroon-tint); color: var(--maroon-600); display: grid; place-items: center; flex: 0 0 auto; }
.reward-icon svg { width: 17px; height: 17px; }
.reward-main { flex: 1; min-width: 0; }
.reward-main strong { font-size: 14px; display: block; }
.reward-cost { color: var(--gold); font-size: 12px; font-weight: 600; text-align: right; display: block; margin-bottom: 5px; }
.pill { border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 600; background: var(--maroon-600); color: #fff; }
.pill.off { background: #EDE7E1; color: var(--muted); }

.act-row { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r-md); padding: 11px 13px; box-shadow: var(--shadow-sm); margin-bottom: 8px; }
.act-row .near-icon { background: var(--maroon-tint); color: var(--maroon-600); }
.act-row strong { display: block; font-size: 13.5px; font-weight: 500; }
.act-pts { font-weight: 700; font-size: 13px; }
.act-pts.plus { color: var(--green); }
.act-pts.minus { color: var(--red); }

.fact {
  background: linear-gradient(140deg, #2B1F23, #4A2130); color: #F4E9DF;
  border-radius: var(--r-md); padding: 14px; margin-bottom: 9px;
}
.fact strong { color: var(--gold-soft); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.fact p { margin: 7px 0 0; font-size: 13.5px; line-height: 1.5; }

/* --------------------------------------------------------------- profile */
.kv { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.plan-step { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.plan-step:last-child { border-bottom: 0; }
.plan-step i {
  width: 26px; height: 26px; border-radius: 50%; background: var(--maroon-tint); color: var(--maroon-600);
  display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; flex: 0 0 auto;
}
.plan-step strong { font-family: var(--serif); font-size: 15px; display: block; }
.plan-step .muted { font-size: 12.5px; }
.switch { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 13.5px; }
.switch input { width: 18px; height: 18px; accent-color: var(--maroon-600); }

/* ------------------------------------------------------------------ nav */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 40;
}
.tabbar button { display: grid; justify-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); }
.tabbar svg { width: 20px; height: 20px; }
.tabbar button.is-active { color: var(--maroon-600); font-weight: 600; }

/* --------------------------------------------------------------- sheets */
.scrim { position: fixed; inset: 0; background: rgba(35, 15, 22, .45); z-index: 50; animation: fade .18s ease; }
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; max-height: 88dvh; overflow-y: auto;
  background: var(--cream); border-radius: 22px 22px 0 0; z-index: 60;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  animation: rise .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes rise { from { transform: translate(-50%, 100%) } to { transform: translate(-50%, 0) } }
.sheet-grab { width: 38px; height: 4px; border-radius: 999px; background: #DCD1C8; margin: 9px auto 4px; }
.sheet-head { display: flex; align-items: center; gap: 11px; padding: 8px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-head > div { flex: 1; }
.sheet-head strong { font-size: 15px; }
.close { width: 30px; height: 30px; border-radius: 50%; background: #EFE7E0; display: grid; place-items: center; }
.close svg { width: 15px; height: 15px; }

.chatlog { padding: 14px 18px 4px; display: grid; gap: 10px; min-height: 160px; }
.bubble { max-width: 84%; padding: 10px 13px; border-radius: 15px; font-size: 13.5px; line-height: 1.5; }
.bubble.me { justify-self: end; background: var(--maroon-600); color: #fff; border-bottom-right-radius: 5px; }
.bubble.ai { justify-self: start; background: var(--card); box-shadow: var(--shadow-sm); border-bottom-left-radius: 5px; }
.bubble .tools { display: block; margin-top: 7px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s }
.typing i:nth-child(3) { animation-delay: .3s }
@keyframes blink { 0%, 60%, 100% { opacity: .25 } 30% { opacity: 1 } }
.suggests { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px; scrollbar-width: none; }
.suggests::-webkit-scrollbar { display: none; }
.composer { display: flex; gap: 9px; padding: 4px 18px 10px; }
.composer input { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 11px 15px; outline: none; font-size: 13.5px; }
.composer button { width: 42px; border-radius: 50%; background: var(--maroon-600); color: #fff; display: grid; place-items: center; }
.composer svg { width: 17px; height: 17px; }

.sheet .thumb { height: 150px; border-radius: var(--r-md); margin: 0 18px; }
.sheet h3 { font-family: var(--serif); font-size: 21px; margin: 14px 18px 2px; }
.sheet .body { padding: 0 18px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 14px 0; }
.detail-grid div { background: var(--card); border-radius: var(--r-sm); padding: 10px; text-align: center; box-shadow: var(--shadow-sm); }
.detail-grid b { display: block; font-family: var(--serif); font-size: 17px; }
.detail-grid span { font-size: 11px; color: var(--muted); }
.verdict { border-radius: var(--r-sm); padding: 11px 13px; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.verdict.ok { background: #E8F3ED; color: #1F5B43; }
.verdict.tight { background: #FBF0DC; color: #8A6218; }
.verdict.no { background: #FBE9E8; color: #8E2825; }
.scanbox { margin: 14px 18px; background: var(--card); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm); }
.scanbox input { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; margin: 10px 0 12px; outline: none; }
.scan-hint { font-size: 12px; color: var(--muted); }
.scan-codes { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: #2B1F23; color: #fff; padding: 11px 17px; border-radius: 999px;
  font-size: 13px; z-index: 80; box-shadow: var(--shadow-md); max-width: 360px; text-align: center;
  animation: rise .2s ease;
}

/* thumbnails: category-coded gradients instead of stock photography */
.t-cafe { background: linear-gradient(140deg, #8C5A2B, #5A3318); }
.t-karak { background: linear-gradient(140deg, #A9743B, #6B3F1C); }
.t-books { background: linear-gradient(140deg, #4F6B52, #2C3F2F); }
.t-dutyfree { background: linear-gradient(140deg, #8A1538, #4E0C20); }
.t-spa { background: linear-gradient(140deg, #6E6A8F, #3A3653); }
.t-dining { background: linear-gradient(140deg, #A3502F, #5E2716); }
.t-lounge { background: linear-gradient(140deg, #3F5A6B, #22333E); }
.t-art { background: linear-gradient(140deg, #C9A227, #8A6512); }
.t-garden { background: linear-gradient(140deg, #3F7A5E, #1F4634); }
.t-gallery { background: linear-gradient(140deg, #6B4F7A, #38263F); }
.t-juice { background: linear-gradient(140deg, #C77B3C, #8A4A1C); }
.t-quiet { background: linear-gradient(140deg, #6C7A86, #3A454E); }

@media (min-width: 900px) {
  body { display: grid; place-items: center; min-height: 100dvh; }
  .phone { border-radius: 26px; min-height: 92dvh; max-height: 940px; overflow-y: auto; }
  .tabbar { position: sticky; bottom: 0; transform: none; left: auto; margin: 0 auto; }
}

/* Competition product system: semantic surfaces, legible routes, and full-width layouts. */
:root {
  color-scheme: light;
  --canvas: #eee8e0; --surface: #fffdfa; --surface-raised: #fff;
  --surface-soft: #f5efe8; --foreground: #241d20; --secondary-text: #625a5b;
  --muted-text: #766d6f; --primary: #781530; --primary-strong: #591027;
  --accent: #a77930; --accent-text: #761b38; --success: #206f52;
  --warning: #875b13; --danger: #aa3035; --info: #275d86;
  --border: #e5dcd3; --input-border: #b7a9a3; --focus: #a77930;
  --shadow-surface: 0 2px 8px rgba(42,25,29,.045), 0 14px 32px rgba(42,25,29,.045);
  --shadow-overlay: 0 24px 60px rgba(34,15,20,.18);
  --radius-sm: 10px; --radius-md: 16px; --radius-lg: 24px;
  --motion-fast: 130ms; --motion-standard: 220ms;
  --ease-standard: cubic-bezier(.2,.7,.2,1);
  --budget-security: #514348; --budget-walk: #891837;
  --budget-free: #ae812f; --budget-buffer: #d5c3a0;
  --map-canvas: #efe8dc; --map-floor: #faf6ee; --map-grid: #d7c9b8;
  --map-gate: #861a39; --map-pin: #50434a; --map-culture: #a87b27; --map-you: #245da3;
  --maroon-900: var(--primary-strong); --maroon: var(--primary);
  --maroon-600: var(--primary); --maroon-tint: #f7e8ed;
  --gold: var(--accent); --gold-soft: #e5c989; --cream: var(--canvas);
  --card: var(--surface); --ink: var(--foreground); --muted: var(--muted-text);
  --line: var(--border); --green: var(--success); --red: var(--danger); --amber: var(--warning);
  --shadow-sm: var(--shadow-surface); --shadow-md: var(--shadow-overlay);
  --r-lg: var(--radius-lg); --r-md: var(--radius-md); --r-sm: var(--radius-sm);
  --sans: "DM Sans", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #171719; --surface: #262227; --surface-raised: #302a30;
  --surface-soft: #302b2c; --foreground: #f6efea; --secondary-text: #cbbfc0;
  --muted-text: #b7a9ad; --primary: #8f284a; --primary-strong: #551a32;
  --accent: #d1a451; --accent-text: #f3c1cf; --success: #82cead;
  --warning: #edc477; --danger: #f19c9c; --info: #91bfdf;
  --border: #473d43; --input-border: #73646a; --focus: #e4bc74;
  --shadow-surface: 0 2px 8px rgba(0,0,0,.12), 0 12px 30px rgba(0,0,0,.1);
  --shadow-overlay: 0 28px 64px rgba(0,0,0,.42);
  --budget-security: #9e8e96; --budget-walk: #bd6681;
  --budget-free: #d1a451; --budget-buffer: #726456;
  --map-canvas: #28272c; --map-floor: #333136; --map-grid: #504951;
  --map-gate: #c46986; --map-pin: #c0b2bb; --map-culture: #dcac54; --map-you: #86b7e8;
  --maroon-tint: #473039; --gold-soft: #e0be79;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --canvas: #171719; --surface: #262227; --surface-raised: #302a30;
    --surface-soft: #302b2c; --foreground: #f6efea; --secondary-text: #cbbfc0;
    --muted-text: #b7a9ad; --primary: #8f284a; --primary-strong: #551a32;
    --accent: #d1a451; --accent-text: #f3c1cf; --success: #82cead;
    --warning: #edc477; --danger: #f19c9c; --info: #91bfdf;
    --border: #473d43; --input-border: #73646a; --focus: #e4bc74;
    --shadow-surface: 0 2px 8px rgba(0,0,0,.12), 0 12px 30px rgba(0,0,0,.1);
    --shadow-overlay: 0 28px 64px rgba(0,0,0,.42);
    --budget-security: #9e8e96; --budget-walk: #bd6681;
    --budget-free: #d1a451; --budget-buffer: #726456;
    --map-canvas: #28272c; --map-floor: #333136; --map-grid: #504951;
    --map-gate: #c46986; --map-pin: #c0b2bb; --map-culture: #dcac54; --map-you: #86b7e8;
    --maroon-tint: #473039; --gold-soft: #e0be79;
  }
}
[hidden] { display: none !important; }
html,body { background: var(--canvas); color: var(--foreground); }
html { scroll-behavior: smooth; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button, input { min-height: 40px; }
button { transition: background-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast); }
button:not(:disabled):active { transform: scale(.975); }
button:disabled { cursor: not-allowed; opacity: .55; }
.phone { width:100%; max-width: 1380px; margin: 0 auto; background: var(--canvas); box-shadow: none; overflow: visible; min-height: 100dvh; }
.appbar { min-height: 66px; display:flex; align-items:center; gap:16px; padding:10px clamp(16px,4vw,38px); background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:45; }
.app-brand { display:flex; gap:10px; align-items:center; color:var(--primary); font-size:13px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; white-space:nowrap; }
.app-brand .brand-mark { width:32px; height:32px; border-color:var(--primary); color:var(--primary); }
.demo-badge { display:inline-flex; align-items:center; padding:5px 9px; border-radius:999px; border:1px solid var(--border); color:var(--secondary-text); font-size:11px; font-weight:600; white-space:nowrap; }
.demo-badge::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--warning); margin-inline-end:7px; }
.app-tools { display:flex; align-items:center; gap:5px; margin-inline-start:auto; }
.tool-button { min-width:40px; display:inline-flex; gap:6px; align-items:center; justify-content:center; border:1px solid var(--border); background:var(--surface); color:var(--foreground); border-radius:10px; padding:7px 10px; font-size:12px; font-weight:700; position:relative; }
.tool-button:hover,.round:hover,.chip:hover,.seg button:hover { background:var(--surface-soft); }
.tool-button svg { width:16px; height:16px; }
.tool-button .dot { position:absolute; top:4px; inset-inline-end:4px; width:7px; height:7px; border-radius:50%; background:var(--danger); }
.screen { padding-bottom:110px; }
.pad { padding-inline: clamp(16px,3.6vw,38px); }
.topbar { padding:32px clamp(16px,3.6vw,38px) 12px; }
.display { font-size:clamp(27px,3vw,36px); line-height:1.2; }
.section-label { color:var(--accent-text); letter-spacing:.12em; }
.link { color:var(--accent-text); min-height:36px; }
.link:hover { text-decoration:underline; }
.hero { border-radius:0 0 var(--radius-lg) var(--radius-lg); background:var(--primary-strong); padding:30px clamp(18px,4vw,42px) 50px; }
.hero::after { width:350px; height:350px; top:-185px; inset-inline-end:-80px; background: none; border:1px solid rgba(255,255,255,.12); }
.hero .greeting { font-size:clamp(30px,4.5vw,54px); line-height:1.1; margin-top:18px; max-width:740px; }
.hero .flight-line { max-width:760px; line-height:1.6; }
.hero .count { font-size:clamp(46px,5vw,68px); }
.hero .rule { margin:20px 0; }
.flight-status { color:#fff2d8; border:1px solid rgba(255,255,255,.4); border-radius:999px; padding:5px 11px; font-size:12px; }
.count-right { text-align:end; }
.agent-card { width:calc(100% - clamp(32px,7.2vw,76px)); margin-inline:clamp(16px,3.6vw,38px); margin-top:-25px; text-align:start; max-width:800px; padding:16px 18px; }
.agent-card:hover,.rail-card:hover,.near-row:hover,.earn:hover { box-shadow:var(--shadow-overlay); }
.agent-avatar { background:var(--primary); }
.agent-avatar .pulse { background:var(--success); }
.chev { margin-inline-start:auto; }
.quick-row { gap:12px; }
.quick { min-height:98px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); color:var(--foreground); }
.quick:hover { border-color:var(--accent); box-shadow:var(--shadow-surface); }
.quick-icon { background:var(--maroon-tint); color:var(--accent-text); }
.quick.is-gold { color:var(--accent-text); }
.card,.place-card,.near-row,.earn,.rail-card,.reward-row,.act-row { border:1px solid var(--border); box-shadow:var(--shadow-surface); }
.big { font-size:clamp(34px,3vw,44px); }
.big-sub { margin-inline-start:8px; color:var(--secondary-text); }
.legend { grid-template-columns:repeat(2,minmax(0,1fr)); }
.legend li { color:var(--secondary-text); }
.risk-green { color:var(--success); } .risk-amber { color:var(--warning); } .risk-red { color:var(--danger); }
.journey { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-surface); padding:22px clamp(18px,3vw,30px); margin-top:18px; }
.journey-intro .eyebrow { color:var(--accent-text); }
.journey h2 { font-family:var(--serif); font-size:clamp(23px,2.5vw,31px); margin:7px 0 3px; line-height:1.2; }
.journey-intro p { color:var(--secondary-text); margin:0 0 14px; font-size:13px; }
.journey-route { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:0; border-block:1px solid var(--border); padding:13px 0; }
.journey-stop { display:flex; gap:9px; align-items:center; min-width:0; padding:6px 10px 6px 0; }
.journey-stop + .journey-stop { border-inline-start:1px solid var(--border); padding-inline-start:12px; }
.journey-index { width:28px; height:28px; border-radius:50%; flex:0 0 auto; display:grid; place-items:center; background:var(--maroon-tint); color:var(--accent-text); font-weight:700; font-size:12px; }
.journey-index svg { width:17px; height:17px; }
.journey-stop div { min-width:0; display:grid; }
.journey-stop strong { font-size:13px; overflow-wrap:anywhere; }
.journey-stop small,.journey-stop span:not(.journey-index) { color:var(--muted-text); font-size:11px; }
.gate-stop .journey-index { background:var(--primary); color:white; }
.journey-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; font-size:12px; color:var(--secondary-text); }
.journey-empty { margin:0; color:var(--secondary-text); }
.rail { padding-inline:clamp(16px,3.6vw,38px); padding-bottom:18px; }
.thumb .fits-pill { background:var(--primary); }
.place-name,.near-main strong,.plan-step strong { font-family:var(--sans); font-weight:700; }
.meta { color:var(--secondary-text); }
.btn,.filter-btn,.pill { background:var(--primary); color:#fff; border-radius:10px; }
.btn:hover,.filter-btn:hover,.pill:hover { background:var(--primary-strong); }
.btn.ghost { background:var(--maroon-tint); color:var(--accent-text); }
.chip { background:var(--surface); border-color:var(--border); }
.chip.is-on { background:var(--primary); border-color:var(--primary); }
.chip.access.is-on { background:var(--maroon-tint); border-color:var(--accent); color:var(--accent-text); }
.seg button { background:var(--surface); }
.seg button.is-on { background:var(--primary); }
.notice { background:var(--surface-soft); color:var(--foreground); border-inline-start:3px solid var(--accent); }
.notice svg { color:var(--accent); }
.search { background:var(--surface); border:1px solid var(--input-border); }
.search:focus-within { outline:3px solid var(--focus); outline-offset:2px; }
.search input { color:var(--foreground); }
.mapwrap { background:var(--map-canvas); border:1px solid var(--border); }
.map-zoom { inset-inline-end:10px; right:auto; }
.map-zoom button { background:var(--surface); }
.locate { inset-inline-end:10px; right:auto; }
.earn-row { margin-top:-28px; }
.earn { text-align:start; }
.reward-row.locked { opacity:1; }
.pill.off { background:var(--surface-soft); color:var(--muted-text); }
.fact { background:var(--primary-strong); color:#fff7f0; }
.kv dd { text-align:end; overflow-wrap:anywhere; }
.tabbar { background:var(--surface); border-color:var(--border); backdrop-filter:none; }
.tabbar button { min-height:47px; }
.tabbar button.is-active { color:var(--accent-text); }
.sheet { background:var(--canvas); box-shadow:var(--shadow-overlay); }
.sheet-grab { background:var(--input-border); }
.close { background:var(--surface-soft); color:var(--foreground); }
.bubble.ai { background:var(--surface); }
.bubble.me { background:var(--primary); border-end-end-radius:5px; }
.composer input,.scanbox input { background:var(--surface); border:1px solid var(--input-border); color:var(--foreground); }
.composer input:focus-visible,.scanbox input:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }
.composer button { background:var(--primary); }
.detail-close { position:absolute; top:14px; inset-inline-end:20px; z-index:2; }
.scan-label { display:block; margin-top:14px; font-size:12px; font-weight:700; }
.scan-disclaimer { border-top:1px solid var(--border); padding-top:10px; color:var(--secondary-text); font-size:11px; }
.verdict.ok { background:color-mix(in srgb,var(--success) 14%,var(--surface)); color:var(--success); }
.verdict.tight { background:color-mix(in srgb,var(--warning) 14%,var(--surface)); color:var(--warning); }
.verdict.no { background:color-mix(in srgb,var(--danger) 14%,var(--surface)); color:var(--danger); }
.toast { background:var(--foreground); color:var(--surface); }
[dir="rtl"] body { font-family:"IBM Plex Sans Arabic",var(--sans); }
[dir="rtl"] .display,[dir="rtl"] .greeting,[dir="rtl"] .count,[dir="rtl"] .points,[dir="rtl"] .journey h2 { font-family:"IBM Plex Sans Arabic",sans-serif; letter-spacing:0; }
[dir="rtl"] .section-label,[dir="rtl"] .eyebrow { letter-spacing:0; }
[dir="rtl"] .chev { transform:rotate(180deg); }
[dir="rtl"] .near-row,[dir="rtl"] .rail-card,[dir="rtl"] .agent-card,[dir="rtl"] .earn { text-align:start; }
[dir="rtl"] .thumb .price-pill,[dir="rtl"] .thumb .fits-pill { left:auto; inset-inline-start:8px; }
[dir="rtl"] .bubble.me { border-radius:15px 15px 5px 15px; }
[dir="rtl"] .bubble.ai { border-radius:15px 15px 15px 5px; }
@media (max-width:599px) {
  .appbar { min-height:58px; gap:8px; padding-inline:14px; }
  .app-brand { font-size:10px; letter-spacing:.07em; gap:6px; }
  .app-brand .brand-mark { width:26px; height:26px; }
  .app-brand .brand-mark svg { width:14px; height:14px; }
  .demo-badge { display:none; }
  .app-tools { gap:4px; }
  .tool-button { min-width:36px; padding:6px; font-size:11px; }
  .tool-button svg { width:15px; height:15px; }
  #theme-label { display:none; }
  .hero { padding:22px 18px 45px; }
  .hero .greeting { font-size:32px; }
  .quick { font-size:11px; min-height:92px; padding:9px 3px; }
  .quick-row { gap:6px; }
  .journey-route { display:block; }
  .journey-stop + .journey-stop { border-inline-start:0; border-block-start:1px solid var(--border); padding-inline-start:0; }
  .journey-bottom { align-items:flex-start; }
  .journey-bottom .btn { white-space:nowrap; }
  .legend { gap:6px; }
  .legend li { font-size:11px; }
  .tabbar { max-width:none; }
  .sheet { max-width:100%; }
}
@media (max-width:350px) {
  .app-brand > span:last-child { display:none; }
  .quick-row { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .count { font-size:42px; }
  .countdown { gap:8px; }
  .count-right { font-size:12px; }
}
@media (min-width:700px) {
  body { display:block; }
  .phone { display:flex; flex-direction:column; min-height:100dvh; max-height:none; border-radius:0; overflow:visible; }
  .appbar { order:-2; }
  .tabbar { order:-1; position:sticky; top:66px; bottom:auto; left:auto; transform:none; width:100%; max-width:none; display:flex; gap:8px; padding:7px clamp(18px,3.6vw,38px); justify-content:flex-start; z-index:44; }
  .tabbar button { display:flex; align-items:center; gap:8px; padding:7px 14px; border-radius:9px; font-size:13px; }
  .tabbar svg { width:17px; height:17px; }
  .tabbar button.is-active { background:var(--maroon-tint); }
  .screen { width:100%; padding-bottom:48px; }
  .hero { margin:24px clamp(18px,3.6vw,38px) 0; border-radius:var(--radius-lg); }
  .agent-card { margin-top:-25px; }
  #screen-home .quick-row { grid-template-columns:repeat(4,minmax(0,1fr)); }
  #screen-home .journey { max-width:100%; }
  #home-rail { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); overflow:visible; }
  .rail-card { min-width:0; }
  #deals-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:16px; align-items:start; }
  .place-card { margin:0; }
  #screen-profile > .pad { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
  #screen-profile > .pad > .card { margin-top:0; }
  #screen-map > .pad:last-of-type { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(310px,.9fr); column-gap:22px; align-items:start; }
  #screen-map .mapwrap { grid-row:1 / 3; aspect-ratio:1; max-height:620px; }
  #screen-map .section-label { margin-top:0; }
  #screen-map #nearby { max-height:590px; overflow-y:auto; padding-inline-end:4px; }
  #screen-map .spacer { display:none; }
  .sheet { max-width:680px; }
  .hero.compact { padding-bottom:55px; }
  .earn-row { max-width:620px; }
  #rewards-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .reward-row { margin-bottom:0; }
  #facts-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
}
@media (min-width:1050px) {
  #screen-home { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(330px,.8fr); align-content:start; gap:0 18px; }
  #screen-home .hero { grid-column:1 / -1; }
  #screen-home .agent-card { grid-column:1 / -1; }
  #screen-home > .pad { grid-column:1; }
  #screen-home > .pad .journey { margin-top:18px; }
  #screen-home > .pad .row-head { margin-top:28px; }
  #home-rail { grid-column:2; grid-row:3; align-content:start; grid-template-columns:repeat(2,minmax(0,1fr)); padding-inline-start:0; padding-top:20px; }
  #screen-home > .pad:last-child { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}
.notification { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; margin:12px 0; }
.notification strong { display:block; color:var(--accent-text); }
.notification p { margin:5px 0; overflow-wrap:anywhere; }
.notification small { color:var(--muted-text); }
@media (max-width:599px) {
  .demo-badge { display:inline-flex; max-width:72px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 6px; }
  .app-brand > span:last-child { display:none; }
}
.connection-banner { margin:12px clamp(16px,3.6vw,38px) 0; padding:12px 14px; border:1px solid var(--warning); border-inline-start:4px solid var(--warning); border-radius:var(--radius-sm); color:var(--foreground); background:var(--surface); font-size:13px; }
#connection-banner:not([hidden]) + .agent-card { margin-top:12px; }
.app-brand { color:var(--accent-text); }
.app-brand .brand-mark { border-color:var(--accent-text); color:var(--accent-text); }
.reward-icon,.act-row .near-icon,.round,.near-right b { color:var(--accent-text); }
