:root { --bg: #0d1020; --fg: #e8ebf5; --mut: #9aa3c0; --acc: #5a77d8; --bar: #161a30; --ok: #4fc27a; --warn: #e5b33f; --bad: #e0605a; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
[hidden] { display: none !important; }
.view { height: 100%; }
#login { display: grid; place-items: center; }
#login-form { display: flex; flex-direction: column; gap: 12px; width: min(320px, 90vw); }
#login-form h1 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
input[type=password] { padding: 10px 12px; border-radius: 6px; border: 1px solid #39406a; background: #0a0d1a; color: var(--fg); font-size: 16px; }
button, .btn { padding: 6px 12px; border-radius: 6px; border: 1px solid #39406a; background: #1d2240; color: var(--fg); font: inherit; cursor: pointer; }
button:hover, .btn:hover { border-color: var(--acc); }
#login-btn { padding: 10px; background: var(--acc); border-color: var(--acc); font-weight: 600; }
#login-msg { min-height: 1.4em; color: var(--bad); margin: 0; }
#launcher { display: flex; flex-direction: column; }
#toolbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: var(--bar); border-bottom: 1px solid #262c50; font-size: 13px; overflow-x: auto; white-space: nowrap; }
#toolbar button, #toolbar .btn { padding: 3px 9px; font-size: 13px; }
#game-title { font-weight: 600; }
#profile-name { color: var(--mut); }
#cloud-time { color: var(--mut); }
.spacer { flex: 1; }
#save-status { padding: 1px 8px; border-radius: 10px; background: #22284a; }
.st-cloud { color: var(--ok); } .st-syncing, .st-local { color: #9fc1ff; } .st-offline { color: var(--warn); } .st-conflict, .st-failed { color: var(--bad); font-weight: 600; }
#stage { position: relative; flex: 1; min-height: 0; background: #000; }
#frame-host, #frame-host iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 7, 15, .88); z-index: 5; }
.overlay .box { width: min(520px, 90vw); text-align: center; display: flex; flex-direction: column; gap: 10px; }
#ov-title { font-size: 18px; font-weight: 600; }
#ov-text { color: var(--mut); white-space: pre-wrap; }
.bar { height: 6px; background: #22284a; border-radius: 3px; overflow: hidden; }
#ov-bar { height: 100%; width: 0; background: var(--acc); transition: width .2s; }
#ov-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#ov-actions button.primary, #dlg-actions button.primary { background: var(--acc); border-color: var(--acc); }
dialog { background: #12162b; color: var(--fg); border: 1px solid #39406a; border-radius: 8px; width: min(720px, 94vw); max-height: 85vh; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog h2 { margin: 0 0 10px; font-size: 17px; }
#dlg-body { max-height: 60vh; overflow: auto; }
#dlg-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
#dlg-body td, #dlg-body th { padding: 4px 6px; border-bottom: 1px solid #262c50; text-align: left; }
menu { display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin: 12px 0 0; }
:fullscreen #toolbar { display: none; }
