
:root{--ink:#152b47;--muted:#526580;--blue:#176ac5;--green:#008267;--orange:#c55c16;--paper:#f6f9ff;--outline:#d4deec;--shadow:0 10px 32px rgba(30,59,105,.09)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{font:17px/1.55 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;background:var(--paper);color:var(--ink);margin:0}
a{color:#1258b8}button,input,select,textarea{font:inherit}button,.btn{border:0;border-radius:14px;padding:12px 16px;background:#126ac5;color:#fff;font-weight:800;cursor:pointer;text-decoration:none;display:inline-block;text-align:center}
button:hover,.btn:hover{filter:brightness(.96)}button:focus-visible,.btn:focus-visible,a:focus-visible{outline:3px solid #e7a125;outline-offset:3px}
main{max-width:1090px;margin:0 auto;padding:22px 16px 65px}.eyebrow{font-weight:900;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#2765a1}
h1{font-size:clamp(30px,5vw,52px);line-height:1.12;letter-spacing:-.04em;margin:6px 0 14px}h2{font-size:clamp(22px,3vw,32px);letter-spacing:-.025em;line-height:1.2}h3{margin:6px 0;font-size:22px}
.sub{font-size:18px;color:#51647b;max-width:850px}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.card,.paper,.section{background:white;border:1px solid #d9e4f3;border-radius:23px;padding:22px;box-shadow:var(--shadow)}
.card{display:flex;flex-direction:column;align-items:flex-start;gap:7px}.card img{width:100%;height:185px;object-fit:cover;border-radius:16px}
.card .btn{width:100%;margin-top:auto}.num{display:inline-flex;align-items:center;justify-content:center;font-weight:950;border-radius:17px;width:56px;height:56px;font-size:29px;color:white;background:#1973d0;box-shadow:0 5px 11px #0001}
.green .num{background:#008e6e}.orange .num{background:#da6c19}.green .eyebrow{color:#006a52}.orange .eyebrow{color:#aa4914}.green .btn{background:#087d62}.orange .btn{background:#c65e19}
.tag{display:inline-block;padding:4px 10px;background:#e8f4ff;border-radius:99px;color:#15569f;font-size:12px;font-weight:800}
.pills{display:flex;flex-wrap:wrap;gap:8px}.pill{display:inline-block;background:#f1f5fa;border:1px solid #dbe5ee;border-radius:99px;padding:5px 12px;font-size:14px;font-weight:750}
.hero{border-radius:24px;padding:27px;background:linear-gradient(110deg,#ecf5ff,#fef4ed);margin-bottom:20px}.callout{padding:15px 17px;background:#fff9e7;border-left:5px solid #e2ac33;border-radius:11px;margin:18px 0;color:#624313}
.area{margin-top:25px}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.section{margin:19px 0}.section-header{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.big-step{border-radius:14px;padding:11px 14px;font-size:23px;font-weight:900;background:#edf5ff;color:#145696;margin-bottom:15px}
.chips{display:flex;gap:10px;flex-wrap:wrap}.chip{color:#124f91;background:#eaf4ff;border:2px solid #a3c9f1;border-radius:15px;padding:11px 18px;font-size:23px;font-weight:850;cursor:pointer}
.chip.active{background:#0f68be;color:#fff;transform:translateY(-1px)}
textarea{border:2px solid #bdcee1;border-radius:13px;min-height:110px;width:100%;padding:14px;background:#fff;line-height:1.55}
input[type=number]{padding:10px;width:100px;border:2px solid #bed1e6;border-radius:13px}select{padding:10px;border:2px solid #bed1e6;border-radius:13px;max-width:100%}
/* Three-dimensional dice: strong shading, bevelled edges and true spatial rotation. */
.dice-shell{height:160px;display:grid;place-items:center;perspective:650px;background:radial-gradient(circle at center,#fff5d5,#ecf4fe);border-radius:19px;margin:18px 0}
.dice{position:relative;width:102px;height:102px;transform-style:preserve-3d;transform:rotateX(-17deg) rotateY(-22deg);transition:transform .85s cubic-bezier(.2,.75,.2,1);filter:drop-shadow(0 18px 9px #193b5a55)}
.face{position:absolute;inset:0;border-radius:18px;background:linear-gradient(132deg,#fff,#f3f3ee 45%,#cbced5);border:3px solid #dadde0;box-shadow:inset 6px 5px 13px #fff,inset -8px -8px 12px #adb2bd;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);place-items:center;padding:11px}
.face .dot{display:block;width:16px;height:16px;border-radius:50%;background:radial-gradient(circle at 33% 28%,#313e53,#0b1423);box-shadow:inset 2px 2px 2px #0007,1px 1px 2px white}
.face.f1{transform:translateZ(51px)}.face.f2{transform:rotateY(90deg) translateZ(51px)}.face.f3{transform:rotateX(90deg) translateZ(51px)}.face.f4{transform:rotateX(-90deg) translateZ(51px)}.face.f5{transform:rotateY(-90deg) translateZ(51px)}.face.f6{transform:rotateY(180deg) translateZ(51px)}
.recorded{font-size:14px;color:#61758d;margin-top:7px}.large-label{font-size:clamp(28px,4vw,43px);font-weight:900;color:#0f5caa;text-align:center;padding:10px;min-height:60px}
.nav{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:17px 0}.nav .btn{flex:1;min-width:130px}.btn.secondary{background:#e8eef7;color:#20517d}.btn.green{background:#087d62}.btn.orange{background:#c55e16}
.source-image{width:100%;height:auto;display:block;border:1px solid #bac5d3;background:#fff;border-radius:9px}.source-wrap{max-width:830px;margin:0 auto}.original{background:#fff;margin-top:28px;border:3px solid #d8e3ef;border-radius:20px;padding:17px}.original h2{color:#8d4319}.small{font-size:14px;color:var(--muted)}
.page-list{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}.page-link{padding:10px 4px;border-radius:10px;border:1px solid #cce0ef;background:white;text-align:center;text-decoration:none;font-weight:750;font-size:14px}.page-link:hover{background:#eaf6ff}
.progress{height:10px;background:#e5edf6;border-radius:99px;overflow:hidden;margin:16px 0}.progress b{display:block;background:linear-gradient(90deg,#44bf97,#126cbd);height:100%}
.foot{font-size:13px;color:#62738a;padding:23px 0;border-top:1px solid #d7e2f0;margin-top:30px}
@media(max-width:850px){.cards{grid-template-columns:1fr}.card img{height:200px}.page-list{grid-template-columns:repeat(5,1fr)}}
@media(max-width:480px){body{font-size:16px}main{padding:12px 12px 50px}.card,.paper,.section{padding:15px;border-radius:17px}.hero{padding:18px}.page-list{grid-template-columns:repeat(4,1fr)}button,.btn{padding:12px}.dice-shell{height:150px}}

/* V4: delightful, Android-safe dice. The picture is an SVG, not a fragile 3D CSS face. */
.dice-shell{height:216px;min-height:216px;background:radial-gradient(ellipse at 50% 40%,#fff4cb 1%,#e8f4ff 67%,#dceafa 100%);border:2px solid #dcecf8;position:relative;overflow:hidden}
.dice-shell:after{content:'ROLL · LOOK · SAY';font-size:11px;letter-spacing:.14em;position:absolute;right:12px;bottom:8px;color:#557598;font-weight:900}
.dice{width:185px;height:174px;display:flex;align-items:center;justify-content:center;transform:none;transform-style:flat;transition:none;filter:drop-shadow(0 8px 6px #345b7840);will-change:transform}
.die-picture{width:100%;height:100%;overflow:visible;display:block}
.dice.rolling{animation:irislyRoll 3s cubic-bezier(.14,.75,.17,1) 1}
@keyframes irislyRoll{0%{transform:rotate(-12deg) scale(.85)}12%{transform:rotate(56deg) scale(1.1) translateY(-17px)}28%{transform:rotate(179deg) scale(.9) translateY(5px)}46%{transform:rotate(310deg) scale(1.06) translateY(-9px)}64%{transform:rotate(490deg) scale(.93) translateY(0)}81%{transform:rotate(653deg) scale(1.02) translateY(-5px)}100%{transform:rotate(720deg) scale(1)}}
#roll-btn{font-size:21px;background:linear-gradient(130deg,#0764b4,#218ff5);box-shadow:0 4px 0 #004981;border:2px solid #ffffff9c}
#roll-btn:disabled{opacity:.8;cursor:wait}
.chips{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:12px}
.chip{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-height:91px;padding:10px 12px;font-size:clamp(23px,4vw,30px);font-family:'Trebuchet MS',Verdana,sans-serif;font-weight:900;border-radius:18px;box-shadow:0 4px 0 rgba(0,0,0,.08);overflow-wrap:anywhere;line-height:1.25;text-align:center;background:#fff4cc;color:#754417;border-color:#f2bf59}
.chip:nth-child(6n+2){background:#e3f3ff;color:#12558e;border-color:#96caf3}
.chip:nth-child(6n+3){background:#ffe8f1;color:#963869;border-color:#f6b1d0}
.chip:nth-child(6n+4){background:#e6ffe8;color:#16713c;border-color:#94d9a7}
.chip:nth-child(6n+5){background:#eeeaff;color:#504493;border-color:#b9abf4}
.chip:nth-child(6n+6){background:#fff0df;color:#8d5015;border-color:#f6bd79}
.chip.active{background:#124f98;color:white;border-color:#051d49;box-shadow:0 4px 0 #092348}
.chip .speaker{font-size:14px;line-height:1.1;opacity:.8}
#active-word{font-family:'Trebuchet MS',Verdana,sans-serif;background:linear-gradient(90deg,#fff4d5,#e9fcff);color:#1261a1;border-radius:14px;margin:12px 0}
.audio-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:15px}
.audio-controls button{background:#16735c;box-shadow:0 3px 0 #0a4639}
#audio-status{font-size:14px;font-weight:750;min-height:27px;color:#087054;background:#ebfff6;padding:8px 13px;border-radius:10px;margin:11px 0}
#audio-status.error{background:#fff0ed;color:#a3271a}
@media(max-width:500px){.chips{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.chip{min-height:76px;padding:8px 3px;font-size:clamp(18px,5vw,24px)}.die-shell{height:205px;min-height:205px}.dice{width:170px;height:168px}.big-step{font-size:clamp(18px,5.6vw,23px);padding:11px}.section h2{font-size:23px}.audio-controls button{padding:12px}}
@media(prefers-reduced-motion:reduce){.dice.rolling{animation:none}}
