:root {
  --lcd: #a8c66c; --lcd-dark: #93b35a; --ink: #1d2b12; --ink-soft: #3d5223; --cheese: #f2c230; --blood: #b8322a;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--lcd); overflow: hidden; overscroll-behavior: none; }
body { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
#app { position: fixed; inset: 0; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#hud { padding: 8px 12px 4px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h1 { font-size: 20px; margin: 0; letter-spacing: 0.5px; }
h1 span { opacity: 0.6; font-size: 14px; }
.stats { font-size: 14px; margin-top: 2px; min-height: 22px; }
.stats b { font-size: 18px; }
button { font: inherit; color: inherit; cursor: pointer; }
.icon { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; }
#stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
#board { touch-action: none; display: block; border-radius: 6px; box-shadow: 0 0 0 3px var(--ink-soft); }
#toast { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 34px; font-weight: 800; color: var(--ink);
  pointer-events: none; opacity: 0; transition: opacity 0.2s, transform 0.4s; text-shadow: 0 2px 0 var(--lcd); }
#toast.show { opacity: 1; transform: scale(1.15); }
#hint { text-align: center; font-size: 12px; opacity: 0.85; padding: 4px 12px 8px; }
#coach { font-size: 14px; font-weight: 700; line-height: 1.3; min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
#sheet-body .how { text-align: left; line-height: 1.4; }
#sheet-body .tip { margin-top: 6px; font-size: 14px; }
body.touch .mouse-only, body:not(.touch) .touch-only { display: none; }
.sheet { position: fixed; inset: 0; background: rgba(15, 22, 9, 0.78); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 5; }
.sheet.hidden, .hidden { display: none !important; }
.card { background: var(--lcd); color: var(--ink); border-radius: 14px; padding: 20px 18px 14px; width: min(360px, 100%); text-align: center; box-shadow: 0 10px 40px #0008; }
.card h2 { margin: 0 0 4px; font-size: 26px; }
.card p { margin: 6px 0; }
#sheet-body { font-size: 15px; line-height: 1.45; margin: 10px 0 14px; }
#sheet-body .brainname { font-size: 20px; font-weight: 800; }
#sheet-body .line { background: var(--lcd-dark); border-radius: 8px; padding: 8px; margin: 8px 0; font-size: 14px; }
.big { display: block; width: 100%; min-height: 50px; margin: 8px 0; border: 0; border-radius: 10px; background: var(--ink); color: var(--lcd); font-size: 18px; font-weight: 700; }
.big.alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.more { font-size: 13px; }
.more a { color: var(--ink); display: inline-block; padding: 14px 4px; min-height: 44px; }
