.game-page { min-height: calc(100vh - var(--header-h)); padding: 20px 0 44px; }
.game-shell { display: grid; gap: 14px; }
.game-topbar { display: grid; gap: 14px; padding: 16px; align-items: center; box-shadow: none; }
.level-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.level-kicker { font-family: var(--font-mono); font-size: .73rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-weight: 760; }
.level-title { font-size: 1.08rem; margin: 0; font-weight: 710; }
.game-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.stat-pill { text-align: center; padding: 8px 7px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.stat-pill small { display: block; color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; }
.stat-pill strong { display: block; font-family: var(--font-mono); font-size: .95rem; color: var(--text); }
.progress-track { height: 7px; background: #e7ece8; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; background: var(--primary); border-radius: inherit; transition: width .3s ease; }
.game-grid { display: grid; gap: 14px; }
.mission-card { padding: 18px; box-shadow: none; }
.mission-card h2 { font-size: 1.25rem; line-height: 1.3; margin: 7px 0 8px; }
.mission-card p { color: var(--muted); margin-bottom: 0; }
.mascot-wrap { display: grid; place-items: center; padding: 5px 0 14px; }
.mascot { position: relative; width: 104px; height: 91px; }
.bot-head { position: absolute; width: 80px; height: 64px; left: 12px; top: 15px; border-radius: 23px; background: #d6eadf; border: 3px solid #b7d8c4; }
.bot-face { position: absolute; inset: 13px 11px; border-radius: 15px; background: #284335; }
.bot-eye { position: absolute; width: 10px; height: 10px; top: 14px; border-radius: 50%; background: #d9f4e3; }
.bot-eye.left { left: 14px; }
.bot-eye.right { right: 14px; }
.bot-mouth { position: absolute; left: 50%; bottom: 10px; width: 26px; height: 5px; border-radius: 999px; transform: translateX(-50%); background: #8fc8a4; }
.bot-antenna { position: absolute; width: 3px; height: 16px; background: #9ec5ad; left: 51px; top: 0; border-radius: 999px; }
.bot-antenna::before { content:""; position:absolute; width:10px; height:10px; left:-3.5px; top:-3px; border-radius:50%; background:#78ad8c; }
.bot-arm { position:absolute; width:20px; height:7px; top:45px; border-radius:999px; background:#b7d8c4; }
.bot-arm.left { left:0; transform:rotate(18deg); }
.bot-arm.right { right:0; transform:rotate(-18deg); }
.bot-success .bot-mouth { height: 10px; border-radius: 0 0 18px 18px; background: #89c59f; }
.bot-error .bot-mouth { background: #b98b8b; transform: translateX(-50%) rotate(180deg); border-radius: 0 0 18px 18px; height: 9px; }
.strings-card, .regex-card { padding: 16px; box-shadow: none; }
.string-list { display: grid; gap: 8px; }
.string-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 11px 13px; border: 1px solid transparent; border-radius: 11px; background: var(--surface-2); transition: opacity .18s ease, background .18s ease, border-color .18s ease; overflow-wrap: anywhere; }
.string-item code { color: var(--text); font-size: .88rem; }
.string-item.status-correct { border-color: #cae4d4; background: #edf7f1; }
.string-item.status-false-positive { border-color: #ead0cf; background: #faf1f0; }
.string-item.status-missed { border-color: #eadcb9; background: #fcf8ee; }
.string-item.status-neutral { opacity: .48; }
.string-item .state-icon { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: #e9eeea; color: var(--muted); font-weight: 800; }
.status-correct .state-icon { color: var(--success); background: var(--success-soft); }
.status-false-positive .state-icon { color: var(--danger); background: var(--danger-soft); }
.status-missed .state-icon { color: var(--warning); background: var(--warning-soft); }
.regex-input-wrap { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; align-items: stretch; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface-2); padding: 7px 8px; }
.regex-slash { display: grid; place-items: center; color: var(--primary); font-family: var(--font-mono); font-size: 1.08rem; font-weight: 800; }
.regex-input { width: 100%; background: transparent; border: 0; color: var(--text); outline: 0; min-height: 44px; min-width: 0; }
.regex-input::placeholder { color: #98a39b; }
.regex-flags { width: 70px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0 8px; }
.symbol-toolbar { display: flex; gap: 7px; overflow-x: auto; padding: 11px 1px 3px; scrollbar-width: thin; }
.symbol-btn { flex: 0 0 auto; min-width: 42px; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-family: var(--font-mono); font-weight: 760; }
.symbol-btn:hover { background: var(--primary-soft); border-color: #c9e2d3; color: var(--primary); }
.game-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
.feedback { margin-top: 14px; padding: 12px 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.feedback.success { border-color: #c7e2d1; background: var(--success-soft); }
.feedback.error { border-color: #ead0cf; background: var(--danger-soft); }
.feedback.warning { border-color: #eadcb9; background: var(--warning-soft); }
.hint-box { margin-top: 12px; padding: 12px; border: 1px solid #eadcb9; background: var(--warning-soft); color: #6f5320; border-radius: 12px; }
.world-nav { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: thin; }
.level-dot { flex: 0 0 auto; width: 41px; height: 41px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-family: var(--font-mono); font-weight: 740; display: grid; place-items: center; cursor: pointer; }
.level-dot.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.level-dot.done { border-color: #bcd9c7; color: var(--success); background: #f2f9f4; }
.level-dot.locked { opacity: .35; cursor: not-allowed; }
.complete-card { text-align: center; padding: 24px 18px; box-shadow: none; }
.stars { font-size: 1.9rem; letter-spacing: 3px; color: #a87924; }
.score-breakdown { display: grid; gap: 8px; margin: 16px 0; }
.score-line { display:flex; justify-content:space-between; gap:10px; padding:9px 11px; background:var(--surface-2); border-radius:10px; }
.loading-state, .error-state { padding: 32px 20px; text-align: center; }
.loading-state .spinner-border { color: var(--primary) !important; }
.game-footnote { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
@media (min-width: 576px) {
  .game-actions { grid-template-columns: 1fr 1fr; }
  .game-actions .execute { grid-column: 1 / -1; }
}
@media (min-width: 768px) {
  .game-grid { grid-template-columns: minmax(240px, .78fr) minmax(0, 1.65fr); align-items: start; }
  .game-main { display: grid; gap: 14px; }
  .mission-card { position: sticky; top: 90px; }
  .game-topbar { grid-template-columns: 1fr auto; }
  .game-actions { grid-template-columns: 1fr 1fr 1.5fr; }
  .game-actions .execute { grid-column: auto; order: 3; }
}
