/* 30 | D&D 5R new-player academy: standalone readable parchment UI. */
:root{color-scheme:light;--ink:#2e3029;--muted:#575b52;--paper:#fbf7ea;--line:#b6a98b;--gold:#846330;--accent:#335448;--focus:#14649a}
*{box-sizing:border-box}
html{font-size:16px}
body{margin:0;background:radial-gradient(ellipse at 85% -10%,#dbd0ad 0%,transparent 50%),linear-gradient(140deg,#eee6d2,#f8f3e6 45%,#ece1c8);color:var(--ink);font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;line-height:1.8}
button,a{font:inherit}
button{cursor:pointer}
a{color:#275444}
button:focus-visible,a:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.skip-link{position:absolute;left:-9999px;top:0;padding:10px;background:#fff}
.skip-link:focus{left:12px;z-index:30}
.academy-wrap{width:min(100% - 32px,1000px);margin-inline:auto}
.academy-header{border-bottom:1px solid var(--line);background:#f8f4e9d9}
.academy-header-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0}
.academy-brand{font-weight:800;text-decoration:none;color:#30483b}
.academy-brand span{font-weight:500}
.academy-link{font-size:.95rem}
.academy-hero{padding:24px 0 20px;border-bottom:1px solid var(--line)}
.eyebrow{color:var(--gold);font-weight:800;font-size:.85rem;letter-spacing:.08em}
h1{font-family:"Noto Serif TC","PMingLiU",serif;font-size:clamp(1.6rem,3.7vw,2.35rem);line-height:1.4;margin:8px 0}
h2{font-size:1.45rem;line-height:1.5;margin:8px 0 12px}
h3{font-size:1.13rem;line-height:1.5;margin:2px 0}
p{margin:6px 0 12px}
.academy-actions,.academy-toolbar,.academy-tabs{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.academy-button,.academy-tabs button,.academy-nav button,.academy-choice{min-height:46px;border-radius:10px;padding:10px 17px;border:1px solid #36584c;background:var(--accent);color:white;text-align:left;text-decoration:none;font-weight:700;line-height:1.5}
.academy-button.secondary,.academy-nav button,.academy-tabs button{background:#f1ecdf;color:#25463a;border-color:#b8ae97}
.academy-button.ghost{background:transparent;color:#244e40}
.academy-button:hover,.academy-tabs button:hover,.academy-choice:hover{filter:brightness(.94)}
.academy-button[disabled],button[disabled]{opacity:.55;cursor:not-allowed}
.academy-tabs{margin:18px 0 6px}
.academy-tabs button[aria-current="page"]{background:#345448;color:#fff;border-color:#345448}
.academy-notice{min-height:1px;color:#773f26}
.academy-notice:not(:empty){border-left:4px solid #b98b50;padding:8px 13px;background:#fffaeb;margin:12px 0}
#academyContent{padding:12px 0 28px}
.academy-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:15px}
.academy-card,.academy-panel,.academy-topic{background:#fffdf7dc;border:1px solid var(--line);border-radius:12px;padding:18px;box-shadow:0 3px 12px #3a31231b;min-width:0;overflow-wrap:anywhere}
.academy-card+.academy-card,.academy-topic+.academy-topic{margin-top:12px}
.academy-grid .academy-card+.academy-card{margin-top:0}
.academy-card .academy-button{display:inline-block;margin-top:10px}
.academy-topic{background:#fffdf9;border-color:#d0c5ae}
.academy-example{background:#f1eedf;border-left:3px solid #9b804d;padding:9px 12px;margin:12px 0;color:#394338}
.academy-caption{font-size:.9rem;color:var(--muted)}
.academy-toolbar,.academy-nav{margin:15px 0}
.academy-nav{display:flex;flex-wrap:wrap;gap:10px}
.academy-nav button{flex:0 1 auto}
.academy-progress{font-weight:750;color:#345344;margin:6px 0}
.academy-meter{width:100%;height:10px;border-radius:999px;background:#ddd5c4;overflow:hidden;margin:5px 0 18px}
.academy-meter>span{display:block;height:100%;background:#4c7655;transition:width .15s ease}
.academy-choice-list{display:grid;gap:10px;margin:16px 0}
.academy-choice{display:block;width:100%;background:#fbfaf5;color:var(--ink);border-color:#afa389;font-weight:500;min-height:56px}
.academy-choice[aria-pressed="true"]{border:2px solid #2e6151;background:#e2f0e3;font-weight:750}
.academy-choice small{display:block;color:#4d5a4b}
.academy-card .rank{font-size:.88rem;letter-spacing:.05em;color:#75552c;font-weight:800}
.academy-card .recommend-note{font-size:.92rem;color:#4c594f}
.academy-card .academy-actions{margin-top:12px}
.academy-card .academy-actions .academy-button{margin:0;min-height:44px;font-size:.92rem}
.academy-warning{background:#ffeedb;border:1px solid #bd8458;color:#693a24;padding:12px;border-radius:10px}
.academy-status{font-size:.92rem;color:var(--muted)}
.academy-footer{border-top:1px solid var(--line);padding:16px 0 28px;font-size:.92rem;color:var(--muted)}
[hidden]{display:none!important}
@media(max-width:600px){
 html{font-size:15px}
 body{line-height:1.8}
 .academy-wrap{width:min(100% - 24px,1000px)}
 .academy-header-row{align-items:start}
 .academy-brand span{display:block}
 .academy-hero{padding-top:18px}
 .academy-tabs{display:grid;grid-template-columns:1fr;gap:7px}
 .academy-tabs button{text-align:center}
 .academy-actions{align-items:stretch}
 .academy-actions>.academy-button{flex:1 1 100%;text-align:center}
 .academy-card,.academy-topic,.academy-panel{padding:15px}
 .academy-nav button{flex:1 1 40%;text-align:center}
}
@media(prefers-reduced-motion:reduce){.academy-meter>span{transition:none}}

/* 2026-11-16 real-user remediation: readable instructions and compact recommendations. */
#academyContentTitle:focus{outline:none}
.academy-lesson{display:grid;gap:16px}
.academy-lesson>section,.academy-further-reading{min-width:0}
.academy-learning-goal{padding:14px 17px;border-left:4px solid #456c54;background:#edf1e8;border-radius:7px}
.academy-learning-goal h3{margin:0 0 5px;color:#254b3b}
.academy-learning-goal p{margin:0}
.academy-instruction h3,.academy-walkthrough h3,.academy-understanding h3{margin:0 0 12px;color:#3c3329}
.academy-steps{list-style:none;counter-reset:academy-step;display:grid;gap:10px;margin:0;padding:0}
.academy-steps li{counter-increment:academy-step;position:relative;padding:13px 16px 13px 57px;border:1px solid #cec3ac;border-radius:9px;background:#fffdf7;min-width:0}
.academy-steps li:before{content:counter(academy-step);position:absolute;left:15px;top:13px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#34584b;color:#fff;font-weight:700}
.academy-steps strong{display:block;font-size:1.03rem;margin-bottom:5px;color:#2e4938}
.academy-steps p{margin:0;line-height:1.85}
.academy-walkthrough{padding:14px 17px;border-left:4px solid #8b6b34;border-radius:7px;background:#f3ead6}
.academy-walkthrough p{margin:0;line-height:1.9}
.academy-understanding{padding:16px;border-radius:10px;border:1px solid #b8c3b5;background:#f3f7f2}
.academy-understanding>p{margin:0 0 10px}
.academy-understanding-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:10px}
.academy-understanding-options .academy-choice{line-height:1.65;overflow-wrap:anywhere}
.academy-understanding-feedback{min-height:0}
.academy-understanding-feedback:not(:empty){margin:10px 0;padding:10px 12px;border-radius:7px;background:#fff2e0;border-left:4px solid #bd794d}
.academy-understanding-feedback.is-correct{background:#e1efe2;border-color:#418052}
.academy-further-reading{border:1px solid #cbbfa9;border-radius:8px;background:#f9f5eb;padding:12px 15px}
.academy-further-reading summary{cursor:pointer;font-weight:700;color:#355244;line-height:1.7}
.academy-further-reading .academy-topic:first-of-type{margin-top:14px}
.academy-result-grid{align-items:start;grid-template-columns:repeat(auto-fit,minmax(min(100%,286px),1fr))}
.academy-result-card{display:flex;flex-direction:column;gap:8px;padding:16px 18px}
.academy-result-card .rank{margin:0}
.academy-result-card h3{font-size:1.35rem;color:#2f4838}
.academy-result-card>p{margin:0;line-height:1.7}
.academy-result-card .academy-result-role{color:#496349;font-size:.95rem;font-weight:700;border-bottom:1px solid #d6ceb9;padding-bottom:10px}
.academy-result-card .academy-actions{margin-top:8px}
.academy-result-card .academy-actions .academy-button{width:100%;text-align:center}
.academy-result-details{margin-top:10px;border-top:1px solid #cbbfa9;padding-top:12px;min-width:0;overflow-wrap:anywhere}
.academy-result-details summary{color:#315d4b;cursor:pointer;line-height:1.65;font-weight:700}
.academy-result-details p{font-size:.92rem;margin:8px 0;line-height:1.75}
@media(max-width:620px){
 .academy-lesson{gap:11px}
 .academy-steps li{padding:12px 12px 12px 46px}
 .academy-steps li:before{left:10px;top:12px;width:25px;height:25px}
 .academy-understanding{padding:13px}
 .academy-understanding-options{grid-template-columns:1fr}
 .academy-result-card{padding:15px}
}

/* 30 humorous dialogue, with original 20 semantic choice clearly shown. */
.academy-quiz-meaning{display:block;margin-top:7px;padding-top:6px;border-top:1px dashed #c6b99f;color:#4b5a50;font-size:.9em;font-weight:400;line-height:1.7;overflow-wrap:anywhere}
.academy-choice[aria-pressed="true"] .academy-quiz-meaning{color:#315849}

/* Academy dossier journey composition. Shared watercolor tokens/art; no alternate theme. */
@media screen {
 body.academy-dossier #academyMain .academy-hero{
   min-height:0;padding:clamp(18px,2.6vw,34px);margin-block:16px;
 }
 body.academy-dossier #academyMain .academy-hero::before{
   width:auto;max-width:49%;height:100%;aspect-ratio:4.173;top:0;bottom:auto;opacity:1;filter:none;
   background:linear-gradient(90deg,#fcf7ed 0%,rgba(252,247,237,.3) 26%,transparent 52%),url("./fantasy-watercolor-scene.webp");
   background-size:100% 100%,auto 235%;background-position:center,right top;background-repeat:no-repeat;
 }
 body.academy-dossier #academyMain .academy-hero>p:not(.eyebrow),
 body.academy-dossier #academyMain .academy-hero h1{max-width:54%}
 body.academy-dossier #academyMain .academy-hero h1{font-size:clamp(26px,3vw,39px)}
 body.academy-dossier #academyMain .academy-hero .eyebrow{font-size:15px}
 body.academy-dossier #academyContent .academy-question-heading{
   display:flex;align-items:center;gap:18px;min-width:0;
   padding:10px 14px;background:linear-gradient(90deg,#ebdac0,#f7efdf 75%,transparent);
   border-radius:16px 9px 15px 8px; border:1px solid var(--wcs-line,#d8cbb5);
 }
 body.academy-dossier #academyContent .academy-question-art{
   width:clamp(64px,7vw,104px);height:clamp(64px,7vw,104px);object-fit:contain;flex:none;
 }
 body.academy-dossier #academyContent .academy-question-copy{min-width:0;flex:1}
 body.academy-dossier #academyContent .academy-question-copy h3{font-size:clamp(21px,2vw,29px);margin:0}
 body.academy-dossier #academyContent .academy-question-copy .academy-caption{font-size:15px;margin:6px 0 0;line-height:1.65}
 body.academy-dossier #academyContent .academy-choice-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 body.academy-dossier #academyContent .academy-choice{
   font-size:18px;line-height:1.6;padding:15px 20px 15px 28px;
   min-height:112px;border-radius:16px 9px 15px 8px;
   box-shadow:inset 0 0 0 2px rgba(255,255,248,.7);
   justify-content:center;
 }
 body.academy-dossier #academyContent .academy-choice::before{top:25px;left:12px}
 body.academy-dossier #academyContent .academy-choice[aria-pressed="true"]{padding-left:24px}
 body.academy-dossier #academyContent .academy-quiz-meaning{font-size:15px;line-height:1.65}
 body.academy-dossier #academyContent .academy-progress{font-size:16px}
 body.academy-dossier #academyContent .academy-meter{height:12px}
 body.academy-dossier #academyContent .academy-nav{margin-bottom:0;justify-content:space-between}
 body.academy-dossier #academyContent .academy-result-heading{display:flex;gap:10px;align-items:center;min-width:0}
 body.academy-dossier #academyContent .academy-class-art{width:62px;height:62px;object-fit:contain;flex:none}
 body.academy-dossier #academyContent .academy-result-heading h3{font-size:25px;min-width:0;overflow-wrap:anywhere}
 body.academy-dossier #academyContent .academy-result-card{background:linear-gradient(160deg,#fffdf6,#f4e9d5);border-radius:18px 10px 16px 9px}
 body.academy-dossier.academy-show-results #academyMain .academy-hero{padding:12px 20px}
 body.academy-dossier.academy-show-results #academyMain .academy-hero::before{opacity:1}
 body.academy-dossier.academy-show-results #academyMain .academy-hero h1{font-size:24px}
 @media(max-width:760px){
   body.academy-dossier #academyContent .academy-choice-list{grid-template-columns:minmax(0,1fr);gap:10px}
   body.academy-dossier #academyContent .academy-choice{font-size:16px;min-height:76px;padding:12px 14px 12px 24px}
   body.academy-dossier #academyContent .academy-choice[aria-pressed="true"]{padding-left:20px}
   body.academy-dossier #academyContent .academy-choice::before{top:20px;left:9px}
   body.academy-dossier #academyContent .academy-question-heading{gap:10px;padding:9px}
   body.academy-dossier #academyContent .academy-question-art{width:58px;height:58px}
   body.academy-dossier #academyMain .academy-hero{padding:18px 16px}
   body.academy-dossier #academyMain .academy-hero::before{width:32%;opacity:1}
   body.academy-dossier #academyMain .academy-hero>p:not(.eyebrow),
   body.academy-dossier #academyMain .academy-hero h1{max-width:100%}
   body.academy-dossier #academyContent .academy-result-heading h3{font-size:23px}
 }
}

/* Academy mobile-first visual acceptance: newly painted source artwork,
   no additional visual system. Keep the real quiz in the first viewport. */
@media screen {
 body.academy-dossier #academyMain .academy-hero h1{display:flex;align-items:center;gap:10px}
 body.academy-dossier .academy-hero-art{width:64px;height:64px;flex:none;object-fit:contain}
 body.academy-dossier .academy-action-art{width:29px;height:29px;object-fit:contain;flex:none;vertical-align:middle}
 body.academy-dossier .academy-rank-art{width:28px;height:28px;object-fit:contain;vertical-align:middle;margin-right:6px}
 body.academy-dossier #academyContent .academy-panel>.academy-caption{margin:8px 0 0;line-height:1.55;font-size:15px}
 body.academy-dossier #academyContent .academy-question-heading{background:linear-gradient(112deg,#e6d4b3,#fcf5e6);border-color:#b9a27b}
 body.academy-dossier #academyContent .academy-question-art{width:clamp(72px,7vw,100px);height:clamp(72px,7vw,100px)}
 body.academy-dossier #academyContent .academy-choice{background:linear-gradient(135deg,#fffcf4,#f6ecd7);border-color:#c2ae8c}
 body.academy-dossier #academyContent .academy-choice[aria-pressed="true"]{background:linear-gradient(115deg,#e1ecdc,#f5f8ed);border-color:#4b6b4d}
 body.academy-dossier #academyContent .academy-choice:hover:not([aria-pressed="true"]){background:#f8edda}
 @media(max-width:760px){
   body.academy-dossier .academy-header .academy-header-row{min-height:48px;padding-block:4px}
   body.academy-dossier .academy-header .academy-brand img{width:30px;height:30px}
   body.academy-dossier #academyMain .academy-hero{padding:10px 12px;margin:8px 0;min-height:0}
   body.academy-dossier #academyMain .academy-hero::before{width:34%;height:72px;bottom:auto;opacity:1;background-size:100% 100%,auto 235%}
   body.academy-dossier #academyMain .academy-hero .eyebrow{display:none}
   body.academy-dossier #academyMain .academy-hero h1{font-size:clamp(19px,5vw,23px);line-height:1.25;margin:0 0 8px;gap:7px;max-width:70%;min-height:60px}
   body.academy-dossier .academy-hero-art{width:34px;height:34px}
   body.academy-dossier #academyMain .academy-hero>p:not(.eyebrow){font-size:14px;line-height:1.45;margin:0 0 8px}
   body.academy-dossier #academyMain .academy-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
   body.academy-dossier #academyMain .academy-actions .academy-button{font-size:14px;line-height:1.25;padding:6px 5px;min-height:44px;width:100%;gap:4px;text-align:center}
   body.academy-dossier .academy-action-art{width:23px;height:23px}
   body.academy-dossier.academy-quiz-active #academyMain .academy-hero>p:not(.eyebrow){display:none}
   body.academy-dossier.academy-quiz-active #academyContent{padding:10px;min-height:0}
   body.academy-dossier.academy-quiz-active #academyContentTitle{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap;margin:0;padding:0;border:0}
   body.academy-dossier.academy-quiz-active #academyContent>.academy-caption{margin:0 0 6px;font-size:14px;line-height:1.45}
   body.academy-dossier #academyContent .academy-progress{font-size:15px;margin:0 0 4px;line-height:1.35}
   body.academy-dossier #academyContent .academy-meter{height:8px;margin:0 0 9px}
   body.academy-dossier #academyContent .academy-panel{padding:8px;border:0;background:transparent;box-shadow:none}
   body.academy-dossier #academyContent .academy-question-heading{gap:9px;padding:8px}
   body.academy-dossier #academyContent .academy-question-art{width:60px;height:60px}
   body.academy-dossier #academyContent .academy-question-copy h3{font-size:20px;line-height:1.35;margin:0}
   body.academy-dossier #academyContent .academy-panel>.academy-caption{font-size:14px;margin:7px 0;line-height:1.45}
   body.academy-dossier #academyContent .academy-choice-list{margin:9px 0;gap:8px}
   body.academy-dossier #academyContent .academy-choice{font-size:16px;min-height:70px;line-height:1.5;padding:10px 12px 10px 24px}
   body.academy-dossier #academyContent .academy-quiz-meaning{font-size:14px;line-height:1.5;margin-top:5px;padding-top:4px}
   body.academy-dossier #academyContent .academy-nav{margin-top:10px}
 }
}
