/* Clubs: Coding Club (Robo Blocks + Python Lab) */
.raid.clubcard { background: linear-gradient(120deg, #064e3b, #06a77d 60%, #7b2cbf); margin-top: 14px; }
.portal.soon { opacity: .55; cursor: default; }
.portal.soon:hover { transform: none; }
.clubnodes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.clubnodes .node { min-height: 0; padding: 14px 10px; text-align: center; }
.clubnodes .node[disabled] { opacity: .45; }
.clubnodes .stars { margin-top: 4px; font-size: 18px; }
.nextq { color: var(--gold); font-weight: 700; font-size: 14px; }
.stars.big { font-size: 46px; }
.good { color: var(--good); font-weight: 700; }
.robotip, .tip.robotip { background: rgba(255, 210, 63, .12); border: 2px dashed var(--gold); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: 17px; }

/* Robo Blocks */
.robo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 820px) { .robo { grid-template-columns: 1fr; } }
.board { position: relative; width: 100%; max-height: 62vh; margin: 0 auto; background: #0a0d26; border-radius: 16px; border: 3px solid var(--line); overflow: hidden; }
.board .cl { position: absolute; display: flex; align-items: center; justify-content: center; }
.board .cl.fl { background: #2b3a8f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.board .cl.wall { background: repeating-linear-gradient(45deg, #151a45 0 6px, #1b2155 6px 12px); }
.gem { font-size: min(5vw, 34px); transition: transform .3s, opacity .3s; animation: bob 2s infinite ease-in-out; }
.gem.got { transform: scale(1.8); opacity: 0; }
.bot { position: absolute; transition: left .3s ease, top .3s ease; display: flex; align-items: center; justify-content: center; z-index: 2; }
.bot .face { font-size: min(6vw, 40px); filter: drop-shadow(0 3px 0 rgba(0,0,0,.4)); }
.bot .dir { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; color: var(--gold); font-size: min(3vw, 18px); transition: transform .3s; text-shadow: 0 0 4px #000; }
.bot.bump { animation: bonk .35s 2; }
@keyframes bonk { 0%, 100% { translate: 0 0; } 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.fast { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.robomsg { margin-top: 12px; font-size: 17px; text-align: center; min-height: 1.5em; }
.robo.locked .palette, .robo.locked #prog, .robo.locked #undo, .robo.locked #clear { pointer-events: none; opacity: .75; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.cb { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 12px; font-weight: 700; font-size: 16px; color: #fff; margin: 5px 0; border: 2px solid rgba(0,0,0,.25); box-shadow: 0 3px 0 rgba(0,0,0,.3); }
button.cb { margin: 0; cursor: pointer; }
.cb.mv { background: #1e88e5; } .cb.tn { background: #8e24aa; } .cb.lp { background: #ef6c00; } .cb.cd { background: #00897b; }
.cb.box { display: block; padding: 8px 8px 6px 12px; }
.cb .hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cb.now { outline: 4px solid var(--gold); outline-offset: 1px; }
.slot { border-left: 4px solid rgba(255,255,255,.25); padding: 2px 0 2px 8px; margin: 6px 0 4px; min-height: 30px; border-radius: 4px; }
.slot.on { border-left-color: var(--gold); background: rgba(255, 210, 63, .08); }
#prog > .slot { border-left: none; padding-left: 0; margin: 0; }
.addhere { display: block; width: 100%; text-align: left; background: transparent; border: 2px dashed rgba(255,255,255,.3); color: var(--muted); border-radius: 10px; padding: 5px 10px; font: inherit; font-size: 14px; cursor: pointer; margin-top: 4px; }
.slot.on > .addhere { border-color: var(--gold); color: var(--gold); }
.del { background: rgba(0,0,0,.3); color: #fff; border: 0; border-radius: 8px; width: 28px; height: 28px; font-size: 14px; cursor: pointer; flex: none; }
.nbtn { background: #fff; color: #222; border: 0; border-radius: 8px; padding: 2px 9px; font: inherit; font-weight: 800; cursor: pointer; }

/* Python Lab */
.pylab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
@media (max-width: 820px) { .pylab { grid-template-columns: 1fr; } }
.pyex, .pyout, .pycode { font-family: 'Consolas', 'Menlo', 'Courier New', monospace; font-size: 16px; line-height: 1.45; }
.pyex { background: #0a0d26; border-radius: 10px; padding: 10px 12px; margin: 6px 0 10px; white-space: pre-wrap; color: #c3f0ff; }
.pyex.hidden { display: none; }
.pycode { width: 100%; min-height: 230px; background: #0a0d26; color: #f4f6ff; border: 2px solid var(--line); border-radius: 12px; padding: 12px; resize: vertical; tab-size: 4; }
.pycode:focus { outline: none; border-color: var(--xp); }
.pyout { background: #000; color: #b9f6ca; border-radius: 10px; padding: 10px 12px; margin: 0; min-height: 60px; white-space: pre-wrap; max-height: 260px; overflow: auto; }
.turtle { position: relative; width: 360px; max-width: 100%; height: 300px; margin: 10px auto 0; background: #fff; border-radius: 10px; overflow: hidden; }
.turtle canvas { position: absolute; left: 0; top: 0; }
.pyno { margin-top: 10px; background: rgba(255, 77, 109, .15); border: 2px solid var(--bad); border-radius: 12px; padding: 10px 12px; }
.pyyes { margin-top: 10px; background: rgba(46, 232, 122, .15); border: 2px solid var(--good); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.pyraw { font-size: 12px; margin-top: 6px; font-family: monospace; }
.pylab code, .pyno code { background: rgba(255,255,255,.12); padding: 1px 5px; border-radius: 5px; font-family: 'Consolas', 'Menlo', monospace; }

/* ---------- Music Club ---------- */
.mq { text-align: center; }
.mqq { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.mshow { display: flex; justify-content: center; margin: 4px 0 10px; }
.stave { width: min(420px, 92%); height: auto; background: #fffdf6; border-radius: 14px; padding: 4px 0; }
.stave.rhy { width: min(360px, 80%); }
.stave .sl { stroke: #222; stroke-width: 1.3; }
.stave path { fill: #111; }
.stave .stem { stroke: #111; stroke-width: 1.4; }
.stave .fl, .stave .dot { fill: #111; }
.stave .plus { font: 700 28px var(--font); fill: #7b2cbf; }
.stave .hl { fill: #d00; stroke: #d00; }
.mopts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.mopt { min-width: 64px; font-size: 22px; }
.mopt.right { background: var(--good) !important; color: #062; }
.mopt.wrong { background: var(--bad) !important; color: #fff; }
.piano { position: relative; width: 100%; max-width: 760px; height: 190px; margin: 8px auto 0; user-select: none; touch-action: manipulation; }
.piano .wk, .piano .bk { position: absolute; top: 0; border: 0; padding: 0; cursor: pointer; font: inherit; }
.piano .wk { height: 100%; background: linear-gradient(#fff, #eef0f7); border: 1px solid #889; border-radius: 0 0 8px 8px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; color: #445; font-weight: 700; font-size: 15px; }
.piano .bk { height: 60%; background: linear-gradient(#333, #000); border-radius: 0 0 6px 6px; z-index: 2; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.piano .wk.on, .piano .wk.right { background: #b9f6ca; } .piano .bk.on, .piano .bk.right { background: #2e7d32; }
.piano .wk.wrong { background: #ffc9d2; } .piano .bk.wrong { background: #b71c1c; }
.piano .want { outline: 4px solid var(--gold); outline-offset: -4px; animation: bob 1s infinite ease-in-out; }
.piano .dotc { color: #e63946; font-size: 26px; line-height: 1; }

/* ---------- Chess Club ---------- */
.chesswrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .chesswrap { grid-template-columns: 1fr; } }
.cboard { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); container-type: inline-size; width: 100%; max-width: min(560px, 72vh); aspect-ratio: 1; border: 4px solid #5b3a1e; border-radius: 8px; overflow: hidden; touch-action: manipulation; }
.cboard .sq { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
.cboard .lt { background: #f0d9b5; } .cboard .dk { background: #b58863; }
.cboard .sq.last { box-shadow: inset 0 0 0 100px rgba(255, 220, 60, .38); }
.cboard .sq.sel { box-shadow: inset 0 0 0 100px rgba(80, 200, 120, .55); }
.cboard .sq.chk { box-shadow: inset 0 0 0 100px rgba(230, 40, 40, .6); }
.cboard .sq.hint .pz { animation: bob 1s infinite ease-in-out; filter: drop-shadow(0 0 8px gold) drop-shadow(0 0 4px gold); }
.cboard .sq.can::after { content: ''; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(20, 120, 60, .55); pointer-events: none; }
.cboard .sq.can.cap::after { width: 86%; height: 86%; background: none; border: 5px solid rgba(20, 120, 60, .6); }
.cboard .pz { font-size: 30px; font-size: 10.5cqw; line-height: 1; font-family: 'Segoe UI Symbol', 'DejaVu Sans', 'Noto Sans Symbols 2', 'Apple Symbols', serif; pointer-events: none; }
.cboard .pw { color: #fff; -webkit-text-stroke: 1.6px #222; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.cboard .pb { color: #1a1a1a; text-shadow: 0 1px 0 rgba(255,255,255,.25); }
.cboard .star, .cboard .rock { font-size: 24px; font-size: 7cqw; pointer-events: none; }
.cboard .star { animation: bob 2s infinite ease-in-out; }
.cboard i { position: absolute; font-style: normal; font-size: 11px; font-weight: 700; opacity: .7; color: #3b2412; pointer-events: none; }
.cboard i.fl { right: 3px; bottom: 1px; } .cboard i.rk { left: 3px; top: 1px; }
.chessside .cstat { font-size: 19px; }
h2 .pz { font-size: 1.1em; color: #fff; -webkit-text-stroke: 1px #222; }
