.concept-card { background:var(--paper); border:1px solid var(--line); border-radius:20px; padding:clamp(18px,4vw,32px); }
#concept-room { max-width:720px; margin:auto; }
#concept-title { font-size:clamp(1.18rem,3vw,1.55rem); line-height:1.55; margin:10px 0 16px; }
#concept-progress { width:100%; height:12px; accent-color:var(--green); margin:0 0 16px; }
#concept-body,.concept-options,.concept-actions { display:grid; gap:9px; }
.concept-unit,.concept-options button { text-align:left; min-height:48px; white-space:normal; }
.concept-options.ox { grid-template-columns:1fr 1fr; }
.concept-options.ox button { text-align:center; font-size:1.5rem; }
.concept-options button[aria-pressed=true] { background:var(--lime); border-color:var(--green); color:var(--ink); }
.concept-feedback { margin:14px 0 4px; border-radius:12px; padding:12px 14px; background:#f5ecda; }
.concept-feedback.right { background:#e0f2ce; }
.concept-feedback.wrong { background:#fae7d7; }
.concept-actions:not(:empty) { margin-top:16px; }
.concept-score { font-size:1.4rem; font-weight:750; }
.staff-main { max-width:740px; }
.staff-main h1 { font-size:clamp(1.65rem,5vw,2.1rem); margin:0 0 14px; }
.staff-tabs { margin:16px 0; }
.progress-tools { display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
.progress-tools label { flex:1 1 160px; }
.progress-card { margin:10px 0; padding:14px 16px; border:1px solid var(--line); border-radius:16px; background:var(--paper); }
.progress-card summary { cursor:pointer; color:var(--ink); }
.progress-card summary strong { font-size:1.1rem; }
.progress-card summary span { margin-left:10px; font-size:.84rem; color:var(--muted); }
.weak-box { margin:12px 0; padding:10px 13px; border-radius:10px; background:#f4eddf; }
.weak-box p { margin:3px 0 0; font-size:.88rem; }
.unit-progress { padding:7px 0; }
.unit-heading { display:flex; justify-content:space-between; gap:8px; }
.unit-heading span,.unit-progress small,.progress-note,#progress-summary { color:var(--muted); font-size:.86rem; }
.unit-progress progress { display:block; width:100%; height:8px; accent-color:var(--green); margin:4px 0; }
#progress-title { margin-bottom:8px; }
#progress-summary { margin:10px 0; }
.progress-note { margin-top:14px; }
:root {
  color-scheme: light;
  --ink: #142e34;
  --muted: #536969;
  --line: #cdd8ce;
  --paper: #fffef8;
  --deep: #17383c;
  --lime: #d7f88b;
  --green: #266450;
  font: 16px/1.58 "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: #edf1e7; color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
main { width: min(1140px, calc(100% - 64px)); margin: 0 auto; padding: clamp(26px,5vh,64px) 0 48px; flex: 1; }
.masthead { background: #132f34; color: white; display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 12px max(26px, calc((100% - 1140px)/2)); gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 750 23px/1.2 "Arial",sans-serif; letter-spacing: -.055em; }
.planet { width: 25px; height: 25px; border-radius: 50%; background: radial-gradient(circle at 32% 32%,#efffb0,#c7ed83 55%,#95c37e); position: relative; margin: 0 4px; }
.planet::after { content: ""; position: absolute; inset: 6px -6px; border: 1.8px solid #e7ffbb; border-radius: 50%; transform: rotate(-30deg); }
.mode { font-size: .76rem; color: #e6f4e2; border: 1px solid #536e6b; border-radius: 16px; padding: 3px 10px; }
.kicker, .login-guide, .empty { color: var(--muted); }
.kicker { margin: 0; font-size: .84rem; font-weight: 720; }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { line-height: 1.27; letter-spacing: -.05em; }
h2 { font-size: 1.35rem; }
.welcome { display: grid; grid-template-columns: 1.18fr 1fr; background: var(--paper); box-shadow: 0 14px 50px #20393311; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); }
.welcome-copy,.tutor-header { background-color: var(--deep); background-image: radial-gradient(ellipse at 16% 7%,#31635f,transparent 57%),radial-gradient(circle,#abcec033 1px,transparent 1.5px); background-size: auto, 22px 22px; color: #fbfcf2; }
.welcome-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 32px clamp(28px,5vw,70px) 40px; }
.welcome-earth { height: clamp(155px,21vw,250px); width: 100%; object-fit: contain; }
.welcome-copy .kicker { margin: 8px 0; color: var(--lime); }
.welcome-copy h1 { margin: 0; font-size: clamp(2.6rem,4.5vw,4.2rem); font-weight: 800; line-height: 1.08; }
.login { display: grid; align-content: center; gap: 8px; padding: clamp(25px,5vw,64px); }
.login h2 { margin: 0; font-size: 1.8rem; }
.login-guide { margin: 0 0 12px; }
.login .primary { margin-top: 12px; }
label,legend { color: var(--muted); font-weight: 680; font-size: .9rem; }
input:not([type=radio]),select,textarea { background: white; color: var(--ink); border: 1px solid #aebeb6; border-radius: 10px; font: inherit; width: 100%; padding: 10px 12px; min-height: 44px; }
textarea { resize: vertical; }
button { border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 8px 15px; font: inherit; font-weight: 700; background: white; color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--green); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #4088ad; outline-offset: 3px; }
.primary { background: var(--deep); color: white; border-color: var(--deep); }
.primary:hover { background: #29514e; }
.secondary,.teacher { background: transparent; }
.workspace-heading,.sheet-heading,.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.workspace-heading { margin-bottom: 22px; }
.workspace-heading h1 { margin: 3px 0 0; font-size: clamp(1.75rem,3.6vw,3rem); }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); grid-template-areas: "tutor question"; gap: 22px; align-items: start; }
.question,.activity { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 5px 22px #19333108; }
.question { grid-area: question; padding: clamp(18px,3vw,32px); }
.sheet-heading { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet-heading h2,.tutor-header h2 { margin: 0; }
#sheet-number { font: 700 .82rem/1.2 ui-monospace,monospace; color: var(--green); }
.question select { margin: 6px 0 18px; }
#prompt { font-size: clamp(1.05rem,2vw,1.32rem); line-height: 1.6; margin-bottom: 12px; }
.question img { width: 100%; max-height: 290px; object-fit: contain; }
.question #figure { max-height: none; height: auto; }
.question ol { padding-left: 26px; margin: 8px 0 0; }
.question li::marker { color: var(--green); font-weight: 750; }
.question li + li { margin-top: 5px; }
#photo-tip { font-size: .875rem; color: var(--muted); margin: 8px 0; }
.activity { grid-area: tutor; padding: 0 24px 20px; min-width: 0; }
.tutor-header { margin: 0 -24px; border-radius: 19px 19px 0 0; display: flex; align-items: center; gap: 15px; padding: 8px 24px; }
.tutor-portrait { width: 92px; height: 92px; object-fit: contain; }
.tutor-header h2 { font-size: 1.55rem; }
.tutor-header p { margin: 3px 0 0; color: #dcf0cb; font-size: .88rem; }
.tabs { display: flex; gap: 5px; margin: 16px 0 0; padding: 4px; background: #e9eee5; border-radius: 12px; }
.tabs button { border: none; flex: 1; padding: 5px; min-height: 40px; background: transparent; font-size: .94rem; }
.tabs [aria-pressed=true] { color: var(--deep); background: var(--lime); }
#timeline { margin: 16px 0 10px; display: grid; gap: 10px; max-height: min(38vh,390px); overflow-y: auto; }
.bubble,.empty { margin: 0; width: fit-content; max-width: 94%; border-radius: 0 13px 13px; background: #ebf1e8; padding: 11px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.student { justify-self: end; border-radius: 13px 0 13px 13px; background: #dbead8; }
.speaker { display: block; color: var(--green); font-size: .77rem; margin-bottom: 3px; }
.hint-button { color: var(--green); border-radius: 22px; font-size: .87rem; }
.hint-button span { padding-left: 8px; }
#activity-form { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 16px; }
#student-text { margin-top: 6px; }
.actions { justify-content: flex-end; gap: 8px; margin-top: 8px; }
.actions button { padding-inline: 12px; }
.mic { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.mic-icon { font: 1.25rem/1 "Segoe UI Symbol", system-ui, sans-serif; }
.mic[aria-pressed=true] { color: #922d28; background: #fff0ec; border-color: #c9776c; }
.teacher { margin-top: 12px; font-size: .85rem; color: var(--muted); }
.status { color: #804021; margin: 8px 0 0; }
.status:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0; }
fieldset label { display: flex; align-items: baseline; gap: 8px; padding: 9px; margin-top: 5px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
footer { text-align: center; color: var(--muted); padding: 16px; font-size: .8rem; }
footer span { padding: 0 5px; }
.text-action { background: transparent; border: 0; color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
#back-route { margin: 0 0 8px; padding-left: 0; }
#choose-route,.admin-panel { max-width: 720px; margin-inline: auto; }
.route-hero { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 24px clamp(20px,5vw,42px); overflow: hidden; border-radius: 20px; background: radial-gradient(ellipse at 78% 50%,#336965,transparent 70%),var(--deep); color: #fffef8; }
.route-hero p { color: var(--lime); margin: 0 0 8px; font-weight: 700; font-size: .88rem; }
.route-hero h2 { font-size: clamp(2rem,5vw,3rem); line-height: 1.16; margin: 0; }
.route-hero img { width: 42%; height: clamp(128px,23vw,172px); object-fit: contain; }
.route-options { display: grid; gap: 12px; margin-top: 16px; }
.route-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 15px; align-items: center; text-align: left; padding: 18px; background: var(--paper); border-radius: 16px; }
.route-card strong,.route-card small { display: block; }
.route-card strong { font-size: 1.12rem; }
.route-card small { color: var(--muted); font-weight: 500; margin-top: 2px; }
.route-card > :last-child { color: var(--green); font-size: 1.6rem; }
.route-symbol { width: 48px; height: 48px; display: grid; place-items: center; background: #dcf1bc; color: var(--green); border-radius: 14px; font: 700 27px/1 Arial,sans-serif; }
.camera-symbol { background: #dceee8; }
.camera-symbol i { width: 24px; height: 18px; border: 2px solid; border-radius: 4px; display: grid; place-items: center; position: relative; }
.camera-symbol i::before { content: ''; width: 8px; height: 8px; border: 2px solid; border-radius: 50%; }
.camera-symbol i::after { content: ''; width: 8px; height: 3px; position: absolute; bottom: 100%; background: currentColor; border-radius: 3px 3px 0 0; }
.photo-actions,.report-days { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-actions button { flex: 1 1 auto; }
.admin-panel { background: var(--paper); padding: 24px; border: 1px solid var(--line); border-radius: 18px; }
.admin-panel a { color: var(--green); white-space: nowrap; }
#admin-report { white-space: pre-wrap; margin: 16px 0 0; }
#my-results { margin-top: 14px; padding: 14px 18px; background: white; border: 1px solid var(--line); border-radius: 14px; }
#my-results summary { cursor: pointer; font-weight: 700; }
#result-list { margin-top: 12px; }
#result-list article + article { border-top: 1px solid var(--line); }
#result-list p { margin: 6px 0 12px; }
#answer-depth { margin: 10px 0; }
#answer-depth label { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; cursor: pointer; }
#answer-depth label:has(:checked) { background: #edf5ef; border-color: var(--green); color: var(--green); }
@media (max-width: 730px) {
  main { width: calc(100% - 28px); padding: 20px 0 32px; }
  .masthead { min-height: 56px; padding: 8px 18px; }
  .workspace-grid,.welcome { grid-template-columns: minmax(0,1fr); }
  .workspace-grid { grid-template-areas: "question" "tutor"; gap: 14px; }
  .welcome-copy { flex-direction: row-reverse; align-items: center; justify-content: space-between; padding: 20px; }
  .welcome-earth { width: 45%; height: 132px; }
  .welcome-copy h1 { font-size: clamp(1.65rem,7.2vw,2.6rem); }
  .login { padding: 22px; }
  .workspace-heading { margin-bottom: 14px; }
  .workspace-heading button { flex-shrink: 0; font-size: .85rem; }
  .sheet-heading { margin-bottom: 10px; padding-bottom: 8px; }
  .activity { padding: 0 16px 14px; }
  .tutor-header { margin: 0 -16px; padding: 6px 16px; gap: 10px; }
  .tutor-portrait { width: 66px; height: 66px; }
}
.section-switch { display: flex; gap: 4px; width: fit-content; border-radius: 12px; padding: 3px; background: #e6ede5; }
.section-switch button { min-width: 74px; border: 0; padding: 5px 16px; background: transparent; }
.section-switch [aria-pressed=true] { background: var(--deep); color: white; }
#choose-route > .section-switch { margin-bottom: 12px; }
.pane-switch { display: none; }
@media (max-width: 730px) {
  body.studying { overflow: hidden; }
  .studying .masthead, .studying footer, .studying #workspace > .workspace-heading { display: none; }
  .studying #workspace {
    position: fixed; inset-inline: 0; top: var(--study-top, 0px); height: var(--study-height, 100dvh);
    display: flex; flex-direction: column; overflow: hidden; background: var(--paper);
  }
  #study-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: max(5px, env(safe-area-inset-top)) 14px 5px; border-bottom: 1px solid var(--line); }
  #back-route { margin: 0; text-decoration: none; }
  .pane-switch { display: flex; }
  #study { display: flex; flex: 1; min-height: 0; align-items: stretch; gap: 0;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  #study::-webkit-scrollbar { display: none; }
  #study > .surface { flex: 0 0 100%; min-width: 0; min-height: 0; border: 0; border-radius: 0;
    box-shadow: none; scroll-snap-align: start; scroll-snap-stop: always; }
  #problem-pane { overflow-y: auto; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  #problem-pane img { max-height: none; }
  #chat-pane { display: flex; flex-direction: column; padding: 0 12px max(6px, env(safe-area-inset-bottom)); }
  .tutor-header { margin: 0 -12px; border-radius: 0; padding: 4px 12px; gap: 8px; }
  .tutor-header > div { display: flex; align-items: baseline; gap: 8px; }
  .tutor-header h2 { font-size: 1rem; }
  .tutor-header p { margin: 0; }
  .tutor-portrait { width: 32px; height: 32px; }
  #timeline { flex: 1 1 0; min-height: 0; max-height: none; align-content: start; overscroll-behavior-y: contain; margin: 0; padding: 12px 1px; }
  #answer-depth { display: flex; gap: 5px; margin: 0; border-top: 1px solid var(--line); padding: 3px 0; }
  #answer-depth legend, #input-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #answer-depth label { min-height: 32px; margin: 0; padding: 2px 9px; font-size: .82rem; }
  .hint-button { align-self: flex-start; min-height: 32px; padding: 3px 10px; margin: 2px 0; }
  #activity-form { margin: 0; padding: 0; border: 0; }
  #student-text { display: block; margin: 0; height: 44px; resize: none; }
  .actions { margin-top: 4px; }
  .tabs { margin-top: 4px; }
  #retry-choices { max-height: 25dvh; overflow-y: auto; }
  #work-status { margin: 2px 0; font-size: .82rem; }
}
