
.pop-page { margin:0; color:#213a32; background:#faf6eb; font:16px/1.6 "Yu Gothic","Hiragino Sans",Meiryo,sans-serif }
.pop-solo { max-width:610px; margin:30px auto; padding:0 20px }
.pop-host { margin:9px 0 18px }
.quiz-card { --ink:#203e34; --sheet:#ffe08a; --fold:#f2ac48; --coral:#f39c7b; --wash:#fff8de; box-sizing:border-box; position:relative; isolation:isolate; color:var(--ink); background:var(--sheet); border:2px solid var(--ink); border-radius:13px; box-shadow:3px 4px 0 var(--ink); font:16px/1.6 "Yu Gothic","Hiragino Sans",Meiryo,sans-serif; text-align:left; margin:0; overflow:hidden }
.quiz-card [hidden] { display:none!important }
.quiz-card * { box-sizing:border-box }
.quiz-card [lang=vi] { font-family:"Plus Jakarta Sans",Arial,sans-serif }
.quiz-card p,.quiz-card h2 { margin:0 }
.quiz-card button { appearance:none; font:inherit; cursor:pointer; touch-action:manipulation; color:var(--ink) }
.quiz-card button:focus-visible,.quiz-card summary:focus-visible { outline:3px solid #005b76; outline-offset:3px }
.quiz-card button:disabled { cursor:default }
.quiz-card[data-topic=addressing] { --sheet:#d4e8cf; --fold:#93bb9b; --wash:#f3f5e2; --coral:#f7af8c }
.pop-head { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:14px clamp(16px,3vw,30px) 12px; border-bottom:2px solid var(--ink); background:var(--sheet); color:var(--ink) }
.pop-head h2 { font-family:"Yu Gothic","Hiragino Sans",Meiryo,sans-serif; font-size:clamp(25px,3.7vw,40px); font-weight:900; line-height:1.2; letter-spacing:-.025em }
.pop-topic { display:inline-block; padding:2px 12px; background:var(--coral); border:1.5px solid var(--ink); border-radius:2px 7px 2px 7px; box-shadow:2px 2px 0 var(--ink); font-size:13px; font-weight:800; white-space:nowrap; transform:rotate(3deg) }
.pop-body { position:relative; padding:15px clamp(16px,3vw,29px) 20px; background-color:var(--wash); background-image:radial-gradient(rgba(70,70,34,.15) .65px,transparent .8px); background-size:6px 6px }
.pop-prompt { display:grid; grid-template-columns:clamp(66px,12vw,106px) minmax(0,1fr); align-items:center; gap:14px; margin-bottom:15px }
.pop-icon { width:100%; aspect-ratio:1; display:grid; place-items:center; border-radius:43% 51% 46% 49%; background:#fbebba; overflow:hidden; transform-origin:65% 95% }
.pop-icon img { display:block; width:100%; height:100%; min-height:0; object-fit:contain; mix-blend-mode:multiply }
.pop-bubble { position:relative; background:#fffdf3; border:2px solid var(--ink); border-radius:17px 14px 18px 3px; box-shadow:2px 3px 0 var(--ink); padding:10px 14px; font-weight:800; font-size:clamp(18px,2.5vw,26px); line-height:1.48; text-wrap:pretty }
.pop-bubble::before { content:""; position:absolute; left:-6px; top:calc(60% - 5px); width:9px; height:9px; transform:rotate(45deg); background:#fffdf3; border-left:2px solid var(--ink); border-bottom:2px solid var(--ink) }
.pop-exercise { border-top:1px dashed #789171; padding-top:12px }
.pop-instruction,.pop-export-instruction { font-size:14px; font-weight:700; line-height:1.5 }
.pop-export-instruction,.pop-next { display:none }
.pop-tray,.pop-blank { display:flex; align-items:center; gap:4px; min-height:50px; padding:6px 11px; margin-top:7px!important; background:#fffdf2; border:1.5px solid #71836a; border-radius:4px }
.pop-slots { display:flex; align-items:center; flex-wrap:wrap; gap:6px }
.pop-slot { display:inline-flex; align-items:center; min-width:48px; min-height:31px; justify-content:center; border-bottom:2px solid #a1a990; color:#24483b; font:750 20px "Plus Jakarta Sans",sans-serif }
.pop-slot:not(.filled) { font-weight:500; color:#717757; font-size:13px }
.pop-slot.filled { border-color:#69836d }
.pop-punct { font:700 22px "Plus Jakarta Sans",sans-serif }
.pop-bank,.pop-choices,.pop-order-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-top:11px }
.pop-bank button,.pop-choices button { background:#fffdf6; border:2px solid var(--ink); box-shadow:2px 3px 0 var(--ink); border-radius:5px; min-height:44px; padding:6px 14px; font-weight:750 }
.pop-bank button { font-family:"Plus Jakarta Sans",sans-serif; font-size:19px }
.pop-bank button:disabled { background:var(--sheet); border-color:#869176; color:#596e58; box-shadow:none }
.pop-choices button { display:flex; align-items:center; gap:12px; flex:1; justify-content:flex-start; font:750 24px "Plus Jakarta Sans",sans-serif }
.pop-letter { display:grid; place-items:center; width:26px; height:26px; background:var(--sheet); border:1px solid var(--ink); border-radius:50%; font-size:14px; line-height:1 }
.pop-blank { display:block; font:750 26px/1.65 "Plus Jakarta Sans",sans-serif!important }
.pop-blank [data-gap] { color:#38664e }
.pop-order-actions { gap:17px }
.pop-order-actions button,.pop-reset { min-height:40px }
.pop-order-actions [data-undo],.pop-reset { padding:3px 0; border:0; background:transparent; color:#304f41; text-decoration:underline; text-underline-offset:4px; font-size:14px; font-weight:700 }
.pop-order-actions [data-check] { padding:5px 17px; color:white; background:#315b49; border:1.5px solid var(--ink); border-radius:4px; font-weight:750; font-size:15px }
.pop-order-actions [data-undo]:disabled { color:#7b806e; text-decoration:none }
.pop-order-actions [data-check]:disabled { background:#e3e5cf; color:#606b57; border-color:#899977 }
.pop-choices button:not([aria-disabled=true]):hover,.pop-bank button:not(:disabled):hover { background:#ffecb2 }
.pop-choices button[data-picked=wrong] { background:#ffe2d3; border-color:#a75037 }
.quiz-card[data-state=win] [data-picked=right] { background:#385d48; color:white }
.quiz-card[data-state=win] .pop-letter { color:var(--ink) }
.quiz-card[data-state=win] .pop-bank,.quiz-card[data-state=win] .pop-order-actions { display:none }
.pop-feedback { margin-top:0 }
.pop-feedback p { margin-top:14px; padding:9px 12px; border:1.5px solid var(--ink); background:var(--sheet); border-radius:6px; font-size:15px; line-height:1.6 }
.pop-feedback strong { margin-right:8px; color:#6f3225 }
.pop-feedback [data-feedback=win] { background:#e2efd5 }
.pop-feedback [data-feedback=win] strong { color:#2a5840 }
.pop-reset { display:block; margin-top:4px }
.pop-solved-phrase { display:inline-block; margin-right:4px; font-size:1.19em }
.pop-imprint { grid-column:1/-1; margin-top:16px; display:flex; justify-content:space-between; gap:8px; align-items:baseline; padding-top:8px; border-top:1px solid #a6ae8a; color:#475d48; font:650 12px/1.5 "Plus Jakarta Sans","Yu Gothic",Meiryo,sans-serif }
.quiz-card[data-entered] .pop-icon { animation:pop-ask .43s ease-out 1 }
.quiz-card[data-state=win] .pop-icon { animation:pop-win .48s cubic-bezier(.2,.65,.28,1) 1 }
@keyframes pop-ask { 45% { transform:rotate(-6deg) translateY(-2px) } }
@keyframes pop-win { 47% { transform:translateY(-8px) rotate(5deg) } }
@media(min-width:750px) {
 .pop-host .pop-body { display:grid; grid-template-columns:.93fr 1.07fr; column-gap:30px }
 .pop-host .pop-prompt { grid-template-columns:85px 1fr; align-self:start; margin:4px 0 10px }
 .pop-host .pop-exercise { border-top:0; padding-top:0 }
 .pop-host .pop-feedback,.pop-host .pop-reset { grid-column:2; justify-self:start }
 .pop-host .pop-bubble { font-size:21px }
}
@media(max-width:500px) {
 .pop-solo { padding:0 14px; margin:16px auto }
 .pop-prompt { grid-template-columns:65px minmax(0,1fr); gap:10px }
 .pop-bubble { padding:10px 11px; line-height:1.5 }
 .pop-head { gap:10px }
 .pop-feedback p { font-size:14px }
}
@media(prefers-reduced-motion:reduce) {
 .quiz-card *, .quiz-card *::before { animation:none!important; transition:none!important }
}
.export-mode { background:#fff4cf }
.export-mode .pop-page { margin:0; padding:0; background:transparent }
.export-mode .pop-page > :not(.pop-solo) { display:none!important }
.export-mode .pop-solo { padding:0; margin:0; max-width:none; width:540px; height:675px }
.export-mode .quiz-card { display:flex; flex-direction:column; width:540px; height:675px; border:3px solid var(--ink); border-radius:0; box-shadow:none }
.export-mode .quiz-card * { animation:none!important; transition:none!important }
.export-mode .quiz-card :focus-visible { outline:none }
.export-mode .pop-head { padding:24px 28px 22px }
.export-mode .pop-head h2 { font-size:43px }
.export-mode .pop-topic { font-size:18px; padding:3px 14px }
.export-mode .pop-body { display:flex; flex-direction:column; padding:24px 27px 20px; flex:1; min-height:0 }
.export-mode .pop-prompt { grid-template-columns:88px minmax(0,1fr); gap:16px; margin:0 0 22px }
.export-mode .pop-bubble { font-size:25px; line-height:1.48; padding:14px 16px }
.export-mode .pop-exercise { padding-top:17px }
.export-mode .pop-instruction,.export-mode .pop-reset,.export-mode .pop-order-actions { display:none!important }
.export-mode .pop-export-instruction { display:block; font-size:20px; line-height:1.55 }
.export-mode .pop-tray,.export-mode .pop-blank { min-height:73px; margin-top:12px!important; padding:10px 18px; border-width:2px }
.export-mode .pop-slot { min-width:74px; min-height:37px; font-size:27px }
.export-mode .pop-slot:not(.filled) { font-size:18px }
.export-mode .pop-blank { font-size:32px!important }
.export-mode .pop-bank,.export-mode .pop-choices { gap:12px; margin:14px 0 0 }
.export-mode .pop-bank button,.export-mode .pop-choices button { min-height:55px; font-size:26px; padding:6px 16px }
.export-mode .pop-imprint { margin-top:auto; padding-top:12px; font-size:14px }
.export-mode .pop-next { display:block; text-align:right; font-size:15px; font-weight:700 }
.export-mode [data-state=win] .pop-next { display:none }
.export-mode .pop-feedback p { font-size:22px; margin-top:18px; padding:12px 16px; line-height:1.5 }
.export-mode .pop-feedback strong { display:block; font-size:27px }
