@charset "UTF-8";
:root { color-scheme: dark; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #deded1; background: #161713; --gold: #d0b978; --border: #37392e; --muted: #939787; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(ellipse at 50% 10%, #292b20 0, #191b16 42%, #121410 100%); }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button:disabled { opacity: .42; cursor: default; }
[hidden] { display: none !important; }
.shell { max-width: 1152px; margin: 0 auto; padding: 32px max(24px, env(safe-area-inset-right)) 16px max(24px, env(safe-area-inset-left)); }
.topbar { max-width: 800px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto 22px; }
.identity { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }
.crest { display: grid; place-items: center; font: bold 25px Georgia, serif; width: 42px; height: 48px; color: var(--gold); border: 1px solid #9c8b58; border-radius: 3px 3px 16px 16px; background: #24261b; }
.eyebrow { display: block; font-size: 10px; line-height: 1.5; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
h1 { font-family: Georgia, serif; font-weight: normal; font-size: 28px; line-height: 1.15; margin: 2px 0 0; color: #f0ecda; }
.toolbar { display: flex; align-items: center; gap: 8px; }
.icon-button, .developer-button, .close-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: transparent; color: #b5b9aa; border-radius: 5px; min-height: 40px; padding: 8px 10px; font-size: 12px; }
.icon-button:hover, .close-button:hover { color: #efeddf; background: #2b2e23; }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.developer-button { border-color: #514a34; color: #d0b978; }
.developer-button:hover, .developer-button[aria-expanded="true"] { background: #363020; border-color: #827247; }
.developer-button span { font-size: 15px; }
.workspace { display: grid; grid-template-columns: minmax(0, 800px); justify-content: center; align-items: start; gap: 24px; }
.workspace.has-developer { grid-template-columns: minmax(0, 800px) 280px; }
body.developer-open .topbar { max-width: none; }
.game-area { min-width: 0; }
.game-frame { position: relative; aspect-ratio: 4 / 3; width: 100%; background: #080a07; border: 1px solid #454637; border-radius: 5px; overflow: hidden; box-shadow: 0 24px 56px #0006, 0 0 0 4px #10120e50; }
.player-container { width: 100%; height: 100%; }
.player-container ruffle-player { width: 100%; height: 100%; display: block; }
.game-frame:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; background: #000; display: flex; justify-content: center; align-items: center; }
.game-frame:fullscreen .player-container { width: min(100vw, calc(100vh * 4 / 3)); height: min(100vh, calc(100vw * 3 / 4)); }
.loading-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: radial-gradient(ellipse at center, #262b1d, #10140d 78%); }
.loading-crest { font: 58px Georgia, serif; color: #bba66b; border: 1px solid #6c6644; width: 86px; height: 100px; display: grid; place-items: center; border-radius: 4px 4px 34px 34px; margin-bottom: 28px; }
.loading-screen h2 { font: normal 25px Georgia, serif; color: #e5dfc5; margin: 0 0 9px; }
.loading-screen p { font-size: 13px; color: #9b9f8b; line-height: 1.6; max-width: 340px; margin: 0; }
.loading-indicator { height: 3px; width: 120px; margin-top: 26px; background: #323726; overflow: hidden; border-radius: 2px; }
.loading-indicator::after { content: ""; display: block; width: 48px; height: 3px; background: var(--gold); animation: loading 1.3s ease-in-out infinite alternate; }
@keyframes loading { from { transform: translateX(-20px); } to { transform: translateX(92px); } }
.primary-button { background: #b9a365; color: #16190f; border: 1px solid #d2bf84; border-radius: 4px; padding: 11px 18px; font-weight: 600; font-size: 13px; margin-top: 24px; }
.primary-button:hover { background: #d0b978; }
.game-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; color: #818674; font-size: 11px; line-height: 1.5; }
.local-badge { display: flex; align-items: center; gap: 7px; color: #a2a792; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8d9d63; flex-shrink: 0; }
.status-dot.waiting { background: #b1a169; }
.status-dot.error { background: #b77b62; }
.developer-panel { width: 280px; border: 1px solid var(--border); background: #20231b; border-radius: 6px; padding: 20px; box-shadow: 0 12px 36px #0003; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 23px; }
.panel-heading h2 { font: normal 19px Georgia, serif; color: #e9e4ce; margin: 5px 0 0; }
.close-button { font-size: 24px; padding: 0; min-height: 28px; width: 28px; margin: -5px -8px 0 0; }
.bridge-state { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b6bdaa; }
.panel-description { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 11px 0 19px; }
.live-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 15px 0; margin: 0 0 18px; }
.live-stats dt { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 5px; }
.live-stats dd { font-size: 20px; font-variant-numeric: tabular-nums; color: #e8dfba; margin: 0; }
.developer-controls { display: grid; gap: 17px; }
.control-label { display: block; font-size: 12px; color: #c2c7b5; margin-bottom: 7px; }
.input-row { display: flex; gap: 7px; }
.number-input { width: 100%; min-width: 0; appearance: textfield; border: 1px solid #444936; border-radius: 4px; background: #161a12; color: #e8e8d8; font-size: 13px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.number-input::-webkit-inner-spin-button { appearance: none; }
.apply-button, .action-button { flex-shrink: 0; color: #d1bb7d; border: 1px solid #565037; background: #2a2c20; border-radius: 4px; font-size: 12px; padding: 8px 11px; }
.apply-button:hover, .action-button:hover { background: #353628; border-color: #8b7c4d; }
.toggle-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle-control .control-label { margin: 0; }
.toggle-button { position: relative; width: 34px; height: 20px; padding: 0; border: 1px solid #4c5240; border-radius: 12px; background: #13180f; }
.toggle-button::before { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: #8c937e; position: absolute; top: 3px; left: 3px; transition: transform .16s, background .16s; }
.toggle-button[aria-checked="true"] { background: #605435; border-color: #9a864d; }
.toggle-button[aria-checked="true"]::before { transform: translateX(14px); background: #e1c887; }
.action-button { width: 100%; margin-top: 4px; padding: 10px; }
.feedback-region { border-top: 1px solid var(--border); margin-top: 21px; padding-top: 12px; }
.feedback-region p { min-height: 32px; margin: 0; font-size: 11px; line-height: 1.5; color: #aca78e; }
.feedback-region p.is-error { color: #d5a08a; }
.panel-note { font-size: 10px; color: #737c68; line-height: 1.6; margin: 13px 0 0; }
.credits { text-align: center; margin: 25px 0 0; font-size: 10px; letter-spacing: .02em; color: #606955; }
.drawer-backdrop { position: fixed; inset: 0; background: #0009; z-index: 9; }
@media (max-width: 1050px) { .workspace.has-developer { grid-template-columns: minmax(0, 800px); } body.developer-open .topbar { max-width: 800px; } .developer-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 10; width: min(320px, 92vw); overflow-y: auto; border-radius: 0; padding: max(24px, env(safe-area-inset-top)) 24px 24px; } }
@media (min-width: 1051px) { .drawer-backdrop { display: none !important; } }
@media (max-width: 600px) { .shell { padding: max(18px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 16px max(12px, env(safe-area-inset-left)); } .topbar { margin-bottom: 18px; gap: 8px; } .identity { gap: 9px; } .crest { width: 31px; height: 37px; font-size: 20px; border-radius: 3px 3px 13px 13px; } .eyebrow { font-size: 8px; letter-spacing: .16em; } h1 { font-size: 23px; } .toolbar { gap: 2px; } .icon-button { padding: 8px; min-width: 36px; } .button-label { display: none; } .developer-button { font-size: 0; padding: 8px; min-width: 36px; } .developer-button span { font-size: 15px; } .game-frame { border-radius: 3px; } .game-footer { font-size: 10px; } .loading-crest { width: 52px; height: 60px; font-size: 34px; border-radius: 3px 3px 22px 22px; margin-bottom: 15px; } .loading-screen h2 { font-size: 18px; } .loading-screen p { font-size: 11px; } .loading-indicator { margin-top: 16px; } .credits { margin-top: 20px; font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { .loading-indicator::after { animation: none; transform: translateX(35px); } .toggle-button::before { transition: none; } }
