:root{color-scheme:dark;--bg:#17171d;--surface:#202027;--surface2:#292830;--text:#e7e3ea;--muted:#b8b5c0;--dim:#85818d;--purple:#c9a7ff;--green:#b8d9c0;--blue:#a9d6e5;--yellow:#e8d9a7;--gold:#d8b47a;--red:#dfa3a8;--line:rgba(231,227,234,.1);--mono:ui-monospace,"SFMono-Regular","Cascadia Code",Consolas,monospace;font-family:var(--mono),"Noto Sans TC",ui-sans-serif,system-ui,-apple-system,sans-serif}*{box-sizing:border-box}body{margin:0;min-height:100vh;color:var(--text);background:linear-gradient(rgba(201,167,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(201,167,255,.025) 1px,transparent 1px),radial-gradient(circle at 50% -10%,rgba(201,167,255,.12),transparent 35%),var(--bg);background-size:16px 16px,16px 16px,auto,auto}button,input{font:inherit}button,a{color:inherit}[hidden]{display:none!important}.app-shell{width:min(100%,520px);min-height:100vh;margin:auto;display:flex;flex-direction:column;border-inline:1px solid var(--line);background:linear-gradient(180deg,#222129,#1d1d24);box-shadow:0 30px 90px rgba(0,0,0,.3)}.system-message{margin:auto;padding:40px 22px;color:var(--muted);text-align:center;line-height:1.7}.system-message.error{color:var(--red)}main{flex:1}.view{padding:23px 17px 31px}.title-row,.block-title{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.kicker{margin:0 0 5px;color:var(--dim);font:600 9px var(--mono);letter-spacing:.1em}h1,h2,p{margin-top:0}h1{margin-bottom:0;font-size:clamp(24px,7vw,31px);line-height:1.18;letter-spacing:-.04em}h2{margin-bottom:0;font-size:18px}.title-row>span,.sync-state{color:var(--green);font:500 9px var(--mono)}.asset-card{position:relative;min-height:195px;margin-top:20px;padding:19px;overflow:hidden;border:1px solid rgba(201,167,255,.2);border-radius:20px;background:radial-gradient(circle at 92% 4%,rgba(201,167,255,.22),transparent 36%),linear-gradient(145deg,#2c2934,#24232b)}.asset-top{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.asset-top button,.block-title button{padding:0;border:0;color:var(--green);background:transparent;font-size:10px;cursor:pointer}.asset-card strong{display:block;margin-top:14px;font:600 27px var(--mono)}.asset-meta{margin-top:8px;display:flex;justify-content:space-between;color:var(--green);font-size:10px}.asset-meta small{color:var(--dim);font:500 8px var(--mono)}.pixel-bars{position:absolute;right:16px;bottom:15px;left:16px;height:48px;display:flex;align-items:flex-end;gap:5px;opacity:.5}.pixel-bars i{flex:1;background:linear-gradient(var(--purple),var(--green));border-radius:2px 2px 0 0}.pixel-bars i:nth-child(1){height:22%}.pixel-bars i:nth-child(2){height:39%}.pixel-bars i:nth-child(3){height:31%}.pixel-bars i:nth-child(4){height:52%}.pixel-bars i:nth-child(5){height:44%}.pixel-bars i:nth-child(6){height:68%}.pixel-bars i:nth-child(7){height:63%}.pixel-bars i:nth-child(8){height:83%}.quick-grid{margin-top:11px;display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.quick{min-height:102px;padding:15px;display:grid;gap:3px;text-align:left;text-decoration:none;border:1px solid var(--line);border-radius:15px;background:var(--surface2);cursor:pointer}.quick span{color:var(--purple);font-size:19px}.quick b{margin-top:7px;font-size:12px}.quick small{color:var(--dim);font-size:9px}.quick.primary{border-color:rgba(184,217,192,.23);background:linear-gradient(145deg,rgba(184,217,192,.12),var(--surface2))}.quick.primary span{color:var(--green)}.quick.disabled{opacity:.42;cursor:not-allowed}.block{margin-top:25px}.block-title{margin-bottom:10px}.stock-list,.holding-list,.order-list{display:grid;gap:7px}.stock-row{width:100%;padding:11px 12px;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:10px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.025);text-align:left;cursor:pointer}.stock-symbol{width:40px;height:40px;display:grid;place-items:center;border-radius:7px;color:var(--surface);background:var(--purple);font:600 10px var(--mono)}.stock-copy{min-width:0;display:grid;gap:3px}.stock-copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.stock-copy small{color:var(--dim);font-size:9px}.stock-quote{display:grid;gap:3px;text-align:right;font-family:var(--mono)}.stock-quote b{font-size:11px}.stock-quote small{color:var(--green);font-size:9px}.stock-quote small.down{color:var(--red)}.simulation-banner{margin-top:15px;padding:11px;display:grid;grid-template-columns:33px 1fr;gap:10px;border:1px solid rgba(232,217,167,.18);border-radius:10px;background:linear-gradient(135deg,rgba(232,217,167,.07),rgba(201,167,255,.035))}.simulation-banner>span{width:33px;height:33px;display:grid;place-items:center;border-radius:5px;color:var(--surface);background:var(--yellow)}.simulation-banner div{display:grid;gap:3px}.simulation-banner b{color:var(--yellow);font-size:10px}.simulation-banner p{margin:0;color:var(--muted);font-size:9px;line-height:1.5}.search{margin:13px 0 11px;padding:0 12px;display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.035)}.search input{width:100%;min-height:44px;border:0;outline:0;color:var(--text);background:transparent;font-size:16px}.sector-tabs{margin-bottom:12px;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.sector-tabs button{flex:none;padding:7px 9px;border:1px solid var(--line);border-radius:8px;color:var(--muted);background:transparent;font-size:9px;cursor:pointer}.sector-tabs button.active{color:var(--surface);border-color:var(--green);background:var(--green);font-weight:600}.summary{margin:19px 0 12px;padding:15px;display:grid;grid-template-columns:1fr 1fr;gap:13px;border-radius:15px;background:linear-gradient(145deg,rgba(169,214,229,.1),rgba(201,167,255,.06))}.summary div{display:grid;gap:4px}.summary small{color:var(--dim);font-size:9px}.summary b{font:500 13px var(--mono)}.holding,.order-row{padding:12px 2px;display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}.holding div,.order-row div{display:grid;gap:3px}.holding div:last-child,.order-row div:last-child{text-align:right}.holding b,.order-row b{font-size:11px}.holding small,.order-row small{color:var(--dim);font-size:9px}.order-row em{color:var(--yellow);font-size:9px;font-style:normal}.order-row em.done{color:var(--green)}.order-row em.failed{color:var(--red)}.empty{padding:18px 4px;color:var(--dim);font-size:10px;text-align:center}.identity{margin:19px 0 23px;padding:16px;display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:11px;border:1px solid rgba(201,167,255,.18);border-radius:16px;background:linear-gradient(145deg,rgba(201,167,255,.09),rgba(255,255,255,.02))}.identity>div{min-width:0;display:grid;gap:3px}.identity b{font-size:14px}.identity small{overflow:hidden;color:var(--dim);font:9px var(--mono);text-overflow:ellipsis;white-space:nowrap}.identity>span:last-child{color:var(--green);font-size:9px}.settings>a,.settings>div{min-height:64px;padding:10px 1px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px;border-bottom:1px solid var(--line);text-decoration:none}.settings i{width:36px;height:36px;display:grid;place-items:center;border-radius:8px;color:var(--surface);background:var(--purple);font-style:normal}.settings span{display:grid;gap:3px}.settings b{font-size:11px}.settings small,.settings em{color:var(--dim);font-size:9px;font-style:normal}.bottom-nav{position:sticky;bottom:0;z-index:4;min-height:68px;padding:7px 9px max(7px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);background:rgba(32,32,39,.96);backdrop-filter:blur(16px)}.bottom-nav button{padding:5px;display:grid;place-items:center;gap:2px;border:0;color:var(--dim);background:transparent;font-size:9px;cursor:pointer}.bottom-nav span{font-size:18px}.bottom-nav button.active{color:var(--green)}.dialog-backdrop{position:fixed;z-index:10;inset:0;padding:16px;display:grid;place-items:center;background:rgba(10,10,13,.8);backdrop-filter:blur(7px)}.dialog{position:relative;width:min(100%,420px);max-height:calc(100vh - 32px);padding:22px;overflow-y:auto;border:1px solid var(--line);border-radius:19px;background:#292830}.dialog-close{position:absolute;top:11px;right:11px;width:36px;height:36px;border:0;border-radius:9px;color:var(--muted);background:rgba(255,255,255,.05);cursor:pointer}.trade-title{margin-bottom:14px;display:flex;justify-content:space-between;gap:10px}.trade-title h2{margin-bottom:3px}.trade-title small{color:var(--dim);font-size:9px}.trade-title strong{font:500 18px var(--mono)}.segmented{margin-bottom:13px;padding:3px;display:grid;grid-template-columns:1fr 1fr;gap:3px;border-radius:10px;background:rgba(255,255,255,.04)}.segmented button{min-height:38px;border:0;border-radius:8px;color:var(--muted);background:transparent;cursor:pointer}.segmented button.active{color:var(--surface);background:var(--green);font-weight:600}.dialog label{display:grid;gap:6px;color:var(--muted);font-size:10px}.dialog input{width:100%;min-height:44px;padding:10px 11px;border:1px solid var(--line);border-radius:10px;outline:0;color:var(--text);background:rgba(255,255,255,.04);font-size:16px}.estimate{margin-top:12px;padding:11px 0;display:flex;justify-content:space-between;border-block:1px solid var(--line);font-size:10px}.estimate b{font-family:var(--mono)}.order-warning{margin-top:11px;padding:9px 10px;display:grid;gap:3px;border-left:3px solid var(--yellow);background:rgba(232,217,167,.055)}.order-warning b{color:var(--yellow);font-size:9px}.order-warning span{color:var(--muted);font-size:9px;line-height:1.45}.dialog label.consent{margin-top:10px;grid-template-columns:16px 1fr;align-items:start;gap:7px;line-height:1.45;cursor:pointer}.dialog label.consent input{width:15px;min-height:15px;margin:0;accent-color:var(--green)}.submit-order{width:100%;min-height:46px;margin-top:12px;border:0;border-radius:10px;color:var(--surface);background:var(--green);font-weight:600;cursor:pointer}.submit-order:disabled{color:var(--dim);background:#36343d;cursor:not-allowed}.dialog-message{min-height:16px;margin:8px 0 0;color:var(--red);font-size:9px;text-align:center}.toast{position:fixed;z-index:20;right:16px;bottom:82px;left:16px;max-width:420px;margin:auto;padding:10px 13px;border-radius:10px;color:var(--surface);background:var(--green);text-align:center;font-size:10px;font-weight:600}@media(min-width:650px){body{padding:18px}.app-shell{min-height:850px;border:1px solid var(--line);border-radius:28px;overflow:hidden}.bottom-nav{position:static}}@media(max-width:380px){.sim-chip{display:none}.view{padding-inline:13px}.identity{grid-template-columns:50px minmax(0,1fr)}.identity>span:last-child{grid-column:2}.large-avatar{width:50px;height:50px}}

/* Word-quiz-specific additions */
.quiz-progress{margin-top:20px;padding:14px 16px;border-radius:16px;background:linear-gradient(145deg,rgba(232,217,167,.1),rgba(201,167,255,.06));border:1px solid rgba(232,217,167,.18)}
.quiz-progress-top{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:10px}
.quiz-progress-top b{color:var(--yellow);font:600 12px var(--mono)}
.progress-track{position:relative;height:10px;margin-top:10px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.06)}
.progress-fill{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,var(--green),var(--yellow));transition:width .5s cubic-bezier(.22,1,.36,1)}
.progress-fill.capped{background:linear-gradient(90deg,var(--yellow),var(--gold))}

.quiz-block{margin-top:20px}
.quiz-card{position:relative;padding:26px 20px 22px;overflow:hidden;text-align:center;border:1px solid rgba(201,167,255,.22);border-radius:22px;background:radial-gradient(circle at 50% -20%,rgba(201,167,255,.16),transparent 45%),linear-gradient(145deg,#2c2934,#20202a)}
.quiz-word{margin:8px 0 22px;font-size:clamp(28px,9vw,40px);letter-spacing:-.02em;color:var(--text);word-break:break-word}
.quiz-word.loading{color:var(--dim);font-size:16px;letter-spacing:0}
.quiz-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quiz-option{min-height:64px;padding:10px 12px;display:grid;place-items:center;border:1px solid var(--line);border-radius:14px;color:var(--text);background:var(--surface2);font-size:12px;line-height:1.4;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease}
.quiz-option:active{transform:scale(.97)}
.quiz-option:disabled{cursor:not-allowed}
.quiz-option.correct{border-color:rgba(184,217,192,.7);background:linear-gradient(145deg,rgba(184,217,192,.28),rgba(184,217,192,.12));color:var(--green);font-weight:600;animation:quiz-pop .4s ease}
.quiz-option.wrong{border-color:rgba(223,163,168,.7);background:linear-gradient(145deg,rgba(223,163,168,.24),rgba(223,163,168,.08));color:var(--red);animation:quiz-shake .4s ease}
.quiz-option.dim{opacity:.4}
@keyframes quiz-pop{0%{transform:scale(1)}40%{transform:scale(1.06)}100%{transform:scale(1)}}
@keyframes quiz-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(4px)}}
.quiz-card.flash-correct{animation:quiz-glow-green .7s ease}
.quiz-card.flash-wrong{animation:quiz-glow-red .7s ease}
@keyframes quiz-glow-green{0%{box-shadow:0 0 0 0 rgba(184,217,192,0)}30%{box-shadow:0 0 0 6px rgba(184,217,192,.18)}100%{box-shadow:0 0 0 0 rgba(184,217,192,0)}}
@keyframes quiz-glow-red{0%{box-shadow:0 0 0 0 rgba(223,163,168,0)}30%{box-shadow:0 0 0 6px rgba(223,163,168,.18)}100%{box-shadow:0 0 0 0 rgba(223,163,168,0)}}

.quiz-capped{padding:30px 20px;display:grid;justify-items:center;gap:8px;text-align:center;border:1px solid rgba(232,217,167,.25);border-radius:22px;background:linear-gradient(145deg,rgba(232,217,167,.12),rgba(216,180,122,.06))}
.quiz-capped-icon{font-size:34px}
.quiz-capped b{color:var(--yellow);font-size:14px}
.quiz-capped p{margin:0;color:var(--muted);font-size:11px;line-height:1.6}
.quiz-capped .submit-order{margin-top:8px;width:auto;padding:0 18px;min-height:38px;background:var(--surface2);color:var(--muted);font-weight:500}

.earn-pop{position:fixed;z-index:25;left:50%;top:38%;padding:6px 14px;color:var(--surface);background:var(--green);border-radius:999px;font:700 13px var(--mono);transform:translate(-50%,0);opacity:0;pointer-events:none}
.earn-pop.show{animation:quiz-earn-pop 1.1s ease forwards}
@keyframes quiz-earn-pop{0%{opacity:0;transform:translate(-50%,10px) scale(.8)}20%{opacity:1;transform:translate(-50%,-10px) scale(1.05)}70%{opacity:1;transform:translate(-50%,-26px) scale(1)}100%{opacity:0;transform:translate(-50%,-40px) scale(1)}}

/* 2026-10-13: today's stats, same-part-of-speech options with a next button, and the leaderboard. */
body.portal-wordquiz .quiz-stats{margin:16px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.portal-wordquiz .quiz-stats div{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.035)}
body.portal-wordquiz .quiz-stats dt{color:var(--muted);font-size:12px}
body.portal-wordquiz .quiz-stats dd{margin:4px 0 0;color:var(--muted);font-size:12px;white-space:nowrap}
body.portal-wordquiz .quiz-stats b{margin-right:2px;color:var(--text);font-size:20px;font-weight:650;font-variant-numeric:tabular-nums}
body.portal-wordquiz .quiz-progress{margin-top:8px}
body.portal-wordquiz .quiz-progress-top span:last-child{color:var(--dim)}

body.portal-wordquiz .quiz-card{padding:14px 16px 16px;text-align:left}
body.portal-wordquiz .quiz-card-top{min-height:36px;display:flex;align-items:center;justify-content:space-between;gap:8px}
body.portal-wordquiz .pos-chip{padding:4px 10px;border:1px solid rgba(222,203,234,.35);border-radius:999px;color:var(--purple);font-size:12px}
body.portal-wordquiz .quiz-word-row{margin:14px 0 18px;display:flex;align-items:center;justify-content:center;gap:6px}
body.portal-wordquiz .quiz-word{margin:0;min-width:0;font-size:clamp(28px,9vw,36px);line-height:1.2;text-align:center;overflow-wrap:anywhere}
body.portal-wordquiz .quiz-word.loading{color:var(--dim);font-size:16px}
body.portal-wordquiz .speak-button{flex:none;width:44px;height:44px;padding:0;display:grid;place-items:center;border:0;border-radius:50%;color:var(--muted);background:transparent;cursor:pointer}
body.portal-wordquiz .speak-button:hover{color:var(--purple);background:rgba(222,203,234,.1)}
body.portal-wordquiz .speak-button svg{width:22px;height:22px}
body.portal-wordquiz .quiz-option{width:100%;min-height:54px;padding:10px 14px 10px 12px;display:grid;grid-template-columns:26px minmax(0,1fr);align-items:center;place-items:center start;gap:12px;font-size:16px;line-height:1.45;text-align:left}
body.portal-wordquiz .quiz-option:hover:not(:disabled){border-color:rgba(222,203,234,.45)}
body.portal-wordquiz .quiz-option kbd{width:26px;height:26px;display:grid;place-items:center;border:1px solid var(--line);border-radius:7px;color:var(--dim);font:500 12px var(--mono)}
body.portal-wordquiz .quiz-option.chosen{border-color:var(--purple)}
body.portal-wordquiz .quiz-option.correct kbd{color:#17151b;border-color:#a8d4b6;background:#a8d4b6}
body.portal-wordquiz .quiz-option.wrong kbd{color:#17151b;border-color:#e4a4ac;background:#e4a4ac}
body.portal-wordquiz .quiz-feedback{min-height:21px;margin:12px 0 0;color:var(--muted);font-size:14px;line-height:1.5;text-align:center}
body.portal-wordquiz .quiz-feedback:empty{min-height:0;margin:0}
body.portal-wordquiz .quiz-feedback.good{color:#bce5c9}
body.portal-wordquiz .quiz-feedback.bad{color:#f1bcc2}
body.portal-wordquiz .quiz-capped .submit-order{color:#17151b;background:var(--purple);font-weight:600}
body.portal-wordquiz .next-button{position:relative;width:100%;min-height:48px;margin-top:10px;overflow:hidden;border:1px solid rgba(222,203,234,.35);color:var(--purple);background:rgba(222,203,234,.08);font-size:15px;font-weight:600;cursor:pointer}
body.portal-wordquiz .next-button i{position:absolute;left:0;bottom:0;width:100%;height:3px;background:var(--purple);transform-origin:left;animation:quiz-next var(--next-delay,1300ms) linear forwards}
@keyframes quiz-next{from{transform:scaleX(0)}to{transform:scaleX(1)}}

body.portal-wordquiz .chip-tabs{margin:0 0 6px;display:flex;gap:8px}
body.portal-wordquiz .chip-tabs button{min-height:36px;padding:0 14px;border:1px solid var(--line);border-radius:999px;color:var(--muted);background:transparent;font-size:13px;cursor:pointer}
body.portal-wordquiz .chip-tabs button[aria-pressed="true"]{color:var(--purple);border-color:rgba(222,203,234,.5);background:rgba(222,203,234,.1);font-weight:600}
body.portal-wordquiz .board-rows{margin:0;padding:0;list-style:none;display:grid;gap:2px}
body.portal-wordquiz .board-row{min-height:48px;padding:8px;display:grid;grid-template-columns:28px 30px minmax(0,1fr) auto;align-items:center;gap:10px;border-radius:10px}
body.portal-wordquiz .board-rank{color:var(--dim);font-size:13px;text-align:center;font-variant-numeric:tabular-nums}
body.portal-wordquiz .board-row.podium .board-rank{width:24px;height:24px;margin:auto;display:grid;place-items:center;border-radius:50%;color:#17151b;font-weight:700}
body.portal-wordquiz .board-row.place-1 .board-rank{background:#e8d9a7}
body.portal-wordquiz .board-row.place-2 .board-rank{background:#cdd1d8}
body.portal-wordquiz .board-row.place-3 .board-rank{background:#d6a887}
body.portal-wordquiz .board-avatar{position:relative;width:30px;height:30px;display:grid;place-items:center;overflow:hidden;border-radius:7px;color:var(--muted);background:rgba(255,255,255,.08);font-size:13px;font-weight:600}
body.portal-wordquiz .board-avatar img{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}
body.portal-wordquiz .board-name{overflow:hidden;font-size:14px;text-overflow:ellipsis;white-space:nowrap}
body.portal-wordquiz .board-name em{margin-left:6px;padding:1px 7px;border-radius:999px;color:#17151b;background:var(--purple);font-size:11px;font-style:normal;font-weight:600}
body.portal-wordquiz .board-value{color:var(--muted);font-size:12px;white-space:nowrap}
body.portal-wordquiz .board-value b{color:var(--text);font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
body.portal-wordquiz .board-row.podium .board-value b{color:var(--yellow)}
body.portal-wordquiz .board-row.me{background:rgba(222,203,234,.1)}
body.portal-wordquiz .board-mine{margin-top:6px;padding-top:6px;border-top:1px dashed var(--line)}
body.portal-wordquiz .board-empty{margin:0;padding:14px 8px;color:var(--muted);font-size:13px;text-align:center;list-style:none}

body.portal-wordquiz .quiz-links{margin-top:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.portal-wordquiz .quiz-link{min-height:64px;padding:12px 8px 12px 14px;display:flex;align-items:center;justify-content:space-between;gap:6px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.035);text-decoration:none}
body.portal-wordquiz .quiz-link:hover{border-color:rgba(222,203,234,.45)}
body.portal-wordquiz .quiz-link span{min-width:0;display:grid;gap:3px}
body.portal-wordquiz .quiz-link b{font-size:16px}
body.portal-wordquiz .quiz-link small{overflow:hidden;color:var(--muted);font-size:13px;text-overflow:ellipsis;white-space:nowrap}
body.portal-wordquiz .quiz-link svg{flex:none;width:20px;height:20px;color:var(--dim)}

/* 錯題本 and 排行榜 pages */
body.portal-wordquiz .back-link{min-height:44px;margin:0 0 4px -4px;padding:0 8px 0 4px;display:inline-flex;align-items:center;gap:4px;border-radius:10px;color:var(--muted);font-size:13px;text-decoration:none}
body.portal-wordquiz .back-link:hover{color:var(--purple)}
body.portal-wordquiz .back-link svg{width:18px;height:18px}
body.portal-wordquiz .page-lede{margin:6px 0 16px;color:var(--muted);font-size:13px;line-height:1.6}
body.portal-wordquiz .mistake-rows{margin:8px 0 0;padding:0;list-style:none;display:grid;gap:8px}
body.portal-wordquiz .mistake-row{padding:10px 8px 12px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 8px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.035)}
body.portal-wordquiz .mistake-word{min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body.portal-wordquiz .mistake-word b{font-size:18px;overflow-wrap:anywhere}
body.portal-wordquiz .mistake-word em{padding:2px 8px;border-radius:999px;color:#f1bcc2;background:rgba(228,164,172,.14);font-size:12px;font-style:normal;white-space:nowrap}
body.portal-wordquiz .mistake-row p{grid-column:1/-1;margin:0;padding-right:6px;color:var(--text);font-size:14px;line-height:1.55}
body.portal-wordquiz .mistake-row time{grid-column:1/-1;color:var(--dim);font-size:12px}
@media(max-width:340px){body.portal-wordquiz .quiz-stats div{padding:8px}body.portal-wordquiz .quiz-stats b{font-size:17px}body.portal-wordquiz .board-row{gap:7px}}
@media(prefers-reduced-motion:reduce){body.portal-wordquiz .next-button i{animation:none}}

/* 2026-10-16: listen-and-spell mode; the 切換 button sits where the sound toggle was. */
body.portal-wordquiz .mode-toggle{min-height:36px;margin-left:auto;padding:0 14px;border:1px solid rgba(222,203,234,.35);border-radius:999px;color:var(--purple);background:transparent;font-size:12px;cursor:pointer}
body.portal-wordquiz .mode-toggle:hover{background:rgba(222,203,234,.1)}
body.portal-wordquiz .quiz-card.spell-mode .quiz-word-row{margin:10px 0 6px;gap:10px}
body.portal-wordquiz .quiz-card.spell-mode .speak-button{width:64px;height:64px;color:var(--purple);border:1px solid rgba(222,203,234,.35);background:rgba(222,203,234,.08)}
body.portal-wordquiz .quiz-card.spell-mode .speak-button svg{width:30px;height:30px}
body.portal-wordquiz .slow-button{min-height:36px;padding:0 14px;border:1px solid var(--line);border-radius:999px;color:var(--muted);background:transparent;font-size:13px;cursor:pointer}
body.portal-wordquiz .slow-button:hover{color:var(--purple);border-color:rgba(222,203,234,.35)}
body.portal-wordquiz .spell-area{display:grid;gap:12px;text-align:center}
body.portal-wordquiz .spell-meaning{margin:0;color:var(--text);font-size:17px;line-height:1.5;overflow-wrap:anywhere}
body.portal-wordquiz .spell-no-voice{margin:0;color:var(--yellow);font-size:12px}
body.portal-wordquiz .spell-slots{display:flex;flex-wrap:wrap;justify-content:center;gap:5px}
body.portal-wordquiz .spell-slot{width:24px;height:32px;display:grid;place-items:center;border-bottom:2px solid rgba(222,203,234,.4);color:var(--text);font:600 18px var(--mono);text-transform:lowercase}
body.portal-wordquiz .spell-slot.given{color:var(--dim)}
body.portal-wordquiz .spell-slot.extra{color:var(--red);border-color:var(--red)}
body.portal-wordquiz .spell-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
body.portal-wordquiz .spell-input{width:100%;min-height:48px;padding:0 14px;border:1px solid rgba(222,203,234,.3);border-radius:12px;outline:0;color:var(--text);background:rgba(255,255,255,.04);font:500 18px var(--mono);letter-spacing:.04em}
body.portal-wordquiz .spell-input:focus{border-color:var(--purple)}
body.portal-wordquiz .spell-input:disabled{opacity:.6}
body.portal-wordquiz .spell-submit{min-height:48px;padding:0 18px;border:0;border-radius:12px;color:#17151b;background:var(--purple);font-size:15px;font-weight:600;cursor:pointer}
body.portal-wordquiz .spell-submit:disabled{color:var(--dim);background:#36343d;cursor:not-allowed}
body.portal-wordquiz .spell-result{display:grid;gap:6px}
body.portal-wordquiz .spell-answer{display:flex;flex-wrap:wrap;justify-content:center;font:700 clamp(26px,8vw,34px) var(--mono);letter-spacing:.06em;overflow-wrap:anywhere}
body.portal-wordquiz .spell-answer .hit{color:#bce5c9}
body.portal-wordquiz .spell-answer .miss{color:#f1bcc2;text-decoration:underline;text-underline-offset:5px}
body.portal-wordquiz .spell-typed{margin:0;color:var(--dim);font:14px var(--mono);overflow-wrap:anywhere}
body.portal-wordquiz .spell-full-meaning{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
