:root{--ink:#161c37;--muted:#69718a;--purple:#7456ed;--line:#e2e4ee;--surface:#fff;--bg:#f5f5fb;--lime:#c9f07c;--p0:#8059ef;--p1:#16a18c;--p2:#ec9354;font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #977fff;outline-offset:3px}button:disabled{cursor:default}button[hidden],[hidden]{display:none!important}p{line-height:1.55}#app{min-height:100dvh}.top{height:74px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(28px,calc((100% - 1180px)/2));gap:16px}.brand{border:0;background:none;display:flex;align-items:center;gap:10px;text-align:left;font-size:19px;font-weight:800;color:var(--ink);letter-spacing:-.7px;padding:0}.brand b{color:var(--purple)}.brand small{font-size:8px;letter-spacing:1.6px;display:block;color:#8b91a4}.brand-icon{display:grid;place-items:center;color:#fff;background:var(--purple);border-radius:12px;width:42px;height:42px;font-size:27px}.top-right,.toolbar-right{display:flex;align-items:center;gap:14px}.top-hint,.eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:900;color:#7e6ac5}.top-hint{color:#9da2b3}.btn{border:0;border-radius:11px;min-height:46px;padding:10px 18px;font-weight:800}.btn.light{background:var(--purple);color:#fff}.btn.ghost{background:#eeedf8;color:#4d4780}.btn.small{min-height:38px;padding:8px 13px;font-size:12px}.btn:active,.game-tile:active,.choice:active{transform:scale(.98)}.page,.study-page{max-width:1180px;margin:auto;padding:28px 28px 60px}.hero{min-height:265px;background:#171d3b;border-radius:25px;padding:36px 40px;color:#fff;position:relative;overflow:hidden;display:flex;justify-content:space-between}.hero>div:first-child{position:relative;z-index:1}.hero .eyebrow{color:#b7a7ff}.hero h1{font-size:clamp(40px,6vw,62px);letter-spacing:-2.5px;line-height:1.02;margin:15px 0}.hero h1 em{color:var(--lime);font-style:normal}.hero p{max-width:490px;color:#c6c9df;font-size:15px;margin:0}.chips{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}.chips span{border:1px solid #474b66;padding:8px 11px;border-radius:20px;font-size:11px;color:#e7e6f4;font-weight:bold}.hero-art{width:320px;position:relative;align-self:stretch;flex:none}.orbit{position:absolute;border:1px solid #77719a55;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%)}.orbit1{width:215px;height:215px}.orbit2{width:150px;height:150px}.hero-core{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-10deg);width:100px;height:100px;border-radius:32px;background:#bdf080;color:#28312c;font-size:76px;display:grid;place-items:center}.float{position:absolute;display:grid;place-items:center;width:50px;height:50px;border-radius:16px;font-weight:900;font-size:23px}.f1{left:30px;top:15px;background:#a993ff;color:#3e2a79;transform:rotate(-12deg)}.f2{right:27px;top:22px;background:#ffc989;color:#7a502c;transform:rotate(12deg)}.f3{left:30px;bottom:12px;background:#8ae5d4;color:#126a5d;transform:rotate(10deg)}.f4{right:28px;bottom:8px;background:#fff;color:#5b4db3;transform:rotate(-10deg)}.setup{background:#fff;border:1px solid var(--line);border-radius:22px;padding:23px;margin-top:22px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-title h2,.study-callout h2{font-size:24px;letter-spacing:-.7px;margin:6px 0 0}.count-switch{display:flex;background:#f1effa;padding:4px;border-radius:12px}.count-switch button{border:0;background:transparent;border-radius:9px;padding:9px 13px;color:#726d8e;font-weight:800;font-size:12px}.count-switch button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 2px 7px #12142c12}.name-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:18px}.name-grid label{font-size:11px;font-weight:800;color:#70758a}.name-grid input{display:block;width:100%;margin-top:7px;background:#f9f9fd;border:1px solid #dddfea;border-radius:10px;padding:11px 12px;color:var(--ink)}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--color)}.p0{--color:var(--p0)}.p1{--color:var(--p1)}.p2{--color:var(--p2)}.setup-help{font-size:12px;color:var(--muted);margin:12px 0 0}.games-section{margin-top:33px}.tiny{font-size:11px;color:#858b9d;font-weight:700}.game-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:17px}.game-tile{text-align:left;border:1px solid var(--line);background:#fff;border-radius:19px;padding:20px;min-height:180px;display:flex;flex-direction:column;color:var(--ink);transition:box-shadow .2s,transform .2s}.game-tile:hover{box-shadow:0 10px 25px #22234212;transform:translateY(-2px)}.tile-top{display:flex;justify-content:space-between;align-items:center}.tile-icon{width:46px;height:46px;display:grid;place-items:center;font-size:24px;border-radius:14px;background:var(--tint);color:var(--accent);font-weight:900}.tile-tag{font-size:9px;letter-spacing:1px;font-weight:900;color:#8f94a6;text-transform:uppercase}.game-tile h3{margin:16px 0 5px;font-size:18px}.game-tile p{margin:0;font-size:12px;line-height:1.5;color:var(--muted)}.tile-arrow{margin-top:auto;color:var(--accent);font-weight:900;font-size:13px;padding-top:12px}.study-callout{display:flex;justify-content:space-between;align-items:center;gap:20px;background:#e7e2fa;border-radius:20px;margin-top:23px;padding:24px}.study-callout p{font-size:13px;margin:7px 0 0;color:#686787}
/* playing */
.game-page{max-width:1200px;margin:auto;padding:16px 24px 50px}.game-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px}.game-title{font-weight:900;letter-spacing:-.4px;margin-left:12px}.game-help{color:var(--muted);font-size:12px;margin:12px 0}.player-bar{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;gap:9px;margin-bottom:14px}.player{border:1px solid var(--line);border-radius:13px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;min-width:0;border-left:5px solid var(--color)}.player.active{box-shadow:0 0 0 2px var(--color);background:#fff}.player-name{font-size:13px;font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-state{font-size:9px;color:#888ca0;text-transform:uppercase;letter-spacing:.7px}.player-score{font-weight:900;font-size:23px;color:var(--color)}.center-stage{max-width:850px;margin:auto}.stage-card,.result-card{border:1px solid var(--line);border-radius:23px;background:#fff;padding:26px}.stage-card .eyebrow{display:block}.stage-card h2{font-size:clamp(21px,2.6vw,30px);line-height:1.25;letter-spacing:-.6px;margin:9px 0}.stage-card p{color:var(--muted);margin:7px 0}.choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.choice{border:1.5px solid #dedfeb;border-radius:13px;background:#f9f9fe;color:var(--ink);padding:14px;text-align:left;min-height:62px;font-size:15px;line-height:1.35;font-weight:700}.choice:hover{border-color:#a799f0;background:#f2efff}.choice.true,.choice.false{text-align:center;font-size:19px;min-height:70px}.question-tip{font-size:12px;color:#888ca0;margin-top:13px}.route{display:grid;gap:10px}.route-row{display:grid;grid-template-columns:minmax(90px,130px) 1fr;align-items:center;gap:10px}.route-name{color:var(--color);font-weight:900;font-size:13px;overflow:hidden;text-overflow:ellipsis}.track{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.space{border-radius:12px;background:#e8e9f1;border:1px dashed #ced0df;min-height:55px;display:flex;align-items:center;justify-content:center;color:#9297a9;font-weight:900}.space.current{background:var(--color);border-style:solid;border-color:var(--color);color:#fff;box-shadow:0 4px 0 #00000012}.space.passed{background:#fff;border-style:solid}.board-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.board-header h2{margin:0;font-size:20px}.board-start{margin-top:17px;display:flex;align-items:center;justify-content:space-between;gap:12px}.board-start p{font-size:13px;color:var(--muted);margin:0}.table-board{position:relative}.seating{display:flex;justify-content:center;gap:10px;font-size:11px;color:#787d91;margin:4px 0 10px}.seating span{background:#fff;padding:7px 12px;border-radius:9px;border:1px solid var(--line)}.seating .north{transform:rotate(180deg)}.table-note{font-size:11px;color:#7d8193;text-align:center;margin:8px 0}.memory-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.memory-card{position:relative;min-width:0;min-height:90px;height:clamp(95px,calc((100dvh - 290px)/4),170px);border:0;border-radius:13px;background:#292f55;color:white;padding:9px;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.25;overflow-wrap:anywhere}.memory-card.definition{background:#e6e1fb;color:#5d4ca6;border:1px solid #d6ceef}.memory-card .kind{position:absolute;top:8px;left:10px;font-size:9px;letter-spacing:.8px;font-weight:900}.memory-card .card-num{position:absolute;top:8px;right:10px;opacity:.7;font-size:10px}.memory-card .back-icon{font-size:25px;font-weight:900}.memory-card.open{background:white;color:var(--ink);border:2px solid #b8a9f2;font-size:clamp(10px,1.2vw,14px);font-weight:700;padding-top:22px;box-shadow:0 2px 0 #e4e1ef}.memory-card.matched{background:#e7f4e9;border:1px solid #b1d6bb;color:#35654b}.memory-card .claim{font-size:11px;color:#3a7750;font-weight:900}.memory-status{display:flex;justify-content:space-between;gap:12px;font-size:13px;font-weight:800;margin:8px 0}.order-bank,.order-answer{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}.word-pill{border:1px solid #d8d4eb;background:#f5f2ff;border-radius:10px;padding:11px 14px;color:#463b83;font-weight:800;min-height:44px}.order-answer{min-height:58px;background:#f5f5fa;border:1px dashed #d5d5e4;border-radius:12px;padding:9px}.order-answer .word-pill{background:#e6e0ff}.order-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.result-card h2{font-size:30px;margin:8px 0}.result-card .ranking{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.rank-chip{border-left:5px solid var(--color);background:#f4f4fa;border-radius:10px;padding:10px 14px;font-size:14px;font-weight:bold}.review-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.review-item{background:#f7f6fc;padding:12px;border-radius:10px;font-size:12px;line-height:1.5}.review-item strong{display:block}.result-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}
.modal{position:fixed;inset:0;background:#0b102ab8;display:flex;align-items:center;justify-content:center;z-index:20;padding:20px}.modal-card{width:min(640px,calc(100vw - 40px));max-height:calc(100dvh - 40px);overflow:auto;background:#fff;border-radius:22px;padding:24px;box-shadow:0 15px 60px #0d112c50;transform-origin:center}.modal-card h2{font-size:clamp(21px,3vw,28px);line-height:1.2;margin:8px 0}.modal-card p{color:#626981;font-size:14px;line-height:1.55}.modal-card .btn{width:100%;margin-top:10px}.modal-card .choices .choice{font-size:14px}.modal-card .choices .btn{margin:0}.modal-card.face-top{transform:rotate(180deg)}.modal-card.face-left{width:min(620px,calc(100dvh - 60px));max-height:calc(100vw - 60px);transform:rotate(-90deg);flex:none}.modal-card .turn-pill{display:inline-block;background:#eeeaff;color:#614ac2;font-size:11px;font-weight:900;padding:7px 10px;border-radius:20px}.correct{color:#21876c}.incorrect{color:#b35b38}.answer-note{background:#f1eefc;padding:14px;border-radius:12px;color:#3e3b5d!important}.study-page{max-width:930px}.study-page .section-title p{color:var(--muted);font-size:13px;margin:6px 0}.study-controls{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0 12px}.filter{border:1px solid #dcdbea;background:#fff;border-radius:10px;padding:10px 13px;color:#686c84;font-weight:800;font-size:12px}.filter.active{background:#262b4f;color:#fff}.study-card{border:1px solid #deddec;border-radius:25px;min-height:330px;background:white;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:30px}.study-card h2{font-size:clamp(28px,5vw,43px);margin:12px 0}.study-card p{max-width:610px;font-size:18px;color:#5e647c}.study-nav{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:14px}.order-callout{margin-top:22px;padding:20px;border-radius:17px;background:#e8e4fa}.order-callout p{font-size:14px;line-height:1.8;margin-bottom:0}.notes{border-top:1px solid var(--line);margin-top:26px;padding-top:18px}.notes summary{font-weight:800;cursor:pointer}.notes-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
@media(max-width:700px){.top{height:64px;padding:0 16px}.top-hint{display:none}.brand{font-size:16px}.brand-icon{width:36px;height:36px}.page,.study-page{padding:18px 15px 45px}.hero{padding:26px;min-height:230px}.hero-art{width:110px;opacity:.45;position:absolute;right:0;top:0;height:100%}.hero-core{width:70px;height:70px;font-size:54px}.orbit1{width:150px;height:150px}.orbit2{width:110px;height:110px}.float{display:none}.hero h1{font-size:43px}.hero p{max-width:300px}.game-grid{grid-template-columns:1fr 1fr;gap:10px}.game-tile{padding:15px;min-height:170px}.name-grid{gap:8px}.name-grid input{padding:9px 7px;font-size:12px}.section-title h2,.study-callout h2{font-size:20px}.setup{padding:17px}.study-callout{align-items:flex-start;flex-direction:column}.game-page{padding:12px 12px 40px}.game-title{font-size:14px;margin-left:5px}.toolbar-right{gap:4px}.player{padding:8px 7px}.player-name{font-size:11px}.player-score{font-size:20px}.choices{grid-template-columns:1fr}.stage-card,.result-card{padding:18px}.memory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.memory-card{height:120px}.route-row{grid-template-columns:75px 1fr}.space{min-height:44px}.modal-card{padding:18px}.modal-card .choices{grid-template-columns:1fr}.modal-card.face-left .choices{grid-template-columns:1fr 1fr}.review-list,.notes-grid{grid-template-columns:1fr}}
@media(min-width:700px) and (min-height:650px){body:has(#game:not([hidden])) .top{height:55px}.game-page{padding-top:10px}.game-help{margin:6px 0}.player-bar{margin-bottom:8px}.player{padding-top:7px;padding-bottom:7px}.memory-card{height:clamp(90px,calc((100dvh - 245px)/4),165px)}.memory-status{margin:6px 0}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.table-layout{width:min(100%,980px);margin:0 auto;display:grid;grid-template-columns:76px minmax(0,1fr) 76px;grid-template-rows:56px auto 56px;grid-template-areas:'. top .' 'left center .' '. bottom .';gap:7px;align-items:stretch}.table-center{grid-area:center}.seat-top{grid-area:top;transform:rotate(180deg);display:flex;justify-content:center}.seat-bottom{grid-area:bottom;display:flex;justify-content:center}.seat-left{grid-area:left;position:relative}.seat-left .seat-button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-90deg)}.seat-button{background:#fff;border:2px solid var(--color);border-radius:12px;padding:7px 15px;min-width:170px;height:52px;color:var(--color);font-weight:900;font-size:13px;white-space:nowrap}.seat-button small{display:block;font-size:9px;letter-spacing:.8px;margin-top:2px}.seat-button.seat-active{color:white;background:var(--color);box-shadow:0 4px 0 #0002}.seat-button:disabled{opacity:.72}@media(max-width:700px){.table-layout{grid-template-columns:50px minmax(0,1fr) 8px;grid-template-rows:52px auto 52px}.table-center .stage-card{padding:12px}.table-center .route-row{grid-template-columns:60px 1fr}.table-center .space{min-height:36px}.seat-button{height:48px;min-width:150px}}

.modal-exit{position:absolute;top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));z-index:2;background:#fff;color:#302957;box-shadow:0 2px 12px #1114;min-height:44px}
.voice-toggle{background:#ece6ff;color:#6443c4;white-space:nowrap}.voice-toggle[aria-pressed=true]{color:#fff;background:#7456ed;box-shadow:0 0 0 3px #7456ed1a}.voice-coach{margin-top:16px;border:1px solid #d7cdf5;background:linear-gradient(120deg,#f4f0ff,#f6fbff);border-radius:16px;padding:13px;text-align:left;box-shadow:0 3px 0 #e6dff333}.voice-tools{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.voice-badge{font-size:9px;letter-spacing:1px;font-weight:900;color:#795bb6;display:flex;align-items:center;gap:7px;margin-right:auto}.voice-orb{display:grid;place-items:center;width:29px;height:29px;background:#7b5be8;color:#fff;border-radius:50%;font-size:17px}.voice-btn{border:1px solid #d9d3ed;border-radius:10px;background:#fff;color:#514270;padding:9px 12px;font-weight:800;font-size:12px;min-height:40px}.voice-btn:disabled{opacity:.5}.voice-btn.mic-btn{background:#6549ce;color:#fff;border-color:#6549ce}.voice-status{font-size:12px!important;line-height:1.4;color:#6b6185;margin-top:9px}.heard{background:#fff;border:1px solid #e1dbef;border-radius:10px;padding:10px;margin-top:9px;line-height:1.45}.heard small{font-size:9px;letter-spacing:1px;font-weight:900;color:#8d79ac;display:block;margin-bottom:4px}.heard span{font-size:14px;color:#403456}.voice-use{font-size:13px;min-height:44px}.voice-fallback{font-size:11px;margin-top:9px;color:#79698a}.voice-fallback summary{cursor:pointer}.voice-fallback>div{display:flex;gap:7px;margin-top:8px}.voice-fallback input{min-width:0;flex:1;width:100%;padding:10px;border-radius:9px;border:1px solid #ccc2e2;color:#3e3455;font-size:14px}.listening{border-color:#e97093;background:linear-gradient(120deg,#fff1f6,#f4edff)}.listening .voice-orb{background:#d85788;animation:micpulse 1s infinite}.speaking .voice-orb{animation:micpulse 1.6s infinite}.voice-info{margin-top:12px;font-size:12px;color:#75718b;line-height:1.5}.voice-info summary{cursor:pointer;font-weight:800}.voice-info p{margin-bottom:0;font-size:12px}.option-number{display:inline-grid;place-items:center;background:#e8e2f8;color:#7257b6;border-radius:7px;width:24px;height:24px;font-size:12px;font-weight:900;margin-right:8px;vertical-align:middle;flex:none}.modal-card .voice-coach .voice-btn{margin:0;width:auto}.modal-card .voice-coach .voice-use{margin-top:8px}.top:has(#voiceToggle[aria-pressed=true]) .top-hint{display:none}@keyframes micpulse{50%{box-shadow:0 0 0 6px #af8be322;transform:scale(1.07)}}
@media(min-width:700px) and (min-height:650px){body:has(#voiceToggle[aria-pressed=true]) .memory-card{height:clamp(72px,calc((100dvh - 380px)/4),145px)}body:has(#voiceToggle[aria-pressed=true]) #gameBody>.voice-coach{margin-top:9px;padding:9px}}
@media(max-width:700px){.top-right{gap:5px}.top .btn{padding:8px 10px;font-size:11px}.brand{font-size:14px}.brand-icon{width:30px;height:30px;font-size:21px}.voice-tools{gap:5px}.voice-badge{width:100%;margin-bottom:4px}.voice-btn{padding:9px;font-size:11px}.voice-coach{padding:10px}.modal-card .voice-badge{width:auto}.modal-card.face-left .voice-badge{width:100%}}
