:root { --bg: #120f1f; --panel: #1e1932; --ink: #f4e9d8; --dim: #9a8fb3; --ember: #ffb347; --hot: #ff6a3d; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: radial-gradient(circle at 50% 30%, #241c3d, var(--bg) 70%); color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#app { position: relative; height: 100%; max-width: 720px; margin: 0 auto; }
.screen { display: none; position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.screen.active { display: flex; }
h1 { font-size: clamp(40px, 10vw, 64px); margin: 0; letter-spacing: 2px; color: var(--ember); text-shadow: 0 0 18px rgba(255,140,60,.6), 0 3px 0 #6b2a12; }
h2 { margin: 0 0 6px; color: var(--ember); }
.tag { margin: 0 0 10px; color: var(--ink); opacity: .85; text-align: center; }
.hint { color: var(--dim); font-size: 13px; text-align: center; margin: 6px 0; }
button { font: inherit; color: var(--ink); background: var(--panel); border: 2px solid #3a3160; border-radius: 12px; padding: 10px 22px; cursor: pointer; min-width: 44px; min-height: 44px; transition: transform .08s, border-color .15s; }
button:hover, button:focus-visible { border-color: var(--ember); outline: none; }
button:active { transform: scale(.96); }
button.big { font-size: 22px; padding: 12px 48px; background: linear-gradient(#ff9a4a, #e0522a); border-color: #ffcf8a; color: #2a1206; font-weight: bold; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: min(100%, 420px); }
.grid button { padding: 8px 0; display: flex; flex-direction: column; align-items: center; font-weight: bold; font-size: 18px; }
.grid button small { font-size: 12px; color: var(--ember); letter-spacing: 1px; min-height: 14px; }
.grid button:disabled { opacity: .35; cursor: default; }
#game { justify-content: flex-start; padding-top: 10px; }
.bar { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 560px; }
.bar button { padding: 6px 12px; font-size: 20px; }
#info { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
#info span { color: var(--dim); font-size: 14px; }
#board { flex: 1; width: 100%; min-height: 0; outline: none; cursor: pointer; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10,8,20,.6); }
.overlay.hidden { display: none; }
.card { background: var(--panel); border: 2px solid var(--ember); border-radius: 18px; padding: 22px 30px; text-align: center; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 0 40px rgba(255,140,60,.3); animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.stars { font-size: 40px; color: var(--ember); letter-spacing: 6px; text-shadow: 0 0 12px rgba(255,160,60,.7); }
.stars .off { color: #3a3160; text-shadow: none; }
.sound { position: absolute; right: 10px; bottom: 10px; font-size: 13px; padding: 6px 12px; min-height: 36px; opacity: .8; }
#titleArt { max-width: 100%; height: auto; }
