.code-main{max-width:620px;margin:24px auto;padding:0 16px}.code-game .board-card{padding:24px}.code-game .board-top h2{font-size:21px}.code-intro{text-align:center;padding:10px 0}.code-intro p{font-size:14px;color:var(--muted);margin:8px 0 16px}.secret,#guess{display:flex;justify-content:center;gap:10px}.secret span,.guess-slot{display:grid;place-items:center;width:52px;height:52px;border-radius:13px;background:var(--light,#edf1df);font-size:26px}.secret span{color:var(--muted);border:1px dashed var(--line)}.guess-slot{border:2px solid var(--line);cursor:pointer}.guess-slot.active{border-color:var(--green);box-shadow:0 0 0 3px #36594416}.code-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;color:var(--muted);padding:8px 0;border-bottom:1px solid var(--line)}.code-game button{font-family:inherit}.code-game .text-button{min-height:40px}.entry{background:#edf1df;border-radius:14px;padding:16px;margin-top:14px}.entry-title{display:flex;align-items:center;gap:14px;font-size:12px;margin-bottom:12px}.entry-title strong{margin-right:auto}#palette{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:16px 0}#palette button{width:44px;height:44px;border-radius:11px;border:1px solid var(--line);background:var(--surface);font-size:25px;cursor:pointer}.code-game button:focus-visible{outline:3px solid #c58844;outline-offset:3px}.code-game .new-button{width:100%;margin-top:10px}.code-game .new-button:disabled{opacity:.45;cursor:default}.history-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.history-shapes{display:flex;gap:8px;align-items:center}.history-shapes span{font-size:22px;width:26px;text-align:center}.history-shapes small{width:16px;color:var(--muted);font-size:10px}.feedback{font-size:11px;line-height:1.7}.feedback strong{color:var(--green)}#status{font-size:12px;line-height:1.6;margin:14px 0 0}.code-note{text-align:center;font-size:11px;color:var(--muted)}.code-game dialog p{font-size:13px;line-height:1.7}.code-game dialog select{width:100%;padding:13px;border:1px solid var(--line);border-radius:9px;margin:12px 0}.code-game .won .secret span{border-style:solid;background:var(--lime);animation:pop .45s ease both}@keyframes pop{50%{transform:translateY(-8px) rotate(6deg)}}@media(max-width:760px){.code-main{margin:0 auto}.code-game .board-card{padding:16px 12px}.code-game .board-top h2{font-size:16px}.secret span,.guess-slot{width:46px;height:46px}.entry{padding:12px}.secret,#guess{gap:7px}.entry-title{gap:10px}.code-game .text-button{font-size:11px}.history-row{gap:6px}.history-shapes{gap:4px}.feedback{font-size:10px}}@media(prefers-reduced-motion:reduce){.code-game .won .secret span{animation:none}}

.feedback{max-width:175px;color:var(--muted);overflow-wrap:break-word}.feedback span{display:block}.feedback span+span{margin-top:3px}@media(max-width:760px){.feedback{max-width:150px;flex:1}.history-shapes{flex-shrink:0}}

.code-victory{border-radius:16px;background:var(--lime);padding:20px 12px 16px;margin:0 0 20px;animation:victory-arrive .55s ease-out both}.code-victory .victory-mark{display:inline-grid;place-items:center;width:48px;height:48px;border-radius:50%;background:var(--green);color:var(--lime);font-size:32px;animation:victory-turn .8s ease-out both}.code-victory h3{font-family:Manrope,sans-serif;font-size:28px;letter-spacing:-1px;margin:8px 0 0}.code-intro .code-victory p{font-size:12px;color:var(--green);margin:8px 0 0}.code-victory:focus{outline:none}.code-game .won{border-color:#8da85d;box-shadow:0 0 0 4px #dceba560}.code-game .won .secret span{animation:code-reveal .75s cubic-bezier(.2,.7,.2,1.2) both}.won .secret span:nth-child(2){animation-delay:.1s}.won .secret span:nth-child(3){animation-delay:.2s}.won .secret span:nth-child(4){animation-delay:.3s}.won .secret span:nth-child(5){animation-delay:.4s}.code-confetti{position:fixed;inset:0;pointer-events:none;z-index:1000;overflow:hidden}.code-confetti i{position:absolute;left:50%;top:18%;width:9px;height:15px;background:var(--colour);border-radius:2px;animation:code-confetti 1.8s var(--delay) ease-out both}@keyframes code-confetti{0%{opacity:0;transform:translate(0,0) rotate(0)}10%{opacity:1}100%{opacity:0;transform:translate(var(--x),65vh) rotate(var(--spin))}}@keyframes code-reveal{0%{opacity:0;transform:translateY(20px) scale(.65) rotate(-12deg)}60%{transform:translateY(-12px) scale(1.12) rotate(5deg)}100%{opacity:1;transform:none}}@keyframes victory-arrive{from{opacity:0;transform:translateY(12px) scale(.95)}to{opacity:1;transform:none}}@keyframes victory-turn{from{transform:rotate(-90deg) scale(.5)}to{transform:none}}@media(prefers-reduced-motion:reduce){.code-victory,.code-victory .victory-mark,.code-game .won .secret span{animation:none}.code-confetti{display:none}}
