/* ═══════════════════════════════════════════════════════════
   PolyXR · shared shell
   iRex Studio design system. Brand colours are fixed — do not
   substitute. Loaded by the landing page and both demos.
   ═══════════════════════════════════════════════════════════ */

:root {
  --green:        #7ED957;
  --green-dark:   #5CBF3F;
  --green-soft:   #A8EC89;
  --green-light:  #E9FBE3;
  --charcoal:     #24272E;
  --black:        #0E0E0E;
  --white:        #FFFFFF;
  --error:        #EF4444;

  --glass-1:      rgba(24, 27, 32, 0.74);
  --glass-2:      rgba(36, 39, 46, 0.44);
  --glass-3:      rgba(255, 255, 255, 0.07);
  --glass-brd:    rgba(255, 255, 255, 0.11);
  --glass-brd-hi: rgba(255, 255, 255, 0.20);

  --text:         #FFFFFF;
  --text-muted:   rgba(255, 255, 255, 0.72);
  --text-faint:   rgba(255, 255, 255, 0.55);

  --green-wash:   rgba(126, 217, 87, 0.12);
  --green-wash-2: rgba(126, 217, 87, 0.20);
  --green-brd:    rgba(126, 217, 87, 0.45);

  --shadow-md:    0 8px 24px rgba(0, 0, 0, 0.34);
  --shadow-lg:    0 16px 48px rgba(0, 0, 0, 0.50);
  --shadow-dark:  0 20px 60px rgba(0, 0, 0, 0.36);
  --glow-green:   0 10px 30px rgba(126, 217, 87, 0.26);

  --blur-sm: 8px;
  --blur-md: 14px;
  --blur-lg: 22px;

  --r-sm: 6px;  --r-md: 12px; --r-lg: 20px;
  --r-xl: 28px; --r-pill: 999px;

  --font-head: 'Anek Bangla', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overscroll-behavior: none; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, a { font-family: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ═══════════════ Shell ═══════════════ */
.app { position: fixed; inset: 0; }

.stage {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #23262D 0%, var(--black) 100%);
  overflow: hidden;
}
#webgl { position: relative; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; }

.topbar, .rail, .panel, .console, .credit, .pop { z-index: 20; }

/* On desktop the dock is transparent to layout — rail, panel and player each
   float where they were placed. On mobile it becomes a real flex column so
   they physically cannot overlap. */
.dock { display: contents; }

/* Ambient focus — the chrome recedes when nothing is being touched */
.topbar, .rail, .console, .credit {
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.app.is-vr .topbar, .app.is-vr .rail, .app.is-vr .panel,
.app.is-vr .console, .app.is-vr .credit { opacity: 0; pointer-events: none; }
.app.is-idle .topbar   { opacity: .26; }
.app.is-idle .rail     { opacity: .26; }
.app.is-idle .console  { opacity: .30; }
.app.is-idle .credit   { opacity: .14; }

/* ═══════════════ Top bar ═══════════════ */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; padding: 18px 20px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand-pill {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 18px 9px 14px;
  border-radius: var(--r-pill);
  background: var(--glass-1);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md));
  box-shadow: var(--shadow-md);
  min-width: 0; text-decoration: none;
  transition: border-color .18s ease;
}
a.brand-pill:hover { border-color: var(--green-brd); }
/* NOTE — deliberate deviation. 22px tall renders 24.6px wide, under the 32px
   minimum the brand guidelines set for the standalone icon. Sized to sit level
   with the title at client request; see README. */
.brand-icon { height: 22px; width: auto; display: block; flex-shrink: 0; }
.brand-title {
  font-family: var(--font-head);
  font-stretch: 75%; font-variation-settings: 'wdth' 75;
  font-size: 22px; font-weight: 700; line-height: 1.1;
  letter-spacing: .01em; white-space: nowrap; color: var(--white);
  overflow: hidden; text-overflow: ellipsis;
}
.brand-back {
  width: 15px; height: 15px; flex-shrink: 0; color: var(--text-faint);
  transition: color .18s ease, transform .18s ease;
}
a.brand-pill:hover .brand-back { color: var(--green); transform: translateX(-2px); }

.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; position: relative; }

/* ═══════════════ Buttons ═══════════════ */
.icon-btn {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  background: var(--glass-1);
  border: 1px solid var(--glass-brd);
  color: var(--white);
  cursor: pointer;
  backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md));
  box-shadow: var(--shadow-md);
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--green-wash); border-color: var(--green-brd); color: var(--green); }
.icon-btn:active { transform: scale(.93); }
.icon-btn:disabled { opacity: .38; cursor: not-allowed; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.is-open { background: var(--green-wash-2); border-color: var(--green); color: var(--green); }

.icon-btn.primary {
  background: var(--green); border-color: var(--green);
  color: var(--charcoal); box-shadow: var(--glow-green);
}
.icon-btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--charcoal); }

.icon-btn.ghost {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.06); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.icon-btn.ghost svg { width: 16px; height: 16px; }
.icon-btn.ghost.is-on { background: var(--green); border-color: var(--green); color: var(--charcoal); }
.icon-btn.ghost.is-on:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--charcoal); }

/* ═══════════════ Popovers ═══════════════ */
.pop {
  position: absolute; top: 54px; right: 0;
  width: 316px; max-width: calc(100vw - 40px);
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--glass-1);
  border: 1px solid var(--glass-brd-hi);
  backdrop-filter: blur(var(--blur-lg)); -webkit-backdrop-filter: blur(var(--blur-lg));
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-8px) scale(.985);
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.pop-title {
  font-size: 9.5px; font-weight: 600; color: var(--green);
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px;
}
.pop-body { font-size: 12.5px; color: var(--text-muted); line-height: 1.65; }
.pop-body strong { color: var(--white); font-weight: 600; }

.ctrl-list { display: grid; gap: 9px; }
.ctrl-row {
  display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-muted);
}
.ctrl-keys-cell { display: flex; gap: 4px; flex-wrap: wrap; }
kbd {
  font-family: var(--font-body);
  font-size: 10px; font-weight: 500;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--glass-brd); border-bottom-width: 2px;
  border-radius: var(--r-sm); padding: 2px 6px; color: var(--white);
  min-width: 22px; text-align: center; line-height: 1.5;
}
.gesture {
  font-size: 10px; font-weight: 600; color: var(--green);
  letter-spacing: .04em; text-transform: uppercase;
}
.ctrl-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .ctrl-keys { display: none; }
  .ctrl-touch { display: grid; }
}

/* ═══════════════ Rail ═══════════════ */
.rail {
  position: absolute; left: 20px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px;
  padding: 9px 8px;
  border-radius: var(--r-pill);
  background: var(--glass-1);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(var(--blur-lg)); -webkit-backdrop-filter: blur(var(--blur-lg));
  box-shadow: var(--shadow-dark);
}
.rail-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.comp-item { position: relative; display: flex; }

.comp-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: rgba(255,255,255,.05);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.comp-btn:hover { background: rgba(255,255,255,.12); color: var(--white); }
.comp-btn svg { width: 22px; height: 22px; }
.comp-btn .flip { transform: scaleX(-1); }
.comp-item.is-active .comp-btn {
  background: var(--green); border-color: var(--green);
  color: var(--charcoal); box-shadow: var(--glow-green);
}
/* Steps already played, in a sequence-based demo */
.comp-item.is-done .comp-btn { border-color: var(--green-brd); color: var(--green-soft); }

.comp-tip {
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%) translateX(-4px);
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--glass-1);
  border: 1px solid var(--glass-brd-hi);
  backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md));
  font-size: 11.5px; font-weight: 600; color: var(--white);
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .18s ease, transform .18s ease;
  z-index: 3;
}
.comp-btn:hover + .comp-tip,
.comp-btn:focus-visible + .comp-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
.comp-item.is-active .comp-tip { opacity: 0; }

/* ═══════════════ Panel ═══════════════ */
.panel {
  position: absolute; left: 92px; top: 50%;
  transform: translateY(-50%) translateX(-8px);
  width: 320px; max-width: calc(100vw - 120px);
  border-radius: var(--r-lg);
  background: var(--glass-1);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(var(--blur-lg)); -webkit-backdrop-filter: blur(var(--blur-lg));
  box-shadow: var(--shadow-dark);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  overflow: hidden;
}
.panel.is-open { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0); }

.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 15px 14px 0 17px;
}
.panel-eyebrow {
  font-size: 9.5px; font-weight: 600; color: var(--green);
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 5px;
}
.panel-title {
  font-family: var(--font-head);
  font-stretch: 75%; font-variation-settings: 'wdth' 75;
  font-size: 24px; font-weight: 700; line-height: 1.08; color: var(--white);
}
.panel-close {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.07); color: var(--text-muted);
  transition: background .18s ease, color .18s ease;
}
.panel-close:hover { background: rgba(255,255,255,.14); color: var(--white); }
.panel-close svg { width: 14px; height: 14px; }
.panel-brief { padding: 9px 17px 15px; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }
.panel-foot { padding: 0 17px 15px; }

.clip-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px 8px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--green-brd);
  background: var(--green-wash);
  color: var(--green);
  font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.clip-btn:hover { background: var(--green); color: var(--charcoal); }
.clip-btn svg { width: 17px; height: 17px; }
.panel-noclip { font-size: 11px; color: var(--text-faint); }

/* ═══════════════ Clip lightbox ═══════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(5, 6, 7, 0.82);
  backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm));
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
.lightbox.is-open { display: flex; }
.lightbox-inner {
  width: min(920px, 100%);
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--glass-1);
  border: 1px solid var(--glass-brd-hi);
  box-shadow: var(--shadow-lg);
  animation: modalIn .28s var(--ease);
}
.lightbox-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 14px 13px 18px;
  border-bottom: 1px solid var(--glass-brd);
}
.lightbox-title {
  font-family: var(--font-head);
  font-stretch: 75%; font-variation-settings: 'wdth' 75;
  font-size: 19px; font-weight: 700; color: var(--white); line-height: 1.1;
}
.lightbox-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.lightbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.985) }
  to   { opacity: 1; transform: none }
}

/* ═══════════════ Hotspots ═══════════════ */
#hotspot-layer { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.hotspot {
  position: absolute;
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%; border: 0; padding: 0;
  background: rgba(14,14,14,.5);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.5), 0 2px 8px rgba(0,0,0,.5);
  backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm));
  cursor: pointer; pointer-events: auto;
  display: grid; place-items: center;
  transition: transform .22s var(--ease), opacity .25s ease, box-shadow .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hotspot::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--white); transition: all .2s ease;
}
.hotspot:hover { transform: scale(1.2); background: rgba(126,217,87,.85); }
.hotspot:hover::after { background: var(--charcoal); }
.hotspot.is-active {
  background: var(--green);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.85), 0 0 0 7px rgba(126,217,87,.24), 0 2px 10px rgba(0,0,0,.5);
}
.hotspot.is-active::after { width: 8px; height: 8px; background: var(--charcoal); }
.hotspot.is-hidden { opacity: 0; pointer-events: none; transform: scale(.55); }

.hotspot-label {
  position: absolute; transform: translate(-50%, -50%);
  background: var(--glass-1);
  backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-brd-hi);
  color: var(--white);
  font-size: 11.5px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-pill);
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .2s ease; z-index: 11;
}
.hotspot-label.is-shown { opacity: 1; }

/* ═══════════════ Player ═══════════════ */
.console {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px;
  border-radius: var(--r-pill);
  background: var(--glass-1);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(var(--blur-lg)); -webkit-backdrop-filter: blur(var(--blur-lg));
  box-shadow: var(--shadow-dark);
}
#play-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; border: 0;
  background: var(--green); color: var(--charcoal);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--glow-green);
  transition: transform .18s var(--ease), background .18s ease;
  -webkit-tap-highlight-color: transparent;
}
#play-btn:hover { background: var(--green-dark); transform: scale(1.05); }
#play-btn:active { transform: scale(.94); }
#play-btn svg { width: 16px; height: 16px; }

.console-div { width: 1px; height: 26px; background: var(--glass-brd); flex-shrink: 0; }

.console-tools { display: flex; gap: 8px; flex-shrink: 0; }

/* ═══════════════ Credit ═══════════════ */
.credit {
  position: absolute; right: 20px; bottom: 26px;
  font-size: 9.5px; color: var(--text-faint); font-weight: 500; letter-spacing: .1em;
  pointer-events: auto;
}
.credit strong { color: var(--text-muted); font-weight: 600; }

/* ═══════════════ Loader ═══════════════ */
#loader-overlay {
  position: absolute; inset: 0; z-index: 40;
  background: var(--black);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; transition: opacity .7s var(--ease);
}
#loader-overlay.is-hidden { opacity: 0; pointer-events: none; }
.loader-mark { height: 52px; width: auto; }
.loader-text {
  font-size: 9.5px; color: var(--text-faint);
  font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
}
.loader-bar { width: 190px; height: 2px; background: rgba(255,255,255,.12); border-radius: var(--r-pill); overflow: hidden; }
#loader-fill { width: 0%; height: 100%; background: var(--green); transition: width .25s ease; }
.loader-pct { font-size: 10px; color: var(--text-faint); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Intro title card */
.intro { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.intro.is-shown { opacity: 1; }
.intro-title {
  font-family: var(--font-head);
  font-stretch: 75%; font-variation-settings: 'wdth' 75;
  font-size: clamp(38px, 7vw, 76px); font-weight: 800; line-height: .98;
  color: var(--white); letter-spacing: .01em; text-align: center;
  text-shadow: 0 6px 40px rgba(0,0,0,.6);
}
.intro-sub {
  margin-top: 10px; text-align: center;
  font-size: 10.5px; font-weight: 600; letter-spacing: .28em;
  text-transform: uppercase; color: var(--green);
}

/* ═══════════════ Toast ═══════════════ */
.toast {
  position: fixed; bottom: 110px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--glass-1);
  backdrop-filter: blur(var(--blur-lg)); -webkit-backdrop-filter: blur(var(--blur-lg));
  border: 1px solid var(--glass-brd-hi);
  color: var(--white);
  padding: 12px 20px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 200; max-width: 90%; text-align: center; line-height: 1.5;
}
.toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════ Page transition ═══════════════
   A short curtain so moving between the landing page and a demo reads as one
   app changing scenes rather than a browser navigation. */
.curtain {
  position: fixed; inset: 0; z-index: 500;
  background: var(--black);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .34s var(--ease);
}
.curtain.is-on { opacity: 1; pointer-events: auto; }
.curtain-mark { height: 46px; width: auto; opacity: .9; }
body.is-entering .curtain { opacity: 1; pointer-events: auto; }

/* ═══════════════ Tablet ═══════════════ */
@media (max-width: 1080px) {
  .panel { width: 292px; }
  .credit { display: none; }
}

/* ═══════════════ Mobile ═══════════════
   Rail, panel and player stack in normal flow — no pixel offsets to get
   wrong, so nothing can overlap however tall the player becomes. */
@media (max-width: 760px) {
  .topbar { padding: 12px 12px; gap: 8px; }
  .brand-pill { padding: 7px 15px 7px 11px; gap: 9px; }
  .brand-icon { height: 20px; }   /* 22.4px wide — see note above */
  .brand-title { font-size: 18px; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg { width: 17px; height: 17px; }

  .pop { top: 50px; width: calc(100vw - 24px); right: -4px; }

  .dock {
    display: flex; flex-direction: column;
    position: fixed; left: 0; right: 0; bottom: 0;
    /* The rail, panel and console go static inside the dock here, which turns
       their z-index:20 off — while the canvas keeps z-index:1. Without a
       z-index of its own the dock paints underneath the model. */
    z-index: 20;
    gap: 8px;
    padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
  }
  .dock > * { pointer-events: auto; }
  .panel   { order: 1; }
  .rail    { order: 2; }
  .console { order: 3; }

  .rail {
    position: static; transform: none;
    flex-direction: row;
    padding: 7px 8px; border-radius: var(--r-xl);
    overflow-x: auto; scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-list { flex-direction: row; }
  .comp-btn { width: 42px; height: 42px; }
  .comp-tip { display: none; }

  .panel {
    position: static; transform: none;
    width: auto; max-width: none;
    max-height: 34dvh; overflow-y: auto;
    display: none;
  }
  .panel.is-open { display: block; transform: none; }
  .panel-title { font-size: 20px; }
  .panel-brief { padding: 8px 15px 13px; font-size: 12px; }

  .console {
    position: static; transform: none;
    border-radius: var(--r-xl);
    justify-content: space-between;
    gap: 10px; padding: 11px 14px 12px;
  }
  .app.is-idle .console { opacity: .45; }
  .console-div { display: none; }

  .toast { bottom: auto; top: 70px; }
  .intro-title { font-size: clamp(30px, 11vw, 52px); }
}

/* Landscape phones — very little height to work with */
@media (max-height: 460px) and (orientation: landscape) {
  .dock { display: contents; }
  .console {
    position: absolute; left: 50%; bottom: 10px;
    transform: translateX(-50%);
    border-radius: var(--r-pill); padding: 8px 14px;
  }
  #play-btn { width: 36px; height: 36px; }
  .intro-title { font-size: 34px; }
  .rail {
    position: absolute; left: 10px; right: auto; bottom: auto; top: 50%;
    transform: translateY(-50%);
    flex-direction: column; overflow: visible; padding: 7px 6px;
  }
  .rail-list { flex-direction: column; }
  .comp-btn { width: 34px; height: 34px; }
  .comp-btn svg { width: 18px; height: 18px; }
  .comp-tip { display: none; }
  .panel {
    position: absolute; display: block;
    left: 56px; right: auto; top: 50%; bottom: auto;
    width: 262px; max-height: 76dvh; overflow-y: auto;
    transform: translateY(-50%);
  }
  .panel.is-open { transform: translateY(-50%); }
}

/* ═══════════════ Reduced motion ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .app.is-idle .topbar, .app.is-idle .rail,
  .app.is-idle .console, .app.is-idle .credit { opacity: 1; }
}
