/* Tricky Brain Test */
.tb-wrap { width: 100%; max-width: 640px; margin: 0 auto; align-self: stretch; box-sizing: border-box; }
.tb-wrap h3 { margin: 12px 0 8px; font-size: 1.05rem; }
.tb-go { margin-top: 12px; min-height: 48px; }
.tb-help { margin-top: 14px; }
.tb-list { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.tb-lv { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 48px; padding: 2px 0; border-radius: 10px; border: 2px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: inherit; font: 800 14px system-ui, sans-serif; cursor: pointer; }
.tb-lv small { font-size: 8px; font-weight: 600; white-space: nowrap; }
.tb-lv:hover:not(:disabled) { border-color: #67e8f9; }
.tb-lv:disabled { opacity: .4; cursor: not-allowed; }
.tb-lv.is-done { border-color: rgba(74,222,128,.6); }
.tb-hud { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font: 800 15px system-ui, sans-serif; }
.tb-title { flex: 1; min-width: 0; color: #fde047; }
.tb-tb { display: flex; gap: 6px; flex-shrink: 0; }
.tb-tb button { background: rgba(15,23,42,.7); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 6px 10px; font: 700 14px system-ui, sans-serif; cursor: pointer; }
.tb-q { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); font: 800 20px/1.35 system-ui, sans-serif; text-align: center; }
.tb-w { cursor: pointer; border-radius: 5px; }
.tb-w:hover { background: rgba(103,232,249,.14); }
.tb-w.is-on { background: #4ade80; color: #052e16; }
.tb-w.is-shake, .tb-s.is-shake { animation: tb-shake .35s; }
.tb-stage { position: relative; width: 100%; height: min(58vh, 400px); min-height: 300px; border-radius: 16px; background: linear-gradient(#e0f2fe, #f0fdf4); color: #1e293b; overflow: hidden; container-type: inline-size; touch-action: none; user-select: none; -webkit-user-select: none; }
.tb-s { position: absolute; transform: translate(-50%, -50%); font-weight: 800; line-height: 1; white-space: nowrap; cursor: pointer; padding: 4px; }
.tb-s.is-text { cursor: default; }
.tb-s.is-drag { cursor: grab; }
.tb-s.is-drag:active { cursor: grabbing; }
.tb-s.is-on { outline: 3px solid #16a34a; outline-offset: 2px; border-radius: 10px; background: rgba(74,222,128,.25); }
.tb-s.is-bump { animation: tb-bump .25s; }
@keyframes tb-shake { 0%, 100% { margin-left: 0; } 25% { margin-left: -6px; } 75% { margin-left: 6px; } }
@keyframes tb-bump { 50% { transform: translate(-50%, -50%) scale(1.1) rotate(3deg); } }
.tb-note { min-height: 24px; margin: 8px 0; text-align: center; font-weight: 700; color: #fde047; }
.tb-res { padding: 12px; border-radius: 14px; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.14); text-align: center; }
.tb-res h3 { margin: 0 0 2px; font-size: 22px; }
.tb-res p { margin: 6px 0 10px; line-height: 1.45; }
.tb-stars { font-size: 28px; letter-spacing: 3px; }
.tb-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
@media (max-width: 560px) { .tb-list { grid-template-columns: repeat(6, minmax(0, 1fr)); } .tb-q { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .tb-w.is-shake, .tb-s.is-shake, .tb-s.is-bump { animation: none; } }
.tb-s.is-fall { transition: left .5s ease-in, top .5s ease-in; }
