
:root{--night:#1e2a78;--violet:#5b3cc4;--gold:#f59f00;--sun:#ffd43b;--pink:#ff6b9a;--sky:#4dabf7;--green:#2b8a3e;--ink:#1d1d35;--bg:#fffdf5;--fs:18px}
*{box-sizing:border-box}
html{font-size:var(--fs)}
body{margin:0;font-family:'Heebo','Assistant','Noto Sans Hebrew','Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.65}
a{color:#3b2a8f}
a:focus,button:focus,[tabindex]:focus{outline:4px solid #ff922b;outline-offset:2px}
.skip{position:absolute;right:-999px;top:0;background:#000;color:#fff;padding:8px 14px;z-index:99}
.skip:focus{right:8px}
header.top{background:linear-gradient(135deg,#141c5c,#1e2a78 35%,#5b3cc4 75%,#f59f00);color:#fff;position:relative;overflow:hidden}
header.top::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 12% 30%,rgba(255,230,120,.35),transparent 25%),radial-gradient(circle at 85% 70%,rgba(255,255,255,.18),transparent 20%);pointer-events:none}
.bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 14px;position:relative;z-index:2}
.brand{font-weight:900;font-size:1.15rem;color:#fff;text-decoration:none;margin-left:auto}
.tools{display:flex;gap:6px;flex-wrap:wrap}
.tools button,.tools a.tbtn{background:rgba(255,255,255,.18);color:#fff;border:2px solid rgba(255,255,255,.5);border-radius:12px;min-width:44px;min-height:44px;font-size:1rem;cursor:pointer;padding:0 10px;font-family:inherit;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.stars{background:#ffd43b;color:#3b2a8f;border-radius:20px;padding:4px 12px;font-weight:800}
.trackbadge{background:#fff;color:#3b2a8f;border-radius:20px;padding:4px 12px;font-weight:800;text-decoration:none}
nav.main{background:rgba(0,0,0,.18);padding:6px 10px;position:relative;z-index:2}
nav.main ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
nav.main a{display:inline-block;color:#fff;text-decoration:none;padding:6px 11px;border-radius:12px;font-weight:600;font-size:.92rem;min-height:40px}
nav.main a[aria-current=page],nav.main a:hover{background:#fff;color:#3b2a8f}
#menuBtn{display:none}
@media (max-width:760px){#menuBtn{display:inline-flex}nav.main{display:none}nav.main.open{display:block}nav.main ul{flex-direction:column}nav.main a{display:block}}
.crumbs{padding:8px 16px;font-size:.9rem;background:#f3f0ff}
.crumbs a{text-decoration:none}
main{max-width:1050px;margin:0 auto;padding:16px}
h1{font-size:2rem;line-height:1.25;color:#3b2a8f;margin:.4em 0}
h2{font-size:1.45rem;color:#5b3cc4;margin:1.2em 0 .5em}
h3{font-size:1.2rem;margin:.6em 0 .3em}
.hero{display:grid;grid-template-columns:1.3fr 1fr;gap:16px;align-items:center;background:linear-gradient(160deg,#fff7d6,#ffe8f0 60%,#e7f0ff);border-radius:28px;padding:22px;box-shadow:0 10px 30px rgba(91,60,196,.15)}
.hero h1{font-size:2.3rem;margin-top:0}
.hero svg{width:100%;height:auto}
@media (max-width:760px){.hero{grid-template-columns:1fr}.hero h1{font-size:1.8rem}}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.card{background:#fff;border-radius:22px;padding:16px;box-shadow:0 6px 18px rgba(30,42,120,.12);border:3px solid transparent;text-decoration:none;color:var(--ink);display:block;transition:transform .15s}
a.card:hover{transform:translateY(-3px);border-color:#ffd43b}
.card .em{font-size:2.6rem;line-height:1.1;display:block}
.card h3{margin:.3em 0;color:#3b2a8f}
.c1{background:linear-gradient(160deg,#fff,#fff4d6)}.c2{background:linear-gradient(160deg,#fff,#ffe3ec)}.c3{background:linear-gradient(160deg,#fff,#e3f0ff)}.c4{background:linear-gradient(160deg,#fff,#e6fcf0)}.c5{background:linear-gradient(160deg,#fff,#f1e8ff)}
.tracks{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media (max-width:760px){.tracks{grid-template-columns:1fr}}
.tile{border:none;font-family:inherit;font-size:1.1rem;cursor:pointer;border-radius:24px;padding:18px;text-align:center;color:#fff;min-height:120px;box-shadow:0 8px 20px rgba(0,0,0,.15)}
.tile b{display:block;font-size:1.4rem}
.tile .em{font-size:2.4rem;display:block}
.t-reg{background:linear-gradient(140deg,#5b3cc4,#845ef7)}.t-hanam{background:linear-gradient(140deg,#2b8a3e,#51cf66)}.t-olim{background:linear-gradient(140deg,#1971c2,#4dabf7)}
.tile[aria-pressed=true]{outline:6px solid #ffd43b}
.box{background:#fff;border-radius:20px;padding:14px 18px;box-shadow:0 4px 14px rgba(30,42,120,.1);margin:12px 0}
.info{background:#fff9db;border:3px solid #ffd43b;border-radius:18px;padding:12px 16px;margin:12px 0}
.tip{background:#ebfbee;border:3px dashed #2b8a3e;border-radius:18px;padding:12px 16px;margin:12px 0}
.warn{background:#fff0f0;border:3px solid #ff8787;border-radius:18px;padding:12px 16px;margin:12px 0}
.story{background:#f8f4ff;border:3px solid #b197fc;border-radius:22px;padding:16px 20px;margin:12px 0;font-size:1.12rem;line-height:1.9}
.story h3{color:#3b2a8f;font-size:1.35rem}
.poem{background:#e7f5ff;border:3px solid #74c0fc;border-radius:22px;padding:16px;text-align:center;font-size:1.15rem;line-height:1.9;margin:12px 0}
table{border-collapse:collapse;width:100%;background:#fff;border-radius:12px;overflow:hidden;margin:10px 0}
th,td{border:2px solid #e5dbff;padding:8px 10px;text-align:right;vertical-align:top}
th{background:#ede7ff}
.tablewrap{overflow-x:auto}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:48px;padding:8px 18px;border-radius:16px;border:none;background:#5b3cc4;color:#fff;font-weight:800;font-size:1rem;cursor:pointer;text-decoration:none;font-family:inherit}
.btn.alt{background:#ffd43b;color:#3b2a8f}.btn.green{background:#2b8a3e}.btn.ghost{background:#fff;color:#3b2a8f;border:3px solid #b197fc}
.practice{background:linear-gradient(160deg,#fff,#fff3e0);border:3px solid #ff922b;border-radius:22px;padding:14px 18px;margin:22px 0}
.practice h2{margin-top:0;color:#d9480f}
.prow{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:6px 0;border-bottom:1px dashed #ffc078}
.prow:last-child{border-bottom:none}
.prow .lab{min-width:150px;font-weight:800}
.prow a{min-height:44px;display:inline-flex;align-items:center;padding:4px 14px;border-radius:12px;background:#fff;border:2px solid #ff922b;text-decoration:none;font-weight:700;color:#d9480f}
.pn{display:flex;justify-content:space-between;gap:10px;margin:24px 0;flex-wrap:wrap}
footer{background:#1e2a78;color:#fff;padding:18px;margin-top:30px;font-size:.92rem}
footer a{color:#ffd43b}
.only-reg,.only-easy,.only-hanam,.only-olim{display:none}
body.tr-reg .only-reg,body.tr-hanam .only-easy,body.tr-olim .only-easy,body.tr-hanam .only-hanam,body.tr-olim .only-olim{display:block}
.vd{border-bottom:3px dotted #1971c2;cursor:pointer;background:none;border-top:0;border-left:0;border-right:0;font:inherit;color:inherit;padding:0}
body.tr-olim .vd{background:#e7f5ff;border-radius:6px}
#vdpop{position:fixed;z-index:50;background:#fff;border:4px solid #1971c2;border-radius:20px;padding:12px 18px;box-shadow:0 10px 30px rgba(0,0,0,.25);text-align:center;display:none;font-size:1.3rem}
#vdpop .e{font-size:3.5rem;display:block}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{background:#fff;border:2px solid #ffd43b;border-radius:16px;padding:4px 12px}
.say{background:#e7f5ff;border:2px solid #74c0fc;color:#1864ab;border-radius:12px;min-width:44px;min-height:44px;cursor:pointer;font-size:1.1rem}
/* games */
.game{background:#fff;border-radius:24px;padding:16px;box-shadow:0 8px 24px rgba(91,60,196,.15);max-width:720px;margin:0 auto}
.gtop{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.prog{height:12px;background:#f1f3f5;border-radius:10px;overflow:hidden;flex:1;min-width:120px}
.prog i{display:block;height:100%;background:linear-gradient(90deg,#ffd43b,#ff922b);width:0;transition:width .3s}
.scen{font-size:1.25rem;font-weight:700;background:#f8f4ff;border-radius:18px;padding:14px;text-align:center}
.scen .big{font-size:3rem;display:block}
.opts{display:grid;gap:10px;margin-top:12px}
.opt{min-height:56px;border-radius:18px;border:3px solid #d0bfff;background:#fff;font-size:1.1rem;font-family:inherit;font-weight:700;cursor:pointer;padding:8px 12px;color:var(--ink);touch-action:manipulation}
.opt:hover{border-color:#845ef7}
.opt.ok{background:#d3f9d8;border-color:#2b8a3e}.opt.no{background:#ffe3e3;border-color:#e03131}
.fb{min-height:2.2em;font-weight:800;margin-top:10px;text-align:center}
.fb.ok{color:#2b8a3e}.fb.no{color:#c92a2a}
.slots{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin:12px 0;direction:rtl}
.slot{width:52px;height:58px;border-bottom:4px solid #5b3cc4;font-size:2rem;font-weight:900;text-align:center;background:#f8f4ff;border-radius:10px 10px 0 0}
.letters{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.letter{width:58px;height:58px;font-size:1.8rem;font-weight:900;border-radius:14px;border:3px solid #ffd43b;background:#fff9db;cursor:pointer;font-family:inherit;touch-action:manipulation}
.letter:disabled{opacity:.3}
.done{text-align:center;font-size:1.4rem;font-weight:900;color:#3b2a8f}
.done .big{font-size:4rem;display:block}
.builder{display:grid;gap:12px}
.builder fieldset{border:3px solid #e5dbff;border-radius:18px;padding:8px 12px}
.builder legend{font-weight:900;color:#5b3cc4;padding:0 6px}
.pick{display:flex;flex-wrap:wrap;gap:8px}
.pick button{min-height:48px;border-radius:14px;border:3px solid #d0bfff;background:#fff;font-family:inherit;font-size:1rem;cursor:pointer;padding:6px 12px;font-weight:600;touch-action:manipulation}
.pick button[aria-pressed=true]{background:#5b3cc4;color:#fff;border-color:#5b3cc4}
.note{background:#fff9db;border:4px dashed #f59f00;border-radius:20px;padding:16px;font-size:1.25rem;font-weight:700;min-height:90px}
.pocketlist{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.pocketlist div{background:#fff;border:2px solid #ffd43b;border-radius:12px;padding:6px 10px}
/* deck */
.deck{background:linear-gradient(150deg,#141c5c,#3b2a8f 55%,#845ef7);color:#fff;border-radius:26px;padding:20px;min-height:420px;position:relative;display:flex;flex-direction:column;justify-content:center;box-shadow:0 12px 30px rgba(20,28,92,.35)}
.deck .se{font-size:4rem;line-height:1}
.deck h2{color:#ffd43b;font-size:1.9rem;margin:.2em 0}
.deck ul{font-size:1.25rem;line-height:1.8}
.deck .q{background:rgba(255,255,255,.14);border-radius:16px;padding:10px 14px;font-weight:700;margin-top:8px}
.deck .rv{background:#ffd43b;color:#3b2a8f;border-radius:16px;padding:10px 14px;font-weight:800;margin-top:8px}
.dnav{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px;flex-wrap:wrap}
.dots{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.dots button{width:16px;height:16px;border-radius:50%;border:none;background:#d0bfff;cursor:pointer;padding:0}
.dots button[aria-current=true]{background:#f59f00}
.candles{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin:10px 0}
.candles button{width:62px;min-height:110px;border-radius:14px;border:3px solid #ffd43b;background:#fff;cursor:pointer;font-family:inherit;font-size:.8rem;padding:4px;touch-action:manipulation}
.candles button .f{font-size:1.8rem;display:block;filter:grayscale(1);opacity:.35}
.candles button[aria-pressed=true]{background:#fff3bf}
.candles button[aria-pressed=true] .f{filter:none;opacity:1}
body.contrast{--bg:#fff;background:#fff;color:#000}
body.contrast header.top{background:#000}
body.contrast .card,body.contrast .story,body.contrast .poem,body.contrast .info,body.contrast .tip{background:#fff!important;border:3px solid #000!important}
body.embed header.top,body.embed .crumbs,body.embed footer,body.embed .pn,body.embed .practice,body.embed .noembed{display:none!important}
body.embed main{padding:8px}
@media print{header.top,nav,.crumbs,.pn,footer,.tools{display:none}}
