/* Rooms web kit: one look for /rooms, /rooms/<slug>, /rooms/post, /v/<token>.
   Tokens mirror web/start.html (src/lib/theme.ts dark + src/lib/fonts.ts).
   Do not invent values. Built for 360px phones first: 16px gutters,
   one shrinking child per row, nothing wider than the frame. */
:root{
  --bg:#0A0A0F; --bg-deep:#050508; --surface:#13121A; --surface-el:#1A1922;
  --honey:#D4A84B; --honey-light:#E8C171; --honey-dim:rgba(212,168,75,.12);
  --text:#F5F4F1; --text-2:#B8B5AD; --text-muted:#9E9B93;
  --negative:#FF3B30;
  --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.14);
  --glass:rgba(5,5,8,.35);
  --cashtag:#7FA8D9;
  --sp-xs:4px; --sp-sm:8px; --sp-ms:12px; --sp-md:16px; --sp-lg:24px; --sp-xl:40px;
  --r-sm:6px; --r-md:12px; --r-lg:20px;
  --display:'Inter',-apple-system,'Segoe UI',Roboto,sans-serif;
  --body:'Manrope',-apple-system,'Segoe UI',Roboto,sans-serif;
  color-scheme:dark;
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{background:var(--bg);color:var(--text);font-family:var(--body);overflow-x:hidden}
body{min-height:100vh;min-height:100dvh;font-size:16px;line-height:1.45;
  background:radial-gradient(70% 320px at 50% 0%, rgba(212,168,75,.10), rgba(212,168,75,0) 70%), var(--bg);background-repeat:no-repeat}
a{color:inherit}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
[hidden]{display:none!important}

.wrap{width:100%;max-width:480px;margin:0 auto;
  padding:var(--sp-md) max(var(--sp-md),env(safe-area-inset-right)) 140px max(var(--sp-md),env(safe-area-inset-left))}
@media (min-width:420px){.wrap{padding-left:var(--sp-lg);padding-right:var(--sp-lg)}}

/* Top: the quiet brand mark, a door home. */
.top{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-md);min-height:44px;margin-bottom:var(--sp-md)}
/* A small door in the top bar (rooms feed: + Post). */
.door{display:inline-flex;align-items:center;gap:var(--sp-xs);min-height:44px;flex:0 0 auto;font-weight:600;font-size:16px;color:var(--text);text-decoration:none}
.door:active{opacity:.7}
.ic{display:block;flex:0 0 auto}
/* An icon in a round well (visual first: the zip question, empty states, promises). */
.disc{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:999px;background:var(--surface);border:1px solid var(--border-strong);color:var(--text);flex:0 0 auto}
.disc.sm{width:40px;height:40px}
.brand{font-family:var(--display);font-weight:700;font-size:14px;letter-spacing:2px;color:var(--text-muted);text-transform:uppercase;text-decoration:none}
.brand b{color:var(--honey);font-weight:700}
.back{display:inline-flex;align-items:center;gap:var(--sp-xs);min-height:44px;margin:-8px 0 var(--sp-sm);
  font-weight:600;font-size:15px;color:var(--text-2);text-decoration:none;max-width:100%}
.back svg{flex:0 0 auto}
.back span{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

h1{font-family:var(--display);font-weight:700;font-size:28px;line-height:1.15;letter-spacing:-.4px;overflow-wrap:anywhere}

/* Buttons: one filled honey main button per page. */
.btn{display:flex;align-items:center;justify-content:center;gap:var(--sp-sm);width:100%;min-height:52px;padding:0 var(--sp-md);
  border-radius:var(--r-md);font-family:var(--body);font-weight:700;font-size:18px;text-decoration:none;cursor:pointer;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.btn:active{opacity:.8}
.btn.pri{background:var(--honey);color:var(--bg-deep);border:1.5px solid var(--honey-light);box-shadow:0 3px 8px rgba(212,168,75,.3)}
.btn.sec{background:var(--surface);color:var(--text);border:1px solid var(--border-strong);font-weight:600;font-size:16px;min-height:48px}
.btn:disabled{background:var(--surface-el);color:var(--text-muted);border-color:var(--border);box-shadow:none;cursor:default}
.link{display:inline-flex;align-items:center;min-height:44px;font-weight:600;font-size:15px;color:var(--text-2);text-decoration:underline;text-underline-offset:3px}

/* The main button rides the bottom edge (the thumb), over a fade. */
.dock{position:fixed;left:0;right:0;bottom:0;z-index:5;
  padding:var(--sp-lg) max(var(--sp-md),env(safe-area-inset-right)) calc(var(--sp-md) + env(safe-area-inset-bottom)) max(var(--sp-md),env(safe-area-inset-left));
  background:linear-gradient(to bottom, rgba(10,10,15,0), var(--bg) 40%)}
.dock .in{max-width:432px;margin:0 auto}

/* Filter pills (header): each one a door into one question. */
.pills{display:flex;gap:var(--sp-sm);margin-top:var(--sp-md)}
.pills .pill{flex:0 1 auto;min-width:0}
.pills.two .pill{flex:1 1 0;justify-content:center}
.pill{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 var(--sp-ms) 0 14px;border:1px solid var(--border-strong);
  border-radius:999px;background:var(--surface);font-weight:600;font-size:15px;color:var(--text);max-width:100%}
.pill span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill svg{flex:0 0 auto;color:var(--text-muted)}
.pill.on{border-color:rgba(212,168,75,.45)}
@media (max-width:380px){.pill{padding:0 10px 0 12px;font-size:14px;gap:4px}}

/* Room card (src/components/rooms/RoomCard.tsx): the whole card is the door. */
.list{display:flex;flex-direction:column;gap:var(--sp-ms);margin-top:var(--sp-lg)}
.card{display:flex;flex-direction:column;gap:var(--sp-ms);padding:var(--sp-md);background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-md);text-decoration:none;color:var(--text)}
.card:active{opacity:.7}
@media (hover:hover){.card:hover{border-color:var(--border-strong)}}
.row{display:flex;align-items:baseline;gap:var(--sp-sm)}
.row .grow{flex:1 1 auto;min-width:0}
.row .hold{flex:0 0 auto}
.price{font-family:var(--display);font-weight:700;font-size:28px;letter-spacing:-.4px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.price .per{font-family:var(--body);font-weight:500;font-size:16px;color:var(--text-muted);letter-spacing:0}
.muted{color:var(--text-muted);font-size:15px;font-weight:500}
.area{font-weight:600;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.facts{display:flex;flex-direction:column;gap:var(--sp-sm);font-size:16px;font-weight:500}
.fact{display:flex;align-items:center;gap:var(--sp-sm);min-width:0}
.fact .ic{color:var(--text-muted)}
.fact span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* The place chip: ONE door to Change area (reads as a card, full width taps). */
.placechip{display:flex;align-items:center;gap:var(--sp-ms);width:100%;min-height:64px;margin-top:var(--sp-md);padding:var(--sp-ms) var(--sp-md);
  background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--r-lg);text-align:left}
.placechip:active{opacity:.7}
.placechip .grow{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.placechip .hold{flex:0 0 auto}
.placechip .pl1{font-family:var(--display);font-weight:700;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.placechip .pl2{color:var(--text-muted);font-size:15px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.placechip .chg{font-weight:600;font-size:16px}
/* One line under the filters: the door is the words, not the width beside them. */
.trust{display:inline-flex;align-items:center;gap:var(--sp-sm);max-width:100%;min-height:44px;margin-top:var(--sp-sm);font-weight:600;font-size:16px;color:var(--text)}
.trust span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trust .ic:last-child{color:var(--text-muted)}

/* The zip said back: one reserved slot, two lines tall, so nothing below moves. */
.echo{display:flex;align-items:center;gap:var(--sp-sm);min-height:48px;margin-top:var(--sp-xs);font-size:16px}
.echo b{font-family:var(--display);font-weight:700;font-size:18px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.echo .bad{color:var(--negative);font-weight:500;text-align:left}
.echo .retry{text-decoration:underline;text-underline-offset:3px}
#ask .disc{margin-bottom:var(--sp-md)}

/* House rules: outline chips (RuleChips.tsx), wrap, never overflow. */
.chips{display:flex;flex-wrap:wrap;gap:var(--sp-sm)}
.chip{border:1px solid var(--border-strong);border-radius:999px;padding:4px var(--sp-ms);font-weight:500;font-size:14px;
  max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chips .tail{display:inline-flex;align-items:center;gap:var(--sp-xs);max-width:100%;min-width:0}
.chips .tail .chip:first-child{min-width:0}
.chip.more{border-color:transparent;padding:4px var(--sp-xs);color:var(--text-muted)}

/* Skeletons: the final layout, filled in place. */
.sk{display:block;background:var(--surface-el);border-radius:var(--r-sm);animation:skp 1.4s ease-in-out infinite}
.sk.pill-sk{border-radius:999px}
@keyframes skp{50%{opacity:.5}}
@media (prefers-reduced-motion:reduce){.sk{animation:none}}

/* Quiet states. */
.state{margin-top:var(--sp-xl);text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--sp-sm)}
.state p{font-size:17px;color:var(--text);max-width:30ch}
.state p.sub{color:var(--text-muted);font-size:16px}
.state .btn{margin-top:var(--sp-sm)}
#feed .state p{font-family:var(--display);font-weight:700;font-size:18px}
.state .disc{margin-bottom:var(--sp-xs)}

/* Fields */
.field{display:flex;align-items:center;margin-top:var(--sp-lg);background:var(--surface);border:1.5px solid var(--border-strong);border-radius:var(--r-md);padding:0 var(--sp-md);min-height:60px}
.field:focus-within{border-color:var(--honey)}
.field.bad{border-color:var(--negative)}
.field input{flex:1;min-width:0;border:0;background:transparent;outline:0;color:var(--text);font-family:var(--display);font-weight:600;font-size:24px;letter-spacing:2px}
.field input::placeholder{color:var(--text-muted);font-weight:500;letter-spacing:0;font-size:20px}
.note{min-height:1.4em;margin-top:var(--sp-sm);font-size:15px;color:var(--negative)}

/* Footer: the promise + credits. */
.foot{margin-top:var(--sp-xl);padding-top:var(--sp-lg);border-top:1px solid var(--border);display:flex;flex-direction:column;gap:var(--sp-sm)}
.foot p{font-size:14px;color:var(--text-muted);line-height:1.5}
.foot .credit{font-size:13px}
.foot .credit a{color:var(--text-muted)}

/* Sheet (one question): scrim + bottom sheet. */
.scrim{position:fixed;inset:0;z-index:20;background:rgba(0,0,0,.6);display:flex;align-items:flex-end;justify-content:center;opacity:0;transition:opacity .18s}
.scrim.open{opacity:1}
.sheet{width:100%;max-width:480px;background:var(--surface);border:1px solid var(--border);border-bottom:0;border-radius:var(--r-lg) var(--r-lg) 0 0;
  padding:var(--sp-sm) var(--sp-md) calc(var(--sp-lg) + env(safe-area-inset-bottom));transform:translateY(24px);transition:transform .18s}
.scrim.open .sheet{transform:none}
.sheet .handle{width:36px;height:5px;border-radius:999px;background:var(--border-strong);margin:0 auto var(--sp-md)}
.sheet h2{font-family:var(--display);font-weight:700;font-size:22px;margin-bottom:var(--sp-md)}
.opts{display:flex;flex-wrap:wrap;gap:var(--sp-sm)}
.opt{min-height:44px;padding:0 var(--sp-md);border-radius:999px;border:1px solid var(--border-strong);background:var(--bg);font-weight:600;font-size:16px}
.opt.on{background:var(--honey);border-color:var(--honey-light);color:var(--bg-deep)}
/* Two per row (prices, lengths) or four across (distances): full-size labels at 312px. */
.opts.two,.opts.four{display:grid;grid-template-columns:1fr 1fr}
.opts.four{grid-template-columns:repeat(4,1fr)}
.opts.two .opt,.opts.four .opt{padding:0 var(--sp-xs);white-space:nowrap}
.sheet .field{margin-top:0}
.sheet .lbl{margin-top:var(--sp-md);margin-bottom:var(--sp-sm);font-weight:600;font-size:16px}
.promise{list-style:none;display:flex;flex-direction:column;gap:var(--sp-md)}
.promise li{display:flex;align-items:center;gap:var(--sp-ms);font-weight:600;font-size:16px}

.seal{display:inline-block;vertical-align:-2px;flex:0 0 auto}
