/* Arcade tab (emulator games). */
.emu-stage { display: flex; flex-direction: column; overflow: hidden; }
.emu-picker { flex: 1; overflow: auto; padding: 10px 14px; }
.emu-picker h3 { margin: 14px 0 6px; font-size: 13px; opacity: .8; }
.emu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.emu-grid button { text-align: center; padding: 0; cursor: pointer; border: 1px solid rgba(255,255,255,.1); border-radius: 2px; background: #0a0a0a; overflow: hidden; display: flex; flex-direction: column; transition: all .15s ease; }
.emu-grid button:hover { border-color: rgba(255,255,255,.3); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255,165,0,.2); }
.emu-cover { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 200px; background: #0a0a0a; }
.emu-cover svg { width: 100%; height: 100%; object-fit: contain; }
.emu-title { padding: 6px 4px; font-size: 11px; line-height: 1.2; color: #aaa; background: #0a0a0a; border-top: 1px solid rgba(255,255,255,.1); text-overflow: ellipsis; overflow: hidden; white-space: normal; max-height: 2.4em; }
.emu-bar { display: flex; gap: 8px; align-items: center; padding: 4px 8px; }
.emu-bar button { margin-left: auto; }
.emu-bar button + button { margin-left: 0; }
.emu-frame { flex: 1; width: 100%; border: 0; background: #000; }
.emu-menu-games { max-height: 60vh; overflow-y: auto; }
/* Game fills the tab; the title/Quit bar floats over the top-left corner. */
.emu-stage { position: relative; }
.emu-stage .emu-playing { position: absolute; top: 6px; right: 8px; z-index: 2; padding: 2px 6px; background: rgba(0,0,0,.55); border-radius: 4px; opacity: .35; transition: opacity .15s; }
.emu-stage .emu-playing:hover { opacity: 1; }
/* The frame stays in normal flow: it is what gives the tab its height. */
.emu-frame { position: static; flex: 1 1 auto; width: 100%; min-height: 0; height: 100%; }
.emu-note { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; padding: 6px 12px; background: rgba(0,0,0,.8); border: 1px solid #333; border-radius: 4px; }
.emu-invite form { display: grid; gap: 10px; min-width: 320px; }
.emu-invite label { display: grid; gap: 4px; }
.emu-invite footer { display: flex; gap: 8px; justify-content: flex-end; }
.emu-invite-error { color: #e66; min-height: 1em; margin: 0; }
/* Arcade has no sub-tabs: don't leave an empty strip above the game. */
#arcadeSubTabs:empty { display: none !important; }
/* Picker tiles: the game's icon, big, over its name. */
.emu-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px !important; text-align: center !important; }
.emu-tile-icon .doom-icon { width: 96px; height: 42px; border-width: 2px; border-radius: 4px; }
.emu-tile-icon .doom-icon svg { width: 90px; height: 36px; }
.emu-tile-name { font-size: 12px; line-height: 1.3; }
.emu-tile:hover .doom-icon { filter: brightness(1.25); }
.emu-invite-hint { margin: 0; font-size: 12px; opacity: .7; }
.emu-holder { opacity: .85; }

.emu-stage { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.emu-stage > .emu-picker { flex: 1 1 auto; min-height: 0; }

/* Arcade tab active: the game fills the chat panel; the composer is hidden. */
html .chat-panel.emu-full { grid-template-rows: auto minmax(0, 1fr) !important; }
html[data-skin="dock"] .chat-panel.emu-full { display: flex; flex-direction: column; }
.chat-panel.emu-full #composer, .chat-panel.emu-full #whisperDock, .chat-panel.emu-full #snTyping { display: none !important; }
html[data-skin="dock"] .chat-panel.emu-full > .console-host { flex: 1 1 auto; min-height: 0; }
/* Full-bleed generated covers, with a text fallback for imported games. */
.emu-tile-icon.emu-tile-cover{position:relative;display:block;width:120px;aspect-ratio:2/3;border-radius:6px;overflow:hidden;box-shadow:0 4px 14px rgba(0,0,0,.5);background:#111827}
.emu-tile-icon.emu-tile-cover img{position:relative;display:block;width:100%;height:100%;object-fit:contain;background:#111827}
.emu-cover-fallback{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;gap:16px;padding:12px;color:#e5e7eb;background:linear-gradient(145deg,#263449,#10151e);font-size:14px;font-weight:700;overflow-wrap:anywhere}
.emu-cover-fallback small{font-size:9px;letter-spacing:2px;opacity:.55}

/* Arcade without a multiplayer session: no userlist column. */
.workspace.arcade-solo{grid-template-columns:minmax(0,1fr)}
.workspace.arcade-solo>.roster-panel{display:none}

/* Prism Originals: always first in the picker, gold-trimmed. Hover keeps the
   shared tile lift, nothing resizes under the cursor. */
.emu-originals h3{color:#d9ac52;letter-spacing:2px;text-transform:uppercase;font-size:11px;opacity:1}
.emu-grid .emu-tile-original{border-color:rgba(201,154,69,.45)}
.emu-grid .emu-tile-original:hover{border-color:rgba(232,190,100,.85);box-shadow:0 4px 14px rgba(232,170,60,.28)}
.emu-tile-original .emu-tile-name{color:#e7c47a;letter-spacing:1px}
