:root{--navy:#092a49;--navy-deep:#061d31;--teal:#287565;--mint:#e6f4ef;--gold:#bf8a24;--gold-soft:#fff4d9;--paper:#f2f5f6;--ink:#13212c;--muted:#687680;--line:#dce4e7;--white:#fff;--danger:#a93838}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--paper);color:var(--ink);font-family:"Noto Sans KR","Malgun Gothic",sans-serif}button,textarea{font:inherit}.topbar{height:74px;padding:0 clamp(16px,4vw,58px);background:var(--navy);color:#fff;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px}.back-link{color:#d7e5e9;text-decoration:none;font-size:14px;font-weight:700}.brand{display:flex;gap:10px;align-items:center}.brand-mark{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(255,255,255,.6);font-weight:900;font-size:12px}.brand>span:last-child{display:flex;flex-direction:column}.brand strong{font-size:15px}.brand small{font-size:9px;letter-spacing:.16em;color:#9fc6bd;margin-top:3px}.outline-button{justify-self:end;border:1px solid rgba(255,255,255,.45);background:transparent;color:#fff;border-radius:999px;padding:8px 14px}.tutor-shell{min-height:calc(100vh - 74px);display:grid;grid-template-columns:minmax(260px,360px) minmax(0,860px);justify-content:center;gap:24px;padding:28px}.intro-panel{background:var(--navy-deep);color:#fff;border-radius:22px;padding:38px;align-self:start;position:sticky;top:28px}.eyebrow{font-size:10px;letter-spacing:.17em;font-weight:900;color:#9bcdbf}.intro-panel h1{font-size:clamp(30px,3vw,43px);line-height:1.2;letter-spacing:-.045em;margin:18px 0}.intro-panel>p{color:#c4d3d8;line-height:1.8;font-size:15px}.source-key{margin-top:30px;padding-top:24px;border-top:1px solid rgba(255,255,255,.12);display:grid;grid-template-columns:max-content 1fr;align-items:center;gap:11px}.source-key small{color:#b7c7cd}.badge{display:inline-flex;width:max-content;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900}.badge.textbook{background:var(--mint);color:#176050}.badge.external{background:var(--gold-soft);color:#865d0e}.privacy-note{margin-top:28px;background:rgba(255,255,255,.07);border-radius:12px;padding:15px;color:#c9d7dc;font-size:12px;line-height:1.6}.privacy-note strong{color:#fff}.chat-panel{height:calc(100vh - 130px);min-height:650px;background:#fff;border:1px solid var(--line);border-radius:22px;display:grid;grid-template-rows:auto minmax(260px,1fr) auto auto auto;overflow:hidden;box-shadow:0 18px 55px rgba(9,42,73,.08)}.chat-head{padding:20px 24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:15px}.chat-head div{display:flex;gap:5px;align-items:baseline}.chat-head span{color:var(--muted);font-size:13px}.usage-status{background:#f1f4f5;border-radius:999px;padding:7px 10px}.chat-log{overflow-y:auto;padding:25px;scroll-behavior:smooth}.message{display:flex;gap:10px;margin-bottom:22px;align-items:flex-start}.message.user{justify-content:flex-end}.avatar{width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:900}.bubble{max-width:min(680px,86%);border-radius:5px 16px 16px 16px;background:#f0f4f5;padding:15px 17px}.message.user .bubble{background:var(--navy);color:#fff;border-radius:16px 5px 16px 16px}.bubble p{white-space:pre-wrap;line-height:1.75;margin:9px 0 0;font-size:15px}.bubble p:first-child{margin-top:0}.citation-list,.external-links{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.citation{background:#fff;border:1px solid #b9d8ce;color:#1b6656;border-radius:999px;padding:6px 9px;font-size:11px;font-weight:800}.external-block{margin-top:15px;padding:14px;border-left:4px solid var(--gold);background:#fff9ea;border-radius:4px 10px 10px 4px}.external-block p{margin-top:7px}.external-links a{color:#70500f;background:#fff;border:1px solid #ead49f;border-radius:8px;padding:7px 9px;font-size:11px;text-decoration:none}.safety-note{margin-top:13px;padding:12px;background:#fff0f0;color:var(--danger);border-radius:9px;font-size:13px;line-height:1.6}.mode-note{display:block;margin-top:10px;color:var(--muted);font-size:11px}.typing .bubble{color:var(--muted)}.typing-dots{display:inline-flex;gap:4px;margin-left:5px}.typing-dots i{width:6px;height:6px;border-radius:50%;background:#80a39b;animation:bounce 1s infinite}.typing-dots i:nth-child(2){animation-delay:.15s}.typing-dots i:nth-child(3){animation-delay:.3s}@keyframes bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-5px)}}.quick-questions{padding:0 22px 12px;display:flex;gap:8px;overflow-x:auto}.quick-questions button{white-space:nowrap;border:1px solid #cbd9dc;background:#fff;color:#415865;border-radius:999px;padding:8px 11px;font-size:12px;cursor:pointer}.quick-questions button:hover{border-color:var(--teal);color:var(--teal)}.question-form{margin:0 20px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end;border:2px solid #b8c9ce;border-radius:14px;padding:7px}.question-form:focus-within{border-color:var(--teal);box-shadow:0 0 0 3px rgba(40,117,101,.12)}.question-form textarea{resize:none;border:0;outline:0;min-height:48px;max-height:120px;padding:11px;line-height:1.5;color:var(--ink)}.question-form button{border:0;border-radius:10px;background:var(--teal);color:#fff;font-weight:900;padding:13px 17px;cursor:pointer}.question-form button:disabled{opacity:.5;cursor:wait}.learning-notice{margin:9px 24px 15px;color:#7a858a;font-size:10px;line-height:1.5}.error-bubble{background:#fff0f0;color:#8f3232}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:850px){.topbar{grid-template-columns:auto 1fr auto}.brand{justify-self:center}.tutor-shell{display:block;padding:14px}.intro-panel{position:static;padding:24px;margin-bottom:14px}.intro-panel h1{font-size:30px}.source-key,.privacy-note{display:none}.chat-panel{height:calc(100vh - 190px);min-height:620px;border-radius:17px}.chat-log{padding:18px 15px}.quick-questions{padding-left:14px}.question-form{margin:0 12px}.bubble{max-width:90%}}@media(max-width:520px){.topbar{height:64px;padding:0 12px}.brand small,.outline-button{display:none}.tutor-shell{padding:0}.intro-panel{border-radius:0;margin:0;padding:18px 20px}.intro-panel h1{font-size:23px;margin:8px 0}.intro-panel>p{font-size:12px;line-height:1.55;margin:0}.chat-panel{height:calc(100vh - 190px);min-height:540px;border:0;border-radius:0}.chat-head{padding:13px 15px}.message{margin-bottom:16px}.bubble p{font-size:14px}.question-form{grid-template-columns:1fr auto}.question-form button{padding:12px}.learning-notice{margin-bottom:10px}}
