/* 서부다문화 AI 학습·진로 도우미 — 화면 디자인
   색: 서부다문화교육센터 로고 6색(남색 · 자주 · 진자주 · 하늘 · 연두 · 주황)과 글자색(짙은 회색).
   아이들이 태블릿으로 쓰기 쉽게: 큰 글씨 · 큰 버튼(48px 이상) · 둥근 카드 · 그림 아이콘. 아랍어 · 파슈토어는 오른쪽→왼쪽(논리 속성). */

:root {
    --navy: #172a88; --navy-2: #2a3fa8; --navy-d: #0f1d63; --navy-50: #eef1fb; --navy-100: #dde3f6;
    --magenta: #e4007f; --magenta-50: #fde8f3;
    --plum: #a50c5e; --plum-50: #f8e7f0;
    --sky: #00a1e9; --sky-50: #e3f5fd;
    --green: #8ec31f; --green-d: #5f8a0c; --green-50: #f0f8e2;
    --orange: #f39700; --orange-d: #b86f00; --orange-50: #fff3e0;
    --ink: #23252d; --ink-2: #3f3b3a; --muted: #6b6f7b; --faint: #9aa0ad;
    --line: #e2e6f0; --line-2: #eef1f7; --bg: #f4f6fb; --card: #ffffff;
    --ok: #2b8a3e; --ok-50: #e9f7ec; --warn: #c25e00; --warn-50: #fff4e5; --danger: #c2255c; --danger-50: #fdebf1;
    --r: 18px; --r-sm: 12px; --r-xs: 8px;
    --shadow: 0 1px 2px rgba(23, 42, 136, .05), 0 10px 30px rgba(23, 42, 136, .07);
    --shadow-sm: 0 1px 2px rgba(23, 42, 136, .06), 0 3px 10px rgba(23, 42, 136, .05);
    --scale: 1;
    --font: "Pretendard Variable", Pretendard, "Noto Sans KR", "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Thai", "Noto Sans Ethiopic", "Noto Sans SC", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
html[data-scale="115"] { --scale: 1.15; }
html[data-scale="130"] { --scale: 1.3; }
:lang(ja) { --font: "Noto Sans JP", "Pretendard Variable", Pretendard, "Hiragino Sans", "Yu Gothic", sans-serif; }
:lang(zh) { --font: "Pretendard Variable", Pretendard, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
:lang(ar), :lang(ps) { --font: "Noto Sans Arabic", "Pretendard Variable", Pretendard, "Segoe UI", Tahoma, sans-serif; }
:lang(hi) { --font: "Noto Sans Devanagari", "Pretendard Variable", Pretendard, "Nirmala UI", sans-serif; }
:lang(th) { --font: "Noto Sans Thai", "Pretendard Variable", Pretendard, "Leelawadee UI", sans-serif; }
:lang(am) { --font: "Noto Sans Ethiopic", "Pretendard Variable", Pretendard, "Nyala", "Ebrima", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(17px * var(--scale)); -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
img, svg { vertical-align: middle; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; } h4 { font-size: 1rem; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 8px; }

/* ───────── 틀 ───────── */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 860px; }
.page { padding: 24px 0 56px; min-height: calc(100vh - 260px); overflow-x: clip; }
.rainbow { height: 5px; background: linear-gradient(90deg, var(--navy) 0 16.6%, var(--plum) 16.6% 33.3%, var(--magenta) 33.3% 50%, var(--orange) 50% 66.6%, var(--green) 66.6% 83.3%, var(--sky) 83.3% 100%); }

.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 14px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img.emblem { width: 40px; height: 44px; flex: none; }
.brand .bt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand .bt b { font-size: 1.05rem; letter-spacing: -.02em; white-space: nowrap; }
.brand .bt small { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; gap: 4px; margin-inline-start: 18px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { padding: 10px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.topnav a:hover { background: var(--navy-50); text-decoration: none; }
.topnav a.on { background: var(--navy); color: #fff; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; }
.icon-btn:hover { background: var(--navy-50); text-decoration: none; }
.menu { position: relative; }
.menu-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 240px; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; z-index: 50; }
.menu-panel a, .menu-panel button.item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink); background: none; border: 0; font: inherit; text-align: start; cursor: pointer; }
.menu-panel a:hover, .menu-panel button.item:hover { background: var(--navy-50); text-decoration: none; }
.menu-panel .on { background: var(--navy-50); font-weight: 700; color: var(--navy); }
.menu-panel .head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.menu-panel .head b { display: block; }
.menu-panel .head small { color: var(--muted); }
.burger { display: none; }

@media (max-width: 1180px) {
    .topnav { display: none; }
    .burger { display: inline-flex; }
}
@media (max-width: 1020px) {
    .brand .bt small { display: none; }
}
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(15, 29, 99, .35); }
.drawer-panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(320px, 86vw); background: #fff; padding: 18px; overflow: auto; box-shadow: var(--shadow); }
.drawer-panel a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; color: var(--ink); font-weight: 600; }
.drawer-panel a.on { background: var(--navy); color: #fff; }
.drawer-panel a:hover { text-decoration: none; background: var(--navy-50); }
.drawer-panel a.on:hover { background: var(--navy-2); }

/* ───────── 바닥글 (센터 홈페이지 정보) ───────── */
.footer { background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 18px 30px; padding-top: 26px; padding-bottom: 30px; }
.footer .fl { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.footer .fl > div { min-width: 0; }
.footer .fl img { width: 190px; height: auto; flex: none; }
.footer p { margin: 0 0 3px; }
.footer .tt { color: var(--ink-2); font-weight: 700; font-size: .9rem; }
.footer .banners { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-content: flex-start; }
.footer .banners img { width: 101px; height: 45px; border: 1px solid var(--line); border-radius: 6px; }
.footer .links a { color: var(--muted); margin-inline-end: 12px; }
@media (max-width: 1000px) { .footer .wrap { grid-template-columns: 1fr; } .footer .banners { justify-content: flex-start; } }
@media (max-width: 760px) { .footer .fl { flex-direction: column; } }

/* ───────── 카드 · 머리 ───────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 22px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.card.flat { box-shadow: none; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { margin: 0; }
.card-h .end { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-h { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-h .ph-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; flex: none; }
.page-h h1 { margin: 0; }
.page-h p { margin: 2px 0 0; color: var(--muted); }
.page-h .end { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .card { padding: 18px; } h1 { font-size: 1.35rem; } .persona-row { grid-template-columns: 60px minmax(0, 1fr) !important; } .persona-row textarea, .persona-row .btn { grid-column: 1 / -1; } }
.card, .grid > * { min-width: 0; }

/* ───────── 홈 타일 (기능 버튼) ───────── */
.hello { display: flex; align-items: center; gap: 18px; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 60%, #3b52c4 100%); color: #fff; border-radius: 24px; padding: 26px 28px; margin-bottom: 22px; position: relative; overflow: hidden; }
.hello::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 220px; height: 220px; background: url('/img/brand/emblem.svg') center / contain no-repeat; opacity: .16; }
.hello h1 { color: #fff; margin: 0 0 4px; font-size: 1.5rem; }
.hello p { margin: 0; opacity: .9; }
.hello .meter { margin-top: 10px; max-width: 360px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease; min-height: 150px; position: relative; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tile .ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.tile b { font-size: 1.12rem; }
.tile span.d { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.tile .tag { position: absolute; top: 14px; inset-inline-end: 14px; }
.c-navy { background: var(--navy); } .c-magenta { background: var(--magenta); } .c-plum { background: var(--plum); } .c-sky { background: var(--sky); } .c-green { background: var(--green); } .c-orange { background: var(--orange); }
.t-navy { color: var(--navy); } .t-magenta { color: var(--magenta); } .t-plum { color: var(--plum); } .t-sky { color: #0081bb; } .t-green { color: var(--green-d); } .t-orange { color: var(--orange-d); }
.section-t { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 1.05rem; font-weight: 800; color: var(--ink-2); }
.section-t::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--magenta); }

/* ───────── 버튼 ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent; background: var(--navy); color: #fff; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; transition: background .12s, box-shadow .12s, transform .05s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--navy-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 1.08rem; border-radius: 16px; }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: .88rem; border-radius: 11px; }
.btn-accent { background: var(--magenta); } .btn-accent:hover { background: #c8006f; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--navy-50); color: var(--navy); }
.btn-soft { background: var(--navy-50); color: var(--navy); }
.btn-soft:hover { background: var(--navy-100); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f2c3d4; }
.btn-danger:hover { background: var(--danger-50); }
.btn-green { background: var(--green-d); } .btn-green:hover { background: #4d7209; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ───────── 입력 ───────── */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 700; margin-bottom: 7px; color: var(--ink-2); font-size: .95rem; }
.field .hint, .hint { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.input, .select, .textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font: inherit; color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(42, 63, 168, .13); }
.input.sm, .select.sm { min-height: 40px; padding: 7px 11px; border-radius: 11px; font-size: .92rem; }
.error { color: var(--danger); font-size: .88rem; margin-top: 6px; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; }
.check input { width: 22px; height: 22px; accent-color: var(--navy); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; background: var(--line-2); border-radius: 15px; }
.seg button, .seg label { min-height: 42px; padding: 0 16px; border: 0; border-radius: 11px; background: transparent; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg button.on, .seg label.on { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.seg input { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; min-height: 38px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; }
.chip.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip input { display: none; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px; border: 2px dashed var(--navy-100); border-radius: 18px; background: var(--navy-50); color: var(--navy); text-align: center; cursor: pointer; }
.drop:hover { border-color: var(--navy-2); }
.drop small { color: var(--muted); }
.notice-pii { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; color: var(--muted); margin-top: 8px; }

/* ───────── 배지 · 알림 ───────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.navy { background: var(--navy-50); color: var(--navy); } .badge.magenta { background: var(--magenta-50); color: var(--magenta); }
.badge.green { background: var(--green-50); color: var(--green-d); } .badge.orange { background: var(--orange-50); color: var(--orange-d); }
.badge.sky { background: var(--sky-50); color: #0077ad; } .badge.plum { background: var(--plum-50); color: var(--plum); }
.badge.ok { background: var(--ok-50); color: var(--ok); } .badge.danger { background: var(--danger-50); color: var(--danger); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--navy-50); color: var(--navy-d); margin-bottom: 14px; }
.alert.ok { background: var(--ok-50); color: #1f6b30; } .alert.warn { background: var(--warn-50); color: #8a4500; } .alert.danger { background: var(--danger-50); color: #9c1748; }
.alert p:last-child { margin: 0; }
.advice { display: flex; gap: 14px; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, #fff6fb, #fff); border: 2px solid #f6c5df; }
.advice .ic { width: 50px; height: 50px; border-radius: 16px; background: var(--magenta); color: #fff; display: grid; place-items: center; flex: none; }
.advice b { display: block; color: var(--plum); margin-bottom: 4px; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; }
.empty .ic { width: 64px; height: 64px; border-radius: 20px; background: var(--navy-50); color: var(--navy); display: grid; place-items: center; margin: 0 auto 12px; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .tiny { font-size: .78rem; } .bold { font-weight: 700; }
.nowrap { white-space: nowrap; } .center { text-align: center; } .end-t { text-align: end; } .mt { margin-top: 16px; } .mb0 { margin-bottom: 0; } .mt0 { margin-top: 0; }
.flex { display: flex; align-items: center; gap: 10px; } .wrap-x { flex-wrap: wrap; } .ml-auto { margin-inline-start: auto; } .grow { flex: 1; min-width: 0; }

/* ───────── 사용량 막대 ───────── */
.meter { background: rgba(255, 255, 255, .22); border-radius: 999px; height: 10px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.meter.light { background: var(--line-2); }
.meter.warn > i { background: var(--orange); } .meter.danger > i { background: var(--magenta); }
.stat { padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.stat .k { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat .v { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-top: 4px; }
.stat .s { color: var(--muted); font-size: .8rem; }

/* ───────── 표 ───────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); text-align: start; vertical-align: top; }
table.t th { background: #f8f9fd; color: var(--muted); font-weight: 700; font-size: .82rem; white-space: nowrap; position: sticky; top: 0; }
table.t tr:hover td { background: #fbfcff; }
table.t td.num, table.t th.num { text-align: end; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: var(--navy-100); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--navy); }

/* ───────── AI 답 (Markdown) ───────── */
.answer { font-size: 1.04rem; line-height: 1.75; }
.answer h1 { font-size: 1.35rem; } .answer h2 { font-size: 1.18rem; margin-top: 1.2em; padding-bottom: 6px; border-bottom: 2px solid var(--navy-50); } .answer h3 { font-size: 1.05rem; margin-top: 1em; }
.answer ul, .answer ol { padding-inline-start: 1.4em; margin: 0 0 .9em; }
.answer li { margin: .2em 0; }
.answer table { border-collapse: collapse; width: 100%; margin: .6em 0 1em; font-size: .95rem; }
.answer th, .answer td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; vertical-align: top; }
.answer th { background: var(--navy-50); color: var(--navy-d); }
.answer blockquote { margin: .6em 0; padding: 10px 14px; border-inline-start: 4px solid var(--sky); background: var(--sky-50); border-radius: 0 10px 10px 0; }
.answer code { background: none; padding: 0; font: inherit; }
.answer pre { white-space: pre-wrap; font: inherit; background: var(--navy-50); padding: 10px 14px; border-radius: 10px; margin: .6em 0; }
.answer em { color: var(--muted); }
.stream { white-space: pre-wrap; font-size: 1.04rem; line-height: 1.75; }
.thinking { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 16px; background: var(--navy-50); color: var(--navy); font-weight: 700; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--navy); animation: bounce 1s infinite ease-in-out; }
.dots i:nth-child(2) { background: var(--magenta); animation-delay: .15s; } .dots i:nth-child(3) { background: var(--green); animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.ai-note { display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: .8rem; margin-top: 12px; }

/* 원문 대조 (문단 단위) */
.pairs { display: grid; gap: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.pair > div { padding: 14px 16px; }
.pair > div.src { background: #fafbfe; border-inline-end: 1px solid var(--line); color: var(--ink-2); }
.pair .pnum { font-size: .72rem; color: var(--faint); font-weight: 700; display: block; margin-bottom: 4px; }
@media (max-width: 720px) { .pair { grid-template-columns: 1fr; } .pair > div.src { border-inline-end: 0; border-bottom: 1px solid var(--line); } }
.terms { display: grid; gap: 8px; }
.term { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 4px 14px; padding: 12px 14px; border-radius: 14px; background: var(--orange-50); }
.term b { color: var(--orange-d); }
.term .tr { grid-column: 2; color: var(--ink-2); }

/* 다국어 동시 표시 */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.lang-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.lang-card .lh { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--navy-50); font-weight: 800; color: var(--navy); }
.lang-card .lb { padding: 14px 16px; font-size: 1.05rem; line-height: 1.7; }
.lang-card .lh .icon-btn { height: 34px; min-width: 34px; margin-inline-start: auto; }
.present .lang-card .lb { font-size: 1.6rem; line-height: 1.6; }
.present .lang-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

/* 대화 */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg .av { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; }
.msg .bubble { padding: 14px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); max-width: min(760px, 100%); min-width: 0; }
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble { background: var(--navy); color: #fff; border-color: var(--navy); white-space: pre-wrap; }
.composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 16px; }
.composer .textarea { min-height: 54px; }

/* 결과 목록 */
.list { display: grid; gap: 10px; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
.row-item:hover { text-decoration: none; border-color: var(--navy-100); box-shadow: var(--shadow-sm); }
.row-item .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.row-item .mid { flex: 1; min-width: 0; }
.row-item .mid b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .mid small { color: var(--muted); }

/* 계정 안내문 인쇄 */
.slips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.slip { border: 1.5px dashed var(--faint); border-radius: 12px; padding: 14px 16px; break-inside: avoid; }
.slip .u { font-size: 1.25rem; font-weight: 800; letter-spacing: .02em; }

/* 로그인 */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.auth-art { background: linear-gradient(150deg, var(--navy) 0%, #24379e 55%, #3a1f78 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; inset-inline-end: -120px; bottom: -120px; width: 460px; height: 460px; background: url('/img/brand/emblem.svg') center / contain no-repeat; opacity: .22; }
.auth-art h1 { color: #fff; font-size: 2.1rem; line-height: 1.25; margin: 22px 0 12px; }
.auth-art p { opacity: .9; max-width: 460px; }
.auth-art .hellos { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; margin-top: 18px; position: relative; z-index: 1; }
.auth-art .hellos span { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); padding: 6px 12px; border-radius: 999px; font-size: .9rem; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(20px, 6vw, 80px); }
.auth-form .box { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-form .logo { width: 260px; max-width: 80%; margin-bottom: 26px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { padding: 26px 22px; } .auth-art h1 { font-size: 1.5rem; margin: 12px 0 6px; } .auth-art .hellos { display: none; } .auth-art::after { width: 220px; height: 220px; inset-inline-end: -40px; bottom: -60px; } }

/* 언어 고르기 */
.lang-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.lang-list a, .lang-list button { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: start; }
.lang-list a.on, .lang-list button.on { border-color: var(--navy); background: var(--navy-50); color: var(--navy); }
.lang-list a:hover, .lang-list button:hover { text-decoration: none; border-color: var(--navy-2); }

/* 수업 화면(전자칠판) */
.present-bar { position: sticky; top: 0; z-index: 30; display: flex; gap: 10px; align-items: center; padding: 10px 0; background: var(--bg); }

/* 인쇄 */
@media print {
    .topbar, .footer, .no-print, .btn, .composer, .rainbow { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 0; padding: 0; }
    .page { padding: 0; }
    .slips { grid-template-columns: repeat(2, 1fr); }
}

/* 좁은 휴대폰: 상단바는 아이콘만 */
@media (max-width: 560px) {
    .top-actions .icon-btn .nowrap { display: none; }
    .topbar .wrap { gap: 8px; padding: 0 12px; }
    .brand .bt b { font-size: .95rem; }
    .page-h .ph-icon { width: 46px; height: 46px; border-radius: 15px; }
    .hello { padding: 20px; }
    .hello h1 { font-size: 1.25rem; }
}

/* 번역된 긴 프로그램 이름이 메뉴 · 단추 밑으로 들어가지 않게 */
.brand { flex: 0 1 auto; min-width: 0; max-width: 300px; }
.brand .bt { min-width: 0; overflow: hidden; }
.brand .bt b, .brand .bt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topnav { flex: 1 1 auto; }
.top-actions { flex: none; }
@media (max-width: 560px) { .brand { max-width: calc(100vw - 210px); } }
