/* =====================================================================
   The Quest Forge Shop: the Admin asset page (assets.html) in the look of
   The Studio mockup (store/ux/studio/studio.css): a clean creator tool with
   1988 accents (Pixelify headings and badges, the EGA sixteen as accent
   colours, notched pixel corners on the main buttons). Digits are always in
   the clear UI font with tabular figures (the pixel font's 5 reads as an S).
   The player site keeps site.css; this page does not load it.
   ===================================================================== */
@font-face { font-family: "Pixelify Sans"; font-weight: 400; font-display: swap; src: url(/fonts/pixelify-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Pixelify Sans"; font-weight: 500; font-display: swap; src: url(/fonts/pixelify-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Pixelify Sans"; font-weight: 700; font-display: swap; src: url(/fonts/pixelify-sans-latin-700-normal.woff2) format("woff2"); }

:root {
  --bg: #0a0c1b;
  --panel: #0e1126;
  --surface: #141836;
  --raise: #1b2046;
  --hover: #222859;
  --line: #222851;
  --line-2: #333b72;
  --text: #eceefc;
  --text-2: #a9aed4;
  --text-3: #7178a9;
  /* the EGA sixteen we use as accents */
  --ega-y: #ffff55; --ega-c: #55ffff; --ega-m: #ff55ff; --ega-g: #55ff55; --ega-r: #ff5555; --ega-b: #5555ff;
  --ega-brown: #aa5500; --ega-dos: #0000aa; --ega-red: #aa0000; --ega-cyan: #00aaaa; --ega-green: #00aa00; --ega-mag: #aa00aa;
  /* one colour per kind, used only as a small pixel mark */
  --k-prop: var(--ega-c); --k-item: var(--ega-m); --k-char: var(--ega-y); --k-env: var(--ega-g); --k-wish: var(--ega-r); --k-box: #e0a050;
  --ok: var(--ega-g); --warn: var(--ega-y); --bad: var(--ega-r);
  --pixel: "Pixelify Sans", "Courier New", monospace;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --notch: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px));
  --ega-strip: linear-gradient(90deg, #000 0 6.25%, #0000aa 0 12.5%, #00aa00 0 18.75%, #00aaaa 0 25%, #aa0000 0 31.25%, #aa00aa 0 37.5%, #aa5500 0 43.75%, #aaaaaa 0 50%, #555555 0 56.25%, #5555ff 0 62.5%, #55ff55 0 68.75%, #55ffff 0 75%, #ff5555 0 81.25%, #ff55ff 0 87.5%, #ffff55 0 93.75%, #ffffff 0);
  --stage-bg: radial-gradient(120% 95% at 50% 30%, #333b74 0%, #252b5c 55%, #1c2149 100%);
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* the pixel font's fi/fl ligatures come out as one wrong letter */
*, *::before, *::after { font-variant-ligatures: none; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--ui); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
p a, .lede a, dd a { color: var(--ega-c); }
img, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
img.smooth, canvas.smooth { image-rendering: auto; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--text); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ega-c); outline-offset: 2px; }
.px { font-family: var(--pixel); }
.muted { color: var(--text-2); } .dim { color: var(--text-3); }
.num, .n, .cnt, .times, .score, .st-score, .price, .kpi .v, .big, .tpill b { font-variant-numeric: tabular-nums; }
/* a number inside a pixel-font heading or badge: the clear font */
.d { font-family: var(--ui); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 14px; height: 14px; } svg.i.l { width: 20px; height: 20px; }

/* ---------- the app shell ---------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.app.withrail { grid-template-columns: 232px minmax(0, 1fr) 360px; }
.side { grid-row: 1 / 3; grid-column: 1; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.top { grid-column: 2 / -1; grid-row: 1; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 16px 0 20px; min-width: 0; position: relative; z-index: 20; }
.main { grid-column: 2; grid-row: 2; overflow: auto; min-width: 0; padding: 22px 24px 40px; -webkit-overflow-scrolling: touch; }
.main.flush { padding: 0; }
.rail { grid-column: 3; grid-row: 2; background: var(--panel); border-left: 1px solid var(--line); overflow: auto; min-width: 0; display: none; }
.app.withrail .rail { display: block; }
.veil { display: none; }

/* sidebar */
.brand { height: 56px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); position: relative; }
.brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ega-strip); opacity: .9; }
.brand .logo { font: 700 16px var(--pixel); letter-spacing: .01em; white-space: nowrap; }
.brand .logo::before { content: "\2666"; color: var(--ega-r); margin-right: 7px; }
.brand .tag { font: 500 11px var(--pixel); color: #000; background: var(--ega-y); padding: 1px 6px 0; clip-path: var(--notch); white-space: nowrap; letter-spacing: .06em; }
.nav { flex: 1; overflow: auto; padding: 10px 10px 16px; }
.nav h4 { font: 500 11.5px var(--pixel); color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin: 14px 8px 6px; }
.nav h4:first-child { margin-top: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; position: relative; white-space: nowrap; }
.nav a:hover { background: var(--raise); color: var(--text); }
.nav a.on { background: var(--raise); color: var(--text); font-weight: 600; }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; background: var(--ega-c); }
.nav a .lab { overflow: hidden; text-overflow: ellipsis; }
.nav a .n { margin-left: auto; font-size: 12px; color: var(--text-3); }
.nav a .pill { margin-left: auto; font: 600 11px var(--ui); background: var(--ega-r); color: #000; border-radius: 9px; padding: 0 6px; line-height: 17px; font-variant-numeric: tabular-nums; }
.nav a .live { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ega-g); font-variant-numeric: tabular-nums; }
.kmark { width: 8px; height: 8px; flex: none; background: var(--k, var(--text-3)); box-shadow: 2px 2px 0 #0008; display: inline-block; }
.nav a .ico { width: 16px; display: grid; place-items: center; color: var(--k, currentColor); flex: none; }
.side .build { margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .build b { color: var(--text-2); font-weight: 600; }
.side .me { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
.side .me .who { flex: 1; min-width: 0; }
.side .me .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 30px; height: 30px; border-radius: 8px; background: var(--ega-dos); display: grid; place-items: center; overflow: hidden; flex: none; }
.avatar img { width: 30px; height: 30px; object-fit: cover; image-rendering: auto; }
.avatar canvas { width: 15px; height: 33px; transform: translateY(5px) scale(1.2); }

/* top bar */
.iconbtn.menubtn { display: none; }
.search { flex: 0 1 560px; height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text-3); font-size: 14px; min-width: 0; position: relative; }
.search:focus-within { border-color: var(--ega-c); box-shadow: 0 0 0 3px #55ffff22; }
.search input { flex: 1; min-width: 0; height: 34px; border: 0; background: transparent; color: var(--text); font: 14px var(--ui); outline: none; -webkit-appearance: none; appearance: none; padding: 0; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
kbd { font: 500 11px var(--ui); color: var(--text-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); white-space: nowrap; }
.top .sp { flex: 1; }
.tpill { height: 32px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--text-2); white-space: nowrap; flex: none; }
.tpill:hover { color: var(--text); background: var(--raise); }
.tpill b { color: var(--text); font-weight: 600; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ega-g); box-shadow: 0 0 0 0 #55ff5580; animation: pulse 1.6s infinite; flex: none; display: inline-block; }
.pulse.idle { background: var(--text-3); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #55ff5599; } 70% { box-shadow: 0 0 0 7px #55ff5500; } 100% { box-shadow: 0 0 0 0 #55ff5500; } }

/* search results: a panel under the search box (the mockup's palette, kept small) */
.results { position: absolute; top: 42px; left: 0; width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 30px 90px #000c; z-index: 60; padding: 6px 0; color: var(--text); }
.results h5 { margin: 8px 18px 4px; font: 600 11px var(--pixel); color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; display: flex; gap: 8px; align-items: center; }
.results .it { display: flex; align-items: center; gap: 12px; padding: 6px 10px; margin: 0 8px; border-radius: 9px; cursor: pointer; }
.results .it:hover, .results .it.on { background: var(--raise); box-shadow: inset 0 0 0 1px var(--line-2); }
.results .it .t { flex: 1; min-width: 0; }
.results .it .t b { font-weight: 600; font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .it .t span { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .none { padding: 10px 18px; color: var(--text-3); }
.results .thumb { width: 44px; height: 32px; }

/* buttons */
.btn { height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--raise); color: var(--text); font: 600 13.5px var(--ui); cursor: pointer; white-space: nowrap; text-decoration: none; -webkit-appearance: none; appearance: none; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm, .btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--raise); color: var(--text); }
.btn.danger { color: var(--ega-r); }
.btn.go { background: var(--ega-y); color: #000; border: 0; border-radius: 0; clip-path: var(--notch); font: 700 14.5px var(--pixel); letter-spacing: .02em; }
.btn.go:hover { background: #ffff99; }
.btn.go.lg { font-size: 16px; }
.btn.go.sm { font-size: 13px; }
.btn.cy { background: var(--ega-c); color: #000; border: 0; border-radius: 0; clip-path: var(--notch); font: 700 14px var(--pixel); }
.btn .price, .btn .d { font: 500 12px var(--ui); opacity: .75; }
.btn.sure { border-color: #ff555588; color: var(--ega-r); background: #ff555514; }   /* pressed once: the next press does it */
.iconbtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); cursor: pointer; flex: none; padding: 0; }
.iconbtn:hover { color: var(--text); background: var(--raise); }

/* ---------- headings ---------- */
.h1 { font: 700 28px/1.1 var(--pixel); margin: 0; letter-spacing: .01em; overflow-wrap: anywhere; }
.h2 { font: 700 19px/1.2 var(--pixel); margin: 0; }
.h3 { font: 600 15px/1.25 var(--pixel); margin: 0; letter-spacing: .02em; }
.lede { color: var(--text-2); margin: 6px 0 0; font-size: 14px; max-width: 70ch; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.crumbs a:hover { color: var(--text); }
.head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 18px; }
.head > div:first-child { flex: 1 1 320px; min-width: 0; }
.head .sp { flex: 1; }
.head .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.lbl { font: 600 11.5px var(--pixel); color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.lbl .sp { flex: 1; }
.lbl a, .lbl button.link { font: 500 12px var(--ui); text-transform: none; letter-spacing: 0; color: var(--text-2); background: none; border: 0; padding: 0; cursor: pointer; }
.empty { color: var(--text-3); padding: 18px 0; }
.note { font-size: 13px; color: var(--text-2); margin: 8px 0 0; }
.note.bad { color: var(--ega-r); }

/* ---------- departments: counts with real art ---------- */
.depts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dept { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 104px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; min-width: 0; }
.dept:hover { border-color: var(--line-2); }
.dept.on { border-color: var(--ega-c); box-shadow: inset 0 0 0 1px var(--ega-c); }
.dept .art { position: absolute; right: 10px; top: 9px; height: 50px; display: flex; align-items: flex-end; gap: 4px; }
.dept .art canvas { display: block; }
.dept .art.env canvas { width: 80px; height: 48px; border-radius: 6px; object-fit: cover; }
.dept .n { font: 700 26px/1 var(--ui); letter-spacing: -.01em; position: relative; color: var(--text); margin: 0; }
.dept .l { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; margin-top: 5px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dept .d2 { position: absolute; top: 10px; left: 12px; font-size: 11.5px; color: var(--ega-g); }
.dept .d2.w { color: var(--ega-r); }

/* ---------- filter bar ---------- */
.filters { display: flex; align-items: center; gap: 6px 8px; margin-bottom: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 2px; flex: none; }
.seg button { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 7px; font-size: 13px; color: var(--text-2); white-space: nowrap; cursor: pointer; background: none; border: 0; }
.seg button[aria-pressed="true"] { background: var(--hover); color: var(--text); font-weight: 600; }
.seg button .n { color: var(--text-3); font-size: 12px; }
.chip { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.on, .chip[aria-pressed="true"] { border-color: #55ffff88; color: var(--ega-c); background: #55ffff10; }
/* a select dressed as a chip (the native list opens, as Safari likes it) */
select.chip { -webkit-appearance: none; appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9aed4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; max-width: 220px; text-overflow: ellipsis; }
select.chip.on { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355ffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
select.chip option { background: var(--panel); color: var(--text); }
.filters .sp { flex: 1; }
.filters select.chip { max-width: 150px; }
.filters select#f-sort { max-width: 180px; }
.count { font-size: 13px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- the stage: one backdrop for every asset ---------- */
.stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--stage-bg); }
.stage::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 27%; background: repeating-conic-gradient(#ffffff09 0 25%, transparent 0 50%) 0 0 / 4px 4px, linear-gradient(#1a1e45, #121534); border-top: 1px solid #3c4486; }
.stage canvas.cut { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); display: block; max-width: 94%; height: auto; }
.stage.env { background: #000; }
.stage.env::before { display: none; }
.stage.env canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.stage.room { background: #000; }
.stage.room::before { display: none; }
.stage.room canvas { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; display: block; }
.stage.close { background: #555; }
.stage.close::before { display: none; }
.stage.close canvas { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; display: block; }
.stage .tagv { position: absolute; right: 7px; bottom: 6px; font: 600 11px var(--ui); color: var(--text-2); background: #0a0c1bcc; border-radius: 5px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.stage .ribbon { position: absolute; left: 7px; top: 7px; z-index: 2; font: 700 11px/1 var(--pixel); color: #000; background: var(--ega-y); padding: 3px 6px 2px; clip-path: var(--notch); letter-spacing: .04em; }
.stage .ribbon.c { background: var(--ega-c); }
.stage .ribbon.g { background: var(--ega-g); }
.stage .ribbon.m { background: var(--ega-m); }
.stage .spin { position: absolute; inset: 0; margin: auto; }

/* ---------- tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; grid-auto-flow: dense; }
.tile { display: block; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; transition: border-color .12s, transform .12s; min-width: 0; }
.tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tile.sel { border-color: var(--ega-c); box-shadow: 0 0 0 1px var(--ega-c), 0 10px 30px #0008; }
.tile.feat { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
.tile.feat .stage { flex: 1; aspect-ratio: auto; min-height: 220px; }
.tile .meta { padding: 8px 11px 10px; }
.tile .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.feat .name { font-size: 15px; }
.tile .sub { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; }
.tile .sub .r { margin-left: auto; font-variant-numeric: tabular-nums; }
.tile .sub .warn { color: #e0c050; }
/* the list view */
.rows { display: grid; gap: 4px; }
.lrow { display: grid; grid-template-columns: 64px minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.2fr) 88px; align-items: center; gap: 12px; padding: 5px 10px 5px 5px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.lrow:hover { border-color: var(--line-2); }
.lrow .stage { width: 64px; aspect-ratio: 16 / 11; border-radius: 7px; }
.lrow b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.lrow .r { text-align: right; justify-content: flex-end; font-variant-numeric: tabular-nums; }

/* ---------- the right rail ---------- */
.rhead { display: flex; align-items: center; gap: 8px; padding: 16px 16px 10px; }
.rhead .h3 { flex: 1; display: flex; align-items: center; gap: 8px; }
.rhead a { font-size: 12.5px; color: var(--text-2); }
.rhead a:hover { color: var(--text); }
.rsec { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.rsec .empty { padding: 4px 16px 6px; font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; padding: 7px 16px; width: 100%; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.row:hover { background: var(--surface); }
.thumb { width: 52px; height: 40px; border-radius: 7px; overflow: hidden; flex: none; position: relative; background: radial-gradient(120% 95% at 50% 30%, #333b74 0%, #1c2149 100%); display: grid; place-items: center; border: 1px solid var(--line); }
.thumb canvas { display: block; max-width: 100%; max-height: 100%; }
.thumb.dark { background: #555; }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t span { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnt { font: 700 15px var(--ui); color: var(--text); min-width: 28px; text-align: right; }
.jobc { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; margin: 0 12px 10px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); width: calc(100% - 24px); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.jobc:hover { border-color: var(--line-2); }
.jobc .thumb { width: 64px; height: 64px; }
.jobc .top3 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.jobc .top3 b { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jobc .st2 { font-size: 12px; color: var(--text-2); display: flex; gap: 8px; }
.jobc .st2 span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { display: flex; gap: 3px; margin: 7px 0 5px; }
.steps i { flex: 1; height: 5px; background: var(--line-2); }
.steps i.d { background: var(--ega-g); }
.steps i.n { background: linear-gradient(90deg, var(--ega-y) 50%, var(--line-2) 50%); background-size: 200% 100%; animation: fill 2s linear infinite; }
@keyframes fill { from { background-position: 100% 0; } to { background-position: 0 0; } }
.badge { display: inline-flex; align-items: center; gap: 4px; font: 700 10.5px/1 var(--pixel); letter-spacing: .06em; padding: 3px 6px 2px; color: #000; clip-path: var(--notch); text-transform: uppercase; white-space: nowrap; background: var(--text-3); }
.badge.q { background: var(--ega-c); } .badge.r { background: var(--ega-y); } .badge.p { background: var(--ega-m); } .badge.ck { background: var(--ega-g); }
.badge.ok { background: var(--ega-g); } .badge.bad { background: var(--ega-r); } .badge.n { background: var(--text-3); } .badge.box { background: var(--k-box); }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 20px; padding: 0 5px; font: 700 12px var(--ui); clip-path: var(--notch); color: #000; background: var(--ega-g); }
.score.mid { background: var(--ega-y); } .score.low { background: var(--ega-r); } .score.none { background: var(--line-2); color: var(--text-2); }
.spend { padding: 4px 16px 16px; }
.spend .big { font: 700 28px/1 var(--ui); letter-spacing: -.01em; }
.spend .big + span { font-size: 13px; color: var(--text-2); margin-left: 8px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-top: 10px; }
.bars i { flex: 1; background: var(--ega-c); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }
.bars i.z { background: var(--line-2); opacity: 1; }
.bars i.t { background: var(--ega-y); opacity: 1; }
.bars + .ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-top: 5px; font-variant-numeric: tabular-nums; }

/* ---------- the asset page ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tagc { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--raise); font-size: 12px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tagc.ok { color: var(--ega-g); } .tagc.warn { color: #e0c050; }
.apage { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.apage > div { min-width: 0; display: grid; gap: 0; align-content: start; }
.apage .right { gap: 14px; }
.panel { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.panel .stage.big { aspect-ratio: auto; height: 300px; }
.panel .bar2 { display: flex; align-items: center; gap: 10px; padding: 4px 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; padding: 3px; }
.tabs button { flex: 1; text-align: center; font-size: 12.5px; height: 28px; line-height: 28px; border-radius: 7px; color: var(--text-2); background: none; border: 0; cursor: pointer; padding: 0 14px; white-space: nowrap; }
.tabs button[aria-pressed="true"] { background: var(--hover); color: var(--text); font-weight: 600; }
.sw { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.sw button { height: 62px; padding: 0 0 14px; border-radius: 8px; border: 1px solid var(--line); background: radial-gradient(120% 95% at 50% 30%, #333b74 0%, #1c2149 100%); display: grid; place-items: center; overflow: hidden; position: relative; cursor: pointer; min-width: 0; }
.sw button[aria-pressed="true"] { border-color: var(--ega-c); box-shadow: inset 0 0 0 1px var(--ega-c); }
.sw button canvas { max-width: 92%; max-height: 44px; }
.sw button span { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.vers { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.ver { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.ver.on { border-color: var(--ega-y); }
.ver .pick { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.ver .stage { aspect-ratio: auto; height: 96px; }
.ver .vt { padding: 9px 11px 11px; display: grid; gap: 1px; }
.ver .vt .top3 { display: flex; align-items: center; gap: 8px; }
.ver .vt .top3 b { font-size: 13.5px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ver .vt span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ver .vt .btn { margin-top: 8px; justify-self: start; }
.card { border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 16px; min-width: 0; }
.card > .lbl:first-child { margin-top: 0; }
.card .stage.room { aspect-ratio: 320 / 190; border-radius: 8px; }
.card .stage.room canvas { width: 100%; height: 100%; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 13px; margin: 0; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.acts2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- cards, tables ---------- */
.tbl-wrap, .table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); -webkit-overflow-scrolling: touch; }
.tbl, table.users { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--text-2); }
.tbl th, table.users th { text-align: left; font: 600 11.5px var(--pixel); color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; padding: 10px 10px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: none; }
.tbl td, table.users td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td, table.users tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td b, table.users td b { color: var(--text); font-weight: 600; }
.tbl tbody tr:hover td { background: #ffffff05; }
.tbl tr.click { cursor: pointer; }
table.users td.who { white-space: normal; min-width: 200px; color: var(--text); }
table.users .who img { width: 24px; height: 24px; border-radius: 6px; vertical-align: middle; margin-right: 8px; image-rendering: auto; }
table.users .who small { display: block; color: var(--text-3); }
table.users tr.blocked td { color: var(--text-3); text-decoration: line-through; }
table.users input[type=number] { width: 5em; height: 28px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg); padding: 0 6px; font-variant-numeric: tabular-nums; }
table.users input[type=number]:disabled { opacity: .5; }
table.users input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ega-c); }
table.users .tag { font: 600 10.5px var(--pixel); color: #000; background: var(--ega-y); padding: 1px 5px 0; margin-left: 6px; clip-path: var(--notch); text-transform: uppercase; letter-spacing: .05em; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.field-in, .tools input[type=search], .tools input[type=email], .addform input { height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 0 12px; font: 14px var(--ui); min-width: 0; }
.tools input[type=search] { flex: 1 1 220px; max-width: 360px; }
.addform { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.addform label { display: grid; gap: 6px; flex: 1 1 260px; max-width: 440px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }

/* ---------- wanted ---------- */
.wishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.wish { display: grid; grid-template-columns: 128px minmax(0, 1fr); border-radius: 12px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; min-width: 0; }
.wish .stage { aspect-ratio: auto; height: 100%; min-height: 136px; }
.wish .stage.close { background: #555; }
.wish .w { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wish .top3 { display: flex; align-items: center; gap: 8px; }
.wish .top3 b { font-size: 14px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wish .where { font-size: 12px; color: var(--text-3); }
.wish .what { font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wish .games { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wish .twin { font-size: 12px; color: #e0c050; }
.wish .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; align-items: center; }
.times { font: 700 12px var(--ui); color: #000; background: var(--ega-r); padding: 2px 6px 1px; clip-path: var(--notch); white-space: nowrap; }
.times.one { background: var(--text-3); }
.done-tag { font-size: 12px; color: var(--ega-g); }

/* ---------- costs ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; min-width: 0; }
.kpi .l { font-size: 12.5px; color: var(--text-2); }
.kpi .v { font: 700 26px/1.15 var(--ui); letter-spacing: -.01em; margin-top: 4px; }
.kpi .s { font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.cgrid > .card:has(> .chart) { align-self: stretch; display: flex; flex-direction: column; }
.cgrid > .card > .chart { flex: 1; display: flex; flex-direction: column; }
.chart .plot { display: flex; align-items: flex-end; gap: 4px; height: 170px; flex: 1 0 170px; border-bottom: 1px solid var(--line-2); position: relative; margin-left: 42px; }
.chart .plot .gl { position: absolute; left: 0; right: 0; border-top: 1px dashed #ffffff10; font-size: 10.5px; color: var(--text-3); pointer-events: none; }
.chart .plot .gl span { position: absolute; right: 100%; margin-right: 6px; top: -8px; font-variant-numeric: tabular-nums; }
.chart .plot i { flex: 1; background: var(--ega-c); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.chart .plot i.z { background: var(--line-2); }
.chart .plot i.t { background: var(--ega-y); }
.chart .xs { display: flex; gap: 4px; font-size: 10.5px; color: var(--text-3); margin: 5px 0 0 42px; font-variant-numeric: tabular-nums; }
.chart .xs span { flex: 1; text-align: center; min-width: 0; overflow: hidden; }
.hbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 84px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.hbar .b { height: 10px; background: var(--line); border-radius: 0 3px 3px 0; overflow: hidden; }
.hbar .b i { display: block; height: 100%; background: var(--ega-c); border-radius: 0 3px 3px 0; }
.hbar .v { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar .v small { color: var(--text-3); }
.hbar > .k { color: var(--text-2); display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }

/* ---------- box covers ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 30px 26px; padding: 6px 4px; }
.bx { display: block; min-width: 0; }
.bx .boxwrap { perspective: 1100px; padding: 0 22px 0 4px; cursor: zoom-in; }
.bx .box3d { position: relative; aspect-ratio: 600 / 750; transform: rotateY(-22deg); transform-origin: 20% 50%; transform-style: preserve-3d; background: #000; }
.bx .boxwrap::after { content: ""; display: block; height: 14px; margin: -4px 6px 0 10px; background: radial-gradient(50% 50% at 50% 50%, #000c, transparent); }
.bx .box3d img.f { width: 100%; height: 100%; display: block; image-rendering: auto; object-fit: cover; }
.bx .box3d .spine { position: absolute; top: 0; bottom: 0; left: 100%; width: 13%; transform-origin: left center; transform: rotateY(90deg); background-size: auto 100%; background-position: right center; filter: brightness(.5) saturate(1.1); }
.bx .box3d .gloss { position: absolute; inset: 0; background: linear-gradient(115deg, #ffffff22 0%, transparent 35%, transparent 70%, #00000033 100%); pointer-events: none; }
.bx .box3d .nobox { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 14px; color: var(--text-3); font-size: 12.5px; background: repeating-conic-gradient(#ffffff08 0 25%, transparent 0 50%) 0 0 / 8px 8px, var(--surface); border: 1px dashed var(--line-2); }
.bx .cap { margin-top: 14px; }
.bx .cap b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.bx .cap > span { display: block; font-size: 12px; color: var(--text-3); }
.bx .cap .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.bx .cap .acts small { font-size: 12px; color: var(--text-2); }

/* ---------- feedback ---------- */
.inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 820px; }
.note-card { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; }
.note-card p { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-card .meta { color: var(--text-3); font-size: 12.5px; }
.inbox .empty { list-style: none; }

/* ---------- characters and environments: the versions window and the room builder ---------- */
dialog.win { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; margin: auto; padding: 18px 20px 20px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); box-shadow: 0 30px 90px #000c; }
dialog.win::backdrop { background: rgba(5, 6, 15, .72); }
dialog.win .dhead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
dialog.win .dhead .h2 { flex: 1; min-width: 0; }
.vd-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 20px; align-items: start; }
.vd-view { width: 100%; aspect-ratio: 320 / 190; background: #000; border-radius: 10px; display: block; }
.vd-view.characters { aspect-ratio: 120 / 70; background: var(--stage-bg); }
.ver-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--text-2); }
.ver-pick select { height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); padding: 0 8px; max-width: 100%; }
.ver-pick small { color: var(--text-3); }
.builder { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
.env-view { width: 100%; aspect-ratio: 320 / 190; background: #000; border-radius: 10px; display: block; }
.env-json { margin: 10px 0 0; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text-3); font: 12px/1.4 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.env-form { border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.env-form label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: grid; gap: 3px; min-width: 0; }
.env-form label.check { display: flex; align-items: center; gap: 6px; }
.env-form select { height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg); padding: 0 6px; width: 100%; font-weight: 400; }

/* ---------- the studio's settings (studio-ui.js adminSection) ---------- */
.st-spend { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 0 0 14px; }
.st-tile { display: grid; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; }
.st-tile span { font-size: 12.5px; color: var(--text-2); }
.st-tile b { font: 700 24px/1.2 var(--ui); font-variant-numeric: tabular-nums; }
.st-tile small { font-size: 12px; color: var(--text-3); }
.st-spend .st-warnline { grid-column: 1 / -1; margin: 0; }
table.users tr.st-failed td { color: var(--ega-r); }
.st-score { display: inline-block; min-width: 2.4em; text-align: center; font: 700 12px/20px var(--ui); padding: 0 5px; clip-path: var(--notch); color: #000; }
.st-score.pass { background: var(--ega-g); } .st-score.near { background: var(--ega-y); } .st-score.low { background: var(--ega-r); } .st-score.none { background: var(--line-2); color: var(--text-2); }
.st-set { display: grid; gap: 14px; max-width: 1000px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 16px; }
.st-fs { border: 1px solid var(--line-2); border-radius: 10px; margin: 0; padding: 8px 14px 14px; min-width: 0; }
.st-fs legend { font: 600 12px var(--pixel); color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; padding: 0 6px; }
.st-pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; margin-top: 8px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; }
.st-field { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); min-width: 0; }
.st-field small { font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.st-field select, .st-field input, .st-prices input { width: 100%; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 0 8px; font: 13px var(--ui); font-variant-numeric: tabular-nums; }
.st-set .table-wrap { border-radius: 10px; }
.st-prices input { min-width: 5.5em; }
.st-steps select { width: 100%; min-width: 7.5em; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 0 8px; font: 13px var(--ui); }
.st-steps td:first-child { color: var(--text-2); }
.st-prices tr.st-long td { background: #ffffff06; font-size: 12px; }
.st-prices tr.st-long td:first-child input { width: 7em; }
.st-set .ws-btns, .ws-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.st-warnline { color: var(--ega-y); margin: 0 0 8px; font-size: 13px; }
.st-okline { color: var(--ega-g); margin: 0 0 8px; font-size: 13px; }
.st-cal > p { margin: 4px 0 8px; font-size: 13px; max-width: 90ch; }
.st-cal-line { color: var(--text-2); }
.st-cal-pic { display: block; max-height: 48px; max-width: 72px; }
.st-cal-note { font-size: 12px; color: var(--text-3); max-width: 360px; white-space: normal !important; }
.st-cal-bad td.who { color: var(--ega-r); }
.st-admin-note { font-size: 13px; color: var(--ega-y); min-height: 1.4em; margin: 10px 0 0; }
.st-admin-note.bad { color: var(--ega-r); }
.st-empty { color: var(--text-3); font-style: italic; margin: 0; }
/* the studio's job panel (studio-ui.js panel), a plain base for the maker (maker.css goes over it) */
.st[hidden], .st-detail[hidden], .st-notes[hidden] { display: none; }
.st-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-line { flex: 1 1 320px; margin: 0; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.st-line.bad { color: var(--ega-r); }
.st-notes, .st-end, .st-by, .st-verdict { font-size: 12.5px; color: var(--text-2); margin: 4px 0 0; }
.st-end:empty { display: none; }
.st-rounds { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip { display: inline-grid; grid-template-columns: repeat(3, auto); justify-content: start; align-items: center; gap: 2px 6px; font-size: 13px; background: var(--raise); color: var(--text); border: 1px solid var(--line-2); border-radius: 9px; padding: 4px 9px; cursor: pointer; text-align: left; }
.st-chip small { grid-column: 1 / -1; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.st-chip[aria-pressed="true"] { border-color: var(--ega-y); }
.st-chip.now { border-style: dashed; cursor: default; }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ega-g); }
.st-finals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.st-card { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; align-content: start; gap: 4px; padding: 0 0 10px; overflow: hidden; }
.st-card.open { border-color: var(--ega-y); }
.st-pic { display: grid; place-items: center; min-height: 220px; padding: 8px; background: var(--stage-bg); border: 0; cursor: pointer; width: 100%; }
.st-img { display: block; max-width: 100%; height: auto; }
.st-nopic { color: var(--text-3); font-size: 13px; padding: 20px; text-align: center; }
.st-meta { display: flex; align-items: center; gap: 8px; padding: 4px 10px 0; font-size: 14px; }
.st-tag { font: 600 10.5px var(--pixel); color: #000; background: var(--ega-y); padding: 1px 5px 0; clip-path: var(--notch); text-transform: uppercase; }
.st-by, .st-verdict { padding: 0 10px; }
.st-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 10px 0; }
.st-detail { margin-top: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 12px; }
.st-dhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13px; }
.st-dhead .spacer { flex: 1; }
.st-figs { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-top: 10px; }
.st-fig { margin: 0; padding: 6px; background: #000; border-radius: 8px; max-width: 100%; }
.st-fig figcaption { font-size: 11.5px; color: var(--text-3); margin-top: 4px; max-width: 46ch; }
.st-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 12px; }
.st-judge h5, .st-checks h5 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font: 600 13px var(--ui); margin: 0 0 4px; }
.st-scores { font-size: 12px; color: var(--text-3); margin: 0 0 4px; }
.st-list h6 { font-size: 12.5px; margin: 8px 0 2px; }
.st-list ul, .st-list ol { margin: 0; padding-left: 20px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); }
.st-block li, .st-fail li { color: var(--ega-r); }
.st-auto li, .st-done, .st-ok { color: var(--ega-g); }
.st-warn { color: #e0c050; }
.st-cost { white-space: pre-line; font-size: 13px; margin: 12px 0 0; font-variant-numeric: tabular-nums; }

/* ---------- signing in, the maker's place, the toast ---------- */
.lockcard { max-width: 520px; margin: 8vh auto 0; text-align: center; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); padding: 28px 24px; }
.lockcard .h1 { margin-bottom: 8px; }
.lockcard p { color: var(--text-2); margin: 0 0 18px; }
.app.locked .nav, .app.locked .top > :not(.menubtn), .app.locked .rail { visibility: hidden; }
.app.locked .top .search { visibility: hidden; }
.maker-missing { color: var(--text-2); }
.status { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: min(640px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; background: var(--text); color: #000; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 16px 40px #000a; z-index: 70; }
.status.err { background: var(--ega-r); color: #000; }
.status:empty { display: none; }
.status button { background: none; border: 0; font: 700 13px var(--ui); cursor: pointer; padding: 0 2px; color: inherit; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--ega-y); border-radius: 50%; animation: spin 1s linear infinite; flex: none; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- narrower windows ---------- */
@media (max-width: 1279px) {
  .app.withrail { grid-template-columns: 232px minmax(0, 1fr); }
  .app.withrail .rail { display: none; }
}
@media (max-width: 1260px) {
  .app, .app.withrail { grid-template-columns: 216px minmax(0, 1fr); }
  .depts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .depts .dept:nth-child(n+4) { display: none; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis .kpi:nth-child(n+4) { display: none; }
  .apage { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1200px) {
  .top .hide-md { display: none; }
  .search { flex-basis: 420px; }
  .cgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1060px) {
  .apage { grid-template-columns: minmax(0, 1fr); }
  .vd-grid { grid-template-columns: minmax(0, 1fr); }
}
/* an iPad held upright: the sidebar becomes a rail of icons */
@media (max-width: 860px) {
  .app, .app.withrail { grid-template-columns: 64px minmax(0, 1fr); }
  .brand .logo, .brand .tag, .nav h4, .nav a .lab, .nav a .n, .nav a .pill, .nav a .live span, .side .me .who { display: none; }
  /* the rail keeps Sign out, small, under the picture (the menu button only comes at phone width) */
  .side .me .btn { height: 24px; padding: 0 4px; font-size: 10.5px; border-radius: 6px; max-width: 58px; white-space: normal; line-height: 1.1; text-align: center; }
  .brand { justify-content: center; padding: 0; }
  .brand::before { content: "\2666"; color: var(--ega-r); font: 700 20px var(--pixel); }
  .nav { padding: 10px 8px; }
  .nav a { justify-content: center; height: 40px; padding: 0; }
  .nav a.on::before { left: -8px; }
  .nav a .live { margin: 0; position: absolute; right: 8px; top: 8px; }
  .nav a .live .pulse { width: 7px; height: 7px; }
  .nav a .pill:not(:empty) { display: block; position: absolute; right: 2px; top: 2px; font-size: 9.5px; line-height: 14px; padding: 0 4px; }
  .side .me { justify-content: center; padding: 10px 0; flex-direction: column; gap: 6px; }
  .side .build { padding: 0 4px 8px; text-align: center; }
  .side .build .long { display: none; }
  .main { padding: 18px 16px 40px; }
  .depts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .depts .dept:nth-child(n+3) { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:nth-child(n+3) { display: none; }
  .top { padding: 0 12px; gap: 8px; }
  .top .hide-sm { display: none; }
  .search { flex: 1 1 auto; }
  .search kbd { display: none; }
  .builder { grid-template-columns: minmax(0, 1fr); }
  .st-cols { grid-template-columns: minmax(0, 1fr); }
  .lrow { grid-template-columns: 64px minmax(0, 2fr) minmax(0, 1.4fr) 72px; }
  .lrow .c3 { display: none; }
}
/* a phone: the sidebar is a menu behind a button, the page scrolls as a whole */
@media (max-width: 600px) {
  .app, .app.withrail { display: block; height: auto; overflow: visible; }
  .top { position: sticky; top: 0; height: 56px; padding: 0 10px; }
  .iconbtn.menubtn { display: inline-grid; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: 272px; max-width: 86vw; z-index: 80; transform: translateX(-102%); transition: transform .18s ease-out; visibility: hidden; }
  .app.menu-open .side { transform: none; visibility: visible; box-shadow: 30px 0 80px #000a; }
  .app.menu-open .veil { display: block; position: fixed; inset: 0; background: #05060fb8; z-index: 70; }
  /* inside the drawer the sidebar shows its words again */
  .brand .logo, .brand .tag, .nav h4, .side .me .who { display: initial; }
  .nav a .lab { display: block; } .nav a .n, .nav a .pill:not(:empty) { display: inline-block; position: static; font-size: 11px; }
  .nav a .live span { display: inline; } .nav a .live { position: static; margin-left: auto; }
  .brand { justify-content: flex-start; padding: 0 16px; }
  .brand::before { content: none; }
  .nav a { justify-content: flex-start; height: 38px; padding: 0 10px; }
  .side .me { justify-content: flex-start; padding: 12px 14px; flex-direction: row; gap: 10px; }
  .side .me .btn { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; max-width: none; white-space: nowrap; }
  .main { overflow: visible; padding: 16px 16px 40px; }
  .rail { display: none !important; }
  .top .btn.go .lab2 { display: none; }
  .top .btn.go { padding: 0 10px; }
  .h1 { font-size: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile.feat { grid-column: span 2; grid-row: span 1; }
  .tile.feat .stage { min-height: 0; aspect-ratio: 16 / 10; }
  .depts { gap: 8px; }
  .dept { height: 92px; }
  .dept .art { transform: scale(.8); transform-origin: top right; }
  .wishes { grid-template-columns: minmax(0, 1fr); }
  .wish { grid-template-columns: 104px minmax(0, 1fr); }
  .sw { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel .stage.big { height: 220px; }
  .hbar { grid-template-columns: 96px minmax(0, 1fr) 72px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .bx .boxwrap { padding: 0 14px 0 2px; }
  .env-form { grid-template-columns: minmax(0, 1fr); }
  .lrow { grid-template-columns: 56px minmax(0, 1fr) 64px; }
  .lrow .c2 { display: none; }
  .filters select.chip { max-width: 46vw; }
  .chart .plot { height: 130px; }
  .status { bottom: 12px; }
}

/* touch screens (iPad): bigger targets, no hover lift */
@media (pointer: coarse) {
  .btn { height: 40px; } .btn.sm, .btn.small { height: 34px; } .chip { height: 38px; }
  .nav a { height: 40px; } .seg button { height: 34px; }
  .iconbtn { width: 40px; height: 40px; }
  .tile:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- the out-of-credit banner (shop.js creditBanner): red, above the whole page, while settings/alerts.credit is set ---------- */
.alertbar { display: flex; align-items: flex-start; gap: 10px; padding: 10px 20px; background: var(--ega-red); color: #fff; border-bottom: 2px solid var(--ega-r); font: 500 14px/1.45 var(--ui); font-variant-numeric: tabular-nums; position: relative; z-index: 60; }
.alertbar p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.alertbar b { font-weight: 700; }
.alertbar a { color: #fff; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.alertbar a:hover { color: var(--ega-y); }
.alertbar a:focus-visible { outline-color: var(--ega-y); }
.alertbar .ab-mark { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; background: var(--ega-y); color: #000; font: 700 14px var(--ui); clip-path: var(--notch); }
/* the page below it keeps its own scrolling: the shell fills what the banner leaves */
body.has-alert { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; --mk-fill: calc(100vh - 56px - var(--alert-h, 0px)); }
@supports (height: 100dvh) { body.has-alert { --mk-fill: calc(100dvh - 56px - var(--alert-h, 0px)); } }
body.has-alert > .alertbar { flex: none; }
body.has-alert > .app { flex: 1 1 auto; min-height: 0; height: auto; }
/* a phone: the page scrolls as a whole, the banner first */
@media (max-width: 600px) {
  .alertbar { padding: 10px 14px; font-size: 13.5px; }
  body.has-alert { display: block; height: auto; overflow: visible; }
}
/* ---------- the asset page's Size panel (assets.js sizeCard): its size beside the hero, a verdict, a resize ---------- */
.sz .lbl .sz-h { font: 12px var(--ui); text-transform: none; letter-spacing: 0; color: var(--text-3); }
.sz .stage.sz-stage { aspect-ratio: auto; height: 132px; border-radius: 8px; }
.sz-nums { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 12px 0 0; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sz-nums b { font: 700 15px var(--ui); color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sz-nums b.sz-new { color: var(--ega-c); }
.sz-nums .sz-to { white-space: nowrap; }
.sz-verdict { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sz-verdict.warn { color: #e0c050; }
.sz-verdict.ok { color: var(--ega-g); }
.sz-verdict .sz-cap { color: var(--text-2); }
.sz-try { font: 600 13px var(--ui); color: var(--ega-c); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-variant-numeric: tabular-nums; }
.sz-slide { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.sz-range { flex: 1; min-width: 0; height: 28px; margin: 0; accent-color: var(--ega-c); cursor: pointer; }
.sz-pct { min-width: 52px; text-align: right; font: 700 17px var(--ui); color: var(--text); font-variant-numeric: tabular-nums; }
.sz-pre { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.sz-pre button { height: 30px; min-width: 0; padding: 0; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: 600 12.5px var(--ui); font-variant-numeric: tabular-nums; cursor: pointer; -webkit-appearance: none; appearance: none; }
.sz-pre button:hover { color: var(--text); background: var(--raise); }
.sz-pre button[aria-pressed="true"] { border-color: #55ffff88; color: var(--ega-c); background: #55ffff10; }
.sz-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sz-acts .btn { flex: 1 1 auto; padding: 0 12px; font-size: 13px; }
.sz-acts .btn .d { margin-left: 2px; }
.sz-note { font-size: 12.5px; line-height: 1.45; }

/* the Games page (1.12.0) */
.tbl.games .gthumb { width: 44px; height: 55px; display: flex; align-items: center; justify-content: center; border-radius: 4px; overflow: hidden; background: var(--surface-2, #1c1c38); font-size: 10px; }
.tbl.games .gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tbl.games td.r, .tbl.games th.r { text-align: right; }
.tbl.games td { vertical-align: middle; }

/* "We already have this" and its undo (1.13.0) */
.card.dup { margin: 0 0 16px; padding: 14px 16px; display: grid; gap: 10px; }
.card.dup.ok { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-color: var(--ega-g, #55ff55); }
.dup-list { display: grid; gap: 6px; }
.dup-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.dup-row .sp { flex: 1; }
.card.dup .field-in { max-width: 360px; }

/* a game's page (1.14.0) */
.gp-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.gp-main, .gp-side { display: grid; gap: 16px; min-width: 0; }
.card.gp { padding: 14px 16px; display: grid; gap: 8px; }
.card.gp p { margin: 0; }
.gp-ok { color: var(--ega-g, #55ff55); font-weight: 600; } .gp-bad { color: var(--ega-r, #ff5555); font-weight: 600; }
.gp-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.gp-say { color: var(--text-2); font-style: italic; margin-top: 2px; }
.gp-quest { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gp-quest li { display: flex; gap: 10px; align-items: flex-start; }
.gp-quest li.walk { color: var(--text-3); font-size: 12.5px; padding-left: 34px; }
.gp-n { flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--ega-y, #ffff55); color: #000; font: 700 12px/24px var(--ui); text-align: center; }
.gp-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gp-room { display: grid; gap: 4px; align-content: start; }
.gp-room.start b::after { content: ' · start'; color: var(--text-3); font-weight: 400; }
.gp-pic { width: 100%; height: auto; image-rendering: pixelated; border-radius: 6px; background: #000; }
.gp-exits { margin: 0; padding-left: 16px; font-size: 12.5px; }
@media (max-width: 860px) { .gp-cols { grid-template-columns: minmax(0, 1fr); } }

/* the scene editor (1.15.0) */
.se-stage { position: relative; width: 100%; max-width: 960px; aspect-ratio: 320 / 200; margin: 0 0 12px; border-radius: 10px; overflow: hidden; background: #000; touch-action: none; user-select: none; -webkit-user-select: none; }
.se-pic { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.se-thing { position: absolute; border: 2px dashed rgba(255, 255, 85, .85); border-radius: 4px; cursor: grab; background: rgba(255, 255, 85, .06); }
.se-thing.free { border-color: rgba(85, 255, 255, .85); background: rgba(85, 255, 255, .06); }
.se-thing:hover, .se-thing.drag { background: rgba(255, 255, 85, .18); }
.se-thing.drag { cursor: grabbing; z-index: 2; }
.se-thing span { position: absolute; left: 0; bottom: 100%; font: 600 11px/1.4 var(--ui); background: rgba(0, 0, 0, .75); color: #fff; padding: 0 5px; border-radius: 3px; white-space: nowrap; pointer-events: none; }
.se-say { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.se-say.good { border-color: var(--ega-g, #55ff55); color: var(--ega-g, #55ff55); } .se-say.bad { border-color: var(--ega-r, #ff5555); color: var(--ega-r, #ff5555); }
.gp-rhead { display: flex; align-items: center; gap: 8px; justify-content: space-between; }

.gp-objs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gp-obj { display: grid; gap: 3px; align-content: start; min-width: 0; }
.gp-obj .stage { height: 116px; }
.gp-obj .gp-look { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gp-obj .gp-lib { font-size: 12.5px; }

/* the spots a dragged thing can go to (1.15.1) */
.se-zone { position: absolute; border: 2px dashed rgba(255, 255, 255, .85); border-radius: 4px; background: rgba(0, 0, 0, .28); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); pointer-events: none; }
.se-zone span { position: absolute; left: 0; top: 100%; font: 600 10.5px/1.4 var(--ui); color: #fff; background: rgba(0, 0, 0, .6); padding: 0 4px; border-radius: 3px; white-space: nowrap; }
.se-zone.here { border-color: rgba(255, 255, 255, .25); }
.se-zone.near { border: 3px solid var(--ega-g, #55ff55); background: rgba(85, 255, 85, .18); }
.se-zone.near span { background: var(--ega-g, #55ff55); color: #000; }

.gp-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* swapping a thing for a shop piece (1.17.0) */
.se-thing.picked { border-style: solid; border-color: var(--ega-m, #ff55ff); background: rgba(255, 85, 255, .15); }
.se-swap .field-in { max-width: 360px; }
.se-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.se-cand { display: grid; gap: 4px; justify-items: center; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: 12.5px var(--ui); cursor: pointer; }
.se-cand:hover { border-color: var(--ega-y, #ffff55); }
.se-cand .thumb { width: 100%; height: 56px; }

/* editing a game's words and steps (1.18.0) */
.ge-sticky { margin-bottom: 4px; }
.ge-steps { display: grid; gap: 12px; }
.ge-step { gap: 10px; }
.ge-step.win { border-color: var(--ega-y, #ffff55); } .ge-step.die { border-color: var(--ega-r, #ff5555); }
.ge-top { display: flex; align-items: center; gap: 10px; } .ge-top .sp { flex: 1; }
.ge-pts { display: flex; align-items: center; gap: 4px; font-size: 13px; } .ge-pts input { width: 64px; height: 30px; }
.ge-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.ge-sel { height: 32px; max-width: 260px; }
.ge-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ge-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); font-size: 13px; }
.ge-x { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 0 2px; font-size: 12px; } .ge-x:hover { color: var(--ega-r, #ff5555); }
.ge-f { display: grid; gap: 4px; } .ge-in { width: 100%; box-sizing: border-box; font: 14px/1.45 var(--ui); padding: 8px 10px; height: auto; }
.gd-tune { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ge-room { border-top: 1px solid var(--line); padding: 8px 0; display: grid; gap: 8px; } .ge-room summary { cursor: pointer; font-weight: 600; }
.ge-room[open] { gap: 10px; } .ge-opens { margin: 0; font-size: 12.5px; } .ge-win { display: inline-flex; align-items: center; gap: 4px; }

/* new steps from templates (1.19.0) */
.ge-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ge-tpl { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: 13px var(--ui); cursor: pointer; }
.ge-tpl:hover { border-color: var(--ega-y, #ffff55); } .ge-tpl span { font-size: 12px; }
.ge-fields { display: grid; gap: 8px; } .ge-del { font-size: 14px; }

/* word chips (1.20.0) */
.ge-said { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 100%; }
.ge-wgrp { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 10px; }
.ge-wgrp.opt { border-style: dashed; } .ge-wlbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.ge-wadd { width: 70px; height: 26px; border: 0; background: transparent; color: var(--text); font: 13px var(--ui); outline: none; }
/* the puzzle map (1.20.0) */
.pm-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pm-svg { min-width: 520px; width: 100%; height: auto; font-family: var(--ui), sans-serif; }
.pm-way { stroke: rgba(255, 255, 255, .35); stroke-width: 3; } .pm-way.locked { stroke: #ff5555; stroke-dasharray: 6 5; }
.pm-lock rect { fill: #2a0d14; stroke: #ff5555; } .pm-lock text { fill: #ffd1d1; font-size: 12px; }
.pm-room rect { fill: #15153a; stroke: rgba(255, 255, 255, .25); stroke-width: 1.5; } .pm-room.start rect { stroke: #55ff55; stroke-width: 2.5; }
.pm-name { fill: #fff; font-size: 14px; font-weight: 700; } .pm-line { fill: #c9c9e6; font-size: 12.5px; }
.pm-flow { fill: none; stroke: #ffff55; stroke-width: 2; stroke-dasharray: 3 5; marker-end: none; } .pm-item { fill: #ffff55; font-size: 12px; font-weight: 600; paint-order: stroke; stroke: #0b0b1a; stroke-width: 4px; }
.pm-line.found { fill: #ffff55; } .pm-line.needs { fill: #55ffff; }

/* two pieces in one wish (1.21.0) */
.split { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--ega-y, #ffff55); border-radius: 10px; }
.split-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .split-h { flex: 1 1 260px; font-size: 13.5px; }
.split-pick { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(160px, 260px) auto; gap: 8px; align-items: center; }
@media (max-width: 700px) { .split-pick { grid-template-columns: 1fr; } }
.wish > .split { grid-column: 1 / -1; margin: 0 12px 12px; }
.wish.splitting { grid-column: 1 / -1; }

/* Edit the game, as pictures (1.23.0) */
.ge-map summary { cursor: pointer; } .ge-map[open] summary { margin-bottom: 8px; }
.ge-tpl { grid-template-columns: 32px 1fr; column-gap: 8px; align-items: start; } .ge-tpl .ge-ico { grid-row: 1 / 3; font-size: 22px; line-height: 1.2; } .ge-tpl b, .ge-tpl span.dim { grid-column: 2; }
.ge-line-of { position: relative; display: grid; gap: 14px; padding-left: 36px; }
.ge-line-of::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: linear-gradient(var(--ega-y, #ffff55), var(--ega-g, #55ff55)); opacity: .55; }
.ge-line-of .ge-step .gp-n { position: absolute; left: -36px; top: 12px; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; box-shadow: 0 0 0 4px var(--bg); }
.ge-step { position: relative; }
.ge-step.win .gp-n { background: var(--ega-y, #ffff55); } .ge-step.die .gp-n { background: var(--ega-r, #ff5555); color: #fff; }
.ge-story { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; align-items: start; }
.ge-thumb { width: 136px; height: 85px; image-rendering: pixelated; border-radius: 6px; background: #000; }
.ge-sum { display: grid; gap: 8px; min-width: 0; }
.ge-sent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; }
.ge-cs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ge-c { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font: 600 12.5px/1.4 var(--ui); border: 1px solid transparent; }
.ge-c.verb { background: var(--ega-y, #ffff55); color: #000; letter-spacing: .03em; } .ge-c.thing { background: #fff; color: #000; }
.ge-c.need { background: rgba(85, 255, 255, .14); color: #8ff; border-color: rgba(85, 255, 255, .45); } .ge-c.not { background: rgba(255, 255, 255, .06); color: var(--text-2); border-color: var(--line-2); }
.ge-c.get { background: rgba(85, 255, 85, .16); color: #8f8; border-color: rgba(85, 255, 85, .45); } .ge-c.lose { background: rgba(255, 85, 85, .12); color: #f99; border-color: rgba(255, 85, 85, .4); }
.ge-c.open { background: rgba(255, 170, 85, .14); color: #fc8; border-color: rgba(255, 170, 85, .45); } .ge-c.pts { background: rgba(255, 255, 85, .14); color: #ff8; }
.ge-c.win { background: var(--ega-y, #ffff55); color: #000; } .ge-c.die { background: var(--ega-r, #ff5555); color: #fff; }
.ge-arrow { color: var(--text-3); font-size: 16px; }
.ge-bubble { position: relative; padding: 9px 12px; border-radius: 12px; background: #fff; color: #111; font: italic 13.5px/1.45 var(--ui); max-width: 640px; }
.ge-bubble::before { content: ''; position: absolute; left: 14px; top: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: #fff; }
.ge-form { display: grid; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ge-step.open { border-color: var(--ega-c, #55ffff); }
@media (max-width: 700px) { .ge-story { grid-template-columns: 1fr; } .ge-thumb { width: 100%; height: auto; } }

/* ---------- the puzzle chart in Edit the game (1.24.0) ---------- */
.pc-tabs { display: flex; gap: 6px; margin: 14px 0 12px; }
.pc-tabs button { font: 600 13px var(--ui); padding: 7px 16px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; }
.pc-tabs button.on { background: var(--ega-y, #ffff55); color: #000; border-color: var(--ega-y, #ffff55); }
.pc-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.pc-cols { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.pc-scroll { flex: 1 1 520px; min-width: 0; overflow: auto; max-height: 78vh; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.pc-board { position: relative; }
.pc-wires { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.pc-box { position: absolute; width: 150px; height: 132px; overflow: hidden; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 10px; padding: 7px; cursor: pointer;
  transition: opacity .15s, border-color .15s, box-shadow .15s; }
.pc-box:hover, .pc-box:focus-visible, .pc-box.sel { border-color: var(--ega-c, #55ffff); box-shadow: 0 0 0 3px rgba(85, 255, 255, .15); outline: none; }
.pc-box .ge-thumb { width: 100%; height: 52px; display: block; object-fit: cover; }
.pc-box.start { width: 120px; border-color: var(--ega-g, #55ff55); cursor: default; text-align: center; }
.pc-box.start .pc-t { justify-content: center; }
.pc-box.win { border-color: var(--ega-y, #ffff55); }
.pc-box.hint { border-style: dashed; }
.pc-box.bad { border-color: var(--ega-r, #ff5555); background: #2a1424; }
.pc-n { position: absolute; top: 3px; left: 3px; z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ega-y, #ffff55); color: #000; font: 700 11px/20px var(--ui); text-align: center; }
.pc-t { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.pc-t .ge-c { padding: 1px 7px; font-size: 11.5px; }
.pc-room { font-size: 11.5px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-why { font-size: 11.5px; line-height: 1.3; color: #f99; font-weight: 600; margin-top: 3px; }
.pc-wl { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; font: 600 11px/1 var(--ui);
  padding: 4px 8px; border-radius: 999px; background: var(--bg); border: 1px solid currentColor; transition: opacity .15s; pointer-events: none; }
.pc-w { fill: none; stroke-width: 3; transition: opacity .15s; }
.pc-w.item, .pc-dot.item { stroke: #55ffff; fill: #55ffff; } .pc-wl.item { color: #55ffff; }
.pc-w.open, .pc-dot.open { stroke: #ffaa55; fill: #ffaa55; } .pc-wl.open { color: #ffaa55; }
.pc-w.flag, .pc-dot.flag { stroke: #c9a0ff; fill: #c9a0ff; } .pc-wl.flag { color: #c9a0ff; }
.pc-w.hint, .pc-dot.hint { stroke: var(--text-3); fill: var(--text-3); } .pc-wl.hint { color: var(--text-2); }
.pc-w.walk, .pc-dot.walk { stroke: #55ff55; fill: #55ff55; opacity: .6; }
.pc-w.hint, .pc-w.walk { stroke-width: 2; stroke-dasharray: 6 5; fill: none; }
.pc-board.focus .pc-box:not(.lit), .pc-board.focus .pc-wl:not(.lit) { opacity: .25; }
.pc-board.focus .pc-w:not(.lit), .pc-board.focus .pc-dot:not(.lit) { opacity: .12; }
.pc-side { flex: 0 1 290px; min-width: 240px; }
.pc-side .ge-story { grid-template-columns: 1fr; } .pc-side .ge-thumb { width: 100%; height: auto; }
.pc-acts { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.pc-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin: 10px 0 0; }
.pc-key { display: inline-block; width: 22px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.pc-key.item { background: #55ffff; } .pc-key.open { background: #ffaa55; } .pc-key.flag { background: #c9a0ff; } .pc-key.hint { background: var(--text-3); } .pc-key.bad { background: var(--ega-r, #ff5555); }
.pc-tray { margin-top: 16px; }
.pc-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pc-tray .pc-box { position: static; height: auto; min-height: 58px; }
@media (max-width: 700px) { .pc-bar { flex-direction: column; align-items: flex-start; } .pc-side { flex: 1 1 100%; } }
.pc-sizer { position: relative; }
.pc-board { transform-origin: 0 0; }
.pc-side { position: relative; }
.pc-shut { position: absolute; top: 8px; right: 8px; }
/* wiring the chart (1.25.0): drag a step's ● onto another step; click a line to take a need away */
.pc-port { position: absolute; z-index: 2; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ega-c, #55ffff);
  cursor: crosshair; touch-action: none; box-shadow: 0 0 0 3px rgba(85, 255, 255, .12); transition: transform .12s, background .12s; }
.pc-port:hover, .pc-board.wiring .pc-port { background: var(--ega-c, #55ffff); transform: scale(1.2); }
.pc-board.wiring { cursor: crosshair; }
.pc-board.wiring .pc-box[data-i] { opacity: 1; }
.pc-box.drop { border-color: var(--ega-g, #55ff55); box-shadow: 0 0 0 4px rgba(85, 255, 85, .25); }
.pc-w.drag { stroke: var(--ega-g, #55ff55); stroke-width: 3; stroke-dasharray: 8 6; fill: none; }
.pc-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.pc-hit:hover { stroke: rgba(255, 255, 255, .08); }
.pc-pop { position: absolute; z-index: 5; width: 220px; display: grid; gap: 6px; padding: 10px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.pc-pop .btn { justify-content: flex-start; text-align: left; white-space: normal; }
.pc-pop-t { font-size: 12.5px; color: var(--text-2); }
.pc-board.wiring .pc-box, .pc-board.wiring .pc-wl, .pc-board.wiring .pc-w, .pc-board.wiring .pc-dot { opacity: 1 !important; }
.pc-board.wiring .pc-wires { z-index: 3; }

/* ---------- a game made by hand (1.26.0): the start form and the Rooms & people tab ---------- */
.ng { display: grid; gap: 14px; max-width: 980px; }
.ng-f { display: grid; gap: 6px; } .ng-f .dim { font-size: 12.5px; }
.ng-envs { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; padding: 2px; }
.ng-env { display: grid; gap: 4px; padding: 5px; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text-2); font: 600 12px/1.2 var(--ui); cursor: pointer; text-align: left; }
.ng-env canvas { width: 100%; height: auto; aspect-ratio: 320 / 190; image-rendering: pixelated; border-radius: 5px; background: #000; display: block; }
.ng-env:hover { border-color: var(--text-3); } .ng-env.on { border-color: var(--ega-y, #ffff55); color: var(--text); box-shadow: 0 0 0 3px rgba(255, 255, 85, .18); }
.ng-go { display: flex; justify-content: flex-end; }
.nb { display: grid; gap: 14px; }
.nb-top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.nb-top .ge-thumb { flex: none; }
.nb-head { display: grid; gap: 6px; min-width: 0; } .nb-head b { font-size: 15px; }
.nb-ways { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.nb-note { font-size: 12.5px; }
.nb-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.nb-row .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .nb-row .sp { flex: 1; }
.nb-add { margin-top: 8px; } .nb-add > summary { cursor: pointer; color: var(--ega-c, #55ffff); font-weight: 600; font-size: 13.5px; padding: 4px 0; }
.nb-add[open] { display: grid; gap: 8px; }
.nb-newroom > summary { color: var(--ega-y, #ffff55); }
.nb-two { display: flex; gap: 8px; } .nb-two input { flex: 1; min-width: 0; }
.se-cand.on { border-color: var(--ega-y, #ffff55); box-shadow: 0 0 0 3px rgba(255, 255, 85, .18); }
@media (max-width: 700px) { .nb-top .ge-thumb { width: 100%; height: auto; } }
.nb-head .ge-c { justify-self: start; }

/* ---------- the room designer (1.27.0): the room big, things and people dragged in and around ---------- */
.rd { display: grid; gap: 12px; }
.rd-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .rd-bar .sp { flex: 1; }
.rd-rooms { display: flex; gap: 6px; flex-wrap: wrap; } .rd-rooms .chip.on { background: var(--ega-y, #ffff55); color: #000; border-color: var(--ega-y, #ffff55); }
.rd-cols { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.rd-main { flex: 1 1 560px; min-width: 0; }
.rd-stage { position: relative; width: 100%; aspect-ratio: 320 / 200; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: #000; touch-action: none; user-select: none; -webkit-user-select: none; }
.rd-stage.drop { box-shadow: 0 0 0 3px var(--ega-g, #55ff55); }
.rd-pic { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.rd-thing, .rd-person { position: absolute; cursor: grab; touch-action: none; border-radius: 4px; outline: 1.5px dashed transparent; transition: outline-color .12s; }
.rd-thing:hover, .rd-person:hover { outline-color: rgba(85, 255, 255, .9); }
.rd-thing.spot:hover { outline-color: rgba(255, 170, 85, .9); }
.rd-thing.on, .rd-person.on { outline: 2px solid var(--ega-y, #ffff55); }
.rd-thing.drag, .rd-person.drag { cursor: grabbing; outline: 2px solid var(--ega-g, #55ff55); z-index: 5; }
.rd-thing.drag { background: rgba(85, 255, 85, .12); }
.rd-person canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.rd-thing span, .rd-person span { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -3px); white-space: nowrap; font: 600 11px/1 var(--ui); padding: 3px 6px; border-radius: 6px; background: rgba(10, 12, 27, .85); color: #fff; opacity: 0; pointer-events: none; transition: opacity .12s; }
.rd-thing:hover span, .rd-person:hover span, .rd-thing.on span, .rd-person.on span, .rd-thing.drag span { opacity: 1; }
.rd-help { font-size: 12.5px; margin: 8px 0 0; }
.rd-side { flex: 0 1 320px; min-width: 260px; display: grid; gap: 10px; align-content: start; }
.rd-tabs { justify-self: start; }
.rd-cands { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); max-height: 56vh; overflow: auto; }
.rd-cands .se-cand { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.rd-ghost { position: fixed; z-index: 1000; pointer-events: none; transform: translate(-50%, -60%) scale(1.05); opacity: .9; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.rd-ptop { display: flex; gap: 8px; align-items: center; } .rd-ptop .sp { flex: 1; } .rd-ptop b { font-size: 15px; }
.rd-full { font-size: 12.5px; color: var(--ega-y, #ffff55); }
.nb-design { white-space: nowrap; }
@media (max-width: 700px) { .rd-side { flex: 1 1 100%; } }
.gp-del.sure { border-color: var(--ega-r, #ff5555); color: #f99; }

/* ---------- the rooms on the puzzle chart, and playing from a room (1.29.0) ---------- */
.rm { margin-bottom: 14px; }
.rm > summary { cursor: pointer; }
.rm-scroll { overflow: auto; max-width: 100%; margin-top: 10px; border-radius: 10px; background: var(--panel); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; border: 1px solid var(--line); }
.rm-map { position: relative; }
.rm-lines { position: absolute; inset: 0; pointer-events: none; }
.rm-way { stroke: var(--text-3); stroke-width: 4; stroke-linecap: round; } .rm-way.locked { stroke: #ffaa55; stroke-dasharray: 8 6; }
.rm-lock { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 600 11.5px/1 var(--ui); color: #fc8; background: var(--bg); border: 1px solid #ffaa55; padding: 4px 8px; border-radius: 999px; z-index: 1; }
.rm-room { position: absolute; width: 190px; height: 200px; display: grid; grid-template-rows: auto auto auto 1fr; gap: 5px; padding: 8px; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 12px; z-index: 2; }
.rm-room.start { border-color: var(--ega-g, #55ff55); }
.rm-room .ge-thumb { width: 100%; height: 86px; cursor: pointer; }
.rm-name { display: flex; gap: 6px; align-items: center; min-width: 0; } .rm-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-count { font-size: 11.5px; }
.rm-btns { display: flex; gap: 6px; align-self: end; } .rm-btns .btn { flex: 1; justify-content: center; padding-left: 6px; padding-right: 6px; }
.rm .nb-newroom { margin-top: 12px; }
.pc-acts { display: flex; gap: 8px; flex: none; }
.pl-over { position: fixed; inset: 0; z-index: 900; background: rgba(5, 6, 15, .82); display: grid; place-items: center; padding: 16px; }
.pl-box { width: min(980px, 100%); display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.pl-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.pl-screen canvas { width: 100%; height: auto; aspect-ratio: 320 / 200; image-rendering: pixelated; display: block; border-radius: 6px; background: #000; outline: none; }
.pl-help { font-size: 12.5px; margin: 0; }
.rm-name .ge-c { white-space: nowrap; flex: none; padding: 1px 7px; font-size: 11px; }
.rm-way.ghost { stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 5 6; }
.rm-ghost { position: absolute; width: 190px; height: 200px; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 10px; text-align: center;
  background: rgba(20, 24, 54, .35); border: 2px dashed var(--line-2); border-radius: 12px; color: var(--text-2); font: 13px var(--ui); cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.rm-ghost:hover, .rm-ghost:focus-visible { border-color: var(--ega-y, #ffff55); color: var(--text); background: rgba(255, 255, 85, .06); outline: none; }
.rm-ghost .rm-plus { font-size: 30px; line-height: 1; color: var(--ega-y, #ffff55); }
.rm-ghost b { font-size: 14px; } .rm-ghost .dim { font-size: 12px; }
.rm-room { cursor: grab; touch-action: none; } .rm-room .btn { cursor: pointer; }
.rm-room.drag, .rm-ghost.drag { cursor: grabbing; z-index: 5; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); border-color: var(--ega-g, #55ff55); }
.rm-ghost { touch-action: none; }
.rm-help { font-size: 12.5px; margin: 8px 0 0; }

/* ---------- steps from where they happen (1.31.0): a thing's "What can the player do here?", a ● dropped in empty
   space, the ghost "What happens next?" ---------- */
.rd-do { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line-2); }
.rd-do .lbl { margin: 0; }
.rd-steps { display: flex; flex-wrap: wrap; gap: 6px; } .rd-steps .ge-c { cursor: pointer; border: 0; }
.rd-fits { display: grid; gap: 6px; } .rd-fits .btn { justify-content: flex-start; }
.rd-do .ge-add, .pc-side .ge-add { padding: 0; border: 0; background: none; box-shadow: none; }
.pc-side .ge-tpls { grid-template-columns: 1fr; }
.pc-ghost { position: absolute; width: 150px; height: 132px; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 8px; text-align: center;
  background: rgba(20, 24, 54, .35); border: 2px dashed var(--line-2); border-radius: 10px; color: var(--text-2); font: 12.5px var(--ui); cursor: pointer; }
.pc-ghost:hover, .pc-ghost:focus-visible { border-color: var(--ega-y, #ffff55); color: var(--text); outline: none; }
.pc-ghost .rm-plus { font-size: 26px; line-height: 1; color: var(--ega-y, #ffff55); }

/* ---------- the game designer (1.32.0): the rooms on a grid, dots to join them, the Properties on the right ---------- */
.gd { display: grid; gap: 10px; }
.gd-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .gd-bar .sp { flex: 1; } .gd-bar .dim { font-size: 12.5px; max-width: 760px; }
.gd-cols { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.gd-scroll { flex: 1 1 560px; min-width: 0; overflow: auto; max-height: 76vh; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 20px 20px; }
.gd-map { position: relative; }
.gd-map.wiring { cursor: crosshair; }
.gd-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.gd-way { fill: none; stroke: var(--text-3); stroke-width: 4; stroke-linecap: round; }
.gd-way.locked { stroke: #ffaa55; stroke-dasharray: 9 7; } .gd-way.on { stroke: var(--ega-y, #ffff55); }
.gd-way.drag { stroke: var(--ega-g, #55ff55); stroke-width: 3; stroke-dasharray: 8 6; }
.gd-way.ghost { stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 5 6; }
.gd-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.gd-room { position: absolute; width: 176px; height: 150px; display: grid; grid-template-rows: auto 1fr; gap: 6px; padding: 8px; background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: 12px; z-index: 2; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; transition: border-color .12s, box-shadow .12s; }
.gd-room:hover { border-color: var(--text-3); }
.gd-room.start { border-color: var(--ega-g, #55ff55); }
.gd-room.on { border-color: var(--ega-y, #ffff55); box-shadow: 0 0 0 3px rgba(255, 255, 85, .2); }
.gd-room.drag { cursor: grabbing; z-index: 5; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.gd-room.drop { border-color: var(--ega-g, #55ff55); box-shadow: 0 0 0 4px rgba(85, 255, 85, .25); }
.gd-room .ge-thumb { width: 100%; height: 100px; pointer-events: none; }
.gd-name { display: flex; gap: 6px; align-items: center; min-width: 0; } .gd-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.gd-name .ge-c { white-space: nowrap; flex: none; padding: 1px 7px; font-size: 11px; }
.gd-dot { position: absolute; z-index: 3; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--bg); border: 2.5px solid var(--ega-c, #55ffff); cursor: crosshair; touch-action: none; transition: transform .12s; }
.gd-dot:hover { transform: scale(1.35); background: var(--ega-c, #55ffff); }
.gd-dot.used { background: var(--text-3); border-color: var(--text-3); cursor: default; } .gd-dot.used:hover { transform: none; background: var(--text-3); }
.gd-ghost { position: absolute; width: 176px; height: 150px; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center;
  background: rgba(20, 24, 54, .35); border: 2px dashed var(--ega-y, #ffff55); border-radius: 12px; color: var(--text-2); font: 12.5px var(--ui); }
.gd-ghost .rm-plus { font-size: 28px; line-height: 1; color: var(--ega-y, #ffff55); }
.gd-props { flex: 0 1 340px; min-width: 280px; display: grid; gap: 10px; align-content: start; position: relative; max-height: 80vh; overflow: auto; }
.gd-props .lbl { margin: 4px 0 0; }
.gd-ptitle b { font-size: 16px; } .gd-ptitle .lbl { margin: 0 0 2px; }
.gd-pthumb { width: 100% !important; height: auto !important; aspect-ratio: 320 / 200; cursor: zoom-in; }
.gd-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gd-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; width: 100%; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 13px var(--ui); cursor: pointer; text-align: left; }
.gd-row:hover { border-color: var(--text-3); }
.gd-props .ng-envs { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 260px; }
.gd-props .ge-add { padding: 0; border: 0; background: none; box-shadow: none; } .gd-props .ge-tpls { grid-template-columns: 1fr; }
@media (max-width: 700px) { .gd-props { flex: 1 1 100%; max-height: none; } }
.gd-branch { cursor: pointer; border-color: var(--line-2); }
.gd-branch:hover, .gd-branch:focus-visible { border-color: var(--ega-y, #ffff55); color: var(--text); outline: none; }
.gd-way-pick { justify-self: start; }
.rd-words { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line-2); }
.rd-words > summary { cursor: pointer; margin: 0; }
.rd-words[open] > summary { margin-bottom: 4px; }

/* ---------- the cleanup (1.34.0): the changes under Undo, the dock, a draft from before ---------- */
.ge-changes { position: relative; align-self: center; } .ge-changes > summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); list-style: none; padding: 6px 8px; border-radius: 8px; }
.ge-changes > summary::-webkit-details-marker { display: none; } .ge-changes > summary:hover { color: var(--text); background: var(--surface); }
.ge-changes[open] > ul { position: absolute; right: 0; top: 100%; z-index: 20; width: 340px; max-height: 50vh; overflow: auto; margin: 6px 0 0; padding: 10px 10px 10px 26px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.ge-dock { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .15s, transform .15s; }
.ge-dock.shown { opacity: 1; transform: none; pointer-events: auto; }
.ge-dcount { font-size: 12.5px; }
.se-say.warn { border-color: var(--ega-y, #ffff55); }
.ge-wide { max-width: 980px; }

/* ---------- one game designer, World and Puzzle (1.35.0); the next steps; the kinds of step in two groups ---------- */
.gd-switch { margin: 0 0 12px; }
.gd-switch button.on { background: var(--ega-y, #ffff55); color: #000; border-color: var(--ega-y, #ffff55); }
.gd-next { display: grid; gap: 4px; padding: 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line-2); }
.gd-next .lbl { margin: 0 0 4px; }
.gd-todo { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 13px var(--ui); text-align: left; cursor: pointer; }
.gd-todo:hover:not(:disabled) { background: var(--hover); } .gd-todo.done { color: var(--text-3); cursor: default; } .gd-todo.done span:last-child { text-decoration: line-through; }
.gd-tick { width: 18px; text-align: center; color: var(--ega-y, #ffff55); } .gd-todo.done .gd-tick { color: var(--ega-g, #55ff55); }
.ge-more { margin-top: 10px; } .ge-more > summary { cursor: pointer; }

/* ---------- 1.36.0: who can play a game, items in the game's Properties ---------- */
.gp-sharebox { display: inline-flex; gap: 6px; align-items: center; } .gp-share { width: auto; padding: 4px 8px; font-size: 12.5px; }
.gd-items { display: grid; gap: 6px; } .gd-item { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--surface); }
.gd-item > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; } .gd-item[open] { display: grid; gap: 8px; }
.rd-count { font-size: 12px; margin: 0; }

/* ---------- the steps in the game designer's world (1.36.0) ---------- */
.gd-room { height: auto; min-height: 150px; }
.gd-steps { display: grid; gap: 3px; margin-top: 2px; }
.gd-step { position: relative; display: flex; gap: 6px; align-items: center; width: 100%; min-height: 24px; padding: 2px 18px 2px 4px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text); font: 11.5px/1.2 var(--ui); text-align: left; cursor: pointer; }
.gd-step:hover { border-color: var(--text-3); } .gd-step.on { border-color: var(--ega-y, #ffff55); box-shadow: 0 0 0 2px rgba(255, 255, 85, .2); }
.gd-step.win { border-color: rgba(255, 255, 85, .6); } .gd-step.die { border-color: rgba(255, 85, 85, .5); } .gd-step.hint, .gd-step.fun { opacity: .8; border-style: dashed; }
.gd-step.bad { border-color: var(--ega-r, #ff5555); background: #2a1424; } .gd-step.drop { border-color: var(--ega-g, #55ff55); box-shadow: 0 0 0 3px rgba(85, 255, 85, .25); }
.gd-sn { flex: none; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ega-y, #ffff55); color: #000; font: 700 10.5px/18px var(--ui); text-align: center; }
.gd-step.die .gd-sn { background: var(--ega-r, #ff5555); color: #fff; } .gd-step.hint .gd-sn, .gd-step.fun .gd-sn { background: var(--line-2); color: var(--text); }
.gd-st { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; } .gd-st b { letter-spacing: .02em; }
.gd-pts { flex: none; color: #ff8; font-size: 10.5px; }
.gd-port { position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ega-c, #55ffff); cursor: crosshair; touch-action: none; }
.gd-port:hover { background: var(--ega-c, #55ffff); transform: scale(1.25); }
.gd-addstep { justify-self: start; border: 0; background: none; color: var(--ega-c, #55ffff); font: 600 11.5px var(--ui); cursor: pointer; padding: 3px 2px; }
.gd-any { cursor: default; min-height: 0; } .gd-any .gd-name .dim { font-size: 11px; }
.gd-wires { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 4; }
.gd-wires .pc-w { stroke-width: 2.5; opacity: .85; } .gd-wires .pc-w.lit { stroke-width: 3.5; opacity: 1; }
.gd-map .pc-wl { z-index: 4; font-size: 10.5px; padding: 3px 7px; }
.gd-map.wiring { cursor: crosshair; }
.gd-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); cursor: pointer; }
.gd-wireopt { justify-content: flex-start; }
.gd-props .ge-step { margin: 0; }
.pc-wires .pc-w, .gd-wires .pc-w { fill: none !important; }
.gd-map .rm-lock { z-index: 3; }
/* a step that takes the player to another room (1.36.0) */
.pc-w.go { stroke: #ff55ff; stroke-dasharray: 6 5; } .pc-dot.go { fill: #ff55ff; stroke: #ff55ff; } .pc-wl.go { color: #ff88ff; }
.ge-c.go { background: rgba(255, 85, 255, .14); color: #f9f; border-color: rgba(255, 85, 255, .45); }

/* ---------- the Game Studio for players (1.36.0): their games and the editors, nothing else ---------- */
.studio-mode #nav > :not([data-nav="games"]) { display: none; }
.studio-mode #pill-jobs, .studio-mode #pill-spend, .studio-mode #new-btn, .studio-mode .search, .studio-mode #g-sum, .studio-mode #g-note, .studio-mode #rail { display: none !important; }
.studio-mode #games-table th:last-child, .studio-mode #games-table td:last-child { display: none; }
.studio-note { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px;
  background: var(--raise); border: 1px solid var(--ega-y, #ffff55); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; }
/* a Game Studio member's own pieces in the room designer, and their credit (1.37.0) */
.rd-mine { display: grid; gap: 6px; } .rd-makepiece { border-style: dashed !important; } .rd-makepiece .rm-plus { font-size: 22px; color: var(--ega-y, #ffff55); }
.studio-mode #nav a[data-nav="new"] { display: flex !important; }
#pill-credit b { font-variant-numeric: tabular-nums; }
.studio-credit { display: flex; gap: 6px; align-items: center; color: var(--ega-y, #ffff55) !important; }
/* My pieces: a Game Studio member's own pieces (1.37.1) */
#nav a.nav-mine { display: none; } .studio-mode #nav a.nav-mine { display: flex !important; }
.my-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.my-card { display: grid; gap: 8px; padding: 10px; }
.my-pic { width: 100%; height: auto; aspect-ratio: 320 / 190; image-rendering: pixelated; border-radius: 8px; background: var(--stage-bg); }
.my-t { display: grid; gap: 2px; } .my-t .dim { font-size: 12px; }
.my-acts { display: flex; gap: 6px; flex-wrap: wrap; } .my-rename { display: flex; gap: 6px; } .my-rename input { flex: 1; min-width: 0; }
.my-jobs { display: grid; gap: 4px; } .my-job { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.my-job:hover { background: var(--hover); } .my-job .dim { font-size: 12px; }

/* the first five minutes (1.38.0): the welcome, the sample game, the tips */
.g-welcome { margin-bottom: 14px; } .g-welcome h2 { margin: 0 0 8px; font-size: 18px; } .g-welcome ol { margin: 0 0 12px 18px; padding: 0; } .g-welcome li { margin: 4px 0; }
.g-welcome-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ge-tip { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 85, .08); border: 1px solid rgba(255, 255, 85, .4); font-size: 13.5px; }
/* a thing's size in the room designer (1.39.0) */
.rd-sizes { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; } .rd-sizes .dim { margin-right: 4px; font-size: 12.5px; }
.rd-sizes button { font: 600 12px var(--ui); padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); cursor: pointer; }
.rd-sizes button[aria-pressed="true"] { background: var(--ega-y, #ffff55); color: #000; border-color: var(--ega-y, #ffff55); }
.g-deleted { margin-top: 14px; } .g-deleted > summary { cursor: pointer; } .g-dlist { display: grid; gap: 6px; margin-top: 8px; }
.g-drow { display: flex; gap: 8px; align-items: center; } .g-drow .sp { flex: 1; }
/* things on things (1.39.0) */
.rd-onit { display: grid; gap: 6px; } .rd-onrow { display: flex; gap: 6px; align-items: center; } .rd-onrow b { flex: 1; font-size: 13px; } .rd-onrow select { width: auto; }
.rd-onhint { font-size: 12px; margin: 0; }
/* the studio's Your games: picture cards (the admins' table is hidden in studio mode) */
.g-cards { display: none; }
.studio-mode .g-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.studio-mode #view-games .tbl-wrap, .studio-mode #view-games .filters .seg { display: none; }
.gc { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.gc-pic { display: flex; align-items: center; justify-content: center; aspect-ratio: 8 / 5; overflow: hidden; background: #000; border-bottom: 1px solid var(--line); font-size: 40px; text-decoration: none; }
.gc-pic img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.gc-pic:hover img { filter: brightness(1.12); }
.gc-body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.gc-title { color: inherit; text-decoration: none; font-size: 15.5px; } .gc-title:hover { text-decoration: underline; }
.gc-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.gc-new { align-items: center; justify-content: center; gap: 8px; min-height: 200px; border-style: dashed; color: inherit; text-decoration: none; }
.gc-new:hover { border-color: var(--ega-y, #ffff55); }
.gc-plus { font-size: 30px; color: var(--ega-y, #ffff55); }
/* the handle between a designer and its side panel (splitter() in assets.js), and the grid that reaches the window's bottom */
.splitter { flex: 0 0 10px; align-self: stretch; margin: 0 -6px; cursor: col-resize; touch-action: none; position: relative; border-radius: 6px; }
.splitter::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--line); border-radius: 2px; transition: background .12s; }
.splitter::after { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 40px; margin: -20px 0 0 -3px; border-radius: 3px; background: var(--line-2); transition: background .12s; }
.splitter:hover::before, .splitter:focus-visible::before, .splitter.drag::before { background: var(--ega-y, #ffff55); }
.splitter:hover::after, .splitter:focus-visible::after, .splitter.drag::after { background: var(--ega-y, #ffff55); }
.splitter:focus-visible { outline: none; }
body.splitting, body.splitting * { cursor: col-resize !important; user-select: none !important; -webkit-user-select: none !important; }
@media (min-width: 701px) {
  .gd-cols, .rd-cols, .pc-cols { flex-wrap: nowrap; align-items: stretch; }
  .gd-scroll, .rd-main, .pc-scroll { flex: 1 1 0; width: 0; min-width: 320px; }   /* width 0: a wide map scrolls inside, never widens the page */
  .gd, .rd { grid-template-columns: minmax(0, 1fr); }
  .gd-cols, .rd-cols, .pc-cols { min-width: 0; }
  .gd-props, .rd-side, .pc-side { flex-grow: 0; flex-shrink: 0; min-width: 260px; align-self: flex-start; }
  .gd-scroll { height: var(--fit-h, 76vh); max-height: none; }
  .gd-props { max-height: var(--fit-h, 80vh); }
  .pc-scroll { height: var(--fit-h, 78vh); max-height: none; }
}
@media (max-width: 700px) { .splitter { display: none; } .gd-props, .rd-side, .pc-side { flex-basis: 100% !important; } }
.hsplit { height: 12px; margin: -4px 0 -2px; cursor: row-resize; touch-action: none; position: relative; }
.hsplit::after { content: ""; position: absolute; left: 50%; top: 50%; width: 48px; height: 5px; margin: -2.5px 0 0 -24px; border-radius: 3px; background: var(--line-2); transition: background .12s; }
.hsplit:hover::after, .hsplit:focus-visible::after, .hsplit.drag::after { background: var(--ega-y, #ffff55); }
.hsplit:focus-visible { outline: none; }
body.splitting-v, body.splitting-v * { cursor: row-resize !important; user-select: none !important; -webkit-user-select: none !important; }
@media (max-width: 700px) { .hsplit { display: none; } }
/* a piece held over a thing it will go on: the thing lights up, the piece says where it goes */
.rd-thing.host { outline: 2px solid var(--ega-g, #55ff55) !important; background: rgba(85, 255, 85, .14); }
.rd-ontag { display: none; position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); white-space: nowrap; font: 600 12px/1 var(--ui); padding: 5px 8px; border-radius: 6px; background: var(--ega-g, #55ff55); color: #000; }
.rd-ghost.on-host .rd-ontag { display: block; }
/* 1.42: a thing on a thing has its spot, its size, Off it and ✕ */
.rd-onrow { flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.rd-onrow b { flex: 1 1 100%; }
.rd-onrow select { flex: 1 1 110px; min-width: 0; }
/* a thing on a thing: its own box over the thing it sits on, its own panel; colourways for a piece */
.rd-thing.rd-add { z-index: 3; outline-style: dotted; }
.rd-thing.rd-add:hover { outline-color: rgba(255, 255, 85, .95); }
.rd-thing.rd-add.on { outline: 2px solid var(--ega-y, #ffff55); }
.rd-onname { display: flex; align-items: center; gap: 4px; flex: 1 1 100%; background: none; border: 0; padding: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.rd-onname:hover b { text-decoration: underline; }
.rd-back { background: none; border: 0; padding: 0; color: var(--ega-c, #55ffff); font: inherit; cursor: pointer; }
.rd-cpick { display: flex; align-items: center; gap: 8px; } .rd-cpick .dim { min-width: 52px; font-size: 12.5px; } .rd-cpick select { flex: 1; }
.rd-colours { display: grid; gap: 8px; }
.rd-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rd-way { padding: 4px; border-radius: 8px; border: 1px solid var(--line); background: #000; cursor: pointer; display: grid; place-items: center; }
.rd-way .thumb { width: 100%; height: 44px; background: none; border: 0; }
.rd-way:hover { border-color: var(--text-3); } .rd-way[aria-pressed="true"] { border: 2px solid var(--ega-y, #ffff55); cursor: default; }
.rd-cpicks { display: grid; gap: 6px; }
/* the place maker's box in a new room's panel */
.pm-box { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--ega-y, #ffff55); border-radius: 10px; background: rgba(255, 255, 85, .04); }
/* the shop for Game Studio members: Items and Small items to look at, never to change (1.43) */
.studio-mode #nav a[data-nav="kind/prop"], .studio-mode #nav a[data-nav="kind/small"] { display: flex !important; }
.studio-mode #view-asset .card.ro .btn, .studio-mode #view-asset .head .acts { display: none !important; }
.gd-window { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
/* places saved from rooms (1.47): their tag in the place picker, the save box, the admin's waiting list */
.ng-env .ng-tag { display: block; font: 11px var(--ui); color: var(--text-3); }
.ng-env.saved { border-style: dashed; }
.pl-save { display: grid; gap: 6px; }
.g-drow .pl-pic { width: 96px; height: auto; border-radius: 6px; image-rendering: pixelated; margin-right: 8px; }
/* Design a place (1.48) */
#nav a.nav-place { display: flex; } .studio-mode #nav a.nav-place { display: flex !important; }
.pd { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pd-main { flex: 1 1 520px; min-width: 0; display: grid; gap: 10px; }
.pd-pic { width: 100%; height: auto; aspect-ratio: 320 / 190; image-rendering: pixelated; border-radius: 10px; border: 1px solid var(--line-2); background: #000; }
.pd-side { flex: 0 1 340px; min-width: 260px; display: grid; gap: 8px; }
.pd-row { display: flex; align-items: center; gap: 8px; } .pd-row .dim { min-width: 100px; font-size: 12.5px; } .pd-row select { flex: 1; min-width: 0; }

/* Moves (1.58; one column since 1.62.1: it lives in narrow side columns): the piece big and moving on top, a click
   picks a part, then how it moves, what moves, and saving */
.mv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.mv-stage { display: grid; place-items: center; min-height: 120px; padding: 10px; border-radius: 8px; background: #000; border: 1px solid var(--line-2); overflow: hidden; }
.mv-cv { image-rendering: pixelated; cursor: crosshair; max-width: 100%; height: auto; }
.mv-side { display: grid; gap: 10px; align-content: start; min-width: 0; }
.mv-info { margin: 0; font: 500 13px var(--ui); color: var(--text-2, #c8cbe8); }
.mv-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.mv-kind { padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--raise); color: inherit; font: 600 12.5px var(--ui); cursor: pointer; text-align: center; white-space: nowrap; }
.mv-kind[aria-pressed="true"] { border-color: var(--ega-m); color: var(--ega-m); background: #ff55ff14; }
.mv-kind:disabled { opacity: 0.45; cursor: default; }
.mv-list { display: grid; gap: 4px; }
.mv-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; background: var(--raise); }
.mv-name { flex: 1; min-width: 0; text-align: left; padding: 2px 0; border: 0; background: none; color: inherit; font: 500 12.5px var(--ui); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-side .lbl { margin: 2px 0 0; }
.mv-side > .btn { justify-self: start; }
.mv-side .note { margin: 0; }
.rd-moves summary { cursor: pointer; font: 600 13px var(--ui); padding: 4px 0; }
.rd-moves .mv { margin-top: 6px; }

/* the character maker (1.59) */
.cm { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.cm-left { display: grid; gap: 14px; }
.cm .stage.cm-stage { position: relative; display: block; padding: 0; overflow: hidden; aspect-ratio: auto; height: auto; background: #000; }
.cm .stage.cm-stage::before { display: none; }
.cm .cm-cv { width: 100%; height: auto; max-height: none; image-rendering: pixelated; display: block; }
.cm-left textarea { width: 100%; box-sizing: border-box; height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.cm-right { display: grid; gap: 8px; }
.cm-right .pd-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 8px; }
.cm-sz { display: flex; align-items: center; gap: 8px; }
.cm-size { flex: 1; }
@media (max-width: 860px) { .cm { grid-template-columns: 1fr; } }

/* the place designer's new look (1.65) */
.pd-side { grid-template-columns: minmax(0, 1fr); }
.pd-side > * { min-width: 0; }
.pd-look { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pd-look > * { min-width: 0; }
.pd-look[open] { padding-bottom: 6px; }
.pd-look .gd-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
/* the coin shop (1.86): the Quest Coin packs over the studio */
.coin-wrap { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .55); }
.coin-shop { width: min(480px, 100%); padding: 20px; display: grid; gap: 12px; }
.coin-shop .h2 { margin: 0; }
.coin-shop p { margin: 0; }
.coin-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coin-pack { height: auto; padding: 12px 8px; display: grid; gap: 4px; justify-items: center; text-align: center; }
.coin-pack b { font-size: 15px; }
.coin-pack span { font-size: 12px; color: var(--text-2); }
@media (max-width: 420px) { .coin-packs { grid-template-columns: 1fr; } }
.coin-shop .row { display: flex; justify-content: flex-end; }
