.ttia-puzzle{max-width:660px!important;padding:24px!important;box-sizing:border-box;background:#191e25;}
.puzzle-head{display:flex;align-items:center;gap:12px}.puzzle-head>img{width:48px;height:48px;object-fit:contain;image-rendering:auto}.puzzle-head h1{font-size:24px;letter-spacing:-.8px;margin:3px 0}.puzzle-eyebrow{font-size:11px;color:#97b9e3;margin:0}.puzzle-intro{color:#acb9ca;font-size:12px;line-height:1.7;margin:12px 0 16px;max-width:440px}
.puzzle-hud{display:grid;grid-template-columns:minmax(86px,1fr) 1.7fr .7fr;align-items:center;gap:10px;padding:13px 16px;border:1px solid #ffffff10;border-radius:12px;background:#ffffff03;font-size:12px;font-variant-numeric:tabular-nums}.puzzle-hud>strong:first-child{white-space:nowrap;font-size:23px;color:#c4dafe;font-weight:650;letter-spacing:-.6px}.puzzle-hud>strong:nth-child(2){text-align:center;font-weight:500;color:#b9c7d8}.puzzle-hud>strong:last-child{text-align:right;font-weight:500;color:#a0afc2}.puzzle-hud [data-urgent=true]{color:#ff9ca8!important}
.puzzle-controls{display:flex;justify-content:center;gap:8px;margin-top:16px}.puzzle-controls[hidden],.puzzle-controls button[hidden],.puzzle-clear[hidden]{display:none!important}.ttia-puzzle .primary{background:#387fe3;color:#fff;box-shadow:0 2px 0 #1855aa;font-weight:600}.ttia-puzzle .primary:hover{background:#4e91ed}.puzzle-controls button{min-height:44px;min-width:160px;font-size:13px;border-radius:12px}
.puzzle-board-wrap{position:relative;margin-top:18px}.puzzle-clear{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;white-space:nowrap;display:flex;align-items:center;gap:9px;padding:13px 22px;border-radius:999px;color:#264b71;background:#f5faff;border:1px solid #b6d2e9;box-shadow:0 12px 32px #0004;font-size:15px;font-weight:650;pointer-events:none;animation:puzzle-clear-in .2s ease-out}.puzzle-clear::before{content:'✓';display:grid;place-items:center;width:23px;height:23px;background:#d5ebdf;color:#2e7656;border-radius:50%;font-size:14px}
.memory-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-width:520px;margin:0 auto;padding:2px}.memory-card{position:relative;overflow:hidden;padding:8px;aspect-ratio:1.12;min-width:0;border:1px solid #648cb54d;border-radius:15px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:linear-gradient(145deg,#2b3c50,#202d3d);box-shadow:0 3px 5px #0002,inset 0 1px #ffffff0b;cursor:pointer;color:#c1d4ec;transition:background-color .16s,border-color .16s,box-shadow .16s}.memory-card::after{content:'';position:absolute;inset:6px;border:1px solid #ffffff07;border-radius:10px;pointer-events:none}.memory-card:hover:not(:disabled){border-color:#91b5e1;box-shadow:0 4px 12px #0003}.memory-card.is-open{background:#f6f7fa;border-color:#e6edf3;box-shadow:0 3px 8px #0002}.memory-card.is-matched{background:#e3f0e9;border-color:#acd0bc}.memory-card img{position:absolute;inset:10%;width:80%;height:80%;object-fit:contain;image-rendering:auto;animation:puzzle-card-reveal .16s ease-out}.memory-card:disabled{opacity:1;cursor:default}.memory-card:focus-visible{outline:3px solid #9bc5ff;outline-offset:3px}.card-back-star{font-size:28px;color:#aec9e9;text-shadow:0 1px 0 #fff2}.card-back-name{font-size:9px;letter-spacing:3px;color:#92a9c3}.memory-badge{position:absolute;right:5px;top:5px;z-index:1;display:grid;place-items:center;width:20px;height:20px;color:#875b19;background:#ffecb2;border:1px solid #dfc78d;border-radius:50%;font-size:14px;box-shadow:0 1px 3px #0002}
.water-board{display:grid;grid-template-columns:repeat(var(--tube-count,6),minmax(0,1fr));gap:12px;align-items:end;padding:9px 0 2px;max-width:580px;margin:auto}.water-bottle{position:relative;background:none;border:0;padding:0 1px;color:#aab9ca;cursor:pointer;min-width:0;transition:transform .18s ease}.water-bottle:disabled{cursor:default;opacity:1}.water-glass{display:flex;flex-direction:column;height:164px;border:2px solid #b1c8df96;border-top-width:4px;border-radius:6px 6px 16px 16px;padding:8px 4px 4px;background:linear-gradient(90deg,#ffffff12,transparent 35%,#ffffff05);box-shadow:inset 2px 0 #ffffff15,0 5px 12px #0002;overflow:hidden}.water-liquid{height:25%;flex-shrink:0;display:grid;place-items:center;color:#13223d90;font-size:11px;font-weight:700;border-top:1px solid #ffffff5c;opacity:0;transform:scaleY(.8);transform-origin:bottom;transition:opacity .14s,transform .18s,background-color .18s}.water-liquid[data-filled=true]{opacity:1;transform:scaleY(1)}.bottle-face{position:static;display:block;width:28px;height:28px;margin:8px auto 0;image-rendering:auto;pointer-events:none}.bottle-number{display:block;margin-top:3px;font-size:10px;color:#8fa0b5}.water-bottle.is-selected{transform:translateY(-9px)}.water-bottle.is-selected .water-glass{border-color:#92baf0;box-shadow:0 0 0 3px #428ef120}.water-bottle.is-complete .water-glass{border-color:#a0d8bc}.water-bottle:focus-visible{outline:2px solid #9bc5ff;outline-offset:5px;border-radius:12px}
.puzzle-notice{min-height:23px;font-size:11px;color:#a8bfd9;line-height:1.6;text-align:center;margin:12px 0 0}.puzzle-tools{font-size:11px;color:#91a2b8;margin-top:10px;border-top:1px solid #ffffff0b;padding-top:8px}.puzzle-tools summary{cursor:pointer;min-height:30px;display:flex;align-items:center}.puzzle-tools summary::after{content:'+';margin-left:auto;color:#6d8199}.puzzle-tools[open] summary::after{content:'−'}.puzzle-tools p{font-size:12px;line-height:1.7}.puzzle-tool-buttons{display:flex;gap:8px;flex-wrap:wrap}.puzzle-tool-buttons button{min-height:40px;font-size:12px}.ttia-puzzle>.game-score-status{font-size:11px;color:#8d9fb5;justify-content:center;padding:8px 0 0;min-height:23px}
@keyframes puzzle-card-reveal{from{opacity:1;transform:scale(.94)}to{opacity:1;transform:scale(1)}}@keyframes puzzle-clear-in{from{opacity:0;transform:translate(-50%,-40%)}to{opacity:1;transform:translate(-50%,-50%)}}
@media(max-width:540px){.ttia-puzzle{padding:16px 13px!important;border-radius:17px}.puzzle-head h1{font-size:21px}.puzzle-head>img{width:42px;height:42px}.puzzle-intro{font-size:11px;margin:9px 0 12px}.puzzle-hud{gap:6px;padding:10px 11px;font-size:10px}.puzzle-hud>strong:first-child{font-size:21px}.puzzle-board-wrap{margin-top:13px}.memory-board{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.memory-card{border-radius:12px}.memory-card::after{inset:5px;border-radius:8px}.memory-badge{width:18px;height:18px;font-size:12px;right:4px;top:4px}.water-board{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 12px;max-width:350px}.water-glass{height:123px}.bottle-face{width:26px;height:26px}.puzzle-controls button{min-height:42px;font-size:12px}.puzzle-notice{font-size:10px;margin-top:9px}.puzzle-tools{margin-top:8px}.ttia-puzzle>.game-score-status{font-size:10px}}
@media(prefers-reduced-motion:reduce){.ttia-puzzle *{animation:none!important;transition:none!important}}

@media(max-width:540px){.game-board .board-heading{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}.game-board .board-heading h1{white-space:nowrap;font-size:22px;margin:0}.game-board .board-count{font-size:11px;white-space:nowrap}.game-board .game-search{grid-column:1/-1;width:100%;min-width:0}}

.puzzle-challenge{display:grid;grid-template-columns:1fr auto;gap:7px 10px;align-items:center;margin:13px 1px 0;font-size:11px;color:#93a6bf}.puzzle-challenge>strong{font-weight:600;color:#c8daef}.puzzle-challenge>span{font-size:10px;text-align:right}.puzzle-challenge-bar{height:4px;border-radius:5px;overflow:hidden;grid-column:1/-1;background:#ffffff0b}.puzzle-challenge-bar>span{display:block;width:0;height:100%;background:#7caef0;border-radius:inherit;transition:width .2s ease}.puzzle-challenge[data-combo=true] .puzzle-challenge-bar>span{background:#90d5b4}
.memory-board[data-pairs]{grid-template-columns:repeat(4,minmax(0,1fr))}.memory-card.is-matched img{animation:puzzle-match .2s ease-out}.puzzle-board-wrap[data-cleared=true] .memory-card{border-color:#abd8bd}.puzzle-clear{max-width:calc(100% - 20px);box-sizing:border-box}.puzzle-notice{font-variant-numeric:tabular-nums}
@keyframes puzzle-match{from{transform:scale(.9)}to{transform:scale(1)}}
@media(max-width:540px){.memory-board[data-pairs]{gap:6px}.memory-card{aspect-ratio:1;border-radius:10px}.memory-card img{inset:6%;width:88%;height:88%}.memory-card::after{inset:4px;border-radius:6px}.card-back-star{font-size:24px}.card-back-name{font-size:8px;letter-spacing:1px}.puzzle-challenge{margin-top:10px;font-size:10px;gap:6px}.puzzle-challenge>span{font-size:9px}.puzzle-board-wrap{margin-top:12px}}
