:root { color-scheme: dark; --text: #f2f7f5; --accent: #a0ffca; --launch-header-height: 0px; }
:root[data-game-screen="menu"] { --launch-header-height: 190px; }
:root[data-game-screen="menu"].menu-guidance-visible { --launch-header-height: 220px; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #000; }
body { color: var(--text); font-family: "Segoe UI", Arial, sans-serif; }
main { width: 100%; }
.play-section { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; height: 100dvh; width: 100%; }
.play-section:focus { outline: none; }
#launch-header, .game-viewport { flex: none; }
.game-viewport { width: min(100vw, calc((100vh - var(--launch-header-height)) * 1.375)); width: min(100vw, calc((100dvh - var(--launch-header-height)) * 1.375)); margin-block: auto; }
#launch-header { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 100%; height: var(--launch-header-height); min-width: 0; padding: 5px 12px; border-top: 1px solid #000; background: #000; }
:root[data-game-screen="menu"] #launch-header { display: flex; }
#launch-toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; width: min(100%, 760px); }
.menu-button { min-width: 0; min-height: 48px; border: 1px solid transparent; border-radius: 6px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; padding: 6px 4px; box-shadow: 0 2px 0 #0007; }
.menu-button strong { font-size: clamp(10px, 2.9vw, 15px); }
.menu-button small { font-size: clamp(9px, 2.45vw, 11px); font-weight: 500; }
#new-game small { white-space: normal; text-wrap: balance; }
.menu-mint, .menu-mint:disabled { background: #a0f4c3; color: #082f20; }
.menu-purple { background: #7535c6; color: #fff; }
.menu-blue { background: #175cb3; color: #fff; }
.menu-amber { background: #f3cd72; color: #342503; }
#connect-wallet small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.menu-button:hover:not(:disabled) { filter: brightness(1.17); border-color: #fff; }
.menu-button:disabled { opacity: 1; cursor: default; }
.menu-button:disabled strong::after { content: ''; }
.menu-button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
#menu-message { color: #d7e3dd; margin: 0; max-width: 600px; font-size: clamp(12px, 3.2vw, 14px); line-height: 1.3; text-align: center; }
.practice-line { display: block; margin-bottom: 3px; font-size: clamp(17px, 4.6vw, 20px); font-weight: 700; line-height: 1.2; }
.practice-label { color: #a0f4c3; }
.practice-divider { color: #c4d3cd; }
.practice-divider em { color: #f3cd72; }
.practice-rewards { color: #ff8585; }
.prize-requirement { display: block; font-size: clamp(16px, 4.3vw, 18px); line-height: 1.3; }
.prize-requirement strong { font-size: 1.12em; }
.eligibility-note { display: block; margin-top: 4px; color: #b6c5bc; font-size: clamp(10px, 2.7vw, 11px); font-weight: 500; line-height: 1.3; }
#menu-guidance { display: block; margin-top: 3px; color: #c4d3cd; font-size: 12px; }
#menu-guidance[hidden] { display: none; }
#contract-address { display: inline-flex; align-items: center; gap: .4em; min-width: 0; max-width: 100%; color: #a8b4a9; font: clamp(9px, 2.6vw, 12px)/1.5 ui-monospace, Consolas, monospace; text-decoration: none; }
.contract-label { flex: none; }
#contract-address-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#contract-address[aria-disabled="true"] { cursor: default; color: #d4e7b8; font-size: clamp(20px, 4.7vw, 26px); font-weight: 700; line-height: 1.1; }
#contract-address[href] { color: #d4e7b8; }
#contract-address[href]:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
#contract-address:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.game-viewport { min-height: 0; min-width: 0; }
#game-stage { position: relative; width: 100%; aspect-ratio: 11 / 8; background: #000; }
#game-stage ruffle-player { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#game-stage:focus { outline: none; }
#touch-pause { position: absolute; z-index: 4; top: 56px; left: max(8px, env(safe-area-inset-left)); min-width: 72px;
  min-height: 44px; padding: 9px 12px; border: 1px solid #8cc6a9; border-radius: 6px; background: #14251ee8;
  color: #eff8f3; font-size: 13px; font-weight: 700; touch-action: manipulation; }
#touch-pause[hidden] { display: none; }
#autosave-status { position: absolute; z-index: 2; left: 50%; bottom: 6px; transform: translateX(-50%); max-width: calc(100% - 16px); margin: 0; padding: 4px 10px; border-radius: 4px; background: #000d; color: #a0f4c3; font-size: 12px; line-height: 1.3; text-align: center; pointer-events: none; }
#autosave-status[data-state="failed"] { color: #ffb3a8; }
#autosave-status[hidden] { display: none; }
button { border: 1px solid #7a8172; border-radius: 3px; background: #080b09e8; color: var(--text); padding: 7px 10px; font: 12px "Segoe UI", Arial, sans-serif; cursor: pointer; white-space: nowrap; }
button:hover, button:focus-visible { background: #30382b; border-color: var(--accent); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { cursor: default; opacity: .5; }
.menu-mint:hover, .menu-mint:focus-visible { background: #a0f4c3; }
.menu-purple:hover, .menu-purple:focus-visible { background: #7535c6; }
.menu-blue:hover, .menu-blue:focus-visible { background: #175cb3; }
.menu-amber:hover, .menu-amber:focus-visible { background: #f3cd72; }
.launch-dialog { width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; border: 1px solid #659782; border-radius: 12px; background: #101e1b; color: #eff8f3; padding: 24px; box-shadow: 0 20px 80px #000c; font-size: 14px; line-height: 1.55; }
.launch-dialog::backdrop { background: #000b; }
.launch-dialog h2 { margin: 0 70px 16px 0; font-size: 24px; line-height: 1.2; }
.launch-dialog h3 { margin: 18px 0 7px; font-size: 15px; }
.launch-dialog li { margin-bottom: 9px; }
.launch-dialog ul { padding-left: 22px; }
.dialog-close { float: right; margin: -8px -8px 8px 8px; }
.launch-dialog button { min-height: 44px; border-color: #6e9785; background: #223e33; color: #fff; white-space: normal; font-size: 13px; }
.launch-dialog button:hover { background: #355e4d; }
.launch-dialog .action-button { background: #a0f4c3; color: #082f20; border-color: #a0f4c3; font-weight: 700; }
.mode-notice { background: #193c31; padding: 10px 12px; border-left: 3px solid #a0f4c3; }
.key-warning { border: 1px solid #e8bd65; background: #3d3018; padding: 12px; color: #ffe9b9; }
.dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
#burner-address { display: block; overflow-wrap: anywhere; background: #06100d; padding: 10px; border: 1px solid #426653; user-select: all; }
#private-key { width: 100%; background: #060d09; color: #fff; border: 1px solid #bc9252; padding: 8px; overflow-wrap: anywhere; resize: vertical; }
#private-key-label { display: block; color: #ffe9b9; }
#private-key-label[hidden] { display: none; }
.backup-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.backup-check input { width: 20px; height: 20px; flex: none; accent-color: #a0f4c3; }
.secondary { color: #bdcec4; font-size: 12px; }
#wallet-message { min-height: 22px; color: #c6f5da; }
#wallet-options { display: grid; gap: 10px; padding: 0; margin: 18px 0; list-style: none; }
.wallet-option-row { margin: 0; min-width: 0; }
.launch-dialog .wallet-connect-option, .wallet-install-option { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 12px 14px; border: 1px solid #557b68; border-radius: 8px; background: #193b2d; color: #f2f7f5; text-align: left; text-decoration: none; overflow-wrap: anywhere; }
.launch-dialog .wallet-connect-option:hover, .wallet-install-option:hover { background: #2a503d; border-color: #a0f4c3; }
.wallet-connect-option strong, .wallet-install-option strong { min-width: 0; }
.wallet-connect-option small, .wallet-install-option small { flex: none; color: #c4d3cd; font-size: 12px; }
.wallet-install-option:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
#connected-wallet-address { display: block; overflow-wrap: anywhere; padding: 10px; border: 1px solid #426653; background: #06100d; user-select: all; }
#connected-wallet-name { margin-bottom: 8px; font-weight: 700; }
#connect-wallet-status { min-height: 22px; color: #c6f5da; overflow-wrap: anywhere; }
@media (max-width: 640px) { :root[data-game-screen="menu"] { --launch-header-height: 280px; } :root[data-game-screen="menu"].menu-guidance-visible { --launch-header-height: 310px; } #launch-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .menu-button strong { font-size: 13px; } }
@media (max-width: 400px) { .launch-dialog { padding: 18px; } #launch-header { padding-inline: 8px; } #launch-toolbar { gap: 6px; } }
#load-error { position: absolute; z-index: 2; inset: 0; background: #101510f5; display: grid; place-content: center; justify-items: center; text-align: center; padding: 25px; }
#load-error[hidden] { display: none; }
#load-error p { color: #acb4a8; max-width: 450px; }
#load-error h2 { font: 28px Georgia, serif; margin: 0; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript { position: fixed; inset: 0; display: grid; place-content: center; margin: 0; background: #000; color: var(--accent); text-align: center; padding: 20px; }
