/* The live demo of the gathering room: the same ink, gold and faces as /rooms, laid out as a
   presenter's console. Rail of steps on the left, the two devices on the stage, Next at the foot. */
:root{
  --ink:#0C0A09; --ink-2:#1C1917; --ink-3:#292524; --bezel:#0E0D0B;
  --paper:#FAFAF9; --muted:rgba(250,250,249,0.62); --dim:rgba(250,250,249,0.42); --line:rgba(255,255,255,0.08);
  --gold:#D4AF37; --gold-warm:#D4A574; --gold-soft:rgba(212,175,55,0.14);
  --display:'Playfair Display',Georgia,'Times New Roman',serif;
  --body:'Inter',-apple-system,BlinkMacSystemFont,'Helvetica Neue',Helvetica,Arial,sans-serif;
  --ease:cubic-bezier(0.22,1,0.36,1);
  --rail:300px;
}
*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{font-family:var(--body);background:var(--ink);color:var(--paper);-webkit-font-smoothing:antialiased;line-height:1.5;display:flex;overflow:hidden}
a{color:inherit}
button{font:inherit;color:inherit}
::selection{background:var(--gold-soft)}

.eyebrow{font-size:11px;letter-spacing:2.2px;text-transform:uppercase;color:var(--gold);font-weight:600}

/* ---------- rail ---------- */
.rail{width:var(--rail);flex:0 0 var(--rail);height:100vh;overflow-y:auto;background:var(--ink-2);border-right:1px solid var(--line);padding:22px 16px 40px;transition:margin .3s var(--ease)}
body.rail-hidden .rail{margin-left:calc(-1 * var(--rail))}
.brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--paper)}
.brand svg{width:26px;height:26px;stroke:var(--gold)}
.brand span{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:22px;font-weight:300;letter-spacing:-0.5px}
.rail-tag{margin:6px 0 0 34px;font-size:11px;letter-spacing:1.6px;text-transform:uppercase;color:var(--dim);font-weight:600}
.rail-blurb{margin:18px 2px 20px;font-size:12.5px;line-height:1.55;color:var(--muted)}
.chapter{margin-top:14px}
.chapter h2{font-size:11px;letter-spacing:2px;text-transform:uppercase;color:var(--gold);font-weight:600;padding:0 12px 6px}
.chapter ol{list-style:none;counter-reset:s}
.chapter li{counter-increment:s}
.chapter li button{width:100%;text-align:left;border:0;cursor:pointer;background:transparent;color:var(--paper);padding:9px 12px 9px 40px;border-radius:11px;position:relative;line-height:1.35;font-size:13.5px;transition:background .13s}
.chapter li button::before{content:attr(data-n);position:absolute;left:11px;top:9px;width:20px;height:20px;border-radius:50%;background:var(--ink-3);color:var(--dim);font-size:10.5px;display:flex;align-items:center;justify-content:center;font-weight:600}
.chapter li button:hover{background:rgba(255,255,255,0.05)}
.chapter li button[aria-current="step"]{background:var(--gold-soft);color:var(--gold)}
.chapter li button[aria-current="step"]::before{background:var(--gold);color:var(--ink)}
.rail-keys{margin-top:24px;padding-top:14px;border-top:1px solid var(--line);font-size:11px;line-height:1.6;color:var(--dim)}

/* ---------- main ---------- */
.main{flex:1;min-width:0;height:100vh;display:flex;flex-direction:column}
.top{display:flex;align-items:center;gap:14px;padding:14px 22px;border-bottom:1px solid var(--line);flex-shrink:0}
.rail-toggle{width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:rgba(255,255,255,0.05);display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}
.rail-toggle svg{width:18px;height:18px}
.top-words{flex:1;min-width:0}
.top h1{font-family:var(--display);font-weight:400;font-size:22px;line-height:1.2;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stage-switch{display:flex;gap:4px;padding:3px;border:1px solid var(--line);border-radius:9999px;background:rgba(28,25,23,0.9);flex-shrink:0}
.stage-switch button{appearance:none;border:0;background:transparent;color:var(--muted);font-size:12.5px;font-weight:500;padding:7px 14px;border-radius:9999px;cursor:pointer;transition:color .2s,background .2s}
.stage-switch button[aria-pressed="true"]{background:var(--gold);color:var(--ink);font-weight:600}
.ghost{appearance:none;border:1px solid var(--line);background:rgba(255,255,255,0.05);color:var(--muted);font-size:12.5px;font-weight:500;padding:8px 14px;border-radius:9999px;cursor:pointer;text-decoration:none;white-space:nowrap;transition:color .2s,border-color .2s}
.ghost:hover{color:var(--paper);border-color:rgba(255,255,255,0.25)}
.gold{appearance:none;border:0;background:var(--gold);color:var(--ink);font-size:13.5px;font-weight:600;padding:10px 22px;border-radius:9999px;cursor:pointer;transition:transform .3s var(--ease)}
.gold:hover{transform:scale(1.04)}
.gold:disabled,.ghost:disabled{opacity:.4;cursor:default;transform:none}
button:focus-visible,a:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

.notes{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:12px 28px;padding:12px 22px 6px;flex-shrink:0}
.say{font-size:14.5px;line-height:1.55;color:var(--muted);max-width:68ch}
.try{font-size:13px;line-height:1.55;color:var(--paper);padding:10px 14px;border-radius:14px;background:var(--gold-soft);border:1px solid rgba(212,175,55,0.3);align-self:start}
.try::before{content:"Try";display:block;font-size:10px;letter-spacing:2px;text-transform:uppercase;color:var(--gold);font-weight:600;margin-bottom:3px}
.try:empty{display:none}

/* ---------- stage ---------- */
.stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:28px;padding:14px 22px 10px;overflow:hidden}
.device{position:relative;flex-shrink:0}
.device-label{margin-top:8px;text-align:center;font-size:11px;letter-spacing:1.6px;text-transform:uppercase;color:var(--dim);font-weight:600}
/* The desktop: a 1440 x 900 window in a bezel, scaled uniformly by JS so the room lays out as it does on a real desktop. */
.desktop-shell{position:relative;width:1460px;height:920px;transform-origin:top left;background:var(--bezel);border:1px solid rgba(255,255,255,0.08);border-radius:16px;padding:10px;box-shadow:0 40px 90px rgba(0,0,0,0.55)}
.desktop-shell::before{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);width:120px;height:4px;border-radius:0 0 4px 4px;background:rgba(255,255,255,0.06)}
.desktop-shell iframe{width:1440px;height:900px;border:0;border-radius:8px;background:var(--ink-2);display:block}
/* The phone: iPhone 17 Pro Max, 440 x 956 points inside the front glass, the same drawing the demo launcher uses. */
.phone-shell{position:relative;width:472px;height:988px;transform-origin:top left;border-radius:14.4% / 7%;background:#070808;box-shadow:0 30px 70px rgba(0,0,0,0.7)}
.phone-shell::after{content:"";position:absolute;inset:0;background:url('/assets/iphone-17-pro-max-front.svg') center/100% 100% no-repeat;z-index:2;pointer-events:none}
.phone-shell iframe{position:absolute;left:3.33%;top:1.59%;width:93.34%;height:96.82%;border:0;border-radius:13.5% / 6.25%;background:var(--ink-2);display:block}
body[data-stage="desktop"] .device.phone,body[data-stage="phone"] .device.desktop{display:none}

.paging{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 22px 14px;border-top:1px solid var(--line);flex-shrink:0}
#progress{font-size:12px;color:var(--dim)}

/* ---------- narrow screens: the phone alone, the rail as a sheet ---------- */
@media(max-width:1000px){
  :root{--rail:280px}
  .rail{position:fixed;left:0;top:0;z-index:30;box-shadow:0 0 60px rgba(0,0,0,0.6)}
  body:not(.rail-open) .rail{margin-left:calc(-1 * var(--rail))}
  body.rail-open .rail{margin-left:0}
  .main{height:100dvh}
  .stage-switch,.top .ghost{display:none}
  .notes{grid-template-columns:1fr;padding:10px 16px 4px}
  .say{font-size:13.5px}
  .stage{padding:8px 0 0}
  .device.desktop{display:none!important}
  .device.phone{display:block!important;width:100%!important;height:100%!important}
  .phone-shell{width:100%!important;height:100%!important;transform:none!important;border-radius:0;box-shadow:none}
  .phone-shell::after{display:none}
  .phone-shell iframe{left:0;top:0;width:100%;height:100%;border-radius:0}
  .device-label{display:none}
  .top h1{font-size:18px}
}
@media(prefers-reduced-motion:reduce){.rail,.gold{transition:none}}
