/* CODEX (GPT-6) 2026-11-04: isolated launcher styling; tune this palette and panel width in devtools. */
:root {
  color-scheme: dark;
  --background: #10110e;
  --text: #e6e5d5;
  --accent: #c5ce83;
  --panel-width: 36rem;
  --panel: rgba(9, 15, 12, .88);
  --line: rgba(236, 220, 169, .24);
  font: 16px/1.6 system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
}
* { box-sizing: border-box; }
html, body, #stage { width: 100%; height: 100%; margin: 0; overflow: hidden; }
#stage { position: relative; }
#lobby-canvas { display: block; width: 100%; height: 100%; outline: none; }
#launcher {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: auto;
  text-align: center;
  background: radial-gradient(ellipse at center, #6c7e5d38, transparent 60%), linear-gradient(#04080680, #040806e3);
}
#launcher[hidden], [hidden] { display: none; }
.start-card { width: min(var(--panel-width), 100%); padding: 2rem; background: var(--panel); border: 1px solid var(--line); border-radius: .85rem; }
.eyebrow { color: var(--accent); font-size: .65rem; text-transform: uppercase; letter-spacing: .2em; }
h1 { font: 500 clamp(2rem, 6vw, 4rem)/1 Georgia, serif; margin: 0; }
p { max-width: var(--panel-width); margin: .5rem 0 1rem; }
.controls { opacity: .8; }
button {
  font: inherit;
  cursor: pointer;
  padding: .65rem 1.4rem;
  color: var(--background);
  background: var(--accent);
  border: 0;
  border-radius: 2rem;
}
button:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
button:disabled { cursor: progress; opacity: .6; }
#status { font-size: .85rem; margin-top: 1rem; overflow-wrap: anywhere; }
kbd { font: inherit; color: var(--accent); }
/* CLAUDE (claude-opus-5-5): texture loading bar and line; indeterminate until the engine reports progress */
#progress { width: 100%; height: .35rem; margin: 1rem 0 .4rem; background: var(--line); border-radius: 1rem; overflow: hidden; }
#progress-bar { width: 0; height: 100%; background: var(--accent); transition: width .2s; }
#progress.indeterminate #progress-bar { width: 30%; animation: progress-slide 1.2s ease-in-out infinite; }
@keyframes progress-slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
#loading { font-size: .8rem; opacity: .75; margin: 0; overflow-wrap: anywhere; min-height: 1.3em; }
/* CLAUDE (claude-sonnet-5-5): server connection icon on the menu's top line; hover or focus shows details */
.top-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top-line .eyebrow { margin: 0; }
.net { position: relative; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; padding: 0; background: none; border-radius: .4rem; color: var(--net, #8b8d80); }
.net.connected { --net: #8fd47a; }
.net.connecting, .net.joining, .net.stalled { --net: #e3b34a; }
.net.replaced { --net: #e0705a; }
.net.off { --net: #8b8d80; }
.net.off svg path { opacity: .5; }
.net.connecting svg, .net.joining svg { animation: net-pulse 1s ease-in-out infinite; }
@keyframes net-pulse { 50% { opacity: .35; } }
#net-tip {
  display: none; position: absolute; top: calc(100% + .4rem); right: 0; z-index: 2; width: max-content; max-width: 18rem;
  padding: .6rem .8rem; text-align: left; font-size: .78rem; line-height: 1.5; color: var(--text); cursor: default;
  background: #0b110d; border: 1px solid var(--line); border-radius: .5rem; box-shadow: 0 .4rem 1.2rem #0008;
}
.net:hover #net-tip, .net:focus-visible #net-tip { display: block; }
#net-tip b { display: block; margin-bottom: .2rem; color: var(--net); }
#net-tip div { display: flex; justify-content: space-between; gap: 1rem; }
#net-tip span { opacity: .6; }
#net-tip em { font-style: normal; overflow-wrap: anywhere; text-align: right; }
/* CLAUDE (claude-opus-5-5) 2026-11-07: render resolution (launcher.js): shrink the canvas box, stretch it back.
   !important so winit's inline width/height (written at startup) can't override it. */
#lobby-canvas[data-render-scale="0.666667"] { width: 66.6667% !important; height: 66.6667% !important; transform-origin: 0 0; transform: scale(1.5); }
#lobby-canvas[data-render-scale="0.5"] { width: 50% !important; height: 50% !important; transform-origin: 0 0; transform: scale(2); }
/* CLAUDE (claude-sonnet-5-5) 2026-11-06: render resolution select.
   CLAUDE (claude-opus-5-5) 2026-11-09: settings row (render resolution, high resolution textures), wraps when narrow */
.settings { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1.75rem; margin: .5rem 0 1rem; }
.setting { display: flex; align-items: center; justify-content: center; gap: .6rem; font-size: .85rem; }
.setting label { opacity: .8; }
select { font: inherit; color: var(--text); background: #0b110d; border: 1px solid var(--line); border-radius: .4rem; padding: .2rem .5rem; }
/* CLAUDE (claude-opus-5-5) 2026-11-09: checkbox drawn to match the select: dark box, accent fill and dark tick when on */
.setting input[type="checkbox"] {
  appearance: none; display: grid; place-content: center; flex: none;
  width: 1.1rem; height: 1.1rem; margin: 0; cursor: pointer;
  background: #0b110d; border: 1px solid var(--line); border-radius: .3rem;
  transition: background-color .15s, border-color .15s;
}
.setting input[type="checkbox"]::before {
  content: ""; width: .6rem; height: .6rem; background: var(--background);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
  transform: scale(0); transition: transform .12s ease-out;
}
.setting input[type="checkbox"]:hover { border-color: var(--accent); }
.setting input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.setting input[type="checkbox"]:checked::before { transform: scale(1); }
.setting input[type="checkbox"]:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.setting input[type="checkbox"] + label { cursor: pointer; user-select: none; }
.setting input[type="checkbox"]:checked + label { opacity: 1; }
/* CLAUDE (claude-opus-5-5) 2026-11-09: texture set and memory badges (.badge-tip: their tooltips) beside the checkbox; hover or focus shows what the set means.
   The original-files fallback is amber: it's the one that costs memory. */
.texture-set {
  position: relative; padding: .05rem .5rem; font-size: .72rem; letter-spacing: .04em; cursor: help;
  color: var(--set, var(--accent)); border: 1px solid currentColor; border-radius: 1rem; opacity: .85;
}
.texture-set.orig { --set: #e3b34a; }
.texture-set.none { --set: #8b8d80; }
/* CLAUDE (claude-opus-5-5) 2026-11-09: the memory badge, in the text colour, with the same pill and tooltip */
.texture-set.memory { --set: var(--text); font-variant-numeric: tabular-nums; }
.texture-set:hover, .texture-set:focus-visible { opacity: 1; outline: none; }
.badge-tip {
  display: none; position: absolute; bottom: calc(100% + .5rem); left: 50%; transform: translateX(-50%); z-index: 2;
  width: max-content; max-width: 19rem; padding: .6rem .8rem; text-align: left; font-size: .78rem; line-height: 1.5;
  letter-spacing: normal; color: var(--text); cursor: default;
  background: #0b110d; border: 1px solid var(--line); border-radius: .5rem; box-shadow: 0 .4rem 1.2rem #0008;
}
.texture-set:hover .badge-tip, .texture-set:focus-visible .badge-tip { display: block; }
.badge-tip b { display: block; margin-bottom: .2rem; color: var(--set, var(--accent)); }
.badge-tip table { width: 100%; margin-top: .5rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.badge-tip th, .badge-tip td { padding: .1rem 0 .1rem .9rem; text-align: right; font-weight: normal; white-space: nowrap; }
.badge-tip tr > :first-child { padding-left: 0; text-align: left; }
/* CLAUDE (claude-opus-5-5) 2026-11-09: greyed-out checkbox (uncompressed set) and the tooltip's warning */
.setting input[type="checkbox"]:disabled, .setting input[type="checkbox"]:disabled + label { opacity: .4; cursor: not-allowed; }
.setting input[type="checkbox"]:disabled:hover { border-color: var(--line); }
.badge-tip .warn { margin: .5rem 0 0; padding-left: .6rem; color: #e3b34a; border-left: 2px solid #e3b34a; max-width: none; }
.badge-tip table + table { margin-top: .6rem; }
.badge-tip .note { margin: .35rem 0 0; font-size: .7rem; opacity: .6; max-width: none; }
.badge-tip tr:first-child th { opacity: .6; font-size: .72rem; border-bottom: 1px solid var(--line); }
