.adventure-panel { margin-top: 22px; padding: 18px; border: 1px solid #eed5ba; background: #fff7e9; border-radius: 18px; }
.score-pill { display: inline-block; background: #f9e6ba; color: #805b32; border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 800; }
.licence-launcher { width: 100%; margin-top: 20px; flex-direction: row; justify-content: space-between; text-align: left; }
.licence-launcher > span:nth-child(2) { display: grid; gap: 5px; flex: 1; }
.item-list { display: grid; gap: 10px; margin: 20px 0; }
.item-card { display: flex; align-items: center; text-align: left; gap: 14px; background: #fff3e1; color: #78513d; border: 1px solid #ecd1af; border-bottom: 4px solid #d9b692; border-radius: 15px; padding: 14px; }
.item-card > span:nth-child(2) { flex: 1; display: grid; gap: 5px; }
.item-card small { color: #9d765a; font-size: 12px; }
.item-card:disabled { opacity: .65; cursor: default; }
.item-icon { font-size: 32px; }
.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.collection-item { display: grid; gap: 8px; padding: 18px 10px; background: #fff0dc; border-radius: 16px; color: #80573e; }
.collection-item span { font-size: 40px; }.collection-item small { color: #8d8d58; }
.furnishing-preview { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.collection-item .furnishing-preview span { font-size: 22px; }
.furnish-button { border: 1px solid #d6a05f; background: #ffe0a6; color: #704a2e; box-shadow: 0 4px 0 #c79255; }
.furnishing-scene { padding: 25px 12px; border-radius: 18px; background: #f4f0d8; font-size: 42px; line-height: 1.5; }
.furnishing-row { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #ecd1af; border-radius: 14px; background: #fff6e9; text-align: left; }
.furnishing-name { display: grid; flex: 1; gap: 5px; color: #78513d; }
.furnishing-name small { font-size: 12px; color: #94735b; }
.furnishing-row button { padding: 12px; border-radius: 12px; font-weight: 900; }
.furnishing-row button:disabled { background: #eee6dc; border-color: #d8cabc; color: #8a776b; box-shadow: none; cursor: not-allowed; }
@media (max-width: 390px) { .furnishing-row { gap: 7px; padding: 10px; } .furnishing-row button { font-size: 11px; padding: 10px 6px; } }
#car-paint { min-height: 46px; border: 1px solid #d6a05f; border-radius: 12px; background: #ffe0a6; color: #704a2e; font-weight: 900; box-shadow: 0 4px 0 #c79255; transition: transform .15s, box-shadow .15s; }
#car-paint:hover { transform: translateY(-2px); }
#car-paint:active { transform: translateY(3px); box-shadow: 0 1px 0 #c79255; }
.exam-problem { font-size: clamp(30px, 4vw, 46px); letter-spacing: 0; }
.goal-label { overflow-wrap: anywhere; }
.goal-buy { display: block; width: 100%; margin-top: 12px; padding: 12px 14px; border: 1px solid #d6a05f; border-radius: 12px; background: #ffe0a6; color: #704a2e; font-weight: 900; box-shadow: 0 4px 0 #c79255; }
.goal-buy:hover { background: #ffe8bb; }
.goal-buy:active { transform: translateY(3px); box-shadow: 0 1px 0 #c79255; }
.paint-car { display: block; width: min(200px, 100%); height: auto; margin: 0 auto; }
.rainbow-stop { animation: rainbow-color 8s linear infinite; }
@keyframes rainbow-color {
  0%, 100% { stop-color: #ef6b70; }
  16.666% { stop-color: #f5b65c; }
  33.333% { stop-color: #f5e36b; }
  50% { stop-color: #83c994; }
  66.666% { stop-color: #76abc9; }
  83.333% { stop-color: #ad96c5; }
}
@media (prefers-reduced-motion: reduce) { .rainbow-stop { animation: none; } }
.paint-list { display: grid; gap: 10px; margin: 20px 0; }
.paint-choice { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid #ecd1af; border-radius: 14px; background: #fff6e9; text-align: left; }
.paint-swatch { width: 36px; height: 36px; border-radius: 11px; background: var(--paint); border: 2px solid #73544355; }
.paint-label { display: grid; gap: 4px; min-width: 0; color: #78513d; }
.paint-label small { color: #9d765a; }
.paint-actions { display: contents; }
.paint-choice button { min-height: 46px; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 900; transition: transform .15s, box-shadow .15s; }
.paint-buy { background: #ffe0a6; color: #704a2e; border: 1px solid #d6a05f; box-shadow: 0 4px 0 #c79255; }
.paint-use { background: #d98e6d; color: #fff; border: 1px solid #c87e60; box-shadow: 0 4px 0 #b66f52; }
.paint-choice button:not(:disabled):hover { transform: translateY(-2px); }
.paint-choice button:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 #b66f52; }
.paint-choice button:disabled { background: #eee6dc; border-color: #d8cabc; color: #8a776b; cursor: not-allowed; box-shadow: none; }
.paint-availability { grid-column: 2 / -1; color: #80695a; font-size: 11px; line-height: 1.4; }
@media (max-width: 700px) {
  .paint-choice { grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 5px; padding: 8px; }
  .paint-swatch { width: 28px; height: 28px; }
  .paint-label { font-size: 11px; overflow-wrap: anywhere; }
  .paint-label small { font-size: 10px; }
  .paint-choice button { min-height: 44px; padding: 7px 5px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .paint-choice button, #car-paint { transition: none; } }
.paint-streak { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.paint-streak span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #f8eade; color: #b9957e; font-size: 22px; font-weight: 900; }
.paint-streak .filled { background: #e4edcf; color: #648351; }
.paint-progress { height: 14px; max-width: 260px; margin: 10px auto 0; overflow: hidden; border-radius: 14px; background: #f1e0d0; }
.paint-progress span { display: block; height: 100%; border-radius: inherit; transition: width .3s; }
.study-menu { display: block; margin: 18px auto 0; }
.difficulty-picker { display: grid; gap: 7px; max-width: 340px; margin: 0 auto 18px; text-align: left; }
.difficulty-picker label { font-size: 13px; font-weight: 900; }
.difficulty-picker select { width: 100%; min-height: 44px; padding: 9px 12px; border: 2px solid #f0ddcf; border-radius: 12px; background: #fffbf7; color: #604940; font: 800 15px Nunito, system-ui, sans-serif; }
.difficulty-picker select:focus-visible { outline: 3px solid #e5a07c; outline-offset: 3px; }
.difficulty-picker small { color: #806b58; font-size: 12px; line-height: 1.45; }
.header { position: sticky; top: 0; z-index: 20; background: #fff8eff5; backdrop-filter: blur(10px); }
.collection-shortcut { background: #ffe5b9 !important; border-color: #d6a05f !important; color: #704a2e !important; box-shadow: 0 3px 0 #c79255; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.settings-actions form { margin: 0; }
#header-achievements { font-size: 12px; white-space: normal; }
.profile-mode .public-board, .garage-mode .public-board, .training-mode .public-board, .storybook-mode .public-board { display: block; }
.game:has(#dashboard-name) .public-board { display: none; }
.public-board .stats-table { min-width: 300px; border: 1px solid #e2cbb7; }
.public-board .stats-table th, .public-board .stats-table td { padding: 6px 5px; }
.public-board .stats-table th:first-child { min-width: 100px; }
.public-board .stats-table tbody th { white-space: normal; overflow-wrap: anywhere; }
.public-board .stats-table th:nth-child(3), .public-board .stats-table td:nth-child(3) { width: 1%; text-align: center; }
.public-board .stats-table td:last-child { width: 100%; font-size: 19px; }
.secondary { border: 1px solid #d6a05f; background: #ffe5b9; color: #704a2e; box-shadow: 0 3px 0 #c79255; cursor: pointer; }
.secondary:not(:disabled):hover { background: #ffedce; }
.secondary:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 #c79255; }
.secondary:focus-visible { outline: 3px solid #855132; outline-offset: 3px; }
.secondary:disabled { background: #eee6dc; border-color: #d8cabc; color: #8a776b; box-shadow: none; cursor: not-allowed; }
.goal-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.goal-actions .secondary { min-width: 0; padding: 12px 5px; }
.goal-actions .primary { grid-column: 1 / -1; }
@media (max-width: 700px) { .header { position: sticky; } .player-nav { flex-wrap: wrap; } }

/* Keep the task and its controls close to the top of the screen. */
.header { min-height: 62px; padding: 8px 0; gap: 10px; }
.intro { padding: 20px 0 16px; }
.intro h1 { margin: 8px 0; font-size: clamp(28px, 3vw, 38px); }
.cat-card { padding: 18px; }
.cat-image { height: 150px; }
.goal { margin-top: 14px; }
.play-card { min-height: 0; padding: 24px; }
.game:has(.answer-row) .intro { display: none; }
.game:has(.answer-row) .layout { margin-top: 16px; }
.game:not(.profile-mode):has(.intro[hidden]) .layout { margin-top: 16px; }
.game:has(.answer-row) .timer-track { margin: 10px 0 16px; }

@media (max-width: 700px) {
  .header { position: static; min-height: 0; padding: 8px 0; gap: 6px; }
  .brand-icon { width: 32px; height: 32px; }
  .intro, .training-mode .intro, .garage-mode .intro { padding: 16px 0 12px; }
  .layout { gap: 12px; }
  .game:not(.profile-mode):not(.training-mode):not(.garage-mode) .cat-card {
    display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: center; padding: 12px;
  }
  .game:not(.profile-mode):not(.training-mode):not(.garage-mode) .cat-top { display: none; }
  .game:not(.profile-mode):not(.training-mode):not(.garage-mode) .cat-image { height: 70px; }
  .game:not(.profile-mode):not(.training-mode):not(.garage-mode) .speech { padding: 10px; font-size: 12px; }
  .game:not(.profile-mode):not(.training-mode):not(.garage-mode) .goal { grid-column: 1 / -1; margin-top: 0; }
  .play-card, .training-mode .play-card { padding: 18px 16px; }
}
