.welcome-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.welcome-actions button { padding: 14px 12px; font-size: 14px; }
#open-garage {
  min-height: 52px;
  border: 1px solid #d6a05f;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffe0a6, #f3c681);
  color: #704a2e;
  font-weight: 900;
  line-height: 1.4;
  box-shadow: 0 5px 0 #c79255, inset 0 1px 0 #fff3d5;
  transition: transform .15s, box-shadow .15s, background .15s;
}
#open-garage:hover { background: linear-gradient(180deg, #ffe8bb, #f6cf91); transform: translateY(-2px); box-shadow: 0 7px 0 #c79255, inset 0 1px 0 #fff3d5; }
#open-garage:active { transform: translateY(4px); box-shadow: 0 1px 0 #c79255; }
#open-garage:focus-visible { outline: 3px solid #96613c; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  #open-garage { transition: none; }
}
.garage-mode .layout { grid-template-columns: minmax(210px, .62fr) minmax(0, 1.38fr); align-items: start; }
.garage-mode .cat-card { position: sticky; top: 20px; }
.garage-mode .cat-image { height: 180px; }
.garage-mode .play-card { padding: 25px; min-width: 0; }
.garage-mode .intro { padding-top: 30px; }
.garage-mode .leaderboard { display: none; }
.garage-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -6px -8px 22px; }
.garage-toolbar .link { font-size: 12px; text-decoration: none; padding: 8px; }
.garage-toolbar .tag { font-size: 9px; padding: 6px 9px; white-space: nowrap; }
.garage-mode h2:focus { outline: none; }
.garage-progress { display: flex; justify-content: space-between; gap: 12px; background: #fff5e5; border: 1px solid #f6e4c5; border-radius: 12px; padding: 12px 16px; margin: 20px 0; font-size: 12px; color: #99734d; }
.locker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.locker { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 5px 12px; border: 1px solid #efd6c0; border-bottom-width: 4px; border-radius: 13px; color: #77523c; background: linear-gradient(150deg, #fff6e7, #fbe7d2); transition: transform .18s, box-shadow .18s; }
.locker::after { content: ''; position: absolute; top: 44%; right: 8px; width: 4px; height: 14px; border-radius: 4px; background: #d8aa85; }
.locker:hover { transform: translateY(-3px); box-shadow: 0 7px 14px #a16a4314; }
.locker.mastered { background: linear-gradient(150deg, #fbf7d8, #f6e9ac); border-color: #e7cd83; }
.locker-icon { font-size: 27px; }
.locker strong { font-size: 20px; letter-spacing: 1px; }
.locker-status { font-size: 10px; font-weight: 800; }
.garage-note { margin: 16px 0 3px; color: #947b6c; font-size: 12px; line-height: 1.6; }
.garage-mode button:disabled { cursor: default; }
.garage-mode .actions button:disabled { opacity: .55; }
.story-text { color: #806257; font-size: 15px; line-height: 1.7; margin: 15px 0 20px; }
.story-scene { --scene-bg: #fff3dc; display: block; width: 100%; color: #775337; background: var(--scene-bg); border: 1px solid #edddc7; border-radius: 20px; padding: 20px 12px; overflow: hidden; }
.theme-peach { --scene-bg: #fff0e3; }
.theme-rose { --scene-bg: #ffefeb; }
.theme-mint { --scene-bg: #f0f3e6; }
.scene-door { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.scene-door strong { font-size: 27px; }
.scene-door > span:last-child { font-size: 12px; font-weight: 800; }
.scene-icon { font-size: 65px; animation: secret-wiggle 2.5s ease-in-out 2; }
.scene-art { display: block; }
.scene-grid { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: 3px; max-width: 290px; margin: 0 auto; }
.scene-tile { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; border-radius: 5px; background: #ffe1af; font-size: clamp(12px, 2vw, 23px); animation: tile-appear .35s both; animation-delay: var(--delay); }
.scene-tile.extra { background: #ecb49a; }
.scene-tile.taken { opacity: .22; background: #dfd5c6; filter: grayscale(1); animation: tile-away .7s both; animation-delay: .55s; }
.scene-caption { display: block; margin: 15px auto 0; font-size: 14px; font-weight: 900; }
.memory-hook { margin: 20px 0 12px; padding: 14px 18px; border-left: 3px solid #dfa17d; border-radius: 0 12px 12px 0; background: #fff5e7; font-size: 17px; font-weight: 900; color: #986446; line-height: 1.5; }
.story-proof { font-size: 14px; line-height: 1.7; color: #806257; }
.swap-equation { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px 0 4px; font-size: 28px; font-weight: 900; color: #b77a54; }
.factor { display: grid; place-items: center; width: 48px; height: 48px; background: #f9e3ce; color: #79523d; border-radius: 12px; animation: factor-arrive .3s both; }
.tail-key { display: block; margin: 14px 0 0; font-size: 30px; }
.tail-key small { display: block; font-size: 12px; }
.number-train { display: flex; justify-content: center; gap: 10px; margin: 16px 0 24px; }
.number-train span { padding: 10px 16px; font-size: 30px; font-weight: 900; background: #ffdbb7; border-radius: 12px; animation: factor-arrive .5s both; }
.number-train span:nth-child(2) { animation-delay: .1s; }
.number-train span:nth-child(3) { animation-delay: .2s; }
.number-train span:nth-child(4) { animation-delay: .3s; }
.number-plate { display: block; width: fit-content; max-width: 100%; margin: auto; border: 3px solid #bd906d; background: #fffdf7; border-radius: 12px; padding: 12px 18px; font-size: clamp(24px, 4vw, 38px); font-weight: 900; box-shadow: 0 5px 0 #dbc3ac; animation: factor-arrive .5s .5s both; }
.octopus-team { display: flex; justify-content: center; flex-wrap: wrap; gap: 28px; max-width: 350px; margin: 25px auto; }
.octopus { position: relative; display: grid; place-items: center; width: 75px; height: 75px; font-size: 36px; }
.tiny-wheel { position: absolute; font-size: 15px; color: #896b60; transform: rotate(calc(var(--arm) * 45deg)) translateY(-40px); }
.twin-garages { display: flex; flex-direction: column; gap: 16px; max-width: 290px; margin: auto; }
.twin-garage { display: grid; gap: 8px; padding: 12px; border: 2px solid #e5ba98; border-radius: 18px 18px 5px 5px; font-size: 12px; font-weight: 900; background: #fffbf1; }
.twin-garage .scene-grid { width: 100%; }
.twin-garage strong { font-size: 19px; }
.chessboard { gap: 0; border: 5px solid #c09470; border-radius: 6px; overflow: hidden; }
.chessboard .scene-tile { border-radius: 0; background: #ffe3b3; }
.chessboard .scene-tile.dark { background: #be8d6a; }
.recall-cue { margin-top: 18px; border-radius: 15px; padding: 16px; background: #fff3df; color: #806257; font-size: 14px; line-height: 1.6; }
.cue-icon { display: block; font-size: 34px; }
.recall-cue p { margin-bottom: 0; }
.recall-stars { display: flex; gap: 8px; justify-content: center; font-size: 38px; color: #eddfce; margin-top: 18px; }
.recall-stars .earned { color: #dba450; animation: factor-arrive .4s both; }
.garage-mode [hidden] { display: none; }
@keyframes tile-appear { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tile-away { from { opacity: 1; } to { transform: translateY(3px); opacity: .22; } }
@keyframes factor-arrive { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes secret-wiggle { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-8deg); } 90% { transform: rotate(8deg); } }
@media (max-width: 700px) {
  .garage-mode .layout { grid-template-columns: minmax(0, 1fr); }
  .garage-mode .cat-card { position: static; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px; }
  .garage-mode .cat-top, .garage-mode .goal { display: none; }
  .garage-mode .cat-image { height: 80px; }
  .garage-mode .speech { padding: 10px; font-size: 12px; }
  .garage-mode .play-card { padding: 20px 16px; }
  .garage-toolbar { margin-left: -6px; margin-right: -6px; gap: 2px; }
  .garage-toolbar .link { font-size: 11px; }
  .garage-mode .intro { padding: 24px 0 20px; }
  .locker { padding: 12px 3px; }
  .locker-grid { gap: 8px; }
  .garage-mode .answer-row { flex-wrap: wrap; }
  .garage-mode .answer-row input { flex: 1; min-width: 80px; max-width: 130px; }
  .scene-tile { font-size: clamp(12px, 4.5vw, 23px); }
  .garage-mode .primary { font-size: 14px; padding: 14px 20px; }
  .number-train { gap: 7px; }
  .number-train span { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .garage-mode *, .garage-mode *::after { animation: none !important; transition: none !important; }
}
