@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Nunito:wght@500;700;800&family=Cairo:wght@500;700;900&display=swap");
:root {
  --bg: #121829; --panel: #1c2540; --panel2: #263156; --line: #34416e; --text: #eef2ff; --muted: #9aa6cf;
  --yellow: #ffd23f; --teal: #19b5a5; --pink: #ff5d73; --blue: #49b6f5; --green: #5fd068;
  --pixel: "Press Start 2P", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--pixel); line-height: 1.5; margin: 0 0 12px; font-weight: 400; }
h1 { font-size: 22px; } h2 { font-size: 15px; } h3 { font-size: 12px; color: var(--yellow); }
a { color: var(--blue); }
p { margin: 0 0 12px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }

/* buttons & inputs */
.btn { font-family: var(--pixel); font-size: 11px; padding: 12px 16px; border: 0; border-radius: 8px; cursor: pointer; color: #1a1f33; background: var(--yellow); box-shadow: 0 4px 0 #b8901a; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b8901a; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.teal { background: var(--teal); box-shadow: 0 4px 0 #0f7d72; color: #fff; }
.btn.pink { background: var(--pink); box-shadow: 0 4px 0 #b83a4c; color: #fff; }
.btn.ghost { background: var(--panel2); box-shadow: 0 4px 0 #161d36; color: var(--text); }
.btn.small { font-size: 9px; padding: 8px 10px; }
input, select, textarea { font: inherit; color: var(--text); background: #0e1424; border: 2px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--yellow); }
label { display: block; font-weight: 700; margin: 0 0 6px; font-size: 14px; }
.field { margin-bottom: 14px; }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.error { color: var(--pink); font-weight: 700; min-height: 22px; }
.ok { color: var(--green); font-weight: 700; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.brand { font-family: var(--pixel); font-size: 13px; color: var(--yellow); text-decoration: none; }
.brand span { color: var(--teal); }
.spacer { flex: 1; }
.chip { background: var(--panel2); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 14px; white-space: nowrap; }

/* landing */
.hero { text-align: center; padding: 48px 16px 24px; }
.hero h1 { font-size: 30px; color: var(--yellow); text-shadow: 4px 4px 0 #000; }
.hero p { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 auto 24px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.choice { cursor: pointer; text-align: left; transition: transform .12s, border-color .12s; }
.choice:hover, .choice.selected { border-color: var(--yellow); transform: translateY(-3px); }
.choice .tag { font-family: var(--pixel); font-size: 9px; color: var(--teal); }

/* level map */
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.level { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; color: var(--text); text-align: left; font: inherit; }
.level:hover:not(:disabled) { border-color: var(--yellow); }
.level:disabled { opacity: .45; cursor: not-allowed; }
.level .num { font-family: var(--pixel); font-size: 18px; color: var(--yellow); }
.level .stars { color: var(--yellow); letter-spacing: 2px; font-size: 18px; }
.level .stars i { color: var(--line); font-style: normal; }

/* game */
.game { display: grid; grid-template-columns: minmax(300px, 480px) 1fr; gap: 14px; padding: 14px; align-items: start; }
@media (max-width: 860px) { .game { grid-template-columns: 1fr; } }
.stage canvas { width: 100%; aspect-ratio: 1; display: block; border-radius: 10px; border: 4px solid #000; image-rendering: pixelated; background: #5cae49; }
.inv { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.bubble { background: #fff; color: #1a1f33; border-radius: 12px; padding: 12px 14px; margin-top: 10px; font-weight: 700; position: relative; }
.bubble .goal { color: #0f7d72; margin-top: 6px; }
.bubble.bad { background: #ffe1e6; } .bubble.good { background: #dcffe0; }
.work { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-height: 560px; }
.work-head { padding: 8px 12px; background: var(--panel2); font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#blockly { flex: 1; min-height: 520px; position: relative; }
#blockly .injectionDiv { position: absolute !important; inset: 0; height: auto !important; }
.py { display: grid; grid-template-columns: 1fr 250px; flex: 1; min-height: 520px; }
@media (max-width: 1050px) { .py { grid-template-columns: 1fr; } }
.editor { display: flex; background: #0b1020; min-height: 320px; }
.gutter { padding: 12px 8px; text-align: right; color: #4f5c8c; font: 15px/1.6 ui-monospace, Menlo, Consolas, monospace; user-select: none; white-space: pre; }
#code { flex: 1; border: 0; border-radius: 0; resize: none; background: transparent; color: #d7f7ff; font: 15px/1.6 ui-monospace, Menlo, Consolas, monospace; padding: 12px 8px; tab-size: 4; white-space: pre; overflow: auto; }
.ref { background: var(--panel2); padding: 12px; font-size: 13.5px; overflow: auto; }
.ref code { display: block; background: #0e1424; color: #d7f7ff; border-radius: 6px; padding: 5px 8px; margin: 8px 0 2px; font: 13px ui-monospace, Menlo, monospace; }
#out { background: #070b16; color: #ffb3bf; font: 13px/1.5 ui-monospace, Menlo, monospace; padding: 8px 12px; min-height: 44px; max-height: 110px; overflow: auto; white-space: pre-wrap; border-top: 2px solid var(--line); }

.dash > *, .game > * { min-width: 0; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(5, 8, 18, .78); display: grid; place-items: center; padding: 16px; z-index: 100; }
.modal .card { max-width: 560px; width: 100%; max-height: 92vh; overflow: auto; }
.opt { display: block; width: 100%; text-align: left; margin: 8px 0; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.opt:hover:not(:disabled) { border-color: var(--yellow); }
.opt.right { background: #1f6b34; border-color: var(--green); } .opt.wrong { background: #7a2636; border-color: var(--pink); }
.bigstars { font-size: 44px; color: var(--yellow); letter-spacing: 6px; text-align: center; } .bigstars i { color: var(--line); font-style: normal; }

/* teacher */
.dash { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .dash { grid-template-columns: 1fr; } }
.bank { display: block; width: 100%; text-align: left; padding: 12px; margin-bottom: 8px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; cursor: pointer; }
.bank.active { border-color: var(--yellow); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { font-family: var(--pixel); font-size: 10px; padding: 10px 12px; border-radius: 8px 8px 0 0; border: 0; background: var(--panel2); color: var(--muted); cursor: pointer; }
.tab.active { background: var(--yellow); color: #1a1f33; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.tablewrap { overflow-x: auto; }
.qitem { border: 2px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #18203a; }
.qitem ol { margin: 6px 0 0; padding-left: 22px; } .qitem li.correct { color: var(--green); font-weight: 800; }
.code-big { font-family: var(--pixel); font-size: 30px; letter-spacing: 6px; color: var(--yellow); background: #0e1424; border-radius: 10px; padding: 16px; text-align: center; }
.drop { border: 3px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; min-width: 70px; } .bar b { display: block; height: 100%; background: var(--green); }

.credit { text-align: center; color: var(--muted); font-size: 13.5px; padding: 22px 16px 26px; }
.credit b { color: var(--yellow); }

/* ---------- Arabic explanations (code areas stay left-to-right) ---------- */
body.ar { font-family: Cairo, Nunito, system-ui, sans-serif; }
body.ar h1, body.ar h2, body.ar h3, body.ar .btn, body.ar .tab, body.ar .choice .tag, body.ar .i-badge { font-family: Cairo, sans-serif; font-weight: 900; letter-spacing: 0; }
body.ar h1 { font-size: 30px; } body.ar h2 { font-size: 21px; } body.ar h3 { font-size: 17px; } body.ar .btn { font-size: 15px; } body.ar .btn.small { font-size: 13px; }
body.ar .hero, body.ar #join .card, body.ar #map, body.ar .bubble, body.ar .modal .card, body.ar .level, body.ar .stage .row,
body.ar .intro-cap, body.ar .i-card h3, body.ar .i-card p, body.ar .i-head, body.ar .prog, body.ar .topbar { direction: rtl; }
body.ar .level, body.ar .bubble, body.ar .choice { text-align: right; }
body.ar .brand, body.ar #jcode, body.ar .work, body.ar .i-demo, body.ar code, body.ar .mono { direction: ltr; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---------- level intro ---------- */
.intro { position: fixed; inset: 0; z-index: 200; background: rgba(5, 8, 18, .92); display: grid; place-items: center; padding: 12px; }
.intro-box { width: min(940px, 100%); }
.intro-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 4px solid #000; background: linear-gradient(#274a8a, #1b2f5e 55%, #16223f); }
.i-sky { position: absolute; inset: -40px; background-image: radial-gradient(#ffffff22 2px, transparent 3px), radial-gradient(#ffd23f33 3px, transparent 4px); background-size: 90px 90px, 140px 140px; background-position: 0 0, 40px 60px; animation: isky 14s linear infinite; }
@keyframes isky { to { transform: translate(90px, 40px); } }
.i-head { position: absolute; left: 4%; right: 4%; top: 6%; transition: all .8s cubic-bezier(.2, .8, .2, 1); z-index: 3; }
.i-badge { display: inline-block; font-family: var(--pixel); font-size: clamp(9px, 1.4vw, 13px); background: var(--teal); color: #fff; padding: 8px 12px; border-radius: 8px; box-shadow: 0 4px 0 #0f7d72; animation: ipop .6s both; }
.i-head h2 { font-size: clamp(16px, 3.6vw, 36px); color: var(--yellow); text-shadow: 4px 4px 0 #000; margin: 14px 0 0; animation: islide .7s .15s both; }
@keyframes ipop { from { transform: scale(0) rotate(-12deg); } 70% { transform: scale(1.15) rotate(3deg); } }
@keyframes islide { from { opacity: 0; transform: translateY(26px); } }
.i-world { position: absolute; height: 78%; aspect-ratio: 1; right: 4%; top: 14%; border-radius: 12px; overflow: hidden; border: 4px solid #000; box-shadow: 0 14px 0 #0006; transition: all .9s cubic-bezier(.2, .8, .2, 1); z-index: 2; }
.i-zoom { position: absolute; inset: 0; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); transform-origin: var(--hx) var(--hy); }
.i-zoom canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.i-mark { position: absolute; width: 12.5%; height: 12.5%; border-radius: 50%; opacity: 0; pointer-events: none; }
.i-mark.goal { box-shadow: 0 0 0 4px var(--yellow); } .i-mark.item { box-shadow: 0 0 0 4px #49e0f5; } .i-mark.me { box-shadow: 0 0 0 4px #fff; }
.s1 .i-mark { animation: ipulse 1.1s ease-in-out infinite; }
@keyframes ipulse { 0% { opacity: 1; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.9); } }
.i-card { position: absolute; background: #fff; color: #1a1f33; border-radius: 14px; padding: 3% 3.4%; box-shadow: 0 10px 0 #0005; opacity: 0; transform: translateY(30px) scale(.9); transition: all .6s cubic-bezier(.2, .8, .2, 1); z-index: 3; }
.i-card h3 { color: #0f7d72; font-size: clamp(10px, 1.5vw, 14px); margin: 0 0 8px; }
.i-card p { margin: 0; font-weight: 800; font-size: clamp(14px, 2.3vw, 24px); line-height: 1.35; }
.i-goal { left: 4%; top: 40%; width: 40%; }
.i-idea { left: 4%; top: 32%; width: 52%; background: #0b1020; color: #d7f7ff; border: 3px solid var(--yellow); }
.i-idea h3 { color: var(--yellow); }
/* scene 0: big title, close-up on Bolt */
.s0 .i-head { top: 30%; right: 50%; }
.s0 .i-zoom { transform: scale(2.6); }
/* scene 1: whole map + goal card */
.s1 .i-goal { opacity: 1; transform: none; }
/* scene 2: new idea, map shrinks */
.s2 .i-world { height: 46%; top: 44%; right: 4%; }
.s2 .i-idea { opacity: 1; transform: none; }
.i-block { display: block; width: max-content; max-width: 100%; color: #fff; font-weight: 800; font-size: clamp(11px, 1.9vw, 19px); padding: .35em .8em; border-radius: 8px; margin-bottom: 5px; box-shadow: 0 3px 0 #0005; opacity: 0; }
.i-py { margin: 0; font: 700 clamp(11px, 1.75vw, 18px)/1.55 ui-monospace, Menlo, Consolas, monospace; white-space: pre; overflow: hidden; }
.i-py span { display: inline-block; opacity: 0; }
.s2 .i-block, .s2 .i-py span { animation: itype .45s both; }
@keyframes itype { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; } }
.intro-cap { background: #fff; color: #1a1f33; border-radius: 12px; padding: 12px 16px; margin-top: 10px; font-weight: 800; font-size: clamp(15px, 2.1vw, 20px); min-height: 62px; text-align: center; }
.intro-cap.in { animation: islide .4s both; }
.intro-bar { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.i-dots { display: flex; gap: 6px; } .i-dots i { width: 26px; height: 8px; border-radius: 4px; background: var(--line); } .i-dots i.on { background: var(--yellow); }
.btn.pulse { animation: bpulse 1s ease-in-out infinite; }
@keyframes bpulse { 50% { transform: scale(1.08); filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .i-sky, .i-mark, .btn.pulse { animation: none; } .i-mark { opacity: 1; } }

/* ---------- progress page ---------- */
.prog { max-width: 980px; margin: 0 auto; padding: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: var(--panel2); border-radius: 12px; padding: 14px; text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--yellow); }
.plevels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.plevel { background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; }
.plevel.done { border-color: var(--green); } .plevel.stuck { border-color: var(--pink); }
.plevel .stars { color: var(--yellow); letter-spacing: 2px; } .plevel .stars i { color: var(--line); font-style: normal; }
.pbar { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 8px 0 14px; } .pbar b { display: block; height: 100%; background: var(--green); }
.mapbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .mapbar .pbar { flex: 1; margin: 0; }

[data-lang-btn] { font-family: Cairo, Nunito, sans-serif !important; font-weight: 800; font-size: 13px !important; }
.intro-bar [data-a="sound"] { font-size: 15px; font-family: system-ui; }
body.ar .ref span, body.ar .ref h3 { display: block; direction: rtl; text-align: right; }
body.ar .i-head { text-align: left; }
body.ar .work-head { direction: rtl; }
.stat b { direction: ltr; unicode-bidi: isolate; }

/* ---------- stages, picture passwords, My Projects ---------- */
.stage-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; flex-wrap: wrap; }
.stage-head h2 { margin: 0; font-size: 20px; }
.pics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 420px; margin: 16px auto; }
.pic { font-size: 44px; line-height: 1; padding: 14px 0; border-radius: 14px; border: 2px solid var(--line, #33406a); background: rgba(255,255,255,.04); cursor: pointer; }
.pic:hover, .pic:focus-visible { border-color: var(--yellow, #ffd34d); transform: translateY(-2px); }
.level.proj { cursor: default; text-align: start; }
#palette:empty { display: none; }
#palette { margin-bottom: 8px; }
.tiles { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tile { font-size: 20px; width: 38px; height: 38px; border-radius: 9px; border: 2px solid transparent; background: rgba(255,255,255,.06); cursor: pointer; }
.tile.on { border-color: var(--yellow, #ffd34d); background: rgba(255,211,77,.15); }
body.sandbox #hint, body.sandbox #watch, body.sandbox #counter { display: none; }
body.sandbox:not(.viewing) #canvas { cursor: crosshair; }
body.viewing #clear { display: none; }
.level.ai .num { font-size: 15px; }
@media print { .topbar, .credit, .no-print { display: none !important; } body { background: #fff; color: #000; } }

/* ---------- AI Lab ---------- */
.ai-lab { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 26, .82); overflow-y: auto; padding: 24px 16px; }
.ai-box { max-width: 880px; margin: 0 auto; }
.ai-baskets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-basket { border: 2px dashed var(--line); border-radius: 14px; padding: 10px; min-height: 90px; }
.ai-bh { font-weight: 800; margin-bottom: 6px; }
.ai-items, .ai-pool, .ai-tests { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-card { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; font-size: 34px; border-radius: 12px; background: rgba(255,255,255,.07); }
.ai-items .ai-card { cursor: pointer; }
.ai-items .ai-card:hover { outline: 2px solid var(--pink); }
.ai-pick { text-align: center; } .ai-pick .btn { padding: 6px 8px; font-size: 16px; margin: 4px 2px 0; }
.ai-test { text-align: center; padding: 6px; border-radius: 12px; border: 2px solid transparent; }
.ai-test.ok { border-color: var(--green); } .ai-test.bad { border-color: var(--pink); }
.ai-guess { font-weight: 800; margin-top: 4px; }
@media (max-width: 560px) { .ai-baskets { grid-template-columns: 1fr; } }

/* ---------- certificate ---------- */
.cert-page { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.cert { background: #fffdf5; color: #1d2340; border-radius: 18px; padding: 48px 40px; text-align: center; border: 10px double #d9a72b; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.cert h1 { font-size: 30px; color: #b07d0a; margin: 4px 0 18px; }
.cert .who { font-size: 34px; font-weight: 800; margin: 10px 0; border-bottom: 2px solid #d9a72b; display: inline-block; padding: 0 24px 6px; }
.cert .stars { font-size: 28px; color: #e0a400; margin: 10px 0; }
.cert .meta { display: flex; justify-content: space-around; gap: 12px; margin-top: 36px; flex-wrap: wrap; font-size: 14px; }
.cert .meta b { display: block; font-size: 16px; }
.cert .bolt { font-size: 52px; }
@media print { .cert { box-shadow: none; } .cert-page { margin: 0; } @page { size: landscape; margin: 12mm; } }
.ai-box .bubble:empty { display: none; }
.levels > p { grid-column: 1 / -1; }
.stage-head h2 { font-size: 15px; }
.codebox { background: #0d1222; padding: 10px; border-radius: 8px; white-space: pre; overflow-x: auto; font-size: 13px; margin: 6px 0 0; max-width: 360px; }
details.lesson { border-top: 1px solid var(--line); padding: 8px 0; }
details.lesson summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lesson-body { padding: 6px 0 4px 28px; } .lesson-body p { margin: 6px 0; }
@media print { #side, .tabs, .modal { display: none !important; } .card { background: #fff !important; color: #000; box-shadow: none; } details.lesson { break-inside: avoid; } }
/* ---------- course pages ---------- */
.choices.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .choices.three { grid-template-columns: 1fr; } }
.unit { margin-bottom: 8px; }
.level.project { border-color: var(--teal); }
.level.quiz { border-color: var(--blue); }
.level.final { border-color: var(--yellow); background: rgba(255, 210, 63, .08); }
.level.cert-card { text-decoration: none; color: inherit; border: 2px solid var(--yellow); }
.level.cert-card.off { opacity: .55; }
.quiz-code { max-width: none; margin-bottom: 10px; }
.cert .meta { align-items: flex-end; }
.cert .sign { display: flex; flex-direction: column; align-items: center; min-width: 220px; }
.cert .sign img { max-height: 70px; max-width: 220px; }
.cert .sig-script { font-family: "Great Vibes", cursive; font-size: 40px; line-height: 1; color: #1d2b6b; }
.cert .sig-line { display: block; width: 220px; border-top: 1.5px solid #1d2340; margin: 4px 0 6px; }
.cert .muted-dark { display: block; font-size: 12px; color: #6b7290; }

/* Game Designer arrow pad */
.dpad { display: grid; grid-template-columns: repeat(3, 44px); grid-template-areas: "tip tip tip" ". u ." "l d r"; gap: 6px; justify-content: center; margin: 8px 0; }
.dpad .muted { grid-area: tip; text-align: center; font-size: 13px; }
.dpad button { width: 44px; height: 40px; border-radius: 10px; border: 0; background: var(--panel2, #2b3a55); color: #fff; font-size: 18px; cursor: pointer; }
.dpad button:active { transform: scale(.94); }
.dpad [data-d="0"] { grid-area: u; } .dpad [data-d="3"] { grid-area: l; } .dpad [data-d="2"] { grid-area: d; } .dpad [data-d="1"] { grid-area: r; }

/* AI Lab: judge activities */
.ai-cap { display: block; font-size: 11px; font-weight: 800; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.ai-judge { display: flex; flex-direction: column; gap: 8px; }
.ai-jrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 2px solid transparent; }
.ai-jrow.ok { border-color: var(--green); } .ai-jrow.bad { border-color: var(--pink); }
.ai-je { font-size: 26px; } .ai-jt { flex: 1; min-width: 180px; font-weight: 700; } .ai-jb { display: flex; gap: 6px; flex-wrap: wrap; }
