*{box-sizing:border-box} :root{--accent:#ff8a3d;--ink:#283e37;--muted:#71786e}html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;color:var(--ink);background:#dfe9e1;letter-spacing:0}button{font:inherit;cursor:pointer;touch-action:manipulation;color:inherit;min-height:46px;border:1px solid #cecfbf;border-radius:8px;background:#fffdf6;padding:10px 14px}button:disabled{cursor:default;opacity:.45}button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}[hidden]{display:none!important}.game{position:relative;isolation:isolate;max-width:520px;min-height:100svh;margin:auto;overflow:hidden}.scene{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}.play-surface{min-height:100svh;padding:max(18px,env(safe-area-inset-top)) 20px max(22px,env(safe-area-inset-bottom));background:rgba(241,247,231,.24);display:flex;flex-direction:column;gap:18px}.status{display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:700}.status>span,.status>button{background:#fffdf2ed;border:1px solid #b9c5ac;padding:10px 15px;border-radius:8px}.status>button{color:#a74b0f}.poem-area{margin:auto 0;background:rgba(255,253,244,.97);border:1px solid #c1c9ae;border-radius:8px;padding:24px 18px;text-align:center;box-shadow:0 6px 24px #244b3220}.eyebrow{margin:0 0 16px;color:#a14e20;font-size:15px;font-weight:700}.poet{display:inline-block;background:#e9efdf;padding:6px 14px;font-size:14px;border-radius:6px}h1{font-family:"Songti SC",SimSun,serif;font-size:22px;margin:17px 0;color:#344d3c}.poem{font-family:"Songti SC",SimSun,serif;font-size:27px;line-height:1.95;white-space:pre-line;overflow-wrap:anywhere}.blank{display:inline-block;color:#ba591a;border-bottom:2px solid var(--accent);padding:0 4px;line-height:1.4}.muted{font-size:13px;line-height:1.7;color:var(--muted)}.choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:20px 0 12px}.choice{font-family:"Songti SC",SimSun,serif;font-size:26px;min-height:64px;padding:8px 2px;border:1px solid #a8b99b;background:#fffef8;box-shadow:0 3px 0 #d5ddc9}.choice:active:not(:disabled){transform:translateY(2px);box-shadow:none}.choice.correct{background:#e0edd8;border-color:#5d8953}.choice.wrong{background:#fae4de;border-color:#cc6c56}.hint{background:#fff0dc;border-color:#f8b97a;font-size:14px;margin-top:10px}.mp-icon{vertical-align:middle}#feedback{font-size:14px;color:#457342;line-height:1.6;min-height:23px}.scoreline{display:flex;justify-content:space-between;gap:8px;background:#fffdf3ed;padding:12px;border-radius:8px;font-size:14px}.tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.tools button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 2px;background:#fffdf3f5;font-size:12px;border-color:#c0c7af}.tools .mp-icon{font-size:23px;color:#a95621}.back{background:var(--accent);border-color:#de7430;color:#40240e}.overlay{position:fixed;inset:0;background:#17271fd1;z-index:10;display:flex;align-items:center;justify-content:center;padding:20px}.dialog{width:100%;max-width:440px;max-height:88svh;overflow:auto;background:#fffdf6;border-radius:8px;padding:24px;box-shadow:0 12px 60px #0003;outline:none}.dialog h2{font-size:23px;margin:0 0 18px;font-family:"Songti SC",SimSun,serif}.dialog h3{font-size:17px}.dialog p{line-height:1.8}.dialog button{width:100%;margin-top:10px}.primary{background:var(--accent);border-color:#e8772e;color:#40240e;font-weight:700}.secondary{background:#eaf0e3}.full-poem{font-family:"Songti SC",SimSun,serif;font-size:22px;white-space:pre-line;text-align:center;padding:14px 0;border-block:1px solid #dce0ce}.entry{padding:14px 0;border-bottom:1px solid #dce0ce}.entry p{margin:6px 0}.entry button{width:auto;min-width:100px}details{margin:16px 0}summary{padding:12px 0;font-weight:700;cursor:pointer}.badge{display:grid;grid-template-columns:40px 1fr;gap:10px;padding:16px 0;border-bottom:1px solid #dce0ce}.badge>.mp-icon{font-size:32px;color:#b9bbb5}.badge.unlocked>.mp-icon{color:#d47b19}.badge strong{display:block;margin-bottom:5px}.badge progress{width:100%;height:8px;accent-color:var(--accent)}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);width:max-content;max-width:88%;padding:12px 18px;background:#203c32;color:white;border-radius:8px;z-index:20;font-size:14px;text-align:center}.countdown{text-align:center;font-size:48px;color:#b45c24;margin:18px 0}.background-card{border-top:1px solid #cbd6c0;margin-top:18px;padding-top:12px;text-align:left;font-size:15px}.background-card h3{margin:0 0 8px;font-size:17px}@media(max-width:360px){.play-surface{padding-inline:12px;gap:12px}.poem-area{padding:18px 12px}.poem{font-size:24px}.choices{gap:7px}.choice{min-height:56px}}@media(min-height:850px){.poem-area{padding-block:32px}.poem{line-height:2.2}}

/* Keep the answer controls together on narrow screens. */
.answer-actions{display:flex;align-items:stretch;gap:10px;margin-top:10px}.answer-actions .hint{margin:0;min-width:76px}.answer-actions #submit{flex:1}.choice[aria-pressed="true"]:not(:disabled){background:#fff0dc;border-color:var(--accent);box-shadow:0 3px 0 #f4c49c}.tools{grid-template-columns:repeat(2,minmax(0,1fr))}.tools button{flex-direction:row;align-items:center;justify-content:center;min-height:46px}.dialog{max-height:calc(100% - 8px);overscroll-behavior:contain}.overlay{padding:max(20px,env(safe-area-inset-top)) 20px max(20px,env(safe-area-inset-bottom))}.toast{bottom:max(20px,env(safe-area-inset-bottom))}#questionNote:empty{display:none}
