/* ═══ v2 depth layer: light, bevel, elevation, motion. Brand kit only. ═══
   Rules from the research brief: blue shadows only; blur only on the six
   top-level panels (never inside a tilting parent); tilt only on cards,
   which carry no blur; motion is transform/opacity only. */

@property --mx { syntax:'<length>'; inherits:false; initial-value:-999px }
@property --my { syntax:'<length>'; inherits:false; initial-value:-999px }

:root{
  --sh:58,86,130;
  --e1:0 1px 2px rgba(var(--sh),.10), 0 4px 12px rgba(var(--sh),.12);
  --e2:0 2px 4px rgba(var(--sh),.10), 0 14px 34px -10px rgba(var(--sh),.26), 0 40px 80px -40px rgba(var(--sh),.22);
  --e3:0 3px 6px rgba(var(--sh),.12), 0 26px 60px -14px rgba(var(--sh),.34), 0 60px 120px -50px rgba(var(--sh),.30);
  --bevel:inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(var(--sh),.10), inset 0 0 0 1px rgba(255,255,255,.35);
  --ease-out:cubic-bezier(.16,1,.3,1);
}

/* The live sky sits behind everything; body gradient remains the fallback. */
#sky{position:fixed;inset:0;width:100vw;height:100vh;z-index:-1;pointer-events:none}

/* ── Glass panels: sheen + bevel + layered elevation + cursor light ────── */
.glass{
  background:
    linear-gradient(140deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 34%),
    linear-gradient(320deg, rgba(232,194,106,.07) 0%, rgba(232,194,106,0) 30%),
    rgba(255,255,255,.58);
  box-shadow:var(--bevel), var(--e2);
  backdrop-filter:blur(16px) saturate(1.35); -webkit-backdrop-filter:blur(16px) saturate(1.35);
}
.centre.glass{box-shadow:var(--bevel), var(--e3); background:
    radial-gradient(120% 70% at 50% -10%, rgba(255,253,244,.85), rgba(255,255,255,0) 60%),
    linear-gradient(140deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 34%),
    rgba(255,255,255,.56)}
.glass::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:radial-gradient(260px circle at var(--mx) var(--my), rgba(255,255,255,.55), rgba(255,250,232,.18) 35%, transparent 65%);
  opacity:0; transition:opacity .35s;
}
.glass.lit::after{opacity:1}
.glass > *{position:relative;z-index:1}
.glass.hair::before{z-index:2;height:1.5px;box-shadow:0 0 10px 1px rgba(246,213,115,.55)}

/* ── Raised controls ───────────────────────────────────────────────────── */
.btn-gold{
  position:relative; overflow:hidden;
  background:linear-gradient(180deg,#fbe39a 0%, var(--gold-hi) 30%, var(--luna-btn) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), inset 0 -2px 0 rgba(122,79,14,.22),
             0 1px 1px rgba(122,79,14,.25), 0 6px 16px -6px rgba(184,133,46,.75), 0 14px 24px -14px rgba(var(--sh),.5);
  transition:transform .18s var(--ease-out), box-shadow .18s, filter .18s;
  translate:var(--magx,0) var(--magy,0);
}
.btn-gold::after{ /* travelling glint */
  content:""; position:absolute; top:0; bottom:0; width:40%; left:-60%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent);
  transform:skewX(-18deg); pointer-events:none;
}
.btn-gold:hover::after{animation:glint .9s var(--ease-out)}
@keyframes glint{to{left:130%}}
.btn-gold:hover{transform:translateY(-1px)}
.btn-gold:active{transform:translateY(1px) scale(.98);box-shadow:inset 0 2px 4px rgba(122,79,14,.3), 0 2px 6px -2px rgba(184,133,46,.6)}
.chip,.goal,.tool,.city,.pillar,.store,.mode,.toggle,.lang,.row select,.region-sel{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(var(--sh),.08), 0 3px 8px -4px rgba(var(--sh),.18);
  transition:transform .18s var(--ease-out), box-shadow .18s, background .18s;
}
.goal:hover,.tool:hover,.city:hover,.pillar:hover,.chip:hover{transform:translateY(-1px);box-shadow:inset 0 1px 0 #fff, 0 2px 4px rgba(var(--sh),.10), 0 8px 18px -8px rgba(var(--sh),.32)}
.goal:active,.tool:active,.city:active,.chip:active{transform:translateY(0) scale(.98)}
.tool .ic,.pillar .ic{box-shadow:inset 0 1px 0 #fff, 0 2px 5px -2px rgba(184,133,46,.5)}
.pillar .ic{box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 3px 8px -3px rgba(11,16,38,.45)}
.search{box-shadow:inset 0 2px 4px rgba(var(--sh),.08), inset 0 -1px 0 #fff, 0 1px 0 rgba(255,255,255,.8)}
.composer{box-shadow:inset 0 2px 4px rgba(var(--sh),.06), 0 1px 0 #fff, 0 10px 30px -12px rgba(184,133,46,.55), 0 0 0 4px rgba(246,213,115,.10)}
.composer:focus-within{box-shadow:inset 0 2px 4px rgba(var(--sh),.06), 0 10px 30px -12px rgba(184,133,46,.7), 0 0 0 4px rgba(246,213,115,.28)}
/* the search field had outline:none and no ring at all: the composer's ring + a 3:1 gold edge while typing */
.search:has(input:focus){border-color:var(--gold-core);box-shadow:inset 0 2px 4px rgba(var(--sh),.06), 0 10px 30px -12px rgba(184,133,46,.7), 0 0 0 4px rgba(246,213,115,.28)}
/* the Search all button (#paletteBtn) is styled with the palette: css/palette.css */

/* ── Headline: gold that moves ─────────────────────────────────────────── */
.greet em{background-size:200% 100%;animation:goldflow 7s ease-in-out infinite}
@keyframes goldflow{50%{background-position:100% 0}}
.brand{background-size:200% 100%;animation:goldflow 11s ease-in-out infinite}

/* ── Orb sits on a soft pedestal of light ──────────────────────────────── */
.luna-head{position:relative}
.orb{isolation:isolate}
.orb canvas{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none}

/* ── Centre stage: conversation | globe ────────────────────────────────── */
.stage{display:grid;grid-template-columns:minmax(0,1fr) clamp(200px,36%,430px);min-height:0}
.stage .thread{min-height:0}
.globe-wrap{position:relative;min-height:0;margin:0 14px 6px 0}
.globe-wrap::before{ /* pedestal glow */
  content:"";position:absolute;left:12%;right:12%;bottom:4%;height:16%;border-radius:50%;
  background:radial-gradient(closest-side, rgba(var(--sh),.22), transparent);filter:blur(6px);
}
#globe{position:absolute;inset:0 0 34px 0}
.globe-cap{position:absolute;left:0;right:0;bottom:4px;text-align:center;line-height:1.2}
.globe-cap b{display:block;font-family:var(--serif);font-size:16px;color:var(--ink)}
.globe-cap span{font-size:10.5px;color:var(--muted)}

/* ── Streamed tokens ───────────────────────────────────────────────────── */
.tok{animation:tokIn .28s var(--ease-out) both}
@keyframes tokIn{from{opacity:.15;filter:blur(2px)}}
.msg.luna{box-shadow:inset 0 1px 0 #fff, 0 2px 4px rgba(var(--sh),.08), 0 10px 24px -14px rgba(var(--sh),.4)}
.msg.user{box-shadow:inset 0 1px 0 rgba(255,255,255,.15), 0 8px 18px -10px rgba(11,16,38,.55)}

/* ── Cards: 3D tilt, glare, cover-flow arc ─────────────────────────────── */
.strip{perspective:1400px;perspective-origin:50% 40%}
.card.tiltable{
  --rx:0; --ry:0; --cr:0deg; --cz:0px;
  transform-style:preserve-3d;
  transform:translateZ(var(--cz)) rotateY(calc(var(--cr) + var(--rx) * 9deg)) rotateX(calc(var(--ry) * -9deg));
  transition:box-shadow .25s, transform .12s linear;
  box-shadow:inset 0 1px 0 #fff, var(--e1), 0 18px 30px -18px rgba(var(--sh),.45);
  position:relative; cursor:pointer;
}
.card.tiltable:hover{transform:translateZ(calc(var(--cz) + 24px)) rotateY(calc(var(--cr) + var(--rx) * 9deg)) rotateX(calc(var(--ry) * -9deg));
  box-shadow:inset 0 1px 0 #fff, 0 4px 8px rgba(var(--sh),.12), 0 30px 50px -20px rgba(var(--sh),.5)}
.card.tiltable::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(calc(var(--ga,135) * 1deg), rgba(255,255,255,.55), rgba(255,255,255,0) 45%);
  opacity:0;transition:opacity .25s;mix-blend-mode:soft-light;
}
.card.tiltable:hover::after{opacity:1}
.card.tiltable:hover{transform-origin:center}
.prop .img{transform:translateZ(0);background-size:112%;background-position:calc(50% + var(--rx) * 6%) calc(50% + var(--ry) * 6%);transition:background-position .12s linear}
.prop .price{text-shadow:0 1px 0 #fff}
.prop .qa{position:absolute;right:8px;top:8px;display:flex;gap:5px;opacity:0;transform:translateY(-4px);transition:.2s var(--ease-out)}
.prop:hover .qa,.prop:focus-within .qa{opacity:1;transform:none}
.prop .qa button{width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,.92);color:var(--gold-text);font-size:12px;font-weight:700;
  box-shadow:inset 0 1px 0 #fff, 0 3px 8px -2px rgba(var(--sh),.45)}
.prop .qa button:hover{background:#fff;transform:scale(1.08)}
.person img{box-shadow:0 0 0 2px rgba(232,194,106,.7), 0 8px 16px -6px rgba(var(--sh),.55)}

/* ── Tabs as a raised segmented rail ───────────────────────────────────── */
.tab[aria-selected="true"]{background:linear-gradient(180deg,#1b2650,var(--ink));box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 6px 14px -6px rgba(11,16,38,.6)}

/* ── Sheets: property detail ───────────────────────────────────────────── */
.sheet{box-shadow:inset 0 1px 0 #fff, var(--e3); animation:sheetIn .35s var(--ease-out)}
@keyframes sheetIn{from{opacity:0;transform:perspective(900px) translateY(18px) rotateX(6deg) scale(.97)}}
.prop-sheet{display:grid;grid-template-columns:1.25fr 1fr;gap:22px;align-items:stretch}
.ps-img{border-radius:var(--r);background:#cfdcec center/cover;min-height:340px;box-shadow:0 20px 40px -18px rgba(var(--sh),.55)}
.ps-body h2{margin-top:8px}
.ps-price{font-family:var(--serif);font-weight:700;font-size:34px;color:var(--ink);margin:4px 0 12px}
.ps-facts{display:flex;gap:10px;margin-bottom:16px}
.ps-facts div{flex:1;text-align:center;padding:10px;border-radius:var(--r);background:var(--pale);font-size:11px;color:var(--muted);box-shadow:inset 0 1px 0 #fff}
.ps-facts b{display:block;font-family:var(--serif);font-size:24px;color:var(--ink)}
.ps-actions{display:flex;flex-wrap:wrap;gap:8px}
.ps-actions .btn-gold{height:38px}
.ps-actions .ghost{height:38px;padding:0 14px;border-radius:999px;font-weight:600;font-size:12.5px;color:var(--ink);background:#fff;border:1px solid var(--hair);box-shadow:inset 0 1px 0 #fff, 0 3px 8px -4px rgba(var(--sh),.3)}
.ps-actions .ghost:hover{border-color:var(--gold);color:var(--gold-text)}
.ps-note{margin-top:14px;font-size:11.5px;color:var(--muted)}
@media (max-width:720px){.prop-sheet{grid-template-columns:1fr}.ps-img{min-height:200px}}

/* ── Entrance choreography (head script adds .pre; fx.js plays it) ─────── */
html.pre .app > *{opacity:0;transform:perspective(1200px) translate3d(0,26px,-70px) rotateX(9deg)}
.app > *.enter{transition:opacity .75s var(--ease-out), transform .9s var(--ease-out)}
.stat b{font-variant-numeric:lining-nums tabular-nums}

/* ── Quality tiers & motion preferences ────────────────────────────────── */
html[data-quality="static"] .greet em, html[data-quality="static"] .brand,
html[data-quality="low"] .greet em, html[data-quality="low"] .brand{animation:none}
html[data-quality="static"] .card.tiltable{transform:none!important}
@media (prefers-reduced-motion:reduce){
  .greet em,.brand,.tok,.sheet{animation:none!important}
  .card.tiltable,.card.tiltable:hover{transform:none!important}
  html.pre .app > *{opacity:1;transform:none}
}

/* ── Layout fit for the new stage on short / narrow screens ────────────── */
@media (max-height:760px){ .globe-cap span{display:none} #globe{bottom:22px} }
@media (max-width:1180px), (max-height:640px){ .stage{grid-template-columns:1fr 280px;min-height:300px} }
@media (max-width:720px){ .stage{grid-template-columns:1fr;grid-template-rows:260px 300px} .globe-wrap{margin:0 12px} }

/* the WebGL orb draws its own halo */
.orb--gl::after{display:none}

/* polish after the 1920 review */
.mortgage .btn-gold{flex:none}
.hs-short{display:none}
@media (max-height:920px){ .hs-short{display:inline} }
@media (max-height:1040px){ .pillar small{display:none} .pillar{align-items:center;padding:6px 9px} }
.strip{gap:14px}

/* ═══ v3 layer ════════════════════════════════════════════════════════════ */
/* 1. Globe as centrepiece: it spans chat + composer + goals on the right. */
.centre{grid-template-columns:minmax(0,1fr) clamp(220px,36%,460px)}
.luna-head,.luna-foot{grid-column:1 / -1}
.stage{display:contents}
.stage .thread{grid-column:1;grid-row:2}
.globe-wrap{grid-column:2;grid-row:2 / 5;margin:0 16px 4px 0}
.composer{grid-column:1;grid-row:3;margin-right:10px}
.goals{grid-column:1;grid-row:4;padding-right:10px}
.globe-wrap:focus-visible{outline:2px solid var(--gold-core);outline-offset:-2px;border-radius:var(--r-lg)}

/* 2. Right column fits without inner scroll on 800–1040 px tall screens. */
@media (max-height:1040px){
  .right .hs{height:58px}
  .guide small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .right .faces{margin-top:6px}
}
@media (max-height:920px){ .right .faces span{display:none} .dots{margin-top:4px} }

/* 3. Phone + tablet: columns may shrink below their widest row (the 1,436 px bug). */
@media (max-width:1180px), (max-height:640px){
  .app{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .app > *{min-width:0}
  .centre{grid-template-columns:minmax(0,1fr) 260px}
}
@media (max-width:720px){
  .app{grid-template-columns:minmax(0,1fr)}
  .top{gap:6px}.brand{font-size:21px}
  .search{min-width:0}
  .mode button{padding:5px 7px}
  .actions{flex-wrap:wrap;margin-left:0}
  .centre{grid-template-columns:minmax(0,1fr)}
  .stage .thread,.globe-wrap,.composer,.goals{grid-column:1;grid-row:auto}
  .globe-wrap{height:280px;margin:6px 12px}
  .composer{margin:0 14px}
  .luna-foot{flex-wrap:wrap}
  .foot{justify-content:center;text-align:center}
  .foot .proto{margin-left:0}
}

/* 4. Luna spotlight: the homes she just found glow in the dock. */
.card.spot{animation:spot 2.4s var(--ease-out)}
@keyframes spot{
  0%{box-shadow:0 0 0 0 rgba(246,213,115,0), var(--e1)}
  25%{box-shadow:0 0 0 3px rgba(246,213,115,.95), 0 0 34px 6px rgba(232,194,106,.55), var(--e2)}
  100%{box-shadow:0 0 0 0 rgba(246,213,115,0), var(--e1)}
}

/* 5. Debug overlay (?debug=1): live fps + tier, to check on a real GPU. */
.hh-debug{position:fixed;right:12px;top:72px;z-index:70;font:600 11px/1.3 ui-monospace,Menlo,monospace;color:var(--ink);
  background:rgba(255,255,255,.9);border:1px solid var(--hair);border-radius:10px;padding:6px 9px;box-shadow:var(--e2);pointer-events:none}
.hh-debug b{color:var(--gold-text)}
.luna-head{grid-row:1}.luna-foot{grid-row:5}
@media (max-width:720px){ .luna-head,.luna-foot{grid-row:auto} }
@media (max-width:720px){
  .dock-head{flex-wrap:wrap;row-gap:4px}
  .dock-note{margin-left:0;width:100%;justify-content:space-between}
  .tab{padding:5px 9px;font-size:12px}
  .actions{width:100%;justify-content:space-between}
}
/* 1280x720-class screens: the right column drops excerpts, keeps every item */
@media (max-height:760px){
  .guide small{display:none}
  .guide{padding:6px 10px}
  .left .sec,.right .sec{padding:8px 12px}
  .pillars{gap:4px;margin-top:6px}
  .pillar{padding:4px 8px}
  .safety{margin-top:5px}
  .safety .tool{padding:4px 7px}
  .right .hs-tiles{margin-top:6px}
}
@media (max-height:760px){ .right .hs{height:44px} }
@media (max-width:720px){ .search input{min-width:0} .search .btn-gold{padding:0 12px} }

/* ═══ Speak to an Agent (replaces Home Sharing until it launches) ═══════ */
.agent-tile{background-size:cover;background-position:center 22%;transition:transform .2s var(--ease-out), box-shadow .2s}
.agent-tile:hover{transform:translateY(-2px);box-shadow:0 10px 22px -10px rgba(var(--sh),.6);outline:none}
.agent-tile span{font-size:11px;line-height:1.1}
.agent-tile span small{display:block;font-size:9px;font-weight:600;opacity:.85;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-tile em{position:absolute;right:5px;top:5px;z-index:1;font-style:normal;font-size:9.5px;font-weight:700;color:var(--gold-text);
  background:rgba(255,255,255,.92);border-radius:999px;padding:1px 6px;box-shadow:0 2px 6px -2px rgba(var(--sh),.5)}
/* P3 B1: no picture → a designed white-glass tile with a gold monogram; a logo shown whole on white */
.agent-tile.mono{background:linear-gradient(180deg,#fff,#faf3e1);box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgba(232,194,106,.35)}
.agent-tile.logo{background-color:#fff;background-position:center 6px;background-size:auto calc(100% - 38px);background-repeat:no-repeat;box-shadow:0 0 0 1px rgba(232,194,106,.3)}
.agent-tile.mono::after,.agent-tile.logo::after{display:none}
.agent-tile.mono span,.agent-tile.logo span{color:var(--ink)}
.agent-tile.mono span small,.agent-tile.logo span small{color:var(--muted);opacity:1}
.agent-tile.mono span,.agent-tile.logo span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;bottom:5px}
.mono-disc{position:absolute;left:7px;top:6px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;
  font:700 13px/1 var(--serif);font-style:normal;letter-spacing:.02em;color:#3F2E08;
  background:linear-gradient(180deg,#fbe39a,var(--gold-hi));box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.85),0 3px 8px -4px rgba(var(--sh),.55)}
@media (max-height:920px){ .mono-disc{width:24px;height:24px;font-size:11px;top:5px} }
@media (max-height:760px){ .mono-disc{width:18px;height:18px;font-size:8.5px;top:4px;left:5px} .agent-tile.mono span small,.agent-tile.logo span small{display:none} }
.faces .face{margin-left:-6px;border-radius:50%;transition:transform .18s var(--ease-out)}
.faces .face:first-child{margin-left:0}
.faces .face img{margin-left:0;width:28px;height:28px;display:block;box-shadow:0 0 0 1.5px rgba(232,194,106,.7), 0 4px 8px -3px rgba(var(--sh),.5)}
.faces .face:hover,.faces .face:focus-visible{transform:translateY(-3px) scale(1.12);z-index:2;position:relative}
.agent-sheet{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:center}
.agent-sheet img{width:180px;height:180px;border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 0 0 3px rgba(232,194,106,.75), 0 24px 40px -18px rgba(var(--sh),.6)}
.agent-sheet h2{margin-top:6px}
@media (max-width:720px){.agent-sheet{grid-template-columns:1fr;justify-items:center;text-align:center}.agent-sheet img{width:120px;height:120px}}
.faces .face img{width:26px;height:26px}
@media (max-height:920px){.faces{margin-top:5px}}

/* ═══ v4: Quick Search + Invest + Guides now share the left column ═══════ */
@media (max-height:860px){
  .left .guide small{display:none}
  .left .guide{padding:6px 10px;margin-top:5px}
  .left .sec{padding:8px 12px}
  .left .pillars{gap:4px;margin-top:6px}
  .left .pillar{padding:4px 8px}
  .left .safety{margin-top:5px}
  .left .safety .tool{padding:4px 7px}
  .left .row{margin-top:5px}
  .left .chips{margin-top:6px}
}
@media (max-height:760px){
  .left .chip{padding:3px 9px}
  .left .chips{gap:5px}
  .left .pillar .ic{width:20px;height:20px}
  .left .row select{height:26px}
}
/* the guides card takes whatever height the left column has spare */
.right > .sec:last-child{flex:1;display:flex;flex-direction:column;min-height:0}
.right > .sec:last-child .guide{flex:1;min-height:0;overflow:hidden}
.guide small{display:-webkit-box!important;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* ═══ v5: favourites, compare, photo placeholders, first-visit hint ═════ */
.fav-btn{gap:4px}
.fav-btn .heart{color:var(--muted);font-size:15px;line-height:1}
.fav-btn b{font-size:11px;min-width:18px;height:18px;border-radius:999px;display:grid;place-items:center;background:rgba(58,86,130,.1);color:var(--muted)}
.fav-btn.has .heart{color:var(--gold-core)}
.fav-btn.has b{background:linear-gradient(180deg,var(--gold-hi),var(--gold));color:var(--luna-btn-text)}
.prop .qa button[aria-pressed="true"]{background:linear-gradient(180deg,var(--gold-hi),var(--gold));color:var(--luna-btn-text)}

/* shimmer until the photo has loaded */
.prop .img{background-color:#dfe8f3}
.prop .img::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.65) 50%, rgba(255,255,255,0) 70%) #e4ecf6;
  background-size:220% 100%;animation:shimmer 1.3s linear infinite;transition:opacity .5s}
.prop .img.ready::before{opacity:0;animation:none}
@keyframes shimmer{from{background-position:120% 0}to{background-position:-120% 0}}

/* compare tray floats above the dock */
.compare-tray{position:fixed;left:50%;bottom:calc(clamp(178px,25vh,260px) + 40px);transform:translateX(-50%);z-index:30;
  display:flex;align-items:center;gap:10px;padding:8px 8px 8px 10px;border-radius:999px;
  background:rgba(255,255,255,.9);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  box-shadow:inset 0 1px 0 #fff, var(--e3);border:1px solid #fff;animation:trayIn .35s var(--ease-out)}
.compare-tray[hidden]{display:none}
@keyframes trayIn{from{opacity:0;transform:translateX(-50%) translateY(14px)}}
.tray-item{position:relative;width:38px;height:38px;border-radius:50%;background:#dfe8f3 center/cover;box-shadow:0 0 0 2px #fff, 0 0 0 3.5px rgba(232,194,106,.8)}
.tray-item button{position:absolute;right:-5px;top:-5px;width:17px;height:17px;border-radius:50%;background:var(--ink);color:#fff;font-size:11px;line-height:17px}
.tray-txt{font-size:12px;color:var(--body);padding:0 4px}
.compare-tray .btn-gold{height:32px}
.compare-tray .btn-gold:disabled{filter:grayscale(.6);opacity:.55;cursor:not-allowed}
.tray-clear{font-size:12px;font-weight:600;color:var(--muted);padding:0 10px}

/* compare sheet */
.cmp{display:grid;grid-template-columns:130px repeat(var(--n),minmax(0,1fr));gap:0;margin-top:8px}
.cmp-h{padding:0 8px 12px;text-align:center}
.cmp-h b{display:block;font-family:var(--serif);font-size:17px;color:var(--ink);margin:8px 0 6px;line-height:1.15}
.cmp-h .ghost{height:30px;padding:0 12px;border-radius:999px;font-weight:600;font-size:12px;color:var(--ink);background:#fff;border:1px solid var(--hair)}
.cmp-img{height:120px;border-radius:var(--r);background:#dfe8f3 center/cover;box-shadow:0 14px 26px -14px rgba(var(--sh),.6)}
.cmp-l,.cmp-v{padding:9px 8px;border-top:1px solid var(--hair);font-size:13px}
.cmp-l{font-weight:600;color:var(--muted);font-size:12px}
.cmp-v{text-align:center;color:var(--ink)}
.cmp-v.win{color:var(--gold-text);font-weight:700;background:rgba(232,194,106,.12)}

/* one quiet first-visit hint, under the search box */
.coach{position:fixed;top:66px;left:50%;transform:translateX(-50%);z-index:35;max-width:min(520px,92vw);
  padding:10px 12px 10px 16px;border-radius:14px;font-size:12.5px;color:var(--body);display:flex;align-items:center;gap:10px;
  background:rgba(255,255,255,.94);box-shadow:inset 0 1px 0 #fff, var(--e3);border:1px solid #fff;animation:trayIn .4s var(--ease-out)}
.coach[hidden]{display:none}
.coach b{color:var(--ink)}
.coach kbd{font:600 10.5px var(--sans);background:#fff;border:1px solid var(--hair);border-bottom-width:2px;border-radius:5px;padding:1px 5px}
.coach button{flex:none;font-weight:700;color:var(--gold-text);padding:4px 8px;border-radius:8px}
.coach button:hover{background:rgba(232,194,106,.18)}
@media (max-width:720px){ .cmp{grid-template-columns:90px repeat(var(--n),minmax(0,1fr))} .cmp-img{height:70px} .compare-tray{bottom:16px} }
@media (prefers-reduced-motion:reduce){ .prop .img::before{animation:none} .compare-tray,.coach{animation:none} }
/* property sheet: the mortgage estimate sits under the actions */
.ps-mortgage{margin-top:14px}
.sheet{width:min(960px,94vw)}
/* a11y pass: the tab rail is its own element; card titles are real buttons */
.tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
h1.greet{font-size:clamp(24px,2.1vw,34px);font-weight:600}
.prop .open-prop{display:block;width:100%;text-align:left;padding:0;font:600 12px var(--sans);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
.prop .open-prop:focus-visible{outline:2px solid var(--gold-core);outline-offset:2px}
.prop:focus-within{box-shadow:0 0 0 2px rgba(232,194,106,.9), var(--e2)}
/* v5 top-bar fit: currency picker joined the bar */
#currency{height:32px;padding:0 6px;font-size:12px;border-radius:10px;border:1px solid var(--hair);background:rgba(255,255,255,.6)}
@media (max-width:1500px){ .actions .act-sq span{display:none} .actions .act-sq{padding:7px 8px} .actions .act-sq svg{width:17px;height:17px} }
/* compare tray lives in the dock's tab row, between the tabs and the note */
.compare-tray{position:static;transform:none;margin:0 auto;padding:3px 4px 3px 6px;gap:7px;box-shadow:inset 0 1px 0 #fff, var(--e1);animation:trayIn2 .3s var(--ease-out)}
@keyframes trayIn2{from{opacity:0;transform:translateY(6px)}}
.tray-item{width:28px;height:28px}
.tray-item button{width:15px;height:15px;line-height:15px;font-size:10px;right:-4px;top:-4px}
.compare-tray .btn-gold{height:28px;padding:0 12px;font-size:12px}
.tray-txt{font-size:11.5px}
.dock-head .dock-note{margin-left:0}
.dock-head{justify-content:space-between}
@media (max-width:720px){ .compare-tray{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);margin:0;z-index:30} }

/* ═══ v6: languages ═══════════════════════════════════════════════════════ */
.search .btn-gold{flex:none;white-space:nowrap;min-width:max-content}
.label{min-width:0}
.label small{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.label .more,.label select{flex:none}
/* listing data is mostly Latin script: keep its own direction inside RTL pages */
.prop .t,.prop .meta,.prop .price,.person b,.person small,.agent-tile span,.cmp-v,.ps-price{unicode-bidi:plaintext}
[dir="rtl"] .label .more{margin-left:0;margin-right:auto}
.msg,.coach span,.guide b,.guide small,.tool span,.pillar span,.globe-cap{unicode-bidi:plaintext}

/* ═══ v6 phones: properties come straight after Luna; long lists stay compact ═══ */
@media (max-width:720px){
  .app{grid-template-areas:"top" "centre" "dock" "left" "right" "foot"}
  .cities{max-height:236px;overflow:auto}
  .coach{top:auto;bottom:14px}
}

/* ═══ v6: longer translations ═════════════════════════════════════════════ */
#cityCount{flex:none}
.hs-short{display:none!important}                         /* hint duplicated the panel copy; cut in every language */
html:not([lang^="en"]) .label small:not(#cityCount){display:none}   /* label hints: English only, the panels say it */
.label .more{max-width:52%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#continuous{white-space:nowrap}
.mortgage{max-width:400px}
.mortgage .btn-gold{min-width:max-content;padding:0 12px}
.mortgage b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.luna-foot{min-width:0}
.mortgage{min-width:0;flex:0 1 auto}
.mortgage > span:first-child{min-width:0}
.label{overflow:hidden}
.label .region-sel{max-width:44%;min-width:0}
/* long translated headings: the link / picker wraps to its own line instead of clipping */
.label{overflow:visible;flex-wrap:wrap;row-gap:3px;white-space:normal}
.label .more,.label .region-sel{max-width:100%;margin-left:auto}
.mortgage b{-webkit-line-clamp:3;font-size:12px;line-height:1.15;min-width:0}
.mortgage > span:first-child{flex:1 1 90px}

/* v7: Browse by City lives on the left, News & Guides on the right */
.left{overflow:hidden}
.left > .sec.panel{flex:1;min-height:110px}
.right .guide{margin-top:6px}

/* ═══ v7 voice: your words appear live; the mic ring follows your real voice level ═══ */
.msg.user.listening{background:linear-gradient(180deg,rgba(27,38,80,.82),rgba(11,16,38,.82));border:1px dashed rgba(246,213,115,.6)}
.msg.user.listening .live-words{display:inline-block;min-width:4ch}
.msg.user.listening .live-words::after{content:"";display:inline-block;width:2px;height:1em;margin-left:3px;vertical-align:-2px;background:var(--gold-hi);animation:caret 1s steps(1) infinite}
@keyframes caret{50%{opacity:0}}
.mic{position:relative;--lvl:0}
.mic[aria-pressed="true"]{background:linear-gradient(180deg,var(--gold-hi),var(--gold))}
.mic[aria-pressed="true"]::before{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid rgba(232,194,106,.85);
  transform:scale(calc(1 + var(--lvl) * .45));opacity:calc(.35 + var(--lvl) * .65);transition:transform .08s linear, opacity .08s linear;pointer-events:none}
.mic[aria-pressed="true"] svg{stroke:var(--luna-btn-text)}
#voiceToggle{white-space:nowrap}
#voiceToggle[aria-pressed="false"]{color:var(--muted)}
.pill-row{flex-direction:column}
@media (prefers-reduced-motion:reduce){ .msg.user.listening .live-words::after{animation:none} }

/* ═══ v8: globe → Agent Area panel; Luna's panel keeps a reserved avatar space ═══ */
/* the reserved space sits exactly where the globe was, so the avatar can drop in without moving the chat */
.luna-avatar-slot{grid-column:2;grid-row:2 / 5;position:relative;margin:0 16px 4px 0;display:grid;place-items:center;min-height:0}
.luna-avatar-slot::before{ /* soft pedestal of light under Luna */
  content:"";position:absolute;left:14%;right:14%;bottom:6%;height:14%;border-radius:50%;
  background:radial-gradient(closest-side, rgba(232,194,106,.35), rgba(var(--sh),.12) 60%, transparent);filter:blur(8px)}
.luna-avatar-slot::after{ /* a faint halo ring that frames the space */
  content:"";position:absolute;width:min(92%,48vh);aspect-ratio:1;border-radius:50%;
  background:radial-gradient(closest-side, rgba(255,250,232,.55), rgba(246,213,115,.10) 60%, transparent 72%);pointer-events:none}
.orb.orb-xl{width:clamp(120px, min(58%, 30vh), 260px);height:auto;aspect-ratio:1;z-index:1}

/* the globe now fills the Agent Area section */
.right #toolsSec{display:flex;flex-direction:column;flex:1;min-height:0}
#toolsSec .globe-wrap{grid-column:auto;grid-row:auto;margin:4px 0 0;flex:1;min-height:150px;position:relative}
#toolsSec #globe{inset:0 0 30px 0}
#toolsSec .globe-cap{bottom:0}
.right > .sec:last-child{flex:none}
.right > .sec:last-child .guide{flex:none}
.agent-area-btn{padding:4px 10px;border-radius:999px;color:var(--luna-btn-text)!important;background:linear-gradient(180deg,var(--gold-hi),var(--luna-btn));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 4px 10px -5px rgba(184,133,46,.7);text-decoration:none!important}
.agent-area-btn:hover{filter:brightness(1.05)}
@media (max-height:760px){ #toolsSec .globe-cap span{display:none} #toolsSec #globe{bottom:20px} #toolsSec .globe-wrap{min-height:120px} }
@media (max-width:1180px), (max-height:640px){ .luna-avatar-slot{min-height:260px} }
@media (max-width:720px){
  .luna-avatar-slot{grid-column:1;grid-row:auto;height:210px;margin:6px 12px}
  #toolsSec .globe-wrap{height:280px;flex:none}
}
/* give the globe the room: guides go compact on laptop heights, the caption becomes a slim line */
#toolsSec #globe{inset:0 0 20px 0}
#toolsSec .globe-cap{line-height:1.1}
#toolsSec .globe-cap b{display:inline;font-size:14px}
#toolsSec .globe-cap span{margin-inline-start:6px;font-size:10px}
@media (max-height:920px){
  .right .guide small{display:none!important}
  .right .guide{padding:6px 10px;margin-top:5px}
  .right .guide b{font-size:14.5px}
  .right .dots{margin-top:4px}
}

/* ═══ v9: Luna's live face (Heaven Cloud) in the reserved space ═══════════ */
.luna-face-wrap{position:absolute;inset:0;z-index:2;opacity:0;transition:opacity .9s var(--ease-out);container-type:size}
/* v10 (Adam, 23 Oct): her side of the panel is deep space, with her own animations, reaching the
   panel's right edge; on its LEFT it fades into the white glass. The square portrait sits in it,
   its edges feathered so no seam shows.
   v11 (W5, PLAN-luna-hyperreal.md): the merge into the white page, refined.
   - colour: one OKLab ramp, dawn #1a2a48 at the seam → her portrait's edge #0d131e → deep #05070d,
     led in by a brighter dawn blue #2c4a80 where the mask is still thin: measured, #1a2a48 alone
     over white falls to OKLab chroma ≈ .015 in the half-transparent band (grey); this keeps it ≥ .02;
   - masks: every fade is an 11-stop easeInOutSine ramp (no Mach bands); the seam is organic
     (v11: an SVG-turbulence edge; v12: the shader's own wobbling seam); a 34 px bottom fade;
   - light: a gold/pearl seam light (screen), two aurora bands (translate/scale only), a voice pulse;
   - texture: grain dither, a real starsheet (--luna-starsheet) at 512/701/937 px, 14 gold motes;
   - js/luna-sky.js (css/luna-sky.css) draws her sky over this layer; this CSS stays as its base;
   - arrival on ready (.face-arrive, 2.3 s), a 400 ms crossfade for reduced motion (.face-calm).
   v12 (space merge, 23 Oct): the layer spans the WHOLE panel. The fade is a twilight: from near the
   panel's left edge a translucent frosted daylight haze (very light OKLab sky, alpha rising slowly),
   then the dusk drop through sky blue into her night just before her portrait; so the white glass shows
   through progressively, never a band, never grey. (v12's WebGL nebula is retired: js/luna-sky.js and
   css/luna-sky.css draw her sky now.) --luna-sw: the old space width,
   which still sets where her night begins (100% - --luna-sw * .6). */
@property --reveal{syntax:'<percentage>';inherits:false;initial-value:100%}
.centre{
  --luna-sw:calc(clamp(220px,36%,460px) + 190px);
  /* alpha: a slow toe of haze from 1% to where her night begins (stops at f = .1 … 1 of that span) */
  --luna-ease-x:linear-gradient(90deg,rgba(0,0,0,0) 1%,
    rgba(0,0,0,.05) calc(1% + (99% - var(--luna-sw) * .6) * .1),rgba(0,0,0,.12) calc(1% + (99% - var(--luna-sw) * .6) * .2),
    rgba(0,0,0,.2) calc(1% + (99% - var(--luna-sw) * .6) * .3),rgba(0,0,0,.3) calc(1% + (99% - var(--luna-sw) * .6) * .4),
    rgba(0,0,0,.42) calc(1% + (99% - var(--luna-sw) * .6) * .5),rgba(0,0,0,.55) calc(1% + (99% - var(--luna-sw) * .6) * .6),
    rgba(0,0,0,.68) calc(1% + (99% - var(--luna-sw) * .6) * .7),rgba(0,0,0,.81) calc(1% + (99% - var(--luna-sw) * .6) * .8),
    rgba(0,0,0,.92) calc(1% + (99% - var(--luna-sw) * .6) * .9),#000 calc(100% - var(--luna-sw) * .6));
  --luna-ease-b:linear-gradient(0deg,rgba(0,0,0,0) 0,rgba(0,0,0,.024) 3.4px,rgba(0,0,0,.095) 6.8px,rgba(0,0,0,.206) 10.2px,rgba(0,0,0,.345) 13.6px,rgba(0,0,0,.5) 17px,rgba(0,0,0,.655) 20.4px,rgba(0,0,0,.794) 23.8px,rgba(0,0,0,.905) 27.2px,rgba(0,0,0,.976) 30.6px,#000 34px);
  --luna-feather:radial-gradient(closest-side,#000 58%,rgba(0,0,0,.976) 62.2%,rgba(0,0,0,.905) 66.4%,rgba(0,0,0,.794) 70.6%,rgba(0,0,0,.655) 74.8%,rgba(0,0,0,.5) 79%,rgba(0,0,0,.345) 83.2%,rgba(0,0,0,.206) 87.4%,rgba(0,0,0,.095) 91.6%,rgba(0,0,0,.024) 95.8%,rgba(0,0,0,0) 100%);
}
.luna-avatar-slot.face-on{margin-right:0}
.luna-avatar-slot.face-on::before,.luna-avatar-slot.face-on::after{opacity:0}
/* the space layer lives on the whole panel (js/avatar.js adds it): top and right edges of the
   panel, down to just above the bottom bar (--luna-space-bottom, measured), fading to white leftwards.
   --fx/--fy/--fr: her portrait's centre and half-size inside the layer (measured by js/luna-sky.js) */
.luna-space{display:none}
.centre.face-on .luna-space{display:block;position:absolute;z-index:0;top:0;right:0;bottom:var(--luna-space-bottom,0px);
  left:0;width:auto;pointer-events:none;overflow:hidden;
  border-radius:inherit;--reveal:100%;
  background-color:transparent;
  background-image:
    radial-gradient(ellipse 92% 78% at var(--fx,66%) var(--fy,50%),rgba(5,7,13,0) 55%,rgba(5,7,13,.18) 78%,rgba(5,7,13,.5) 100%),
    radial-gradient(circle calc(var(--fr,180px) * 1.45) at var(--fx,66%) var(--fy,50%),#0d131e 0,#0d131e 62%,rgba(13,19,30,.62) 80%,rgba(13,19,30,0) 100%),
    linear-gradient(90deg,#f7faff 0%,#e9f0fb calc(100% - var(--luna-sw) * 1.15),#dbe7f8 calc(100% - var(--luna-sw) * .9),#a9c2e7 calc(100% - var(--luna-sw) * .76),
      #5d7fb8 calc(100% - var(--luna-sw) * .7),#2c4a80 calc(100% - var(--luna-sw) * .65),#1a2a48 calc(100% - var(--luna-sw) * .6),#0d131e calc(100% - var(--luna-sw) * .46),#05070d 100%);
  background-image:
    radial-gradient(ellipse 92% 78% at var(--fx,66%) var(--fy,50%),rgba(5,7,13,0) 55%,rgba(5,7,13,.18) 78%,rgba(5,7,13,.5) 100%),
    radial-gradient(circle calc(var(--fr,180px) * 1.45) at var(--fx,66%) var(--fy,50%) in oklab,#0d131e 0,#0d131e 62%,rgba(13,19,30,.62) 80%,rgba(13,19,30,0) 100%),
    linear-gradient(in oklab 90deg,#f7faff 0%,#e9f0fb calc(100% - var(--luna-sw) * 1.15),#dbe7f8 calc(100% - var(--luna-sw) * .9),#a9c2e7 calc(100% - var(--luna-sw) * .76),
      #5d7fb8 calc(100% - var(--luna-sw) * .7),#2c4a80 calc(100% - var(--luna-sw) * .65),#1a2a48 calc(100% - var(--luna-sw) * .6),#0d131e calc(100% - var(--luna-sw) * .46),#05070d 100%);
  -webkit-mask-image:var(--luna-ease-x),var(--luna-ease-b),linear-gradient(270deg,#000 calc(var(--reveal) * 1.25 - 25%),rgba(0,0,0,0) calc(var(--reveal) * 1.25));
          mask-image:var(--luna-ease-x),var(--luna-ease-b),linear-gradient(270deg,#000 calc(var(--reveal) * 1.25 - 25%),rgba(0,0,0,0) calc(var(--reveal) * 1.25));
  -webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-composite:source-in,source-in;mask-composite:intersect}
.luna-space > *{position:absolute;inset:0;pointer-events:none}
.centre.face-on > :not(.luna-space){position:relative;z-index:1}
/* r4: with her here, the panel glass's top sheen sits over the white side: centred (50% -10%) it was
   brightest exactly where the dusk begins, and the translucent haze let it through as a bright column */
@media (min-width:721px){
  .centre.glass.face-on{background:
    radial-gradient(70% 70% at 14% -10%, rgba(255,253,244,.85), rgba(255,255,255,0) 60%),
    linear-gradient(140deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 34%),
    rgba(255,255,255,.56)}
}
/* the header text stays on the white side; the pills on the right sit on the space */
.centre.face-on .luna-head > div:nth-child(2){max-width:calc(100% - clamp(220px,36%,460px) - 150px)}
.centre.face-on .luna-head .tagline{text-wrap:balance}
/* phase C W10: long lines (de/pt/fr) wrap to a third line instead of pushing the sky's seam toward her; js/app.js
   reserves the tallest tagline (min-height), so the rotation never moves the panel or the sky */
@media (min-width:1280px){ .centre.face-on .luna-head .tagline{max-width:36ch} }
/* stars: one generated starsheet tiled at three sizes (no visible repeat), pointer parallax per depth */
.luna-stars i{position:absolute;inset:0;--d:-3px;
  transform:translate3d(calc(var(--px,0) * var(--d)),calc(var(--py,0) * var(--d) * .7),0);transition:transform .7s var(--ease-out)}
.luna-stars i::before{content:"";position:absolute;inset:0 -940px 0 0;background:var(--luna-starsheet,none) 0 0/512px 512px repeat;
  animation:lunaTwinkle 6s ease-in-out infinite}
/* (twinkle and drift share the ::before: split across parent and child, Chrome repaints them every frame) */
.luna-stars i:nth-child(2){--d:-7px}
.luna-stars i:nth-child(2)::before{background-size:701px 701px;animation:lunaTwinkle2 8s ease-in-out -3s infinite,lunaDrift2 520s linear infinite}
.luna-stars i:nth-child(3){--d:-12px}
.luna-stars i:nth-child(3)::before{background-size:937px 937px;background-position:-211px -97px;animation:lunaTwinkle 11s ease-in-out -5s infinite,lunaDrift3 400s linear infinite}
@keyframes lunaTwinkle{0%,100%{opacity:1}50%{opacity:.62}}
@keyframes lunaTwinkle2{0%,100%{opacity:.8}50%{opacity:.5}}
@keyframes lunaDrift2{to{translate:-701px 0}}
@keyframes lunaDrift3{to{translate:-937px 0}}
/* aurora: two soft skewed bands of pearl light (gold over the navy reads grey); only translate/scale move.
   They stay off her portrait: light around her that her own dark edge doesn't get reads as a ring. */
.luna-aurora b{position:absolute;display:block;left:calc(100% - var(--luna-sw) * .9);width:calc(var(--luna-sw) * .4);top:-22%;height:140%;mix-blend-mode:screen;
  background:radial-gradient(ellipse 50% 50% at 50% 50%,rgba(226,236,255,.13),rgba(236,242,255,.05) 46%,rgba(236,242,255,0) 72%);
  transform:skewX(-22deg) rotate(9deg);animation:lunaAurora 19s ease-in-out infinite alternate}
.luna-aurora b:nth-child(2){left:calc(100% - var(--luna-sw) * .8);width:calc(var(--luna-sw) * .3);top:6%;height:96%;
  background:radial-gradient(ellipse 50% 50% at 50% 50%,rgba(250,246,236,.09),rgba(236,242,255,.04) 50%,rgba(236,242,255,0) 74%);
  transform:skewX(16deg) rotate(-13deg);animation-duration:24s;animation-delay:-9s}
@keyframes lunaAurora{from{translate:-5% 2%;scale:1 .94}to{translate:6% -3%;scale:1.1 1.05}}
/* seam light: where her night meets the white day */
/* (it sits on the thin, light end of the mask: gold laid over the half-dark blue band cancels its hue
   to grey, measured, so it stays where the fade is still mostly day) */
.luna-seam{right:auto!important;left:calc(100% - var(--luna-sw) * .98)!important;width:calc(var(--luna-sw) * .3);mix-blend-mode:screen;opacity:.85;
  background:radial-gradient(ellipse 30% 46% at 34% 50%,rgba(246,213,115,.5),rgba(246,213,115,0) 75%),
    radial-gradient(ellipse 46% 58% at 50% 50%,rgba(236,243,255,.46),rgba(214,228,255,.22) 40%,rgba(214,228,255,0) 78%);
  animation:lunaSeam 8s ease-in-out infinite}
@keyframes lunaSeam{50%{opacity:.62;scale:1.04 1}}
.centre.luna-talking .luna-seam{animation:lunaSeamVoice 1.2s ease-in-out infinite}
@keyframes lunaSeamVoice{0%,100%{opacity:.85;scale:1}50%{opacity:1;scale:1.09 1.03}}
/* gold motes rising out of her space into the daylight (v12 layer; css/luna-sky.css hides it under the sky) */
.luna-motes{container-type:size}
.luna-motes i{position:absolute;left:var(--x,50%);bottom:-8px;width:var(--s,3px);height:var(--s,3px);border-radius:50%;opacity:0;
  background:radial-gradient(circle,#fff8e2 0,rgba(246,213,115,.95) 34%,rgba(232,194,106,0) 70%);
  animation:lunaMote var(--t,14s) linear var(--dl,0s) infinite}
@keyframes lunaMote{0%{opacity:0;translate:0 0}12%{opacity:var(--o,.8)}70%{opacity:calc(var(--o,.8) * .55)}100%{opacity:0;translate:var(--dx,-30cqw) -105cqh}}
.luna-rim{display:none}
/* grain: triangular-PDF noise dither so the long dark ramps never band */
.luna-grain{background:var(--luna-grain,none) 0 0/128px 128px repeat;mix-blend-mode:soft-light;opacity:.07}
/* her portrait: an eased radial feather into a ground of exactly her edge colour */
.luna-face-wrap iframe{position:absolute;inset:0;margin:auto;z-index:1;
  width:100%!important;height:100%!important; /* without container units (Safari < 16, Firefox < 110): never the 300×150 default */
  width:min(100cqw,100cqh)!important;height:min(100cqw,100cqh)!important;
  -webkit-mask-image:var(--luna-feather);mask-image:var(--luna-feather)}
/* light wrap: a faint screen ring where she meets her space, and a key light from the white side */
.luna-face-wrap::after{content:"";position:absolute;inset:0;margin:auto;z-index:2;pointer-events:none;border-radius:50%;
  width:100%;height:100%;width:min(100cqw,100cqh);height:min(100cqw,100cqh);mix-blend-mode:screen;
  background:
    radial-gradient(ellipse 26% 40% at 15% 46%,rgba(244,247,255,.09),rgba(244,247,255,0) 72%),
    radial-gradient(closest-side,rgba(236,242,255,0) 60%,rgba(236,242,255,.035) 66%,rgba(244,247,255,.05) 71%,rgba(236,242,255,0) 80%)}
.luna-face-wrap.on{opacity:1}
.luna-face-wrap iframe{border:0;display:block;background:transparent;color-scheme:normal}
.luna-avatar-slot.face-on .orb-xl{opacity:0;transform:scale(.92);transition:opacity .9s var(--ease-out), transform .9s var(--ease-out)}
.luna-tap{position:absolute;left:50%;bottom:10%;transform:translateX(-50%);z-index:3;pointer-events:none;display:none;
  padding:6px 12px;border-radius:999px;font:700 12px var(--sans);color:var(--luna-btn-text);
  background:linear-gradient(180deg,var(--gold-hi),var(--luna-btn));box-shadow:0 6px 16px -6px rgba(184,133,46,.8)}
.luna-face-wrap.blocked .luna-tap{display:block;animation:tapPulse 1.6s ease-in-out infinite}
@keyframes tapPulse{50%{transform:translateX(-50%) scale(1.06)}}

/* ── arrival (0–2.3 s from ready): the orb gathers, a gold bloom, space unfurls from the right
   with a pearl band riding its edge, the stars ignite, her face fades in, then the living light ── */
.centre.face-arrive .luna-avatar-slot .orb-xl{transition:none;animation:lunaGather .55s cubic-bezier(.5,0,.75,0) both}
@keyframes lunaGather{0%{opacity:1;scale:1}35%{opacity:1;scale:1.07}100%{opacity:0;scale:.42}}
.centre.face-arrive .luna-avatar-slot.face-on::after{opacity:0;animation:lunaBloom .9s cubic-bezier(.2,.7,.3,1) .38s both;
  background:radial-gradient(closest-side,rgba(255,250,234,.95),rgba(246,213,115,.6) 32%,rgba(232,194,106,.2) 58%,rgba(232,194,106,0) 76%)}
@keyframes lunaBloom{0%{opacity:0;scale:.35}35%{opacity:1;scale:1}100%{opacity:0;scale:1.5}}
.centre.face-arrive .luna-space{animation:lunaUnfurl 1.5s cubic-bezier(.16,1,.3,1) .25s both}
@keyframes lunaUnfurl{from{--reveal:0%}to{--reveal:100%}}
.centre.face-arrive .luna-rim{display:block;right:auto!important;width:20%;
  background:linear-gradient(90deg,rgba(255,250,236,0) 0,rgba(255,250,236,.5) 42%,rgba(246,213,115,.38) 56%,rgba(246,213,115,0) 100%);
  animation:lunaRimRide 1.5s cubic-bezier(.16,1,.3,1) .25s both,lunaRimFade 1.5s linear .25s both}
@keyframes lunaRimRide{from{translate:512% 0}to{translate:-113% 0}}
@keyframes lunaRimFade{0%{opacity:0}8%{opacity:1}70%{opacity:.8}100%{opacity:0}}
.centre.face-arrive .luna-stars i{animation:lunaIgnite .7s var(--ease-out) .5s both}
.centre.face-arrive .luna-stars i:nth-child(2){animation-delay:.65s}
.centre.face-arrive .luna-stars i:nth-child(3){animation-delay:.8s}
@keyframes lunaIgnite{from{opacity:0}to{opacity:1}}
.centre.face-arrive .luna-face-wrap{transition:none;animation:lunaFaceIn 1.1s cubic-bezier(.22,.8,.3,1) .7s both}
@keyframes lunaFaceIn{from{opacity:0;scale:.965}to{opacity:1;scale:1}}
.centre.face-arrive :is(.luna-aurora,.luna-motes){animation:lunaIgnite 1s ease-out 1.1s both}
.centre.face-arrive .luna-seam{animation:lunaIgnite 1s ease-out 1.1s both,lunaSeam 8s ease-in-out 2.1s infinite}
/* no @property (Firefox < 128, Safari < 16.4): --reveal would jump, so the unfurl becomes a fade
   (js/avatar.js adds .no-reveal); --reveal stays 100%, her space ends fully shown */
.centre.face-arrive.no-reveal .luna-space{animation:lunaIgnite .9s ease-out .25s both}
.centre.face-arrive.no-reveal .luna-rim{display:none}
/* reduced motion (her face still mounts, js/avatar.js capable()): a 400 ms crossfade, nothing else
   moves. Her face speaks and moves its lips; around her: no aurora, motes, parallax, twinkle or
   WebGL motion (js/luna-sky.js: one still frame), the seam light holds still, the voice pulse is off */
/* (v12: her calm space simply appears; measured: an opacity animation on the masked space, even finished,
   left Chrome compositing it at ~20% — the night showed as a grey fog. Her face still crossfades in .4 s) */
.centre.face-calm .luna-space{animation:none}
.centre.face-calm .luna-face-wrap,.centre.face-calm .luna-avatar-slot .orb-xl{transition-duration:.4s}
@media (prefers-reduced-motion:reduce){
  .luna-face-wrap,.luna-avatar-slot.face-on .orb-xl{transition-duration:.4s}
  .luna-face-wrap.blocked .luna-tap,.luna-space *,.luna-space *::before{animation:none!important}
  .luna-motes,.luna-rim,.luna-aurora{display:none!important}
  .luna-stars i{transform:none!important;transition:none!important}
  .luna-seam{opacity:.85!important;scale:none!important}
}
html[data-quality="static"] :is(.luna-space *,.luna-space *::before){animation:none!important}
html[data-quality="static"] :is(.luna-motes,.luna-rim){display:none!important}
/* 'low': CSS only, the seam light holds still, no motes, no light wrap */
html[data-quality="low"] .luna-motes{display:none}
html[data-quality="low"] :is(.luna-seam,.luna-aurora b,.luna-stars i::before){animation:none!important}
html[data-quality="low"] .luna-face-wrap::after{display:none}

/* ── phones: her space becomes a window — a pearl bezel round a rounded pane of her night ── */
@media (max-width:720px){
  .centre.face-on .luna-space{display:none}
  .centre.face-on .luna-head > div:nth-child(2){max-width:none}
  .luna-avatar-slot.face-on{margin:6px 12px}
  .luna-avatar-slot.face-on .luna-face-wrap{padding:3px;border-radius:22px;background:linear-gradient(#fff,#faf3e1);
    box-shadow:0 0 0 1px rgba(232,194,106,.72),0 0 0 4px rgba(246,213,115,.1),0 0 24px -4px rgba(246,213,115,.45),0 14px 28px -14px rgba(184,133,46,.6)}
  .luna-avatar-slot.face-on .luna-face-wrap::before{content:"";position:absolute;inset:3px;z-index:0;border-radius:19px;-webkit-clip-path:inset(0 round 19px);clip-path:inset(0 round 19px);
    background:
      radial-gradient(ellipse 64% 24% at 50% 104%,rgba(246,213,115,.42),rgba(232,194,106,.12) 55%,rgba(232,194,106,0) 78%),
      radial-gradient(circle 52cqh at 50% 50%,#0d131e 0,#0d131e 62%,rgba(13,19,30,.6) 80%,rgba(13,19,30,0) 100%),
      var(--luna-starsheet,none) 0 0/512px 512px repeat,
      linear-gradient(180deg,#1a2a48 0%,#101b31 30%,#0d131e 58%,#05070d 100%);
    background:
      radial-gradient(ellipse 64% 24% at 50% 104%,rgba(246,213,115,.42),rgba(232,194,106,.12) 55%,rgba(232,194,106,0) 78%),
      radial-gradient(circle 52cqh at 50% 50% in oklab,#0d131e 0,#0d131e 62%,rgba(13,19,30,.6) 80%,rgba(13,19,30,0) 100%),
      var(--luna-starsheet,none) 0 0/512px 512px repeat,
      linear-gradient(in oklab 180deg,#1a2a48 0%,#101b31 30%,#0d131e 58%,#05070d 100%)}
  /* top glass sheen (plain alpha: no blending over the iframe on phones) */
  .luna-avatar-slot.face-on .luna-face-wrap::after{inset:3px;width:auto;height:auto;margin:0;border-radius:19px;mix-blend-mode:normal;
    background:linear-gradient(180deg,rgba(255,255,255,.2),rgba(255,255,255,.05) 18%,rgba(255,255,255,0) 36%)}
  .centre.face-arrive .luna-face-wrap{animation:lunaIris .9s cubic-bezier(.16,1,.3,1) backwards}
}
@keyframes lunaIris{from{-webkit-clip-path:circle(0% at 50% 50%);clip-path:circle(0% at 50% 50%);opacity:.4}to{-webkit-clip-path:circle(75% at 50% 50%);clip-path:circle(75% at 50% 50%);opacity:1}}
/* v10: on her space, pills and chips are solid (translucent glass turns grey over black) */
.centre.face-on .luna-head .badge{background:#fbf3df;border-color:rgba(232,194,106,.7)}
.centre.face-on .luna-head .toggle{background:#fff;border-color:#fff;color:var(--ink)}
.centre.face-on .goal{background:#fff}
/* "Speak to an Agent" is a button (it opens the agents) */
.label-btn{all:unset;cursor:pointer;display:inline-flex;align-items:baseline;gap:6px;font:inherit;color:inherit;border-radius:6px}
.label-btn:hover{color:var(--gold-text)}
.label-btn:focus-visible{outline:2px solid var(--gold-hi);outline-offset:3px}
.card.person.hl{animation:agentHl 1.4s var(--ease-out) both}
@keyframes agentHl{0%{box-shadow:0 0 0 0 rgba(232,194,106,.0)}25%{box-shadow:0 0 0 3px rgba(232,194,106,.95)}100%{box-shadow:0 0 0 0 rgba(232,194,106,0)}}
@media (prefers-reduced-motion:reduce){ .card.person.hl{animation:none} }
/* P3 B3: the reply stat stays out of the row until this visitor has a measurement */
.stat[hidden]{display:none}
/* P3 B6: fewer than four matches → a quiet card that hands over to Search Everywhere */
.card.ghost-more{width:clamp(180px,13vw,220px);align-items:center;justify-content:center;padding:14px;text-align:center;cursor:pointer;
  background:linear-gradient(180deg,rgba(255,255,255,.55),rgba(250,243,225,.6));border:1.5px dashed rgba(232,194,106,.75);box-shadow:none;
  font:700 12.5px/1.3 var(--sans);color:var(--gold-text)}
.card.ghost-more:hover,.card.ghost-more:focus-visible{background:linear-gradient(180deg,#fff,#faf3e1);border-style:solid}

/* ═══ F2: accessibility + touch ════════════════════════════════════════════ */
/* skip link: unseen until a keyboard lands on it */
.skip{position:fixed;inset-inline-start:12px;top:-60px;z-index:80;padding:9px 16px;border-radius:999px;font-weight:700;font-size:13px;
  color:var(--luna-btn-text);background:linear-gradient(180deg,var(--gold-hi),var(--luna-btn));box-shadow:var(--e2);transition:top .15s}
.skip:focus{top:10px}
/* card Save / Compare / Film: shown on hover or focus, which a touch screen never has → always shown there */
@media (hover:none){ .prop .qa{opacity:1;transform:none} }
/* 44 px touch targets. Small inline controls keep their look and get an invisible ::before hit slop;
   where neighbours sit closer than 44 px the gap opens just enough that slops never overlap. Selects
   (no pseudo-elements) take a transparent border, clipped from the paint, cancelled by a negative margin. */
@media (pointer:coarse){
  :is(.act,.chip,.goal,.toggle,.tab,.mode button,.label-btn,.store,.dock-note button,.dots button,.prop .qa button,.faces .face,.city,.pillar,.tool,.btn-gold,.mortgage){position:relative}
  :where(.act,.chip,.goal,.toggle,.tab,.mode button,.label-btn,.store,.dock-note button,.dots button,.prop .qa button,.faces .face,.city,.pillar,.tool,.btn-gold,.mortgage,.explore-tab)::before{
    content:"";position:absolute;inset:calc(var(--hy,0px) * -1) calc(var(--hx,0px) * -1)}
  .act{--hy:7px;--hx:5px} .btn-gold{--hy:7px;overflow:visible} .btn-gold::after{display:none} /* glint runs on hover only */
  .actions{row-gap:12px} .top{row-gap:10px}
  .mode button{--hy:9px}
  .search input{height:44px;margin-block:-12px} .composer input{height:44px;margin-block:-5px}
  .mic::after{content:"";position:absolute;inset:-3px}
  .chip{--hy:9px;--hx:3px} .chips{row-gap:18px} .chips + .row{margin-top:17px} /* clear of the chips' slop */
  .goal{--hy:11px;--hx:3px} .goals{row-gap:20px;padding-bottom:4px}
  .toggle{--hy:11px;--hx:4px} .pill-row{gap:20px}
  .tab{--hy:11px} .tabs{row-gap:25px} .dock-head{z-index:2} /* above the strip, so the slops reach down */
  .city{min-height:38px;--hy:4px} .cities{gap:6px;padding-block:5px;margin-top:11px} /* the scroller clipped the end rows' slop */
  .pillar{min-height:38px;--hy:5px} .left .pillars{gap:8px} .tool{min-height:38px;--hy:5px} .mortgage{--hy:4px} .left .safety{margin-top:8px}
  .store{--hy:7px}
  .label-btn,.dock-note button{--hy:14px}
  /* .label .more clips its own overflow (ellipsis), so its slop is a transparent border */
  .label .more{border:solid transparent;border-width:12px 0 18px;margin-block:-12px -18px;background-clip:padding-box}
  .right .hs-tiles{margin-top:14px} #toolsSec .globe-wrap{margin-top:12px} .right .guide{margin-top:14px} /* room under the links' slop */
  .label .agent-area-btn{border-width:10px 0 12px;margin-block:-10px -12px;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}
  .explore-tab{--hy:6px}
  .faces{gap:18px} .faces .face,.faces .face:first-child{margin-left:0;--hy:9px;--hx:9px} /* the overlapped stack opens into a row */
  .dots{gap:min(38px,calc((100% - 58px) / 7));margin-top:12px} .dots button{--hx:19px}
  .dots button::before{inset:-12px calc(var(--hx) * -1) -26px} /* 12 + 6 + 26: clear of the guide card above */
  .prop .qa{gap:11px;top:auto;bottom:8px} /* bottom corner: clear of the (translated, wider) FEATURED tag */ .prop .qa button{width:34px;height:34px;font-size:14px;--hy:7px;--hx:6px}
  .prop .body{position:relative} .prop .open-prop::before{content:"";position:absolute;inset:0} /* the whole card opens it anyway */
  .foot button{min-height:44px}
  .row select{height:44px;border:solid transparent;border-width:8px 1px;margin-block:-8px;border-radius:9px/17px}
  #regions{height:44px;border:solid transparent;border-width:10px 1px;margin-block:-10px;border-radius:8px/18px}
  #currency,.lang{height:46px;border:solid transparent;border-width:7px 1px;margin-block:-7px;border-radius:10px/17px}
  :is(.row select,#regions,#currency,.lang){position:relative;background-clip:padding-box;box-shadow:inset 0 0 0 1px var(--hair)}
}
@media (pointer:coarse) and (max-width:1180px){ .dock{height:300px} } /* the tabs' 25 px row gap, not taken from the cards */
/* phones: nothing under 12 px in the city codes, store badges, card tag + meta, stat labels, agency names */
@media (max-width:720px){
  .city .cc,.stat span,.prop .meta,.agent-tile span small{font-size:12px}
  .prop .img .tag{font-size:12px;padding:2px 9px}
  .store{font-size:13px;padding:6px 11px} .store small{font-size:12px}
}
/* phones: the currency picker shows its arrow again (#currency's plain background had dropped money.css's chevron) */
@media (max-width:720px){
  #currency{padding-inline:10px 24px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a4f0e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center,rgba(255,255,255,.6);background-clip:padding-box}
  [dir="rtl"] #currency{background-position:left 9px center,0 0}
}
/* first-visit tip placed by app.js under ⌘K, beside (not over) her greeting */
.coach.anchored{transform:none;animation-name:coachIn}
@keyframes coachIn{from{opacity:0;transform:translateY(8px)}}
/* customer experience (31 Oct): the Wish List card, "Example" labels, the guides' pause button */
.wish-card{width:min(440px,calc(100vw - 60px));padding:14px 16px;gap:6px;justify-content:center;cursor:default}
.wish-card:hover{transform:none}
.wish-card b{font-family:var(--serif);font-size:17px;color:var(--ink)}
.wish-card small{font-size:11.5px;color:var(--body);line-height:1.4}
.wish-card .btn-gold{align-self:flex-start;margin-top:4px;padding:6px 14px}
[dir="rtl"] .wish-card{text-align:right}
.prop .img .tag-example,.ex-badge.ex-example{color:var(--muted);background:rgba(255,255,255,.94)}
.ex-badge.ex-example{top:auto;bottom:10px}
.guide-ctl{display:flex;align-items:center;gap:8px;margin-top:7px}
.guide-ctl .dots{flex:1;margin-top:0}
.guide-pause{flex:none;width:22px;height:22px;border-radius:50%;font-size:8px;line-height:22px;text-align:center;color:var(--muted);background:rgba(58,86,130,.08)}
.guide-pause:hover,.guide-pause:focus-visible{color:var(--ink);background:rgba(232,194,106,.25)}
.guide-pause[aria-pressed="true"]{color:var(--gold-text)}
