/* ─── css/visit.css — a public project's first impression (js/cloud/visit.js): the cover, the visitor's bar, the hints.
   Every size: two columns from 760 px wide, one below; the card always inside the screen (it scrolls, the page never). */

/* ── the cover ─────────────────────────────────────────────────────────── */
.vx-wrap{position:fixed;inset:0;z-index:9600;display:flex;align-items:center;justify-content:center;
  padding:max(16px,env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));
  background:rgba(6,8,11,.62);backdrop-filter:blur(10px) saturate(.9);-webkit-backdrop-filter:blur(10px) saturate(.9);
  opacity:0;transition:opacity .22s ease;overflow:hidden;font-family:var(--sans,system-ui,sans-serif)}
.vx-wrap.in{opacity:1}
.vc{position:relative;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,1fr);width:min(1120px,100%);max-height:100%;
  border-radius:20px;overflow:hidden;background:#12161c;color:#e7ebf0;border:1px solid rgba(255,255,255,.08);
  box-shadow:0 30px 80px rgba(0,0,0,.55),0 2px 0 rgba(255,255,255,.04) inset;transform:translateY(10px) scale(.985);transition:transform .28s cubic-bezier(.2,.8,.2,1)}
.vx-wrap.in .vc{transform:none}
.vx-hero{position:relative;min-height:0;background:#0b0d10;overflow:hidden}
.vx-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:filter .5s,transform .8s}
.vx-hero img.soft{filter:blur(14px) saturate(1.1);transform:scale(1.06)}
.vx-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(18,22,28,0) 70%,rgba(18,22,28,.85));pointer-events:none}
.vx-badge{position:absolute;left:16px;top:16px;z-index:1;display:inline-flex;align-items:center;gap:8px;padding:6px 11px 6px 9px;border-radius:999px;
  background:rgba(11,13,16,.62);border:1px solid rgba(255,255,255,.14);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font:600 11.5px/1 var(--sans,system-ui);letter-spacing:.04em}
.vx-badge b{color:var(--accent,#D6A461);letter-spacing:.08em}.vx-badge span{color:#d5dbe2}
.vx-body{position:relative;display:flex;flex-direction:column;gap:14px;min-height:0;overflow:auto;overscroll-behavior:contain;padding:clamp(20px,3vw,34px)}
.vx-x{position:absolute;z-index:3;top:10px;right:10px;width:44px;height:44px;border-radius:22px;border:0;background:transparent;color:#9aa4b1;cursor:pointer;display:grid;place-items:center;touch-action:manipulation}
.vx-x:hover{background:rgba(255,255,255,.07);color:#fff}
.vx-x svg,.vx-ic svg,.vb-b svg,.vb-edit svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.vx-t{margin:4px 48px 0 0;font:italic 400 clamp(30px,3.4vw,44px)/1.04 "Instrument Serif",Georgia,"Times New Roman",serif;letter-spacing:.005em;color:#f2f4f6;overflow-wrap:anywhere}
.vx-meta{margin-top:-6px;color:var(--accent,#D6A461);font:500 12.5px/1.4 var(--sans,system-ui);letter-spacing:.02em}
.vx-intro{margin:0;color:#aeb8c4;font:14.5px/1.6 var(--sans,system-ui);max-width:62ch}
.vx-acts{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.vx-go{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;text-align:left;min-height:58px;padding:10px 18px 10px 14px;
  border:0;border-radius:14px;background:var(--accent,#D6A461);color:var(--on-accent,#1B1408);cursor:pointer;touch-action:manipulation;box-shadow:0 8px 24px rgba(214,164,97,.22);transition:background .15s,transform .15s}
.vx-go:hover{background:var(--accent2,#E6BD85)}.vx-go:active{transform:scale(.99)}
.vx-go .vx-ic{grid-row:1 / span 2;width:36px;height:36px;border-radius:10px;background:rgba(27,20,8,.12);display:grid;place-items:center}
.vx-go-t{font:650 16px/1.15 var(--sans,system-ui)}
.vx-go small{font:500 12px/1.3 var(--sans,system-ui);opacity:.72;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vx-views{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.vx-view{display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.1);background:#1a1f27;color:#e3e7ec;
  text-align:left;cursor:pointer;touch-action:manipulation;transition:background .15s,border-color .15s;min-width:0}
.vx-view:hover{background:#212833;border-color:rgba(214,164,97,.45)}
.vx-view .vx-ic{flex:none;color:var(--accent,#D6A461);display:grid;place-items:center}
.vx-vt{display:flex;flex-direction:column;min-width:0}
.vx-vt small{font:500 10.5px/1.2 var(--sans,system-ui);letter-spacing:.06em;text-transform:uppercase;color:#7f8a97}
.vx-vt b{font:600 13.5px/1.25 var(--sans,system-ui);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vx-all .vx-ic{color:#9aa4b1}
.vx-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:2px;padding-top:14px;border-top:1px solid rgba(255,255,255,.07)}
.vx-edit{min-height:42px;padding:0 16px;border-radius:21px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#e7ebf0;font:600 13.5px var(--sans,system-ui);cursor:pointer;touch-action:manipulation}
.vx-edit:hover{background:rgba(255,255,255,.06)}
.vx-new{color:var(--accent,#D6A461);font:600 13.5px var(--sans,system-ui);text-decoration:none;padding:10px 0}
.vx-new:hover{text-decoration:underline}
.vx-note{color:#6f7a87;font:12px/1.5 var(--sans,system-ui)}

/* one column: the picture on top, the card scrolls inside the screen */
@media (max-width:759px){
  .vx-wrap{align-items:flex-end;padding:0}
  .vc{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);width:100%;max-height:min(100%,100dvh);border-radius:20px 20px 0 0;border-bottom:0}
  .vx-hero{aspect-ratio:16/10;max-height:38vh;min-height:150px}
  .vx-hero::after{background:linear-gradient(180deg,rgba(18,22,28,0) 55%,rgba(18,22,28,.9))}
  .vx-body{padding:18px 18px calc(18px + env(safe-area-inset-bottom,0px));gap:12px}
  .vx-x{background:rgba(11,13,16,.55);color:#fff;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
  .vx-t{margin-right:0;font-size:clamp(28px,8.5vw,38px)}
  .vx-intro{font-size:14px;line-height:1.55}
  .vx-go{min-height:56px}
  .vx-foot{flex-direction:column;align-items:stretch}
  .vx-edit{width:100%}
  .vx-new{text-align:center}
}
/* narrow phones: the main views one under another */
@media (max-width:380px){ .vx-views{grid-template-columns:1fr} .vx-body{padding-left:14px;padding-right:14px} }
/* a phone on its side (short and wide): two columns, the picture beside, everything scrolls on the right */
@media (min-width:560px) and (max-height:520px){
  .vx-wrap{align-items:center;padding:max(10px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))}
  .vc{grid-template-columns:minmax(0,1fr) minmax(300px,1.1fr);grid-template-rows:none;height:100%;max-height:100%;border-radius:16px;border-bottom:1px solid rgba(255,255,255,.08)}
  .vx-hero{aspect-ratio:auto;max-height:none;min-height:0}
  .vx-hero::after{background:linear-gradient(90deg,rgba(18,22,28,0) 70%,rgba(18,22,28,.85))}
  .vx-body{padding:16px 18px;gap:10px}
  .vx-x{top:6px;right:6px}
  .vx-t{font-size:30px;margin-right:44px}
  .vx-intro{font-size:13px;line-height:1.5}
  .vx-foot{flex-direction:row;align-items:center}
  .vx-edit{width:auto}
}
@media (prefers-reduced-motion:reduce){.vx-wrap,.vc,.vx-hero img{transition:none}}

/* ── every view (a PC's popover) ───────────────────────────────────────── */
.vx-pop{position:fixed;z-index:9550;width:min(320px,calc(100vw - 16px));max-height:min(70vh,560px);overflow:auto;padding:6px;border-radius:14px;
  background:#161a21;border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 50px rgba(0,0,0,.5);font-family:var(--sans,system-ui)}
.vx-pop-g{padding:10px 10px 4px;font:600 10.5px/1 var(--sans,system-ui);letter-spacing:.08em;text-transform:uppercase;color:#7f8a97}
.vx-pop-r{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:6px 10px;border:0;border-radius:9px;background:transparent;color:#dfe4ea;font:500 13px var(--sans,system-ui);text-align:left;cursor:pointer}
.vx-pop-r span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vx-pop-r:hover{background:#212833}.vx-pop-r.on{background:var(--accent-soft,rgba(214,164,97,.14));color:var(--accent2,#E6BD85)}
.vx-pop-r .vx-ic{color:var(--accent,#D6A461);display:grid;place-items:center;flex:none}

/* ── the visitor's bar on a PC (ViewerMode's bar, cloud/visit.js fills it) ── */
.guest-bar.visit-bar{gap:6px;padding:6px 6px 6px 10px;border-radius:14px;max-width:calc(100vw - 28px);flex-wrap:nowrap}
.vb-home{display:inline-flex;align-items:center;padding:4px 6px 4px 2px;color:#e7ebf0}
.vb-home{gap:7px;font:600 13px/1 system-ui,sans-serif;letter-spacing:.04em}
.vb-home svg{height:17px;width:auto;fill:currentColor}
.vb-home:hover{color:var(--accent,#D6A461)}
.visit-bar .gb-title{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 6px 0 8px;border-left:1px solid rgba(255,255,255,.12)}
.vb-b,.vb-edit{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;border-radius:10px;border:1px solid #3a4150;background:#232934;color:#e8eaed;font:500 13px var(--sans,system-ui);cursor:pointer;white-space:nowrap}
.vb-b:hover{background:#2b3240}
.vb-b svg,.vb-edit svg{width:16px;height:16px}
.vb-tools{display:inline-flex;align-items:center;gap:4px}
.vb-edit{background:var(--accent,#D6A461);border-color:var(--accent,#D6A461);color:var(--on-accent,#1B1408);font-weight:600;margin-left:4px}
.vb-edit:hover{background:var(--accent2,#E6BD85)}
@media (max-width:1100px){ .vb-b span{display:none} .vb-b{padding:0 9px} .visit-bar .gb-title{max-width:160px} }
@media (max-width:860px){ .visit-bar .gb-title{display:none} .vb-tools .vh-xbar{display:none} }

/* ── the visitor's screen: nothing of the editor ─────────────────────────── */
body.visit-mode .statusbar,body.visit-mode #statusbar,body.visit-mode .story-bar,body.visit-mode .sheet3d-bar,body.visit-mode .zhint,
body.visit-mode .st-showbar .st-btn,body.visit-mode #cloud-bar,body.visit-mode .perf-hud{display:none!important}
body.visit-mode .st-showbar{opacity:1!important}
/* the phone header gets the About button (viewerhud.js) */
body.vh .vh-about{color:#fff}

/* a first 3D view on a PC: how to move */
.vx-hint{position:fixed;left:50%;bottom:calc(86px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:9000;display:flex;flex-direction:column;align-items:center;gap:3px;max-width:calc(100vw - 32px);
  padding:11px 18px;border-radius:14px;background:rgba(18,22,28,.9);border:1px solid rgba(255,255,255,.1);color:#fff;font:13px/1.4 var(--sans,system-ui);text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.45);transition:opacity .4s;pointer-events:none}
.vx-hint b{font-size:14px}.vx-hint span{color:#aeb8c4}.vx-hint.out{opacity:0}

/* showcase hides the rails but they kept their width: the page could be nudged sideways by a pixel */
body.showcase .st-rail{display:none}
body.is-mobile .vx-hint{bottom:auto;top:calc(env(safe-area-inset-top,0px) + 66px)}

/* a PC: the visitor's bar steps aside while the mouse rests (Showcase's own idle), like the slide pill */
body.showcase .guest-bar.visit-bar{transition:opacity .6s,transform .6s}
body.showcase.st-idle .guest-bar.visit-bar{opacity:0;transform:translateY(8px);pointer-events:none}

/* ── the showcase's public room (js/cloud/visitroom.js): people, a chat that forgets ── */
.vr-panel{position:fixed;z-index:9560;left:14px;bottom:78px;width:min(340px,calc(100vw - 28px));max-height:min(60vh,520px);display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:16px;
  background:rgba(20,24,31,.86);-webkit-backdrop-filter:blur(16px) saturate(1.15);backdrop-filter:blur(16px) saturate(1.15);border:1px solid rgba(255,255,255,.12);box-shadow:0 18px 50px rgba(0,0,0,.5);color:#e7ebf0;font:13.5px/1.45 var(--sans,system-ui)}
.vr-panel.vr-sheet{left:0;right:0;bottom:0;width:auto;max-height:70vh;border-radius:18px 18px 0 0;padding:14px 14px calc(14px + env(safe-area-inset-bottom,0px))}
.vr-head{display:flex;align-items:center;justify-content:space-between}.vr-head b{font-size:15px}
.vr-x{width:36px;height:36px;border:0;border-radius:18px;background:transparent;color:#9aa4b1;font-size:20px;cursor:pointer}
.vr-sub{margin:0;color:#aeb8c4}.vr-legal{margin:0;color:#7f8a97;font-size:11.5px}.vr-legal a{color:var(--accent2,#E6BD85)}
.vr-join,.vr-say{display:flex;gap:8px}.vr-join input,.vr-say input{flex:1;min-width:0;min-height:40px;padding:0 11px;border-radius:10px;border:1px solid #2f3742;background:rgba(10,12,16,.7);color:#e7ebf0;font:inherit}
.vr-join button,.vr-say button{flex:none;min-height:40px;padding:0 14px;border-radius:10px;border:0;background:var(--accent,#D6A461);color:var(--on-accent,#1B1408);font:600 13.5px var(--sans,system-ui);cursor:pointer}
.vr-err{min-height:0;color:#ff8a7a;font-size:12.5px}
.vr-vis{display:flex;align-items:center;gap:8px;color:#cfd6de;font-size:12.5px}.vr-vis input{width:20px;height:20px;accent-color:var(--accent,#D6A461)}
.vr-people{display:flex;flex-wrap:wrap;gap:5px}.vr-person{display:inline-flex;align-items:center;gap:6px;padding:2px 9px 2px 6px;border-radius:12px;background:rgba(255,255,255,.06);font-size:12px}
.vr-person::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--c,#9aa4b1)}.vr-alone{color:#7f8a97;font-size:12px}
.vr-log{flex:1 1 auto;min-height:60px;max-height:260px;overflow:auto;display:flex;flex-direction:column;gap:4px;padding:2px 0}
.vr-line{position:relative;display:flex;gap:6px;align-items:baseline;padding:4px 30px 4px 8px;border-radius:9px;background:rgba(255,255,255,.04);animation:vr-fade 30s linear forwards}
.vr-line.mine{background:rgba(214,164,97,.12)}.vr-line b{flex:none;font-weight:600}.vr-text{min-width:0;overflow-wrap:anywhere;color:#dfe4ea}
@keyframes vr-fade{to{opacity:0}}
.vr-more{position:absolute;right:2px;top:1px;width:28px;height:28px;border:0;border-radius:14px;background:transparent;color:#9aa4b1;cursor:pointer}
.vr-menu{position:absolute;right:0;top:28px;z-index:2;display:flex;flex-direction:column;min-width:180px;padding:4px;border-radius:10px;background:#1b2028;border:1px solid rgba(255,255,255,.12);box-shadow:0 10px 30px rgba(0,0,0,.5)}
.vr-menu button{min-height:36px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:#e7ebf0;text-align:left;font:inherit;cursor:pointer}.vr-menu button:hover{background:#262d38}
.vr-btn.vr-new,.vh-people.vr-new{box-shadow:0 0 0 2px var(--accent,#D6A461)}
body.vh .vh-people span{display:none}
/* the cover: 'Meet the other visitors' and the mailing list */
.vx-room:empty{display:none}.vx-meet{width:100%}.vx-meet .vx-ic{color:#7ee0a4}
.vx-interest{min-height:42px;padding:0 16px;border-radius:21px;border:1px solid rgba(214,164,97,.55);background:rgba(214,164,97,.1);color:var(--accent2,#E6BD85);font:600 13.5px var(--sans,system-ui);cursor:pointer;align-self:flex-start}
.vx-interest:hover{background:rgba(214,164,97,.18)}
@media (max-width:759px){.vx-interest{width:100%}}
/* Pablo's card (js/support.js) from the cover */
.vx-support{min-height:38px;margin-top:8px;padding:0 4px;border:0;background:transparent;color:var(--ink2,#b9c3cf);font:500 13px var(--sans,system-ui);text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(214,164,97,.5);cursor:pointer;align-self:flex-start}
.vx-support:hover{color:var(--accent2,#E6BD85)}

/* the cover's "try it" pair: a live copy to edit + the AI demo (js/ai/demo.js) */
.vx-duo{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.vx-go2{display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 12px;border-radius:14px;border:1px solid rgba(214,164,97,.55);background:rgba(214,164,97,.1);color:#f1e3cf;text-align:left;cursor:pointer;touch-action:manipulation;font:inherit}
.vx-go2:hover{background:rgba(214,164,97,.2)}
.vx-go2 .vx-ic{flex:none;width:32px;height:32px;border-radius:9px;background:rgba(214,164,97,.18);display:grid;place-items:center}
.vx-go2 .vx-ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.vx-go2 b{display:block;font:650 14px/1.2 var(--sans,system-ui)}.vx-go2 small{display:block;font:500 11.5px/1.3 var(--sans,system-ui);opacity:.72}
@media (max-width:420px){.vx-duo{grid-template-columns:1fr}}
.vx-go2 small{text-transform:none!important;letter-spacing:0!important}
