.unified-create {
  --stage-panel-width:1320px;
  height:min(860px,calc(var(--handheld-modal-height,var(--handheld-height,100dvh)) - 32px));
  max-height:var(--stage-height); padding:24px; overflow:hidden;
  color:var(--stage-ink); color-scheme:light;
}
.unified-create *, .unified-create { box-sizing:border-box; }
.unified-create [hidden] { display:none !important; }
.unified-create form { display:flex; flex-direction:column; gap:18px; height:100%; min-height:0; }
.unified-create .stage-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex:none; padding:0; border:0; }
.create-heading { display:flex; align-items:center; gap:14px; min-width:0; }
.create-brand { width:78px; height:70px; object-fit:contain; flex:none; }
.unified-create h2 { position:relative; margin:0; padding-bottom:8px; font-size:clamp(30px,3.1vw,46px); line-height:1.2; font-weight:900; letter-spacing:-.045em; }
.unified-create h2::after { content:""; position:absolute; left:2px; bottom:0; width:42%; height:5px; border-radius:50%; background:var(--stage-coral); transform:rotate(-3deg); }
.unified-create h2:focus { outline:0; }
.create-header-note { color:var(--stage-mist); font-size:12px; }
.create-top { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.unified-create label { display:flex; flex-direction:column; gap:6px; font-size:14px; font-weight:650; color:var(--stage-ink); min-width:0; }
.unified-create :is(input,select) {
  width:100%; min-width:0; min-height:44px; padding:9px 12px;
  background:var(--stage-panel); border:1px solid var(--stage-rim); border-radius:13px;
  color:var(--stage-ink); font:inherit;
}
.unified-create input::placeholder { color:var(--stage-mist); opacity:.85; }
.unified-create button {
  min-width:44px; min-height:44px; padding:9px 14px; background:var(--stage-panel);
  border:1px solid var(--stage-rim); border-radius:14px; color:var(--stage-ink);
  font:inherit; cursor:pointer; transition:background-color .15s,border-color .15s;
}
.unified-create :is(button,input,select,summary):focus-visible { outline:3px solid var(--stage-highlight); outline-offset:2px; }
.unified-create button:not(:disabled):hover { border-color:var(--stage-ink); }
.unified-create button:disabled { opacity:.6; cursor:default; }
.create-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.05fr); gap:20px; flex:1; min-height:0; overflow:hidden; }
.create-library {
  display:flex; flex-direction:column; gap:14px; min-width:0; min-height:0; padding:18px;
  background:linear-gradient(145deg,#fffdfa,var(--stage-tile)); border:1px solid var(--stage-border); border-radius:24px;
  overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--stage-rim) transparent;
}
.create-library > :is(.create-top,.create-settings,#create-extra,#create-empty,.create-library-foot) { flex:none; }
#create-games { flex:1 1 150px; overflow:auto; min-height:100px; overscroll-behavior:contain; padding:3px; scrollbar-width:thin; scrollbar-color:var(--stage-rim) transparent; }
.create-game { display:flex; gap:6px; margin-bottom:7px; padding:4px; align-items:center; border:1px solid var(--stage-border); border-radius:15px; background:var(--stage-panel); }
.create-game:has([aria-pressed=true]) { background:var(--stage-selected); border-color:var(--stage-gold); box-shadow:inset 0 0 0 1px var(--stage-gold); }
.create-game [data-select] { display:flex; align-items:center; gap:9px; flex:1; min-width:0; text-align:left; padding:3px; border:0; border-radius:10px; background:transparent; }
.create-game [data-select]::before { content:""; width:18px; height:18px; flex:none; border:2px solid var(--stage-rim); border-radius:50%; }
.create-game [data-select][aria-pressed=true]::before { content:"✓"; display:grid; place-items:center; background:var(--stage-gold); border-color:var(--stage-gold); color:var(--stage-ink); font-size:13px; font-weight:800; }
.create-game [data-download] { padding:7px 10px; min-width:64px; flex:none; font-size:12px; font-weight:700; background:var(--stage-gold); border-color:var(--stage-gold); border-radius:22px; }
.create-game[data-state=ready] [data-download] { background:var(--stage-mint,#dcf5e9); color:var(--stage-success,#126a56); border-color:transparent; opacity:1; }
.create-game[data-state=downloading] [data-download] { background:var(--stage-selected); border-color:var(--stage-rim); }
.create-thumb { display:grid; place-items:center; position:relative; overflow:hidden; width:88px; height:64px; flex:none; border-radius:11px; background:var(--stage-bg); color:var(--stage-mist); font-size:24px; }
.create-thumb > span { display:grid; place-items:center; width:28px; height:33px; border:2px solid var(--stage-rim); border-radius:4px 4px 7px 7px; font-size:17px; }
.create-thumb :is(canvas,.game-preview) { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#111c36; }
.create-thumb .game-preview[hidden] { display:none; }
.create-game-copy { display:flex; flex-direction:column; gap:5px; min-width:0; }
.create-game-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:18px; line-height:1.4; font-weight:850; }
.create-game small { color:var(--stage-mist); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.create-details { display:flex; flex-direction:column; gap:16px; min-width:0; min-height:0; padding:20px; background:linear-gradient(145deg,#fffdfa,var(--stage-tile)); border:1px solid var(--stage-border); border-radius:24px; overflow:hidden; }
#create-stage { display:grid; place-items:center; flex:1; min-height:0; position:relative; background:var(--stage-bg); border:1px solid var(--stage-border); border-radius:15px; overflow:hidden; }
#create-stage:has(canvas:not([hidden])) { background:#111c36; border-color:transparent; }
#create-stage canvas { width:100%; height:100%; position:absolute; inset:0; object-fit:contain; image-rendering:pixelated; }
#create-preview-note { display:flex; flex-direction:column; align-items:center; gap:14px; margin:0; padding:18px; color:var(--stage-mist); font-size:13px; text-align:center; }
#create-preview-note::before { content:""; display:block; width:94px; height:86px; background:url('/ui/lounge-mascot.svg') center/contain no-repeat; }
.create-settings { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
.create-settings > label:first-child, #create-password-field { grid-column:1/-1; }
#create-extra { font-size:12px; }
#create-extra summary { display:none; }
#create-extra .fields { display:grid; gap:7px; padding-block:10px; }
#create-extra input[type=file] { padding:7px; }
#create-extra input::file-selector-button { min-height:28px; padding:2px 8px; border:1px solid var(--stage-rim); border-radius:7px; color:var(--stage-ink); background:var(--stage-bg); font:inherit; }
#create-extra p, #create-empty { margin:0; color:var(--stage-mist); font-size:12px; }
.create-library-foot { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#create-upload { align-self:flex-start; min-width:132px; background:var(--stage-mint,#dcf5e9); color:var(--stage-success,#126a56); border-color:transparent; font-weight:700; }
#create-upload span { font-size:19px; line-height:1; vertical-align:-1px; }
#create-originals { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; border-radius:14px; text-decoration:none; background:linear-gradient(180deg,#fffdf3,#fff0c2); border:1px solid #e4bd47; color:#7a4c00; font-weight:800; font-size:13px; }
#create-originals svg { width:15px; height:15px; }
.create-orig-badge { display:inline-block; margin-right:5px; padding:1px 6px; border-radius:999px; background:#ffd334; color:#17264f; font-size:11px; font-weight:900; vertical-align:1px; }
.unified-create footer { display:flex; justify-content:flex-end; gap:12px; margin:0; flex:none; }
.unified-create footer button { flex:0 1 152px; min-height:50px; border-radius:25px; font-weight:700; }
.unified-create #create-submit { flex-basis:256px; background:var(--stage-gold-surface); color:var(--stage-ink); font-weight:850; border-color:#dba91f; box-shadow:inset 0 3px #fff7bc,0 5px 0 #dcae35,0 9px 18px #bd8c2530; }
#create-error { color:var(--stage-error,#a63836); background:var(--stage-error-bg,#ffe4dc); border-radius:9px; padding:8px 12px; font-size:12px; margin:0; }
#create-status { color:var(--stage-mist); font-size:12px; margin:0; }
@media (max-height:450px), (max-width:600px) {
  .unified-create { padding:10px; border-radius:20px; }
  .unified-create form { gap:7px; }
  .create-brand { width:40px; height:34px; }
  .unified-create h2 { font-size:21px; }
  .create-heading { gap:7px; }
  .create-columns { gap:10px; }
  .create-library { padding:8px; gap:8px; border-radius:15px; }
  .create-top, .create-settings { gap:7px; }
  .unified-create label { gap:3px; font-size:11px; }
  .unified-create :is(input,select) { padding:8px; border-radius:10px; }
  #create-games { flex-basis:100px; min-height:100px; padding:2px; }
  .create-game { gap:4px; padding:3px; border-radius:12px; }
  .create-game [data-select] { gap:6px; padding:2px; }
  .create-game [data-select]::before { width:16px; height:16px; }
  .create-game [data-download] { min-width:54px; padding:7px 6px; font-size:11px; }
  .create-thumb { width:48px; height:42px; border-radius:7px; }
  .create-game-copy { gap:3px; }
  .create-game-copy strong { font-size:13px; }
  .create-game small { font-size:10px; }
  .create-details { padding:9px; gap:8px; border-radius:15px; }
  #create-stage { border-radius:11px; }
  #create-preview-note { gap:10px; font-size:12px; padding:12px; }
  #create-preview-note::before { width:50px; height:40px; border-radius:13px; font-size:15px; }
  .unified-create footer { gap:9px; }
  .unified-create footer button { min-height:44px; padding-block:8px; }
  #create-error { padding:5px 9px; }
}
@media (max-width:570px) and (orientation:portrait) {
  .create-columns { grid-template-columns:1fr; grid-template-rows:minmax(240px,1fr) minmax(200px,1fr); overflow:auto; }
  .create-library { overflow:auto; }
  #create-games { flex:1 0 140px; }
}
html.virtual-landscape .create-columns { grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); grid-template-rows:minmax(0,1fr); overflow:hidden; }
html.virtual-landscape .create-library { overflow:auto; }
html.virtual-landscape #create-games { flex:1 0 100px; height:auto; }
html.virtual-landscape .create-top { grid-template-columns:minmax(0,1fr); }
@media (prefers-reduced-motion:reduce) { .unified-create button { transition:none; } }

/* The visible controls are native radio groups and an arrow picker. Hidden
   selects retain the existing value contract for callers and game capacities. */
.unified-create svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.unified-create .create-dismiss { display:grid; place-items:center; width:48px; height:48px; padding:0; flex:none; border-radius:50%; box-shadow:inset 0 2px #fff,0 3px 0 #b8947020; }
.create-network-field { min-width:0; }
.create-network-field > span,.create-search > span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.create-network-picker { display:grid; grid-template-columns:48px minmax(0,1fr) 48px; align-items:center; overflow:hidden; border:1px solid #e7c665; border-radius:999px; background:var(--stage-gold-surface); box-shadow:inset 0 2px #fff8cc,0 3px 0 #d6ab3320; }
.unified-create .create-network-picker button { border:0; border-radius:0; min-height:48px; padding:0; background:transparent; display:grid; place-items:center; }
.create-network-picker button:first-child { border-right:1px solid #d9b75266; }
.create-network-picker button:last-child { border-left:1px solid #d9b75266; }
.create-network-picker output { text-align:center; font-size:18px; font-weight:850; line-height:1.3; padding:7px 3px; }
.create-network-picker button:disabled { opacity:.35; }
.create-network-picker button:focus-visible { outline-offset:-4px; }
.unified-create .create-search input { border-radius:999px; padding-left:18px; }
.create-choice-field { margin:0; padding:0; border:0; min-width:0; }
.create-choice-field legend { margin-bottom:6px; padding:0; color:var(--stage-ink); font-size:14px; font-weight:650; }
.create-player-options,.create-access-options { display:grid; gap:8px; }
.create-player-options { grid-template-columns:repeat(4,minmax(44px,1fr)); }
.create-access-options { grid-template-columns:repeat(2,minmax(44px,1fr)); }
.unified-create label.create-choice { position:relative; display:block; min-width:0; cursor:pointer; }
.unified-create .create-choice input { position:absolute; inset:0; width:100%; height:100%; min-height:0; margin:0; padding:0; opacity:0; cursor:pointer; }
.create-choice > span { display:flex; align-items:center; justify-content:center; min-height:48px; padding:8px 3px; border:1px solid var(--stage-rim); border-radius:13px; color:var(--stage-ink); background:#fffefa; font-size:15px; font-weight:750; pointer-events:none; }
.create-choice input:checked + span { background:var(--stage-gold-surface); border-color:#e5b627; box-shadow:inset 0 2px #fff8cf,0 2px 0 #cfa74620; }
.create-choice input:disabled + span { opacity:.4; }
.create-choice input:focus-visible { outline:none; }
.create-choice input:focus-visible + span { outline:3px solid var(--stage-highlight); outline-offset:2px; }
.create-thumb .create-cover { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; image-rendering:pixelated; }
.create-thumb:has(.create-cover) > span { display:none; }
.unified-create .create-game [data-download] { background:var(--stage-gold-surface); border-color:#e9bf42; box-shadow:inset 0 1px #fffbc9,0 2px 0 #c9a04020; }
.unified-create .create-game[data-state=ready] [data-download] { background:var(--stage-mint-surface); color:var(--stage-success); border-color:#c1e9d8; opacity:1; box-shadow:inset 0 1px #fff; }
.unified-create #create-upload { min-width:166px; background:var(--stage-mint-surface); border-color:#badfce; border-radius:999px; font-size:16px; box-shadow:inset 0 2px #fff,0 3px 0 #a4d7c333; }
.unified-create footer button { min-height:58px; min-width:160px; padding:12px 28px; border-radius:999px; font-size:20px; font-weight:850; box-shadow:inset 0 2px #fff,0 3px 0 #ae8a6426; }
.unified-create footer .flow-primary { min-width:240px; border-color:#e9b624; background:var(--stage-gold-surface); box-shadow:inset 0 2px #fff5b5,0 4px 0 #d29c2726,0 7px 14px #c0932914; }
@media (min-width:1400px) and (min-height:850px) { .create-details::after { content:""; flex:0 1 100px; min-height:40px; background:url('/ui/lounge-cartridges.svg') center/contain no-repeat; opacity:.09; } }
@media (max-width:1000px), (max-height:600px) { .create-settings { grid-template-columns:minmax(0,1fr); } }
@media (max-height:450px), (max-width:600px) {
  .unified-create .create-dismiss { width:44px; height:44px; }
  .unified-create h2 { padding-bottom:5px; }.unified-create h2::after { height:3px; }
  .create-network-picker { grid-template-columns:44px minmax(0,1fr) 44px; }
  .create-network-picker output { font-size:14px; }
  .unified-create .create-network-picker button { min-height:44px; }
  .create-choice > span { min-height:44px; font-size:13px; }
  .create-choice-field legend { font-size:12px; }
  .create-player-options,.create-access-options { gap:6px; }
  .unified-create #create-upload { min-width:132px; font-size:13px; }
  .unified-create footer button { min-height:44px; min-width:110px; padding:8px 16px; font-size:15px; }
  .unified-create footer .flow-primary { min-width:156px; }
}
