/* Signed-in arcade shell. Existing game canvas and menus retain their own styles. */
.app-nav .lobby-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 2px solid #203653; border-radius: 12px; background: #fff7df; box-shadow: 0 3px 0 #203653; font-weight: 800; }
.lobby-link svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-nav .lobby-link:active { transform: translateY(2px); box-shadow: 0 1px 0 #203653; }
.saved-library { margin: 42px 0 30px; }
#upload-screen.is-creating .saved-library { display: none; }
.saved-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.saved-library-heading h2 { font-size: clamp(25px, 3vw, 32px); margin: 4px 0; }
.saved-library-heading p { color: #52647e; font-size: 14px; }
.slot-counter { padding: 8px 13px; border: 2px solid #c0cee2; border-radius: 12px; background: white; font-weight: 700; white-space: nowrap; }
.floppy-art { display:block;overflow:visible; }
.floppy-art-shell { fill:#83c4aa;stroke:#203653;stroke-width:7;stroke-linejoin:round; }
.floppy-art-shutter { fill:#dce4ea;stroke:#203653;stroke-width:6; }
.floppy-art-shutter-slot,.floppy-art-protect { fill:#203653; }
.floppy-art-label { fill:#fffdf7;stroke:#203653;stroke-width:6; }
.floppy-art-line,.floppy-art-plus { fill:none;stroke:#52647e;stroke-width:7;stroke-linecap:round; }
.floppy-art-notch { fill:#ffde76;stroke:#203653;stroke-width:5; }
.saved-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.saved-card { display: flex; flex-direction: column; min-width: 0; padding: 12px; background: white; border: 2px solid #203653; border-radius: 17px; box-shadow: 0 4px 0 #ccd8e8; }
.saved-card h3 { font-size: 17px; line-height: 1.3; margin: 12px 0; overflow-wrap: anywhere; }
.saved-art { height: 115px; position: relative; background: #f2f5fa; border-radius: 9px; overflow: hidden; }
.saved-art img { width: 100%; height: 100%; object-fit: contain; }
.saved-mode { position: absolute; bottom: 0; left: 0; padding: 3px 8px; border-radius: 0 8px 0 0; background: #203653; color: white; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.save-button { min-height: 44px; padding: 8px 14px; border: 2px solid #203653; border-radius: 10px; background: #e8efff; color: #203653; font-weight: 700; cursor: pointer; }
.save-button:hover { background: #dbe6ff; }
.save-button:active { transform: translateY(1px); }
.saved-play { margin-top: auto; background: #2559ce; color: white; border-color: #164397; }
.saved-play:hover { background: #164397; }
.saved-card-actions { display: flex; justify-content: space-between; gap: 8px; }
.saved-card-actions button { min-height: 44px; font-size: 13px; padding: 4px; }
.saved-card--empty { align-items: center; justify-content: center; text-align: center; background: #edf2fa; border: 2px dashed #a2b5cf; box-shadow: none; }
.empty-slot-art { width: 78px; height: 72px; margin-top: 4px;transform:rotate(-4deg); }
.saved-card--empty p { font-size: 13px; color: #52647e; margin: 0 0 16px; }
.saved-card--empty h3 { margin: 10px 0 5px; }
.saved-card--empty .save-button { font-size: 13px; padding: 8px; width: 100%; margin-top: auto; }
.game-cover { --cover-tint:#d7e9e0; position:relative; display:grid; padding:10px 12px 8px; background:var(--cover-tint); border:2px solid #203653; border-radius:13px 13px 19px 13px; box-shadow:inset 0 -4px 0 #20365314; }
.game-cover--racing { --cover-tint:#dce5fc; }
.game-cover--tanks { --cover-tint:#f7dfb7; }
.game-cover--maze { --cover-tint:#dfefdf; }
.game-cover--zombie { --cover-tint:#dce8c9; }
.cartridge-art--zombie { background:#dce8c9; }
.game-cover-top,.game-cover-bottom { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.game-cover-top { padding:0 1px 8px; }
.game-cover-brand { font-size:14px; font-weight:900; font-style:italic; letter-spacing:-.06em; }
.game-cover .saved-mode { position:static; background:#203653; color:#fff; border-radius:5px; padding:4px 8px; font-size:10px; line-height:1.3; }
.game-cover-window { aspect-ratio:10/7; overflow:hidden; border:2px solid #203653; border-radius:7px; background:#f1f5fc; display:grid; place-items:center; }
.game-cover-window img { display:block; width:100%; height:100%; object-fit:contain; }
.game-cover-bottom { padding-top:8px; font-size:9px; letter-spacing:.12em; font-weight:700; }
.cover-ridges { width:42px; height:10px; background:repeating-linear-gradient(to bottom,#20365355 0 2px,transparent 2px 4px); }
.cover-placeholder { color:#52647e; font-size:15px; padding:14px; text-align:center; }
.saved-art.game-cover { height:auto; overflow:visible; }
.saved-card,.community-card { transition:box-shadow .18s ease; }
.saved-card:hover,.community-card:hover { box-shadow:0 6px 0 #b9cbe2; }
.community-card .game-cover { width:100%; }
.expansion-panel>.community-card { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:12px 24px; max-width:940px; margin:24px auto; padding:24px; align-items:start; }
.expansion-panel>.community-card>.game-cover { grid-column:1; grid-row:1/span 7; align-self:center; }
.expansion-panel>.community-card>:not(.game-cover) { grid-column:2; }
.expansion-panel>.community-card>.save-button { background:#2559ce; border-color:#164397; color:#fff; }
@media(max-width:700px) { .expansion-panel>.community-card { display:flex; padding:16px; } }
.saved-card--empty { min-height:260px; }
@media (prefers-reduced-motion:reduce) { .saved-card,.community-card { transition:none; } }
@media (max-width:520px) { .saved-grid { grid-template-columns:1fr; } .saved-card--empty { min-height:190px; } }
.save-feedback { color: #2559ce; font-size: 14px; overflow-wrap: anywhere; }
.save-feedback:empty { display: none; }
.save-dialog { width: min(500px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 24px; color: #203653; background: #f5f8ff; border: 3px solid #203653; border-radius: 22px; box-shadow: 0 7px 0 #14243d; }
.save-dialog::backdrop { background: #14243dc9; }
.save-dialog.adventure-save-dialog { width:min(700px,calc(100% - 24px)); }
.adventure-save-intro { margin:14px 0;color:var(--app-muted,#52647e);line-height:1.5; }
.adventure-slot-picker { min-width:0;border:0;padding:0;margin:0; }
.adventure-slot-picker legend { margin-bottom:12px;font-weight:700; }
.adventure-slot-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-height:350px;overflow-y:auto;padding:4px 5px 10px; }
.save-form .adventure-slot { position:relative;display:block;min-width:0;cursor:pointer; }
.save-form .adventure-slot input { position:absolute;right:11px;top:11px;z-index:1;width:18px;height:18px;min-height:0;accent-color:#2559ce; }
.adventure-slot-face { display:flex;flex-direction:column;align-items:center;gap:5px;min-height:142px;padding:10px;border:2px solid var(--app-border,#b8c7dc);border-radius:13px;background:var(--app-surface,#fff);color:var(--app-text,#203653);box-shadow:0 3px 0 var(--app-shadow,#c7d4e8); }
.adventure-slot input:checked+.adventure-slot-face { border-color:var(--app-accent,#2559ce);background:var(--app-selected,#dbe6ff);box-shadow:0 3px 0 var(--app-accent,#2559ce); }
.adventure-slot input:focus-visible+.adventure-slot-face { outline:3px solid var(--app-accent,#2559ce);outline-offset:2px; }
.adventure-slot-art { display:block;width:78px;height:80px;overflow:hidden; }.adventure-slot-art>svg { width:100%;height:100%; }.adventure-slot-art .game-cover { padding:4px;box-shadow:none;border-width:1px; }.adventure-slot-art .game-cover-top,.adventure-slot-art .game-cover-bottom { display:none; }.adventure-slot-art .game-cover-window { height:70px;aspect-ratio:auto; }.adventure-slot-art .cover-placeholder { font-size:10px;padding:5px; }
.adventure-slot-face>small { max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px; }
.adventure-save-footer { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--app-muted,#52647e); }.adventure-save-footer>small { font-size:12px;line-height:1.5; }.adventure-slot-store { color:var(--app-accent,#2559ce);font-size:13px;min-height:44px;display:inline-flex;align-items:center; }
.adventure-save-submit { width:100%; }
@media(max-width:520px){ .adventure-slot-grid { grid-template-columns:repeat(2,minmax(0,1fr));max-height:280px; }.adventure-slot-face { min-height:132px; }.adventure-slot-art { height:65px;width:67px; }.adventure-save-dialog .profile-heading h2 { font-size:23px; } }
.save-dialog h2 { font-size: 26px; }
.save-dialog p { line-height: 1.5; margin: 16px 0; }
.save-form { display: grid; gap: 16px; }
.save-form label { display: grid; gap: 7px; font-weight: 600; }
.save-form input, .save-form select { width: 100%; min-width: 0; min-height: 46px; padding: 10px; border: 1px solid #91a5c1; border-radius: 9px; background: white; color: #203653; font: inherit; }
.share-visibility { display:grid;gap:8px;min-width:0;margin:0;padding:0;border:0; }
.share-visibility legend { margin-bottom:8px;font-weight:800; }
.save-form .share-visibility-choice { display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;border:2px solid var(--app-border,#91a5c1);border-radius:11px;background:var(--app-surface,#fff);cursor:pointer; }
.share-visibility-choice:has(input:checked) { border-color:var(--app-accent,#2559ce);background:var(--app-selected,#dbe6ff); }
.save-form .share-visibility-choice input { width:18px;height:18px;min-height:18px;padding:0;margin:0;flex:none;accent-color:var(--app-accent,#2559ce); }
.share-visibility-choice:has(input:focus-visible) { outline:3px solid var(--app-accent,#2559ce);outline-offset:2px; }
.save-form .save-replace-warning { font-size: 14px; margin: 0; }
.save-dialog.slot-save-dialog { box-sizing:border-box;width:min(1000px,calc(100dvw - 24px));height:min(420px,calc(100dvh - 24px));max-width:none;padding:16px;overflow:hidden; }
.slot-save-dialog[open] { display:grid;grid-template-rows:auto minmax(0,1fr);gap:8px; }
.slot-save-dialog .profile-heading { gap:12px; }.slot-save-dialog .profile-heading h2 { font-size:25px;margin:0; }
.slot-save-dialog .close-orb { width:44px;height:44px;min-width:44px;min-height:44px; }
.slot-save-dialog .slot-save-form { min-height:0;grid-template-rows:auto minmax(0,1fr) auto;gap:8px; }
.save-form .slot-save-name { display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:14px; }.slot-save-name input { flex:1; }
.save-slot-picker { min-width:0;min-height:0;padding:0;margin:0;border:0;display:flex;flex-direction:column;gap:8px; }
.save-slot-picker legend { padding:0;font-size:14px;font-weight:700;margin-bottom:0; }
.save-slot-grid { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;overflow-y:auto;min-height:0;padding:3px 3px 6px;align-content:start; }
.save-form .save-slot-choice { position:relative;display:block;min-width:0;cursor:pointer; }
.save-form .save-slot-choice input { position:absolute;width:1px;height:1px;min-height:0;padding:0;border:0;opacity:0; }
.save-slot-face { display:flex;align-items:center;gap:8px;min-height:90px;padding:10px 8px;border:2px solid var(--app-border,#91a5c1);border-radius:14px;background:var(--app-surface,#fff);color:var(--app-text,#203653);box-shadow:0 3px 0 var(--app-shadow,#c7d4e8); }
.save-slot-choice input:checked+.save-slot-face { background:var(--app-selected,#dbe6ff);border-color:var(--app-accent,#2559ce);box-shadow:0 3px 0 var(--app-accent,#2559ce); }
.save-slot-choice input:focus-visible+.save-slot-face { outline:3px solid var(--app-accent,#2559ce);outline-offset:1px; }
.save-slot-art { width:52px;height:56px;flex:none;overflow:hidden; }.save-slot-art>svg { width:100%;height:100%; }.save-slot-art .game-cover { height:100%;padding:3px;border-width:1px;box-shadow:none; }.save-slot-art .game-cover-top,.save-slot-art .game-cover-bottom { display:none; }.save-slot-art .game-cover-window { height:100%;aspect-ratio:auto; }.save-slot-art .cover-placeholder { font-size:10px;padding:3px; }
.save-slot-copy { display:grid;gap:5px;min-width:0; }.save-slot-copy strong { font-size:14px; }.save-slot-copy small { overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px; }
.slot-save-footer { display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0; }.slot-save-footer .save-replace-warning { flex:1;min-width:0;line-height:1.3; }.slot-save-submit { display:flex;align-items:center;justify-content:center;gap:8px;min-width:160px;min-height:48px;flex:none; }
.slot-save-submit svg,.save-exit-actions svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.save-exit-dialog { text-align:center; }.save-exit-dialog .profile-heading { text-align:left; }.save-exit-emblem { display:grid;place-items:center;margin:16px auto;width:72px;height:72px;border-radius:20px;background:var(--app-selected,#dbe6ff); }.save-exit-emblem svg { width:40px;height:40px;fill:none;stroke:var(--app-accent,#2559ce);stroke-width:1.8; }
.save-exit-actions { display:grid;grid-template-columns:1fr 1fr;gap:12px; }.save-exit-actions button { display:flex;justify-content:center;align-items:center;gap:8px;min-height:48px;padding:10px; }.save-exit-yes { background:#ffcf48; }.save-exit-leave { background:var(--app-raised,#edf3ff); }
@media(max-height:420px) { .save-dialog.slot-save-dialog { padding:12px; }.save-slot-face { min-height:76px; }.slot-save-dialog .slot-save-name input { min-height:44px;padding:8px; } }
@media(orientation:portrait) and (max-width:740px) {
  .save-dialog.slot-save-dialog { position:fixed;inset:auto;left:50%;top:50%;margin:0;width:calc(100dvh - 24px);height:calc(100dvw - 24px);max-height:none;transform:translate(-50%,-50%) rotate(90deg);padding:12px; }
  .slot-save-dialog .save-slot-face { min-height:76px; }.slot-save-dialog .slot-save-name input { min-height:44px;padding:8px; }
}
@media(orientation:landscape) and (max-width:640px), (orientation:portrait) and (max-height:640px) {
  .slot-save-dialog .save-slot-face { gap:4px;padding:8px 6px; }
  .slot-save-dialog .save-slot-art { width:32px;height:40px; }
  .slot-save-dialog .save-slot-copy strong { font-size:13px; }
}
.game-type-intro { color:#52647e; }
.game-type-picker { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px; }
.game-type-choice { min-width:0;min-height:170px;padding:12px;display:flex;flex-direction:column;align-items:stretch;gap:10px;border:2px solid #203653;border-radius:16px;background:#fff;color:#203653;box-shadow:0 4px 0 #b4c4dc;text-align:left;cursor:pointer; }
.game-type-choice:hover { transform:translateY(-2px);box-shadow:0 6px 0 #203653; }
.game-type-choice:active { transform:translateY(2px);box-shadow:0 2px 0 #203653; }
.game-type-choice-art { min-height:82px;display:grid;place-items:center;overflow:hidden;border-radius:10px;background:#dff1e8; }
.game-type-choice--racing .game-type-choice-art { background:#e4ebff; }
.game-type-choice--tanks .game-type-choice-art { background:#f3e3ce; }
.game-type-choice-art svg { width:92%;height:78px;fill:none; }
.game-type-choice-copy { display:grid;gap:3px; }
.game-type-choice-copy strong { font-size:18px; }
.game-type-choice-copy small { color:#52647e;font-size:13px;line-height:1.35; }
.saved-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.save-button--danger { color: #9f2828; border-color: #9f2828; background: #fff0ef; }
.save-menu-button { display: block; min-height: 44px; margin: 14px auto 0; padding: 8px 20px; color: #203653; background: #fff4cf; border: 2px solid #203653; border-radius: 12px; font-weight: 700; }
.save-menu-button:disabled { opacity: .65; cursor: default; }
@media (max-width: 950px) { .saved-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .saved-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .saved-library-heading { align-items: flex-start; }
  .saved-library-heading p { max-width: 25ch; }
  .slot-counter { padding: 6px 9px; font-size: 13px; }
  .app-nav .lobby-link { display: inline-flex; padding: 6px 9px; }
  .lobby-link span { display: none; }
}
.dashboard-page { --ink: #203653; --muted: #52647e; --paper: #eef3fc; background: #eef3fc; background-image: radial-gradient(#b8c9e055 1px, transparent 1px); background-size: 22px 22px; min-height: 100dvh; }
.dashboard-page .topbar { position: sticky; top: 0; z-index: 30; width: 100%; min-height: 88px; padding: 14px max(24px, calc((100vw - 1240px) / 2)); background: #fff; border-bottom: 3px solid #d9e3f3; }
.app-nav { display: flex; align-items: center; gap: 22px; }
.app-nav a { text-decoration: none; font-weight: 700; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.app-nav .lobby-link[aria-current="page"] { color: var(--blue); }
.app-nav .nav-wallet { gap: 10px; min-width: 148px; padding: 5px 8px 5px 5px; color: #704614; background: #fff3ca; border: 2px solid #eed797; border-radius: 40px; box-shadow: 0 3px 0 #dbc082; }
.nav-wallet strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.wallet-plus { margin-left: auto; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: white; background: #2559ce; font-size: 22px; line-height: 1; }
.sketch-coin { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #ffcf48; color: #86511a; border: 3px solid #ffe594; box-shadow: inset 0 0 0 2px #d89a29, 0 3px 0 #bb801c; font: 800 21px/1 Outfit, sans-serif; transform: rotate(-12deg); text-shadow: 0 1px #fff1b3; }
.profile-orb { display: grid; place-items: center; width: 52px; height: 52px; padding: 3px; background: #fff; border: 3px solid #203653; border-radius: 50%; box-shadow: 0 3px 0 #b7c7de; }
[data-avatar] { display: grid; place-items: center; overflow: hidden; width: 100%; height: 100%; border-radius: 50%; background: #dce7ff; color: #2559ce; font-size: 24px; font-weight: 800; }
[data-avatar] img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dashboard-page > main { padding-top: 30px; }
.player-dashboard-heading { padding: 20px 0 30px; }
.player-dashboard-heading h1 { font-size: clamp(38px, 5vw, 64px); font-weight: 800; letter-spacing: -.045em; }
.player-dashboard-heading p { font-size: 20px; }
.dashboard-page .account-kicker { color: #486596; font: 700 12px/1.4 Outfit, sans-serif; letter-spacing: .14em; }
.mode-picker.cartridge-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0 0 34px; }
.cartridge-shelf button { --cartridge-color: #c4e4cb; display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 13px 13px 20px; border: 3px solid #203653; border-radius: 24px; background: #fff; box-shadow: 0 8px 0 #203653; transition: transform 160ms, box-shadow 160ms; }
.cartridge-shelf button[data-mode="racing"] { --cartridge-color: #c3d9fa; }
.cartridge-shelf button[data-mode="tanks"] { --cartridge-color: #ead3f4; }
.cartridge-shelf button[data-mode="maze"] { --cartridge-color: #dcebd9; }
.scene-maze { background:#dcebd9; }
.scene-maze-ink { display:grid;place-items:center;width:100%;height:100%; }
.scene-maze-ink svg { width:88%;height:88%;fill:none;stroke:#203653;stroke-width:4;stroke-linecap:round;stroke-linejoin:round; }
@media (min-width: 541px) and (max-width: 1050px) { .mode-picker.cartridge-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (hover: hover) and (pointer: fine) {
  .cartridge-shelf button:hover { transform: translateY(-5px) rotate(-.7deg); background: #fff; box-shadow: 0 13px 0 #203653; }
}
.cartridge-shelf button:active { transform: translateY(4px); box-shadow: 0 4px 0 #203653; }
.cartridge-shelf button[aria-pressed="true"] { background: #fff; box-shadow: 0 8px 0 #203653; }
.cartridge-shelf button[aria-pressed="true"]::after { display: none; }
.cartridge-art { height: clamp(170px, 20vw, 244px); display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 13px; background: var(--cartridge-color); }
.cartridge-art::before { content: ''; width: 190px; height: 190px; border-radius: 50%; position: absolute; background: #ffffff55; }
.cartridge-art::after { content: '+'; position: absolute; right: 18px; top: 10px; color: #20365350; font-size: 35px; transform: rotate(15deg); }
.cartridge-shelf .cartridge-art svg { position: relative; width: 80%; height: 80%; max-width: 245px; margin: 0; stroke-width: 1.6; fill: none; }
.cartridge-demo { position:absolute;inset:8px;display:grid;place-items:center;border:1px solid #20365322;border-radius:8px;background:#fffdf6;opacity:0;pointer-events:none;contain:paint;transition:opacity .4s ease; }
.cartridge-shelf .cartridge-art>svg,
.cartridge-shelf .cartridge-art::after { transition:opacity .4s ease; }
.dashboard-page .cartridge-shelf .cartridge-art .cartridge-demo svg { display:block;width:100%;height:auto;max-width:none;max-height:100%;margin:0; }
.cartridge-shelf button[data-preview-playing] .cartridge-demo { opacity:1; }
.cartridge-shelf button[data-preview-playing] .cartridge-art>svg,
.cartridge-shelf button[data-preview-playing] .cartridge-art::after { opacity:0; }
.cartridge-shelf button > strong { margin: 18px 10px 2px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.cartridge-shelf button > span { margin: 0 10px; font-size: 15px; color: #52647e; }
.cartridge-play { margin: 22px 10px 0; display: flex; justify-content: center; min-height: 44px; align-items: center; background: #203653; color: #fff; border-radius: 10px; font-size: 15px; }
.lobby-note { display: flex; align-items: center; gap: 20px; padding: 24px 0; }
.lobby-note .sketch-coin { width: 45px; height: 45px; font-size: 27px; }
.lobby-note strong, .lobby-note span:not(.sketch-coin) { display: block; }
.lobby-note strong { font-size: 18px; }.lobby-note div > span { color: var(--muted); font-size: 14px; max-width: 58ch; }
.lobby-note a { margin-left: auto; flex-shrink: 0; font-size: 14px; font-weight: 600; }
#upload-screen:not(.is-creating) #workbench, #upload-screen:not(.is-creating) .creation-header { display: none; }
#upload-screen.is-creating .player-dashboard-heading, #upload-screen.is-creating .cartridge-shelf, #upload-screen.is-creating .lobby-note { display: none; }
.lobby-back { min-height: 44px; padding: 6px 0; color: #38577d; background: transparent; font-weight: 700; }
.dashboard-page .arcade-back { position:relative;display:inline-grid;place-items:center;flex:none;width:48px;height:48px;min-height:48px;padding:8px;color:#fff;background:#14243dbb;border:1px solid #ffffff66;border-radius:50%;box-shadow:0 5px 18px #0004;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);text-decoration:none;cursor:pointer; }
.arcade-back[hidden] { display:none; }.arcade-back>svg { width:25px;height:25px; }
.arcade-back-label { position:absolute;left:0;top:calc(100% + 9px);z-index:10;white-space:nowrap;padding:7px 10px;border-radius:8px;background:var(--app-text,#203653);color:var(--app-surface,#fff);font-size:12px;opacity:0;pointer-events:none; }
.arcade-back:hover .arcade-back-label,.arcade-back:focus-visible .arcade-back-label { opacity:1; }
.arcade-back:focus-visible { outline:3px solid var(--app-accent,#2559ce);outline-offset:5px; }
.arcade-back:active { transform:translateY(1px);box-shadow:0 2px 10px #0004; }
#app-panel-back { margin:0 0 22px; }
.creation-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 20px 0 28px; }
.creation-header h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin-top: 5px; }
#creation-mode { text-transform: uppercase; color: #486596; font-size: 12px; letter-spacing: .14em; font-weight: 700; }
.creation-cost { display: flex; gap: 10px; align-items: center; font-size: 13px; color: #52647e; white-space: nowrap; }
.creation-cost .sketch-coin { width: 26px; height: 26px; font-size: 15px; }
.dashboard-page .workbench { background: #fff; border: 3px solid #203653; border-radius: 24px; box-shadow: 0 7px 0 #c7d4e8; padding: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; }
.dashboard-page .drop-zone { background: #f0f5ff; border: 2px dashed #9eb6dc; border-radius: 20px; }
.dashboard-page .primary-button { background: #2559ce; border: 2px solid #164397; box-shadow: 0 4px 0 #164397; border-radius: 12px; font-weight: 700; }
.dashboard-page .primary-button:active { transform: translateY(2px); box-shadow: 0 2px 0 #164397; }
.dashboard-page .lab-footer { display: none; }
.dashboard-page .lab-footer > span { display: none; }
.dashboard-page .lab-footer nav { gap: 16px; }
.dashboard-page .lab-footer a { font-size: 12px; }
.app-account-screen { width: min(1120px, calc(100% - 48px)); margin: 0 auto; animation: app-enter 180ms ease-out; }
.app-account-screen .account-main { width: 100%; padding: 32px 0; min-height: 0; }
.app-account-screen .dashboard-heading h1 { font-size: 44px; font-weight: 800; }
.app-account-screen .credit-balance { background: #ffdf76; box-shadow: 0 5px 0 #d5aa38; }
.app-account-screen .credit-balance::before { content: 'S'; display: grid; place-items: center; float: right; width: 42px; height: 42px; border: 3px solid #fff0b8; box-shadow: inset 0 0 0 2px #d89a29, 0 3px 0 #bb801c; border-radius: 50%; color: #86511a; background: #ffcf48; font-size: 25px; font-weight: 800; transform: rotate(-12deg); }
.app-account-screen .admin-users, .app-account-screen .credit-history-list { border: 2px solid #cfdaeb; }
.app-account-screen[aria-busy="true"] { min-height: 200px; opacity: .65; }
.profile-dialog { width: min(600px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow-y:auto; padding: 26px; background: #f5f8ff; border: 3px solid #203653; border-radius: 24px; box-shadow: 0 8px 0 #14243d; }
.profile-dialog::backdrop { background: #14243db8; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.profile-heading h2 { font-size: 32px; font-weight: 800; margin-top: 3px; }
.close-orb { width: 44px; height: 44px; font-size: 28px; background: #e4ebf7; border-radius: 50%; }
.profile-photo-settings { display: flex; align-items: center; gap: 22px; margin: 24px 0; padding: 22px 0; border-block: 1px solid #d4deee; }
.avatar-upload { position: relative; width: 110px; height: 110px; flex: 0 0 auto; padding: 4px; background: #fff; border: 3px solid #2559ce; border-radius: 50%; overflow: hidden; }
.avatar-upload [data-avatar] { font-size: 45px; }
.avatar-upload-label { position: absolute; bottom: 0; left: 0; right: 0; background: #203653ed; color: #fff; padding: 6px 0 9px; font-size: 12px; }
.profile-photo-settings p, .profile-photo-settings small { color: #52647e; font-size: 13px; }
.profile-photo-settings > div { min-width: 0; }
#profile-player-name { display: block; overflow-wrap: anywhere; }
.profile-photo-settings small { display: block; margin-top: 2px; }
#avatar-delete { padding: 6px 0; min-height: 36px; color: #a13535; font-size: 13px; }
#avatar-delete:disabled { opacity: .45; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 20px; }
.profile-dialog label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.profile-dialog input { width: 100%; min-width: 0; min-height: 44px; background: #fff; border: 2px solid #cfdaeb; border-radius: 10px; padding: 9px 11px; font-size: 16px; color: #203653; }
.email-password-check { margin-top:6px; }
.email-password-note { display:block;color:#52647e;font-size:12px;margin:5px 0 12px; }
.profile-security { border-top: 1px solid #d4deee; margin-top:18px;padding-top:14px; }
.profile-security summary { min-height: 44px; font-weight: 600; }
.profile-security label { margin-top: 10px; }
.profile-security>p { color:#52647e;font-size:13px;line-height:1.5;margin:4px 0 12px; }
.profile-security .ghost-button { width:100%; }
.profile-code-fields { display:grid;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #d4deee; }
.profile-code-fields[hidden] { display:none; }
#profile-security-feedback:not(:empty) { margin-top:10px;padding:10px;border-radius:8px;background:#e2ebfb;color:#203653; }
#profile-feedback:not(:empty) { margin: 10px 0; padding: 10px; border-radius: 8px; background: #e2ebfb; font-size: 14px; }
#profile-form > button { width: 100%; margin-top: 10px; }
.profile-sound { min-width:0; margin:20px 0 0; padding:16px 0; border:0; border-top:1px solid var(--app-border,#d4deee); }
.profile-sound legend { padding:0; font-size:18px; font-weight:700; }
.profile-dialog .profile-sound-toggle { display:flex; align-items:center; gap:12px; min-height:48px; font-size:16px; cursor:pointer; }
.profile-dialog #profile-sound-enabled { width:22px; height:22px; min-height:0; padding:0; flex:none; accent-color:var(--app-accent,#2559ce); }
.profile-sound p { margin:0; color:var(--app-muted,#52647e); font-size:14px; line-height:1.5; }
.profile-footer { display: flex;flex-wrap:wrap; justify-content: space-between; gap: 20px; align-items: center; margin-top: 24px; }
.profile-footer button { background: #f9e5e3; color: #8d3030; min-height: 44px; padding: 8px 20px; border-radius: 10px; font-weight: 700; }
.profile-footer div { display: flex;flex-wrap:wrap; gap: 16px; }.profile-footer a { font-size: 13px; }
.app-notice { position: fixed; z-index: 1000; bottom: 24px; left: 50%; transform: translateX(-50%); width: min(480px, calc(100% - 32px)); padding: 16px 22px; border-radius: 14px; background: #203653; color: #fff; box-shadow: 0 4px 0 #13243c; }
@keyframes app-enter { from { opacity: .3; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.is-creating .workbench { animation: app-enter 180ms ease-out; }
@media (max-width: 800px) {
  .dashboard-page .topbar { padding: 12px 20px; min-height: 78px; }.app-nav { gap: 12px; }
  .dashboard-page .brand strong { font-size: 22px; }.dashboard-page .brand-mark { width: 36px; height: 36px; }
  .mode-picker.cartridge-shelf { gap: 14px; }.cartridge-art { height: 160px; }
  .cartridge-shelf button > strong { font-size: 25px; }.cartridge-shelf button > span { font-size: 13px; }
  .cartridge-play { margin: 18px 0 0; }.lobby-note { flex-wrap: wrap; }.lobby-note a { margin-left: 65px; }
  .creation-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .dashboard-page .workbench { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .dashboard-page .topbar { padding: 12px 16px; gap: 12px; }.dashboard-page .brand { gap: 0; }.dashboard-page .brand strong { display: none; }
  .app-nav { gap: 8px; }.app-nav .lobby-link { display: inline-flex; }.app-nav a { font-size: 13px; }
  .app-nav .nav-wallet { min-width: 122px; gap: 8px; }.nav-wallet strong { font-size: 19px; }.profile-orb { width: 46px; height: 46px; }
  .dashboard-page > main { padding-top: 8px; }.player-dashboard-heading { padding: 24px 0; }.player-dashboard-heading h1 { font-size: 38px; }.player-dashboard-heading p { font-size: 17px; }
  .game-type-picker { grid-template-columns:1fr; }
  .game-type-choice { min-height:96px;display:grid;grid-template-columns:94px minmax(0,1fr);align-items:center; }
  .game-type-choice-art { min-height:72px; }
  .mode-picker.cartridge-shelf { grid-template-columns: 1fr; gap: 20px; }.cartridge-shelf button { display: grid; grid-template-columns: 105px 1fr; column-gap: 16px; padding: 12px; border-radius: 19px; }
  .cartridge-art { grid-row: 1 / 4; width: 105px; height: 140px; }.cartridge-art::before { width: 110px; height: 110px; }
  .cartridge-shelf button > strong { margin: 4px 0 0; font-size: 26px; }.cartridge-shelf button > span { margin: 0; font-size: 13px; }.cartridge-play { margin-top: 12px; font-size: 13px; }
  .lobby-note { padding-top: 5px; gap: 14px; align-items: start; }.lobby-note div { flex: 1; }.lobby-note a { margin-left: 59px; }
  .dashboard-page .workbench { padding: 20px 16px; gap: 22px; }.profile-dialog { padding: 20px; }.profile-fields { grid-template-columns: 1fr; }.profile-photo-settings { gap: 16px; }.avatar-upload { width: 92px; height: 92px; }
  .app-account-screen { width: calc(100% - 32px); }.app-account-screen .dashboard-heading h1 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { .dashboard-page *, .dashboard-page *::before, .dashboard-page *::after { animation: none !important; transition: none !important; } }
