:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;color:#18273a;background:#f1f5f9;line-height:1.65;--accent:#196c80;--navy:#13243b}*{box-sizing:border-box}body{margin:0}header{background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:15px max(18px,calc((100% - 1050px)/2));gap:12px}.brand{display:flex;align-items:center;gap:12px;white-space:nowrap}.logo{font-size:30px;color:#85e2d0}.brand strong{display:block;font-size:20px;letter-spacing:.03em}.brand small{display:block;color:#c4d3e1;font-size:11px}#saveStatus{font-size:11px;text-align:right;color:#c4d3e1}main{max-width:1080px;margin:auto;padding:20px 16px}.hero{background:linear-gradient(120deg,#13243b,#1d586b);color:white;border-radius:20px;padding:26px 28px;display:flex;justify-content:space-between;align-items:center;gap:24px}.hero h1{font-size:clamp(28px,5vw,43px);line-height:1.3;margin:6px 0 12px}.hero p{margin:0;max-width:560px}.eyebrow{font-size:12px;color:#9ce5d3;letter-spacing:.14em;font-weight:700}.hero-aside{min-width:145px;display:grid;gap:8px}.hero-aside b{font-size:30px}.hero-aside span{font-size:12px}progress{width:100%;accent-color:#83e0cd}.tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:20px 0}.tabs button{background:#e2e8f0;color:#334155;padding:12px 3px;font-size:13px}.tabs button[aria-selected=true]{background:var(--navy);color:white}.page{display:grid;gap:16px}.page[hidden]{display:none}.panel{background:white;border:1px solid #e2e8f0;border-radius:16px;padding:20px;min-width:0}.panel h2{font-size:19px;margin:0 0 14px}.panel p{margin:8px 0 14px}.panel label:not(.button){display:block;font-size:13px;font-weight:650;margin:12px 0 5px}select,textarea{width:100%;font:inherit;border:1px solid #cbd5e1;border-radius:9px;padding:10px;background:#fff;color:#17263a}textarea{resize:vertical}button,.button{display:inline-block;text-decoration:none;border:1px solid transparent;border-radius:9px;background:var(--accent);color:#fff;font:inherit;font-size:14px;font-weight:650;padding:10px 15px;cursor:pointer;text-align:center}.secondary{background:#edf5f7;color:#16576a;border-color:#c9e1e8}button:focus-visible,a:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #f2b84b;outline-offset:2px}.actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.hint{color:#53647a;font-size:12px}.step{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid #e2e8f0}.step:last-child{border:0}.step input{width:19px;height:19px;accent-color:var(--accent)}.step strong{display:block}.step small{display:block;color:#64748b}.step.active strong{color:var(--accent)}.code{font:14px/1.6 ui-monospace,monospace;background:#101c2e;color:#e2e8f0;tab-size:2}.version{display:flex;gap:12px;justify-content:space-between;align-items:center;border-bottom:1px solid #e2e8f0;padding:10px 0;flex-wrap:wrap}iframe{width:100%;height:420px;border:1px solid #dbe3ec;border-radius:10px;background:white}details{border-top:1px solid #e2e8f0;padding:14px 0}summary{cursor:pointer;font-weight:700}details li{margin:8px 0}footer{text-align:center;padding:25px;color:#64748b;font-size:12px}#checkResult{white-space:pre-wrap;font-size:13px;color:#334155}a{color:var(--accent)}@media(min-width:850px){#learn{grid-template-columns:1fr 1fr}#learn>.panel:last-child{grid-column:1/-1}#editor{grid-template-columns:1fr 1fr}}@media(max-width:520px){.hero{display:block;padding:20px}.hero-aside{margin-top:20px;grid-template-columns:auto 1fr;align-items:center}.hero-aside progress{grid-column:1/-1}.panel{padding:15px}.step{gap:8px}.step button{padding:6px 9px;font-size:12px}}

.logbar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:14px 0 6px;font-size:14px}.logbar button{padding:6px 12px;font-size:13px}
#consoleOut{background:#f8fafc;border:1px solid #dbe3ec;border-radius:10px;padding:8px 10px;max-height:220px;overflow:auto;font:13px/1.6 ui-monospace,monospace;white-space:pre-wrap;color:#1e293b}
#consoleOut:empty::before{content:"console.log の出力やエラーがここに表示されます。";color:#53647a}
.log{padding:3px 0;border-bottom:1px dashed #e2e8f0}.log:last-child{border:0}.log small{display:block;font:12px/1.5 system-ui,sans-serif;color:#475569;margin-top:2px}
.log.error{color:#b91c1c}.log.warn{color:#92400e}.log.notice{color:#16576a}.log.alert{color:#6d28d9}
/* v1.1 accessibility and editor */
[hidden]{display:none!important}.brand small,#saveStatus,.eyebrow,.hero-aside span,.tabs button,.panel label:not(.button),.hint,footer,#checkResult,.step small,.logbar button,.log small,#consoleOut,.step button{font-size:14px}.projectbar{margin-top:16px}.projectbar select{flex:1;min-width:160px;width:auto}.wide{grid-column:1/-1}.mission .eyebrow{color:#196c80}.skills{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.skills>div,.lessonbox{background:#f4f8fa;border:1px solid #dbe7ee;padding:12px;border-radius:10px}.skills p{margin:4px 0}.criterion{display:flex!important;gap:8px;align-items:flex-start;font-weight:400!important}.criterion input{flex:none;margin-top:6px}.editorwrap{display:flex;background:#101c2e;border-radius:9px;overflow:hidden}.editorwrap pre{flex:none;width:3.4em;text-align:right;padding:10px 9px;margin:0;color:#9aacc2;background:#1b2b40;font:14px/1.6 ui-monospace,monospace;overflow:hidden;max-height:440px;user-select:none}.editorwrap textarea{flex:1;min-width:0;resize:none;height:440px;border:0;border-radius:0;font:14px/1.6 ui-monospace,monospace;padding:10px;white-space:pre;overflow:auto}.panel input:not([type=checkbox]):not([type=file]){width:100%;font:inherit;border:1px solid #cbd5e1;border-radius:9px;padding:10px;color:#17263a;background:white}.panel input[type=checkbox]{accent-color:var(--accent);width:18px;height:18px;vertical-align:middle}.panel a:focus-visible,.panel input:focus-visible{outline:3px solid #f2b84b;outline-offset:2px}#diffOut{white-space:pre;overflow:auto;max-height:460px;background:#101c2e;color:#e2e8f0;padding:12px;border-radius:8px;font:14px/1.6 ui-monospace,monospace}.version span{overflow-wrap:anywhere}.warning{color:#9a3412}.step{grid-template-columns:1fr auto}.step small{margin-top:3px}.doneMark{color:#17654a}#lesson{margin-top:16px}.projectbar .actions{margin-bottom:0}.mission ul{margin:8px 0;padding-left:24px}#promptScore{margin:8px 0;font-size:14px}.panel button:disabled{opacity:.5;cursor:not-allowed}@media(min-width:850px){#learn>.panel.wide,#learn>.panel:nth-last-child(2){grid-column:1/-1}}@media(max-width:520px){header{flex-wrap:wrap}.brand{white-space:normal}.projectbar .actions{display:grid;grid-template-columns:repeat(3,1fr)}.projectbar select{grid-column:1/-1}.editorwrap textarea,.editorwrap pre{height:360px;max-height:360px}.tabs button{padding:10px 2px}}
