:root {
  --canvas: #ffffff;
  --raised: #f6f6f8;
  --inset: #ececef;
  --ink: #16161b;
  --muted: #6b6b77;
  --faint: #9e9ea7;
  --rule: #e5e5e9;
  --lime: #d6ff3e;
  --blue: #007aff;
  --on-lime: #111115;
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--ink); font-family: var(--font); }
html[data-layout="phone"] body { background: var(--canvas); }
html[data-layout="desktop"] body {
  background:
    radial-gradient(900px 500px at 50% -10%, #2a2a32 0%, transparent 55%),
    #111115;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 20px 16px 28px;
}
.stage { width: 100%; display: grid; place-items: center; }
.phone-frame {
  position: relative;
  background: #0b0b0d;
}
.phone-screen {
  position: relative;
  background: var(--canvas);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.status-bar {
  display: none;
  flex: 0 0 auto;
  height: 48px;
  padding: 14px 22px 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.2px;
  align-items: center;
  justify-content: space-between;
}
.status-bar .dots { letter-spacing: 2px; font-size: 11px; opacity: 0.85; }
.island {
  display: none;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 34px;
  background: #0b0b0d;
  border-radius: 20px;
  z-index: 5;
}
.home-bar {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  width: 128px;
  height: 5px;
  background: #16161b;
  border-radius: 99px;
  opacity: 0.28;
  z-index: 5;
  pointer-events: none;
}
.layout-switch {
  display: none;
  margin-top: 14px;
  gap: 8px;
  justify-content: center;
}
.layout-switch button {
  border: 0;
  background: #2a2a30;
  color: #f5f5f7;
  font: 12px/1 var(--font);
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.layout-switch button.on { background: var(--lime); color: var(--on-lime); }

/* Real iPhone / small device: full-bleed native app */
html[data-layout="phone"] .phone-frame,
html[data-layout="phone"] .phone-screen {
  width: 100%;
  min-height: 100%;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
html[data-layout="phone"] .island,
html[data-layout="phone"] .home-bar,
html[data-layout="phone"] .layout-switch { display: none !important; }
html[data-layout="phone"] .status-bar {
  display: flex;
  height: calc(12px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 20px 0;
  font-size: 0;
}
html[data-layout="phone"] .status-bar span { display: none; }

/* Mac / desktop: iPhone app in a device frame */
html[data-layout="desktop"] .phone-frame {
  width: min(390px, calc(100vw - 32px));
  height: min(844px, calc(100vh - 72px));
  border-radius: 54px;
  padding: 11px;
  box-shadow:
    0 0 0 1px #2c2c32,
    0 30px 80px rgba(0,0,0,.45);
}
html[data-layout="desktop"] .phone-screen {
  height: 100%;
  border-radius: 44px;
}
html[data-layout="desktop"] .status-bar,
html[data-layout="desktop"] .island,
html[data-layout="desktop"] .home-bar,
html[data-layout="desktop"] .layout-switch { display: flex; }

#shell {
  flex: 1;
  min-height: 0;
  background: var(--canvas);
  position: relative;
  display: flex;
  flex-direction: column;
}
#view {
  padding: 12px 20px 96px;
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
h1.hero { font-size: 40px; font-weight: 800; letter-spacing: -1.4px; line-height: 0.95; margin: 18px 0 0; }
h1.hero .faint { color: var(--faint); display: block; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 1.4px; font-size: 13px; }
.brand img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.micro { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 14px 0; }
.muted { color: var(--muted); font-size: 14px; }
.faint { color: var(--faint); }
.card {
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 18px;
  overflow: hidden;
  margin: 14px 0;
  cursor: pointer;
}
.card img, .card .ph {
  width: 100%; height: 160px; object-fit: cover; display: block; background: var(--inset);
}
.card .meta { padding: 12px 14px 14px; }
.card .meta h3 { margin: 0 0 4px; font-size: 16px; }
.price { font-weight: 800; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 16px; overflow-x: auto; padding: 16px 0 4px; }
.chips button {
  border: 0; background: 0; font: inherit; font-size: 10px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint);
  padding: 0 0 6px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.chips button.on { color: var(--ink); border-bottom-color: var(--blue); }
.nav {
  position: sticky; bottom: 0; left: 0; right: 0;
  background: var(--raised); border-top: 1px solid var(--rule);
  display: flex; padding: 8px 4px 18px;
  flex: 0 0 auto;
}
.nav button {
  flex: 1; border: 0; background: 0; font: inherit; font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--faint); padding: 8px 0;
  cursor: pointer;
}
.nav button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--blue); }
.btn {
  display: block; width: 100%; border: 0; border-radius: 999px; padding: 16px;
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
  background: var(--lime); color: var(--on-lime);
}
.btn.ghost { background: var(--inset); }
.btn.blue { background: var(--blue); color: #fff; }
.field { width: 100%; border: 1px solid var(--rule); background: var(--inset); border-radius: 12px; padding: 12px; font: inherit; margin: 6px 0 12px; }
.hero-photo { width: 100%; height: 240px; object-fit: cover; background: var(--inset); }
.back { border: 0; background: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; padding: 0 0 12px; }
.bubble { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 14px; margin: 8px 0; }
.bubble.bot { background: var(--raised); }
.bubble.me { background: var(--lime); margin-left: auto; }
.chat { display: flex; flex-direction: column; }
.preset { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.preset button { border: 0; background: var(--inset); border-radius: 999px; padding: 8px 10px; font: 11px/1 var(--font); white-space: nowrap; cursor: pointer; }
.n1 {
  position: absolute; right: 16px; bottom: 78px;
  width: 56px; height: 56px; border-radius: 50%; background: var(--lime);
  border: 0; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,.12);
  font-weight: 900; font-size: 12px; z-index: 6;
}
html[data-layout="phone"] .n1 {
  position: fixed;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}
.modal {
  position: absolute; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: flex-end; justify-content: center; z-index: 20;
}
html[data-layout="phone"] .modal { position: fixed; }
.sheet {
  width: 100%; background: var(--canvas);
  border-radius: 22px 22px 0 0; padding: 16px 16px 28px;
  max-height: 82%; overflow: auto;
}
.hidden { display: none !important; }
.error { color: #c0392b; font-size: 13px; }
.city { display: inline-block; margin: 0 16px 10px 0; cursor: pointer; }
.city b { display: block; }
.badge { display: inline-block; background: var(--lime); color: var(--on-lime); font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 4px 8px; border-radius: 999px; }