:root{font-family:"Pretendard","Noto Sans KR","맑은 고딕",sans-serif;color:#243d47;background:#f3f7f8;line-height:1.65;--teal:#297e83;--line:#d7e2e6;--muted:#71848d}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.42}button,a,input,textarea,select{outline-offset:4px}button:focus-visible,a:focus-visible{outline:3px solid #79bfc4}a{color:var(--teal)}[hidden]{display:none!important}.skip{position:absolute;top:-80px;left:16px;z-index:20;background:white;padding:12px}.skip:focus{top:8px}
.header{background:#fff;border-bottom:1px solid var(--line)}.header-inner{max-width:1440px;margin:auto;display:flex;align-items:center;gap:24px;padding:16px 28px}.brand{text-decoration:none;font-weight:800;font-size:17px;white-space:nowrap}.brand span{font-weight:400;color:var(--muted);margin-left:8px;font-size:13px}h1{font-size:20px;margin:0;letter-spacing:-.04em}#identity{margin-left:auto;display:flex;align-items:center;gap:14px;font-size:13px}main{max-width:1440px;margin:auto;padding:28px}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:28px}.card h2{margin:0 0 16px;font-size:23px;line-height:1.4;letter-spacing:-.035em}.card h3{font-size:16px;margin:22px 0 8px}.muted,.help{color:var(--muted)}.help{font-size:13px;margin:8px 0}.eyebrow{font-size:12px;color:var(--muted);letter-spacing:.04em;margin:0 0 12px}.btn{border:1px solid #bacdd4;border-radius:9px;background:#fff;color:#294a55;min-height:44px;padding:9px 16px;font-weight:650}.btn.primary{background:var(--teal);border-color:var(--teal);color:white}.btn.quiet{border-color:transparent;background:transparent;color:var(--muted)}.btn.danger{color:#a24e40}.actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:20px}.pill{border-radius:99px;background:#e6f1f2;color:#286b74;padding:4px 10px;font-size:12px;font-weight:650}.waiting,.login{max-width:680px;margin:8vh auto;background:white;padding:40px;border:1px solid var(--line);border-radius:18px}.login h2,.waiting h2{font-size:30px;line-height:1.35;letter-spacing:-.05em;margin:0 0 20px}.login .steps{display:flex;gap:14px;margin:24px 0;flex-wrap:wrap}.steps span{background:#f0f5f6;padding:7px 12px;border-radius:7px;font-size:14px}.notice{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);max-width:min(90vw,700px);border-radius:12px;background:#243d47;color:#fff;padding:14px 22px;z-index:100;box-shadow:0 4px 18px #243d4720}.notice.error{background:#874b43}
.context{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}.context h2{margin:0;font-size:21px;letter-spacing:-.03em}.context p{margin:6px 0 0;font-size:14px}.clock{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--teal);font-weight:700}.tabs{display:flex;border-bottom:1px solid var(--line);margin:20px 0;gap:10px}.tabs button{border:0;border-bottom:3px solid transparent;color:var(--muted);background:transparent;padding:13px 18px;font-weight:700}.tabs button[aria-selected=true]{border-color:var(--teal);color:var(--teal)}.two-col{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(360px,1fr);gap:24px;align-items:start}.article{font-size:15px;line-height:1.95}.article h2{font-size:27px}.article p{margin:10px 0 15px}.article img{display:block;width:100%;height:auto;border-radius:10px;margin:22px 0}.organisms{display:flex;flex-wrap:wrap;gap:9px}.chain{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:24px 0}.slot{background:#f7fafb;border:1px dashed #b8cbd3;border-radius:9px;padding:16px 18px;min-width:110px;text-align:center}.chain-model{background:#edf5f3;padding:16px;border-radius:10px;font-size:14px}.chain-model span{font-weight:700}.article-source{border-top:1px solid var(--line);margin-top:24px;font-size:12px;color:var(--muted)}
input,textarea,select{border:1px solid #bdcfd6;border-radius:8px;background:white;padding:10px 12px;color:inherit;max-width:100%}textarea{width:100%;resize:vertical;line-height:1.8;min-height:165px}label{display:block;font-size:14px;font-weight:650;margin-bottom:7px}.field{margin:16px 0}.field input,.field select{width:100%}.form-row{display:flex;gap:14px;flex-wrap:wrap}.form-row>.field{flex:1;min-width:180px}.saved{font-size:12px;min-height:20px;color:var(--muted)}.phases{display:flex;gap:10px;align-items:flex-end;margin:14px 0 18px;flex-wrap:wrap}.phase{display:flex;flex-direction:column;gap:8px;border-radius:12px;padding:10px}.phase.change{background:#edf4ea;color:#567148}.phase.recovery{background:#edf3f9;color:#4d718d}.phase strong{font-size:12px;text-align:center}.stage-buttons{display:flex;gap:7px}.stage{width:45px;height:43px;border:1px solid #cddde4;border-radius:8px;background:white;color:#405d6b}.stage.current{background:var(--teal);border-color:var(--teal);color:white;font-weight:800}.phases>.stage{margin-bottom:10px}.nav-actions{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.diagram{margin:24px 0}.bar-row{display:grid;grid-template-columns:115px minmax(0,1fr) 40px;gap:12px;align-items:center;margin:16px 0}.bar-row label{margin:0;font-size:12px}.bar-row small{display:block;color:var(--muted);font-weight:400}.bar-track{height:38px;background:#f1f5f6;border-radius:7px;display:flex;align-items:center}.bar{height:100%;max-width:100%;border-radius:6px;min-width:15px;transition:width .25s ease}.bar.secondary{background:#e8a992}.bar.primary{background:#80bdc8}.bar.producer{background:#b6ce70}.bar-row.target{background:#f3f8f8;border-radius:10px;padding:10px;margin:16px -10px}.bar-row output{font-size:13px;color:var(--muted)}.directions{display:flex;gap:10px;margin:22px 0}.directions .btn{flex:1;min-height:55px}.directions .selected{background:#e5f2f3;border:2px solid var(--teal);color:var(--teal)}.feedback{border-left:3px solid var(--teal);background:#f1f7f6;padding:17px;margin:18px 0;line-height:1.9}.feedback strong{display:block;font-size:15px}.question-title{font-size:24px;margin:12px 0;line-height:1.45;letter-spacing:-.035em}.history table{font-size:12px}.essay{max-width:960px;margin:auto}.essay textarea{min-height:340px}
.teacher-head{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:24px}.teacher-head h2{margin:0;font-size:25px}.teacher-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.teacher-grid .full{grid-column:1/-1}.stat-list{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.stat{background:#edf4f5;padding:12px 20px;border-radius:10px;font-size:13px}.stat b{display:block;font-size:24px;color:var(--teal)}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}th,td{text-align:left;padding:11px 10px;border-bottom:1px solid var(--line)}th{color:var(--muted);font-weight:600}td .btn{min-height:32px;font-size:12px;padding:5px 9px}.windows{max-height:270px;overflow:auto}.window-item{padding:12px 0;border-bottom:1px solid var(--line);display:flex;gap:14px;align-items:center;font-size:13px}.window-item span{flex:1}.checks{display:flex;gap:8px 16px;flex-wrap:wrap}.checks label{font-size:12px;display:flex;align-items:center;gap:5px;font-weight:400}.checks input{width:auto}.record{position:fixed;inset:4vh max(20px,calc((100vw - 1000px)/2));z-index:80;background:white;border:1px solid var(--line);border-radius:16px;padding:26px;overflow:auto;box-shadow:0 0 0 100vmax #243d4770}.record pre{white-space:pre-wrap;font:inherit;font-size:14px;line-height:1.9}.record .record-head{display:flex;justify-content:space-between;align-items:center;gap:20px;position:sticky;top:0;background:white;padding-bottom:14px}.demo-note{background:#eaf3f8;border:1px solid #c9dce9;border-radius:12px;padding:15px 22px;margin-bottom:22px;display:flex;gap:18px;align-items:center;font-size:14px}.demo-note span{flex:1}
@media(max-width:1000px){.two-col,.teacher-grid{grid-template-columns:1fr}.teacher-grid .full{grid-column:auto}.header-inner{padding:14px 18px;gap:14px}.brand span{display:none}main{padding:20px}.card{padding:23px}.article img{max-height:540px;object-fit:contain;background:#f3f7f8}}@media(max-width:560px){main{padding:16px}.header h1{font-size:16px}.brand{font-size:14px}#identity{font-size:11px;gap:4px}#identity .btn{font-size:11px;padding:6px}.card{padding:20px}.login,.waiting{padding:28px 22px;margin:3vh auto}.context{flex-direction:column;gap:10px}.context h2{font-size:19px}.tabs{gap:2px}.tabs button{padding:12px;font-size:14px}.bar-row{grid-template-columns:85px minmax(0,1fr) 30px;gap:8px}.slot{min-width:75px;font-size:12px;padding:12px}.stage{width:35px;height:38px}.phases{gap:6px}.phase{padding:7px}.stage-buttons{gap:4px}.article h2{font-size:24px}.record{inset:10px;padding:18px}.demo-note{flex-wrap:wrap}.stat{padding:10px 14px}.directions{gap:6px}.directions .btn{padding:9px}}
.stage{padding:0;white-space:nowrap}.pyramid-figure{margin:20px 0}.pyramid-layout{display:grid;grid-template-columns:minmax(100px,130px) minmax(0,1fr);gap:10px;align-items:stretch}.pyramid-labels{display:grid;grid-template-rows:repeat(3,1fr);padding:16px 0 10px;min-width:0}.pyramid-label{display:flex;flex-direction:column;justify-content:center;line-height:1.5;border-left:3px solid transparent;padding-left:8px}.pyramid-label strong{font-size:13px}.pyramid-label small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}.pyramid-label.target{border-color:var(--teal)}.pyramid-label.target strong{color:var(--teal)}.pyramid-svg{display:block;width:100%;height:100%;overflow:visible;min-width:0}.pyramid-figure figcaption{text-align:center;margin-top:10px}.pyramid-figure>p{margin-top:14px}@media(max-width:560px){.pyramid-layout{grid-template-columns:1fr;gap:12px}.pyramid-svg{order:1;height:auto;aspect-ratio:560/330}.pyramid-labels{order:2;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto;padding:0;gap:8px}.pyramid-label{justify-content:flex-start;border-left:0;border-top:3px solid transparent;padding:6px 0 0}.pyramid-label.secondary{border-top-color:#e8a992}.pyramid-label.primary{border-top-color:#80bdc8}.pyramid-label.producer{border-top-color:#b6ce70}.pyramid-label.target{border-top-color:var(--teal)}.pyramid-label strong{font-size:12px}.pyramid-label small{font-size:11px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}@media print{.header,.tabs,.actions,.record-head button,.notice,.nonprint{display:none!important}body:has(>dialog.record[open])> :not(dialog.record){display:none!important}.record{position:static;box-shadow:none;border:0;overflow:visible;width:100%;max-width:none;max-height:none;height:auto;margin:0;padding:0}.record pre{overflow-wrap:anywhere}.card{break-inside:avoid}body{background:white}main{padding:0}}
.organisms .selected{background:#e5f2f3;border:2px solid var(--teal);color:var(--teal)}.chain{align-items:stretch}.slot{cursor:pointer;color:var(--ink,#243d47);font-weight:700}.slot.filled{background:#edf5f3;border-style:solid}.chain-notice{color:#a2482b;font-weight:700}.placement{margin-top:12px}.pyramid-layer.tappable{cursor:pointer}button.pyramid-label{background:transparent;border:0;border-left:3px solid transparent;border-radius:0;text-align:left;font:inherit;color:inherit;min-height:44px;cursor:pointer}button.pyramid-label.placed{cursor:default;color:inherit}.chain-compare{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}.chain-compare figcaption{font-weight:700;margin:0 0 6px}@media(max-width:560px){button.pyramid-label{border-left:0;border-top:3px solid transparent;padding:6px 0 0}button.pyramid-label.secondary{border-top-color:#e8a992}button.pyramid-label.primary{border-top-color:#80bdc8}button.pyramid-label.producer{border-top-color:#b6ce70}}
.profiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.profile{margin:0;text-align:center}.profile img{display:block;width:100%;max-width:96px;aspect-ratio:1;object-fit:cover;border-radius:10px;margin:0 auto 6px}.profile figcaption{font-size:13px;font-weight:700;overflow-wrap:anywhere}
[data-draggable]{touch-action:none;cursor:grab;user-select:none}
.drag-ghost{position:fixed;left:0;top:0;transform:translate(-50%,-50%);pointer-events:none;z-index:1000;opacity:.92;box-shadow:0 8px 22px rgba(20,40,50,.25)}
.dragging{opacity:.35}
.slot.drop-over{outline:3px solid var(--teal);outline-offset:2px;background:#e5f2f3}
polygon.drop-over{stroke:#297e83;stroke-width:5}
.pyramid-name{fill:#1f3640}
.placement .pyramid-svg,.chain-compare .pyramid-svg{max-width:460px;margin:0 auto;display:block}
.case-choices .case-option img{width:100%;border-radius:10px;margin:8px 0}
.case-choices .case-option h2{font-size:19px}
