/* Alef Bais with Morah Chanie A"H · styles for the story games (engine.js) */
.arrive{animation:arrive2 .5s ease-out}
@keyframes arrive2{from{transform:translateY(14px);opacity:0}to{transform:none;opacity:1}}
#stage{max-width:760px;margin:0 auto}
/* sort */
.s-wrap{display:flex;flex-direction:column;align-items:center;gap:12px}
.s-item{width:150px;height:150px;border-radius:30px;background:var(--paper);box-shadow:var(--shadow);display:grid;place-items:center;position:relative;z-index:3}
.s-item .big{font-size:96px;line-height:1;padding-top:.12em}
.bins{display:grid;gap:10px;width:100%;max-width:600px}
.bins.b2{grid-template-columns:1fr 1fr}.bins.b3{grid-template-columns:1fr 1fr 1fr}
.bin{border:3px solid transparent;border-radius:24px;padding:10px 6px;min-height:150px;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer;box-shadow:var(--shadow);background:var(--paper);text-align:center}
.bin.c0{background:#fde3d6}.bin.c1{background:#fbe0e6}.bin.c2{background:#e5f1e1}.bin.c3{background:#e1eef8}.bin.c4{background:#fff0cc}.bin.c5{background:#eee6f8}
.bin b{font-size:19px;font-weight:800;line-height:1.15}
.bin .bt{font-size:14.5px;color:var(--soft);line-height:1.2}
.bpic{display:flex;align-items:center;justify-content:center;gap:4px;pointer-events:none}
.bpic img.photo{width:clamp(76px,24vw,112px);height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:16px;margin-bottom:2px}
.bpic svg.hand{width:46px;height:46px}
.bin.glow,.opt.right{border-color:var(--ok)}
.parked{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;min-height:12px;margin-top:2px}
.parked i{width:12px;height:12px;border-radius:50%;display:block}
/* options (letters to tap) */
.opts{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:12px auto 4px;max-width:640px}
.opt{border:3px solid transparent;background:var(--paper);border-radius:22px;box-shadow:var(--shadow);min-width:96px;min-height:96px;padding:6px 14px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;gap:0}
.opt .oc{font-size:64px;line-height:1.05;padding:.1em 0 .28em}
.opt b{font-size:17px;font-weight:800;line-height:1.1}
.opt .os{font-size:14px;color:var(--soft);line-height:1.15}
.opt.c4{background:#fff0cc}.opt.c3{background:#e1eef8}.opt.c2{background:#e5f1e1}.opt.c1{background:#fbe0e6}
/* letters sitting on a line, so a leg below the line shows */
.opts.lined .opt{min-width:104px;min-height:120px}
.opts.lined .opt .oc{display:block;width:100%;border-radius:12px;background:linear-gradient(to bottom,transparent 0,transparent 73%,#7aa6c2 73%,#7aa6c2 calc(73% + 3px),#e4f0f8 calc(73% + 3px))}
.opts.lined .opt .oc{font-size:72px}
/* fill */
.f-wrap{display:flex;flex-direction:column;align-items:center}
.f-card{background:var(--paper);border-radius:28px;box-shadow:var(--shadow);padding:14px 22px;min-width:220px;display:flex;justify-content:center;transition:transform .9s ease-in,opacity .9s}
.f-word{display:flex;gap:2px;justify-content:center;align-items:flex-end;font-size:72px;line-height:1.1}
.f-word .he{padding-top:.08em}
.slot{display:inline-grid;place-items:center;min-width:.62em;height:1.12em;border:4px dashed #e2a23c;border-radius:16px;background:#fff8e6;margin:0 2px}
.slot.filled{border-style:solid;border-color:var(--ok);background:#eaf5e6}
.f-mean{min-height:34px;margin-top:8px;font-size:18px;color:var(--soft);text-align:center}
.f-mean .he{font-size:28px;color:var(--ink);margin-right:6px}
.f-card.locked{box-shadow:0 0 0 5px #a8cfa0,var(--shadow)}
.f-road{position:relative;width:100%;max-width:600px;height:200px;background:linear-gradient(#fff8ee 0 70%,#e9e1d6 70% 100%);border-radius:24px;overflow:hidden}
.f-gate{position:absolute;left:10px;bottom:12px;width:86px;display:flex;flex-direction:column;align-items:center;z-index:1}
.f-gate .gpic img.photo{width:62px;height:62px;object-fit:cover;border-radius:14px}
.f-gate .gch{font-size:46px;line-height:1;background:#fff;border:3px solid #5a463a;border-radius:12px;width:56px;height:74px;display:grid;place-items:center;margin-top:2px}
.f-gate .glbl{font-size:12.5px;font-weight:700;color:var(--soft);line-height:1.1;text-align:center}
.f-car{position:absolute;right:8%;bottom:8px;width:210px;transition:transform 1.3s ease-in,opacity 1.3s;z-index:2}
.f-car .carsvg{width:210px;height:118px;display:block}
.f-car .f-word{position:absolute;left:0;right:0;top:-6px;font-size:44px;background:#fff;border:3px solid #5a463a;border-radius:16px;margin:0 22px;padding:0 4px}
.f-car .slot{border-width:3px;border-radius:10px}
.f-car.leave{transform:translateX(-140vw);opacity:.2}
.f-car.stay{animation:pop .5s}
/* spot */
.spot{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:420px;margin:8px auto}
.tile{position:relative;border:3px solid transparent;background:var(--paper);border-radius:22px;box-shadow:var(--shadow);aspect-ratio:1/1;cursor:pointer;display:grid;place-items:center;padding:0}
.tile .he{font-size:64px;line-height:1;padding-top:.12em}
.tile.found{border-color:#e2a23c;background:#fff0cc}
.tile.nope{background:#f6efe7}
.tile .tag{position:absolute;top:4px;left:8px;font-style:normal;font-size:15px;font-weight:800;color:#c07b5c}
/* path */
.track{display:flex;align-items:center;justify-content:center;gap:6px;margin:6px auto 10px;flex-wrap:nowrap;max-width:100%}
.stone{flex:0 1 46px;height:46px;min-width:30px;border-radius:50%;background:#eadccb;display:grid;place-items:center;position:relative}
.stone .he{font-size:26px;line-height:1;padding-top:.1em}
.stone.done{background:#d6ead2}
.stone.here{background:#fff0cc;box-shadow:0 0 0 3px #e2a23c}
.stone.goal{background:#fbe0e6}
.goalsvg{width:24px;height:24px}
.walker{display:block;width:44px;height:44px;animation:pop .5s}
.walker img.photo,.walker svg{width:44px;height:44px;border-radius:50%;object-fit:cover;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.p-card{max-width:620px;margin:0 auto;background:var(--paper);border-radius:22px;box-shadow:var(--shadow);padding:10px 14px;display:flex;align-items:center;gap:12px}
.ppic img.photo{width:96px;height:96px;object-fit:cover;border-radius:16px;display:block}
.ptxt{display:flex;flex-direction:column;gap:4px;font-size:17px}
.ptxt q{color:var(--soft);quotes:"“" "”"}
.ptxt b{font-size:19px}
/* wheel */
.wheel{position:relative;width:min(92vw,400px);aspect-ratio:1/1;margin:0 auto}
.wsvg{position:absolute;inset:0;width:100%;height:100%}
.seats{position:absolute;inset:0}
.seat{position:absolute;width:21%;aspect-ratio:1/1;margin:-10.5% 0 0 -10.5%;border-radius:50% 50% 40% 40%;border:3px solid #5a463a;background:#fffdf9;display:grid;place-items:center;cursor:pointer;padding:0;box-shadow:var(--shadow)}
.seat .cup{display:none}
.seat .he{font-size:clamp(34px,10vw,52px);line-height:1;padding-top:.12em}
.seat.found{background:#fff0cc;border-color:#e2a23c}
.seat.nope{background:#f3ebe2}
/* memory */
.mem{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:420px;margin:8px auto}
.mcard{border:0;padding:0;background:none;aspect-ratio:1/1;perspective:600px;cursor:pointer}
.mcard .inner{position:relative;display:block;width:100%;height:100%;transition:transform .45s;transform-style:preserve-3d}
.mcard.up .inner{transform:rotateY(180deg)}
.mcard .back,.mcard .face{position:absolute;inset:0;border-radius:18px;display:grid;place-items:center;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-shadow:var(--shadow);overflow:hidden}
.mcard .back{background:#c9b6e4}
.mcard:nth-child(3n+1) .back{background:#f6b89a}.mcard:nth-child(3n+2) .back{background:#9fcbe8}
.mcard .back svg{width:56%;height:56%}
.mcard .face{background:var(--paper);transform:rotateY(180deg)}
.mcard .face img.photo{width:100%;height:100%;object-fit:cover}
.mcard .face .mc{font-size:clamp(46px,13vw,72px);line-height:1;padding-top:.12em}
.mcard.got .face{box-shadow:0 0 0 4px var(--ok)}
/* build */
.b-wrap{display:flex;flex-direction:column;align-items:center;gap:10px}
.frame{width:min(70vw,260px);aspect-ratio:1/1;background:var(--paper);border-radius:30px;box-shadow:var(--shadow);position:relative}
.frame svg{width:100%;height:100%;display:block}
.frame .pt{opacity:.12;transition:opacity .5s}
.frame .pt.on{opacity:1}
.frame .pt .lb{opacity:0;transition:opacity .4s}
.frame .pt.on .lb{opacity:1}
.frame.quiz .pt{cursor:pointer}
.frame .pt.pulse{animation:pop .6s}
.frame.glow .slideglow{animation:glowup 1.6s ease-in-out}
.slideglow{opacity:0}
@keyframes glowup{0%{opacity:0;stroke-dashoffset:120}30%{opacity:1}100%{opacity:0;stroke-dashoffset:0}}
.b-side{width:100%;max-width:620px}
.opt.part{flex-direction:column;min-width:120px}
.opt.part svg{width:70px;height:70px}
@media (min-width:900px){.s-item{width:170px;height:170px}.s-item .big{font-size:110px}.f-word{font-size:84px}}
@media (orientation:landscape) and (max-height:500px){
 .gtitle p{display:none}.gtitle h1{font-size:26px}.quote{margin:6px auto;font-size:16px}
 .s-wrap{flex-direction:row;justify-content:center;align-items:center}.s-item{width:120px;height:120px;flex:0 0 auto}.s-item .big{font-size:76px}
 .bins{max-width:560px}.bin{min-height:120px;padding:6px}.bpic img.photo{width:66px}
 .opt{min-width:84px;min-height:80px}.opt .oc{font-size:52px}.opts.lined .opt{min-height:100px}.opts.lined .opt .oc{font-size:60px}
 .f-word{font-size:56px}.f-road{height:170px}
 .spot{grid-template-columns:repeat(6,minmax(0,1fr));max-width:640px}.tile .he{font-size:46px}
 .p-card{padding:6px 12px}.ppic img.photo{width:64px;height:64px}.ptxt{font-size:15px}.ptxt b{font-size:17px}.opts{margin-top:6px}
 .wheel{width:min(60vh,250px)}
 .mem{grid-template-columns:repeat(6,minmax(0,1fr));max-width:600px}
 .b-wrap{flex-direction:row;justify-content:center}.frame{width:200px;flex:0 0 auto}
 .track{margin:2px auto 6px}.stone{height:38px;flex-basis:38px}.walker,.walker img.photo{width:36px;height:36px}
}
@media (min-width:700px) and (min-height:600px){.mem{grid-template-columns:repeat(4,minmax(0,1fr));max-width:560px}.spot{max-width:480px}}
.note{max-width:620px;margin:8px auto;text-align:center;color:var(--soft);font-size:17px}
.note .he{font-size:26px;color:var(--ink)}
