/* Отдельный раздел «Ретроигры» — стилистика проекта, без внешних шрифтов. */
#railRetro .ui-icon{width:23px;height:23px}
#retroChannel .ui-icon{width:22px;height:22px;color:#a899f7;flex-shrink:0}
.retro-panel{position:fixed;inset:0;z-index:9;background:#171923;color:#edeafa;overflow-y:auto;overscroll-behavior:contain}
.retro-wrap{width:min(1150px,100%);margin:auto;padding:30px 32px 55px}
.retro-head,.retro-tools,.retro-summary,.retro-section-head,.retro-brand,.retro-card-actions{display:flex;align-items:center}
.retro-head{justify-content:space-between;gap:18px;margin-bottom:27px}
.retro-brand{gap:15px}.retro-brand-icon{display:grid;place-items:center;width:59px;height:59px;border-radius:17px;background:#5548a0;color:#f4efff}
.retro-brand-icon .ui-icon{width:33px;height:33px}.retro-kicker{font-size:10px;font-weight:800;letter-spacing:1.6px;color:#9992cb}
.retro-head h2{font-size:26px;letter-spacing:-.6px;margin:3px 0 2px}.retro-head p{font-size:12px;color:#aaa9bb;margin:0}
.retro-icon-button{border:1px solid #44465d;background:#303144;color:#d4cee7;border-radius:11px;min-height:40px;min-width:40px;font-size:23px}
.retro-tools{flex-wrap:wrap;gap:10px;margin-bottom:13px}.retro-search{display:flex;align-items:center;gap:9px;background:#272a39;border:1px solid #45465e;border-radius:12px;padding:0 12px;flex:1 1 230px;min-height:44px}
.retro-search .ui-icon{width:19px;height:19px;color:#aaa2ea}.retro-search input{background:transparent;border:0;outline:0;color:#f5f2ff;min-width:0;width:100%}
.retro-tools select,.retro-upload-form select,.retro-edit-form select{background:#2c2e40;border:1px solid #45465e;border-radius:10px;padding:11px 12px;color:#f2efff;max-width:100%}
.retro-summary{gap:15px;justify-content:space-between;color:#a7a5ba;font-size:12px;margin:0 0 18px;flex-wrap:wrap}
.retro-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}.retro-card{min-width:0;background:#252736;border:1px solid #3d3e53;border-radius:17px;overflow:hidden;transition:border-color .15s,transform .15s}
.retro-card:hover{border-color:#7567d2;transform:translateY(-1px)}.retro-card-art{height:165px;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;background:radial-gradient(circle at 60% 20%,#4c4389 0,transparent 68%),#191c2a;color:#c6b7ff}
.retro-card-art .ui-icon{width:69px;height:69px;opacity:.88}.retro-card-art span{font-weight:850;letter-spacing:3px;font-size:10px;color:#a69bdf}.retro-card-art img{display:block;width:100%;height:100%;object-fit:contain;padding:9px}
.retro-card-content{padding:15px}.retro-system{color:#a99dff;font-size:10px;letter-spacing:.4px;font-weight:800}.retro-card-content h3{margin:7px 0;font-size:15px;overflow-wrap:anywhere;line-height:1.28}.retro-card-meta{font-size:11px;color:#a7a8be;margin-bottom:15px}
.retro-card-actions{gap:8px;flex-wrap:wrap}.retro-download,.retro-edit-button{display:inline-flex;align-items:center;justify-content:center;background:#5145a5;color:white;text-decoration:none;border:0;padding:10px 11px;border-radius:9px;font-size:12px;font-weight:750;min-height:38px}
.retro-edit-button{background:#383a51}.retro-empty{padding:44px 10px;text-align:center;border:1px dashed #4b4a67;border-radius:17px;color:#9fa0b4}
.retro-empty .ui-icon{width:58px;height:58px;color:#9f8efa}.retro-empty h3{color:#e2daff;margin:10px 0 5px}.retro-empty p{margin:0 auto;max-width:420px;line-height:1.6;font-size:12px}
.retro-admin,.retro-edit{margin-top:26px;background:#242637;border:1px solid #46445d;border-radius:18px;padding:22px}
.retro-section-head{justify-content:space-between;gap:16px;margin:0 0 17px}.retro-section-head h3{margin:0;font-size:17px}.retro-section-head>span{font-size:12px;color:#a6a2bf}
.retro-upload-form,.retro-edit-form,.retro-cover-actions{display:flex;flex-wrap:wrap;align-items:end;gap:12px}
.retro-upload-form label,.retro-edit-form label,.retro-cover-actions label{flex:1 1 190px;min-width:0;font-size:12px;font-weight:750;color:#c0bbd8;display:flex;flex-direction:column;gap:8px}
.retro-upload-form input[type=file],.retro-cover-actions input[type=file],.retro-edit-form input{display:block;width:100%;background:#1d2030;border:1px solid #494862;color:#f0eaff;padding:10px;border-radius:9px;min-height:43px}
.retro-hint{font-size:11px;color:#a5a2bb;line-height:1.75;overflow-wrap:anywhere}.retro-hint code{background:#161925;border-radius:5px;padding:2px 4px;color:#cfbdff}
.retro-cover-actions{margin:17px 0}.retro-status{font-size:12px;color:#9fedca;min-height:18px;margin-top:13px}.retro-status.error{color:#ffa9ad}
@media(max-width:690px){.retro-panel{bottom:calc(var(--mobile-nav-height, 64px) + env(safe-area-inset-bottom));z-index:8}.retro-wrap{padding:17px 14px 36px}.retro-head{margin-bottom:19px}.retro-brand-icon{width:45px;height:45px;border-radius:12px}.retro-brand-icon .ui-icon{width:25px;height:25px}.retro-head h2{font-size:21px}.retro-kicker{font-size:8px}.retro-head p{font-size:10px}.retro-tools{gap:7px}.retro-search{flex:1 0 100%}.retro-tools select{flex:1;min-width:0;font-size:11px}.retro-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.retro-card-art{height:120px}.retro-card-art .ui-icon{height:48px;width:48px}.retro-card-content{padding:10px}.retro-card-content h3{font-size:13px}.retro-card-meta{font-size:10px}.retro-card-actions{gap:4px}.retro-download,.retro-edit-button{font-size:10px;padding:8px 7px;min-height:35px}.retro-admin,.retro-edit{padding:14px}.retro-section-head h3{font-size:15px}.retro-summary{font-size:10px}}
@media(max-width:360px){.retro-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.retro-card-art{height:105px}}

/* On phones the library is view-only; no ROM download/play control. */
.retro-device-notice{margin:2px 0 14px;padding:12px 14px;border:1px solid #6959a0;border-radius:12px;background:#322c4c;color:#e7ddff;font-size:12px;line-height:1.55}
.retro-device-notice[hidden]{display:none!important}
.retro-spectator-label{display:inline-flex;align-items:center;justify-content:center;background:#383449;color:#c8bfeb;padding:10px 11px;border:1px solid #555071;border-radius:9px;font-size:12px;min-height:38px}

/* Активный эмулятор — отдельный слой внутри каталога. */
.retro-play{display:inline-flex;align-items:center;justify-content:center;background:#6954db;color:#fff;border:1px solid #8777f5;padding:10px 13px;border-radius:9px;font-size:12px;font-weight:800;min-height:38px;cursor:pointer}
.retro-play:hover{background:#7969e2}
.retro-player[hidden]{display:none!important}
.retro-player{position:fixed;inset:0;z-index:4;display:flex;flex-direction:column;background:#0f111b;color:#efeaff;padding:10px 18px 14px;gap:10px}
.retro-player-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.retro-player-name{display:flex;align-items:center;gap:10px;min-width:0}
.retro-player-name .ui-icon{width:27px;height:27px;color:#b2a0ff}
.retro-player-name strong{font-size:16px;display:block;max-width:52vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.retro-player-name small{font-size:11px;color:#a9a4c3}
.retro-player-tools{display:flex;align-items:center;gap:9px}
.retro-player-stage{flex:1 1 auto;min-height:150px;max-height:calc(100vh - 110px);display:flex;align-items:center;justify-content:center;background:#080910;border:1px solid #32304c;border-radius:13px;overflow:hidden}
.retro-player-stage:fullscreen{max-height:none;border:0;border-radius:0}
#retroPlayerFrame{display:block;width:100%;height:100%;border:0;background:#090b11}
.retro-player-help{font-size:11px;color:#a9a4c3;text-align:center;line-height:1.45}
@media(max-width:690px){.retro-player{display:none!important}.retro-card-actions .retro-play{display:none!important}}
