html:has(body.gather-light-community),body.gather-light-community{height:auto;min-height:100%;overflow:auto;background:#071b2b}
.gather-light-community [hidden]{display:none!important}
#gatherLightApp{height:auto;min-height:100dvh;overflow:visible;padding:clamp(88px,12vh,122px) max(16px,env(safe-area-inset-right)) 80px max(16px,env(safe-area-inset-left));background:#071b2b}
.gather-panel{width:min(720px,100%);box-sizing:border-box;margin:32px auto;padding:clamp(20px,4vw,38px);border:1px solid var(--line);border-radius:28px;background:var(--panel)}
.gather-panel h2,.gather-camera-stage h2{color:var(--gold);font-size:clamp(26px,3vw,36px);font-weight:400}
.gather-light-community p{font-size:clamp(18px,2vw,20px);line-height:1.7}
.gather-panel .primary-action,.gather-panel .secondary-action,.gather-camera-stage .primary-action,.gather-camera-stage .secondary-action{display:block;width:100%;box-sizing:border-box;margin-top:16px;text-align:center;text-decoration:none}
.gather-consent-note{opacity:.82}
.gather-light-community #gameplay{max-width:1280px;margin:auto}
.gather-actions{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}
.gather-actions button{min-height:48px;padding:12px 20px;font:inherit;border:1px solid var(--line);border-radius:16px;background:#073954;color:var(--ink);cursor:pointer}
.gather-actions button:disabled{opacity:.5;cursor:default}
.gather-light-community :focus-visible:not(.shell-link){outline:3px solid #fff2a9;outline-offset:4px}
#gatherLightApp #preparation{padding-bottom:38px}

/* Round 2.2 formal Camera / Calibration surface. The operator DOM is never re-parented. */
.gather-camera-stage{width:min(980px,calc(100% - 32px));box-sizing:border-box;margin:24px auto 48px;padding:clamp(18px,3vw,30px);border:1px solid var(--line);border-radius:28px;background:var(--panel)}
.gather-camera-stage-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.gather-camera-stage-head .gather-shell-back{position:static;flex:0 0 auto}
#gatherLightApp #runtimeHost iframe{display:block;width:100%;height:min(66dvh,760px);min-height:560px;border:1px solid var(--line);border-radius:16px;background:#071b2b}
.gather-camera-stage-actions{margin-top:16px}
body.gather-runtime-tools #cameraSetup{position:fixed;inset:0;z-index:90;width:100%;max-width:none;height:100dvh;margin:0;border:0;border-radius:0;overflow:auto;background:#071b2b;padding:clamp(18px,3vw,30px) max(16px,calc((100vw - 980px)/2));}
body.gather-runtime-tools #cameraSetup #runtimeHost iframe{height:calc(100dvh - 230px);min-height:500px}

/* Existing participant visual: fixed overlay, never side-by-side with the operator surface. */
body.gather-playing,body.gather-playing #gatherLightApp{overflow:hidden}
body.gather-playing #gatherLightApp>.starbag-header{display:none}
#participantSurface{position:fixed;inset:0;width:100vw;height:100dvh;border:0;z-index:60;background:#071b2b}
#engineeringDrawer{position:fixed;top:0;right:0;z-index:70}
#engineeringDrawer>summary{position:fixed;top:max(4px,env(safe-area-inset-top));right:max(4px,env(safe-area-inset-right));min-width:76px;height:44px;padding:0 10px;box-sizing:border-box;display:grid;place-items:center;list-style:none;cursor:pointer;background:transparent;color:#d8f1f7;font-size:18px}
#engineeringDrawer>summary::-webkit-details-marker{display:none}
#engineeringDrawer[open]>summary span{font-weight:600}
#engineeringDrawer .engineering-panel{position:fixed;top:52px;right:4px;width:min(560px,calc(100vw - 8px));height:auto;max-height:calc(100dvh - 60px);overflow:auto;padding:16px;background:#071b2bf5;border:1px solid var(--line);border-radius:16px;box-sizing:border-box}
#engineeringDrawer:not([open]) .engineering-panel{display:block;visibility:hidden;pointer-events:none}
#engineeringDrawer .engineering-panel h2{font-size:20px;font-weight:400;margin:12px 0}
#engineeringDrawer #activityStatus{font-size:16px;line-height:1.4;min-height:2.8em}
#gatherLightApp .gather-shell-back{z-index:80}

@media(max-width:600px){.gather-actions button{width:100%}.gather-panel{margin:20px auto}.gather-camera-stage{width:calc(100% - 16px);padding:16px}.gather-camera-stage-head{display:block}#gatherLightApp #runtimeHost iframe{min-height:560px;height:68dvh}}

/* Round 2.4.2 — Retention is decided only after the shared star sea is complete. */
.gather-retention-trigger {
  position: fixed;
  z-index: 69;
  left: 50%;
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  transform: translateX(-50%);
  min-height: 52px;
  padding: 10px 22px;
  border: 1px solid rgba(255,248,205,.82);
  border-radius: 999px;
  background: rgba(3,52,83,.9);
  color: #fff2b1;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0,18,42,.34);
  cursor: pointer;
}
.gather-retention-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-sizing: border-box;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(3,39,68,.98);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0,14,35,.62);
}
.gather-retention-dialog::backdrop { background: rgba(0,16,34,.58); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gather-retention-dialog h2 { margin: 0 0 10px; color: var(--gold); font-size: clamp(28px, 4vw, 42px); font-weight: 500; }
.gather-retention-dialog > p { margin: 8px 0 18px; }
.gather-retention-options { display: grid; gap: 10px; }
.gather-retention-options button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(215,244,255,.44);
  border-radius: 16px;
  background: rgba(4,57,88,.74);
  color: #effbff;
  text-align: left;
  cursor: pointer;
}
.gather-retention-options button strong { color: #fff0a8; font-size: 19px; }
.gather-retention-options button span { color: rgba(229,247,252,.82); font-size: 15px; line-height: 1.45; }
.gather-retention-options button[aria-pressed="true"] { border-color: #ffe595; background: rgba(255,225,128,.14); box-shadow: 0 0 0 2px rgba(255,226,132,.22); }
.gather-retention-status { min-height: 1.5em; margin: 14px 0 !important; color: #dff8ff; font-size: 16px !important; }
.gather-retention-dialog .primary-action,
.gather-retention-dialog .secondary-action { width: 100%; margin-top: 10px; }
@media(max-width:600px){.gather-retention-trigger{width:calc(100% - 32px)}.gather-retention-dialog{width:calc(100vw - 20px);padding:20px}}

/* Round 2.4.3 — Gather audio controls only. */
.gather-light-community .gather-audio-volume{display:grid;grid-template-columns:auto minmax(8rem,1fr);align-items:center;gap:.75rem;margin:.45rem 0 .9rem;font-size:.92rem;color:var(--muted,#bfd3df)}
.gather-light-community .gather-audio-volume input[type="range"]{width:100%;min-width:8rem}
