/* 졸업각 — "졸업까지 한눈에". 불안을 덜어 주는 밝고 확신 있는 학생용 도구.
   컬러: 딥그린(브랜드/졸업) + 골드(월계관·합격 축하) + 조치 필요에만 레드.
   숫자는 Pretendard tabular (모노 안 씀). 큰 타이포 · 넉넉한 여백 · 또렷한 CTA. */
:root {
  /* 색상은 기존 팀 팔레트 유지 (초록 #1a7f45 + 레드 #c4372a) */
  --bg: #f6f7f5;
  --surface: #fdfdfc;
  --surface-2: #eef0ed;
  --ink: #15181b;
  --ink-2: #454b51;
  --ink-3: #626970;
  --line: #dfe2de;
  --line-2: #c9cdc8;

  --green: #1a7f45;
  --green-2: #1f9a53;        /* 같은 초록 계열, 그라데이션·강조용 */
  --green-ink: #0f5c31;
  --green-soft: #e2f2e7;
  --red: #c4372a;
  --red-ink: #a52f24;        /* soft 배경 위 텍스트 대비용(같은 빨강 계열) */
  --red-soft: #fbe8e5;

  --grad: linear-gradient(135deg, #167a40 0%, #0f5f33 58%, #0a4d2a 100%);

  --g0: #e3e7e2; --g1: #b5e2c1; --g2: #6cc48a; --g3: #2b9a58;

  --shadow-sm: 0 1px 2px rgb(21 24 27 / .06);
  --shadow: 0 2px 6px rgb(21 24 27 / .05), 0 22px 44px -24px rgb(21 24 27 / .22);
  --shadow-green: 0 16px 34px -16px rgb(26 127 69 / .45);

  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --r-xl: 24px; --r-lg: 18px; --r: 14px; --r-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1214; --surface: #161a1d; --surface-2: #1b2024;
    --ink: #e8ebe9; --ink-2: #b4bbc1; --ink-3: #8f979e;
    --line: #262c31; --line-2: #343b41;
    --green: #3dbd70; --green-2: #49c97d; --green-ink: #7fdba3; --green-soft: #15291d;
    --red: #f06a5d; --red-ink: #f3938c; --red-soft: #2c1714;
    --grad: linear-gradient(135deg, #2ea866 0%, #1f8a4d 60%, #13663a 100%);
    --g0: #1e2428; --g1: #1b4a2d; --g2: #23774a; --g3: #3dbd70;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow: 0 2px 6px rgb(0 0 0 / .4), 0 22px 44px -24px rgb(0 0 0 / .7);
    --shadow-green: 0 16px 34px -16px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  word-break: keep-all; overflow-wrap: anywhere;
}
::selection { background: var(--green-soft); color: var(--green-ink); }
:focus-visible { outline: 2.5px solid var(--green-2); outline-offset: 2px; border-radius: 6px; }
a { color: var(--green-ink); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; letter-spacing: -0.035em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
i[class*="ph"] { font-size: 1.15em; line-height: 1; }

/* ---------- 상단 바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 max(24px, calc((100vw - 1160px) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.04em; }
.brand-logo { display: block; width: 144px; flex: none; }
.brand-logo img { display: block; width: 100%; height: auto; }
.trial {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px; font-size: .875rem; font-weight: 700;
  background: var(--green-soft); color: var(--green-ink);
  border: 1px solid color-mix(in srgb, var(--green) 20%, transparent);
}
.trial.used { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }

main { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- 첫 화면 ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 72px 0 88px;
}
/* 앰비언트 글로우 (깊이감) */
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -60px; right: -80px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--green) 20%, transparent), transparent 68%);
}
h1 { font-size: clamp(2.5rem, 1.7rem + 3vw, 4rem); line-height: 1.08; font-weight: 800; }
.hero h1 b, .hero h1 .hl { color: var(--green); }
.lede { margin-top: 20px; font-size: 1.25rem; line-height: 1.6; color: var(--ink-2); max-width: 26em; }

.intake {
  margin-top: 32px; padding: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  display: grid; gap: 18px;
}
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; padding: 5px; border: 0; background: var(--surface-2); border-radius: var(--r); }
.tabs input { position: absolute; opacity: 0; pointer-events: none; }
.tabs label {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 6px; border-radius: var(--r-sm); font-size: .9375rem; font-weight: 700; color: var(--ink-2); cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.tabs label:hover { color: var(--ink); }
.tabs input:checked + label { background: var(--surface); color: var(--green-ink); box-shadow: var(--shadow-sm); }
.tabs input:focus-visible + label { outline: 2.5px solid var(--green-2); outline-offset: 1px; }

.pane { display: none; }
.intake:has(#src-sample:checked) .pane-sample,
.intake:has(#src-paste:checked) .pane-paste { display: block; }
.intake:has(#src-capture:checked) .pane-capture { display: grid; }
.pane-sample { display: flex; align-items: center; gap: 12px; padding: 4px 2px; }
.pane-sample p:first-child { font-size: 1.0625rem; }
.pane-sample .muted { font-size: .9375rem; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; color: var(--ink-2); background: var(--surface-2); vertical-align: 2px; }
.drop {
  place-items: center; gap: 8px; padding: 28px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line-2); border-radius: var(--r); color: var(--ink-2);
  transition: border-color .2s, background .2s;
}
.drop:hover { border-color: var(--green-2); background: var(--green-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; }
.drop i { font-size: 2rem; color: var(--green-2); }
.drop small { color: var(--ink-3); }
.pane-paste label { display: block; font-size: .875rem; font-weight: 700; margin-bottom: 7px; }
textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px;
}
textarea { resize: vertical; min-height: 96px; }
textarea::placeholder { color: var(--ink-3); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields .field:first-child { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; }
.field-label { font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.field-static { display: flex; align-items: center; min-height: 46px; padding: 0 14px; border-radius: var(--r); background: var(--surface-2); font-size: .9375rem; font-weight: 700; }
select { min-height: 48px; padding-right: 36px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r);
  font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #f7fdf9; box-shadow: var(--shadow-green); font-size: 1.0625rem; }
.btn-primary:hover { background: var(--green-ink); }
.btn-primary i { font-size: 1.25rem; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--green-2); color: var(--green-ink); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: var(--line); min-height: 44px; font-weight: 700; }
.btn-quiet:hover { color: var(--ink); border-color: var(--line-2); }
.fine { display: flex; gap: 7px; font-size: .8125rem; color: var(--ink-3); line-height: 1.5; }
.fine i { margin-top: 1px; color: var(--green-2); }

/* ---------- 졸업 리포트 카드 (히어로 우측, 메모리 포인트) ---------- */
.pr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden; }
.rc-top { background: var(--green); background-image: var(--grad); color: #fff; padding: 28px; position: relative; overflow: hidden; }
/* 장식용 졸업모 일러스트 (우상단, 살짝 바깥으로 흘림) */
.cap-illu { position: absolute; top: -14px; right: -10px; width: 128px; height: auto; filter: drop-shadow(0 10px 16px rgb(0 0 0 / .22)); transform: rotate(8deg); }
@media (prefers-reduced-motion: no-preference) { .cap-illu { animation: bob 4.5s ease-in-out infinite; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(8deg); } 50% { transform: translateY(-7px) rotate(8deg); } }
.rc-badge { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--green-ink); font-size: .8125rem; font-weight: 800; }
.rc-badge i { color: var(--green); font-size: 1rem; }
.rc-row { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.rc-info { flex: 1; min-width: 0; }
.rc-who { font-size: .9375rem; font-weight: 600; }
.rc-big { display: flex; align-items: baseline; gap: 7px; margin-top: 2px; }
.rc-big strong { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.rc-big span { font-size: 1.0625rem; font-weight: 700; opacity: .92; }
.rc-left { margin-top: 12px; font-size: .9375rem; font-weight: 600; }
.rc-left strong { font-weight: 800; }
/* 원형 진행률 링 */
.rc-ring { position: relative; width: 112px; height: 112px; flex: none; }
.rc-ring svg { width: 112px; height: 112px; transform: rotate(-90deg); }
.rc-ring .track { fill: none; stroke: rgb(255 255 255 / .25); stroke-width: 11; }
.rc-ring .prog { fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 124.1; }
.rc-pct { position: absolute; inset: 0; display: grid; place-items: center; line-height: 1; }
.rc-pct strong { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.03em; }
.rc-pct span { font-size: 1rem; font-weight: 700; opacity: .9; margin-left: 1px; }
.rc-foot { display: flex; align-items: center; gap: 9px; padding: 16px 24px; background: var(--green-soft); color: var(--green-ink); font-size: .9375rem; font-weight: 700; }
.rc-foot i { font-size: 1.25rem; }
.rc-foot strong { font-weight: 800; }

/* ---------- 체크 목록 (공통) ---------- */
.checks { list-style: none; margin: 0; padding: 0; }
.check { --c: var(--ink-3); }
.check[data-s="pass"] { --c: var(--green-2); }
.check[data-s="fail"] { --c: var(--red); }
.st { position: relative; width: 24px; height: 24px; flex: none; display: grid; place-items: center; color: var(--c); }
.st i { font-size: 24px; grid-area: 1 / 1; }
.st .spin { color: var(--ink-3); opacity: 0; }
.code { font-size: .75rem; color: var(--ink-3); font-weight: 600; }

/* 히어로 안의 compact 체크 */
.compact { padding: 8px 10px; }
.compact .check { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r); }
.compact .check + .check { margin-top: 2px; }
.compact .name { flex: 1; font-weight: 700; font-size: .9375rem; }
.compact .metric { font-size: .875rem; color: var(--ink-2); font-weight: 700; }
.compact .check[data-s="fail"] { background: var(--red-soft); }
.compact .check[data-s="fail"] .metric { color: var(--red-ink); }
.compact .check[data-s="pass"] .metric { color: var(--green-ink); }

/* 체크가 하나씩 판정되는 순간 */
@media (prefers-reduced-motion: no-preference) {
  .run .st .spin { animation: pending calc(var(--i) * 130ms + 400ms) linear both; }
  .run .st .done { animation: settle .4s cubic-bezier(.16, 1, .3, 1) calc(var(--i) * 130ms + 400ms) both; }
  .run .check .metric, .run .check .note { animation: fade .4s ease-out calc(var(--i) * 130ms + 400ms) both; }
}
@keyframes pending { 0% { opacity: 1; transform: rotate(0); } 99% { opacity: 1; transform: rotate(540deg); } 100% { opacity: 0; } }
@keyframes settle { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 섹션 ---------- */
.sec { padding: 72px 0; border-top: 1px solid var(--line); }
.step { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: .9375rem; font-weight: 700; color: var(--ink-3); }
.step span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--green-soft); color: var(--green-ink); font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; }
.sec h2, .report h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.2; font-weight: 800; }
.sec h2 .num { color: var(--green); }
.sec-lede { margin-top: 12px; color: var(--ink-2); font-size: 1.125rem; max-width: 40em; }

/* 학점 지도 (잔디) */
.grass-card { margin-top: 32px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.grass { display: flex; gap: 10px; }
.gcol { display: grid; gap: 6px; justify-items: center; }
.gcells { display: grid; grid-template-rows: repeat(7, 18px); gap: 5px; }
.cell { width: 18px; height: 18px; border-radius: 5px; background: var(--g0); }
.cell.l1 { background: var(--g1); } .cell.l2 { background: var(--g2); } .cell.l3 { background: var(--g3); }
.cell.f { background: transparent; box-shadow: inset 0 0 0 2px var(--red); }
.cell.now { background: transparent; box-shadow: inset 0 0 0 2px var(--g3); }
.cell.empty { background: transparent; }
.gcol.leave .gcells { border: 1.5px dashed var(--line-2); border-radius: 5px; width: 18px; }
.glabel { font-size: .75rem; color: var(--ink-3); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .8125rem; color: var(--ink-3); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sw.l1 { background: var(--g1); } .sw.l2 { background: var(--g2); } .sw.l3 { background: var(--g3); }
.sw.f { box-shadow: inset 0 0 0 2px var(--red); } .sw.now { box-shadow: inset 0 0 0 2px var(--g3); }

/* 학기별 이수내역 */
.terms { margin-top: 20px; display: grid; gap: 10px; }
.term { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.term summary { display: flex; align-items: center; gap: 12px; padding: 18px 22px; cursor: pointer; list-style: none; }
.term summary::-webkit-details-marker { display: none; }
.term summary .chev { transition: transform .2s; color: var(--ink-3); }
.term[open] summary .chev { transform: rotate(90deg); }
.term summary strong { font-weight: 800; font-size: 1.0625rem; }
.term summary .grow { flex: 1; }
.term summary .num { font-size: .9375rem; color: var(--ink-2); font-weight: 700; }
.course-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.course-table th { text-align: left; font-size: .75rem; font-weight: 700; color: var(--ink-3); padding: 10px 22px; border-top: 1px solid var(--line); }
.course-table td { padding: 8px 22px; border-top: 1px solid var(--line); }
.course-table td:first-child { width: 50%; font-weight: 600; }
.course-table .req { margin-left: 7px; font-size: .75rem; font-weight: 800; color: var(--green-ink); background: var(--green-soft); padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.course-table .area { margin-left: 7px; font-size: .8125rem; color: var(--ink-3); }
.course-table tr.is-f td { color: var(--red-ink); }
.course-table tr.is-f .grade::after { content: " 미산입"; font-size: .75rem; font-weight: 700; }
.cell-edit { font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 5px 7px; margin-left: -8px; min-height: 0; }
.cell-edit:hover { border-color: var(--line-2); }
.cell-edit:focus { border-color: var(--green-2); outline: none; background: var(--surface); }
input.cell-edit { width: 4.5em; }
select.cell-edit { width: auto; background-image: none; padding-right: 8px; }
.grade { font-weight: 700; }
.log-actions { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; font-size: .9375rem; }

/* 전체 체크 */
.tally { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.tally span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; font-size: .875rem; font-weight: 700; background: var(--surface); border: 1px solid var(--line); }
.tally .ok { color: var(--green-ink); } .tally .ok i { color: var(--green-2); }
.tally .bad { color: var(--red-ink); background: var(--red-soft); border-color: transparent; } .tally .bad i { color: var(--red); }
.tally .mid { color: var(--ink-2); } .tally .mid i { color: var(--ink-3); }
.full { margin-top: 28px; display: grid; gap: 12px; }
.full .check { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.full .check[data-s="fail"] { box-shadow: 0 10px 30px -16px rgb(224 70 70 / .4); }
.full details > summary {
  display: grid; grid-template-columns: 26px 1fr auto 20px; align-items: center; gap: 16px;
  padding: 22px 24px; cursor: pointer; list-style: none;
}
.full details > summary::-webkit-details-marker { display: none; }
.full .code { grid-row: 1; grid-column: 2; align-self: end; margin-bottom: -2px; }
.full .name { grid-row: 2; grid-column: 2; font-weight: 800; font-size: 1.125rem; margin-top: -2px; }
.full .note { grid-column: 2 / 4; font-size: .9375rem; color: var(--ink-2); }
.full .metric { grid-row: 1 / 3; grid-column: 3; text-align: right; }
.full .metric b { font-weight: 800; font-size: 1.375rem; letter-spacing: -0.02em; }
.full .metric .gap { display: block; font-size: .8125rem; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.full .chev { grid-row: 1 / 3; grid-column: 4; color: var(--ink-3); transition: transform .2s; }
.full details[open] .chev { transform: rotate(90deg); }
.full .check[data-s="fail"] summary { background: var(--red-soft); }
.full .check[data-s="fail"] .metric b { color: var(--red-ink); }
.full .check[data-s="fail"] .metric .gap { color: var(--red); font-weight: 700; }
.full .check[data-s="pass"] .metric b { color: var(--green-ink); }
.logbox { padding: 4px 24px 22px calc(24px + 26px + 16px); display: grid; gap: 14px; }
.quote { padding: 16px 18px; background: var(--surface-2); border-radius: var(--r); font-size: .9375rem; line-height: 1.6; }
.quote .src { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .8125rem; font-weight: 700; }
.related { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 0; padding: 0; }
.related li { font-size: .8125rem; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: var(--surface); }

/* 졸업까지 가는 길 (계획) */
.verified { display: flex; flex-wrap: wrap; gap: 10px 14px; list-style: none; margin: 20px 0 0; padding: 0; font-size: .9375rem; font-weight: 700; }
.verified li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; background: var(--green-soft); color: var(--green-ink); border-radius: 999px; }
.verified i { color: var(--green-2); }
.branch { list-style: none; margin: 36px 0 0; padding: 0; position: relative; }
.branch::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 32px; width: 3px; border-radius: 3px; background: linear-gradient(var(--green-2), var(--green)); transform-origin: top; }
@media (prefers-reduced-motion: no-preference) {
  .branch.drawn::before { animation: draw 1.1s cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.node { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 22px; padding-bottom: 20px; }
.dot { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-2); display: grid; place-items: center; z-index: 1; font-size: .75rem; font-weight: 800; color: var(--ink-3); }
.node.now .dot { border-color: var(--green-2); color: var(--green-ink); }
.node.now .dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--green-2); }
.node.goal .dot { background: #fff; border-color: #fff; color: var(--green-ink); font-size: 1.125rem; }
.node-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; transition: border-color .2s, box-shadow .2s; }
.node-card:hover { box-shadow: var(--shadow-sm); }
.node-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.node-head strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.node-head .term-code { color: var(--ink-3); font-size: .875rem; font-weight: 600; }
.node-head .load { margin-left: auto; font-size: .9375rem; color: var(--ink-2); font-weight: 700; }
.node-head .load b { color: var(--green-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9375rem; font-weight: 600; background: var(--surface-2); }
.chip .c { color: var(--ink-3); font-size: .8125rem; font-weight: 700; }
.chip.req { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); background: var(--green-soft); color: var(--green-ink); }
.chip.retake { border-color: var(--red); color: var(--red-ink); background: var(--red-soft); font-weight: 700; }
.why { margin-top: 16px; font-size: .9375rem; color: var(--ink-2); display: flex; gap: 8px; line-height: 1.6; }
.why i { color: var(--green-2); margin-top: 2px; font-size: 1.125rem; }
.node.goal .node-card { border: 0; background: var(--green); background-image: var(--grad); color: #fff; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-green); }
.node.goal strong { color: #fff; font-size: 1.5rem; }
.node.goal .load { color: #fff; } .node.goal .load b { color: #fff; }

/* 시그니처: 조치 필요 체크 ↔ 그걸 해결하는 학기·과목·날짜가 함께 밝아진다 */
body:has([data-link="act"]:is(:hover, :focus-within)) .node[data-link="act"] .node-card { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
body:has([data-link="act"]:is(:hover, :focus-within)) .chip[data-link="act"] { background: var(--red); color: #fff; border-color: var(--red); }
body:has([data-link="act"]:is(:hover, :focus-within)) .full .check[data-link="act"] { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
body:has([data-link="act"]:is(:hover, :focus-within)) .compact .check[data-link="act"] { box-shadow: inset 4px 0 0 var(--red); }
body:has([data-link="act"]:is(:hover, :focus-within)) .date[data-link="act"] { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.link-hint { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; font-weight: 800; color: var(--red-ink); }

/* 날짜 */
.dates { list-style: none; margin: 32px 0 24px; padding: 0; display: grid; gap: 14px; }
.date {
  display: grid; grid-template-columns: 10rem 1fr; gap: 28px; align-items: center;
  padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .2s, box-shadow .2s;
}
.date:hover { box-shadow: var(--shadow-sm); }
.dday { font-size: 2.75rem; line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: var(--green); }
.date .when { font-size: .875rem; color: var(--ink-3); margin-top: 6px; font-weight: 600; }
.date h3 { font-size: 1.125rem; font-weight: 800; }
.date p { font-size: .9375rem; color: var(--ink-2); margin-top: 5px; line-height: 1.6; }

/* 리포트 CTA */
.report {
  margin: 20px 0 80px; padding: 48px; border-radius: var(--r-xl);
  background: var(--green); background-image: var(--grad); color: #fff; box-shadow: var(--shadow-green);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.report h2 { color: #fff; }
.report p { margin-top: 10px; color: rgb(255 255 255 / .9); font-size: 1.0625rem; }
.report .btn-primary { background: #fff; color: var(--green-ink); box-shadow: none; }
.report .btn-primary:hover { background: var(--green-soft); }

/* 바닥 */
.foot { border-top: 1px solid var(--line); padding: 40px max(24px, calc((100vw - 1160px) / 2)) 56px; font-size: .875rem; }
.foot-grid { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 28px; align-items: start; }
.foot p + p { margin-top: 5px; }
.brand.small { font-size: 1.0625rem; margin-bottom: 6px; }
.brand.small .brand-logo { width: 120px; }
.print-note { display: none; }

/* ---------- 반응형 ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 64px; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  main { padding: 0 18px; }
  .topbar { padding: 0 18px; height: 64px; }
  .sec { padding: 52px 0; }
  .btn-primary[type="submit"] { width: 100%; }
  .tabs label span { display: none; }
  .grass { overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
  .course-table td:first-child { width: auto; }
  .date { grid-template-columns: 1fr; gap: 10px; }
  .dday { font-size: 2.25rem; }
  .report { padding: 32px 24px; }
  .rc-big strong { font-size: 2.75rem; }
}

/* 인쇄: 상담용 리포트 한 장 */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f4f2; --ink: #15211b; --ink-2: #47564d; --ink-3: #6d7a71; --line: #e5ebe2; --line-2: #cfd8cb; --green: #0e7a42; --green-2: #16a85a; --green-ink: #0a5730; --green-soft: #e4f3e9; --red: #e04646; --red-ink: #ad2727; --red-soft: #fcebea; --grad: none; color-scheme: light; }
  body { font-size: 11pt; }
  .topbar, .hero, #log, .log-actions, #ics, .report, .foot-grid, .chev { display: none !important; }
  .node.goal .node-card { background: var(--green-soft) !important; color: var(--ink) !important; }
  .node.goal strong { color: var(--green-ink) !important; }
  .sec { padding: 18pt 0; break-inside: avoid; }
  details > :not(summary) { display: block !important; }
  .print-note { display: block; font-weight: 800; }
  .foot { border: 0; padding: 0; }
  *, *::before { animation: none !important; box-shadow: none !important; }
}

/* GSAP 초기 숨김 — 모션 허용(.ganim)일 때만. gsap.js가 못 뜨면 즉시 해제 */
.ganim .hero h1, .ganim .lede, .ganim .intake, .ganim .pr,
.ganim #branch .node { opacity: 0; }

/* ===== 기능 연결분 (mvp): 결과 표 수정, 진행 상태, 페이월, AI 희망 사항·검증 기록·학과 문의 ===== */
input[type="text"] { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; }
.trial.pass { background: var(--green); color: #fbfdfb; }
[hidden] { display: none !important; }
.course-table tr.is-old td { color: var(--ink-3); }
.course-table tr.is-old .grade::after { content: " 재수강 전"; font-family: var(--sans); font-size: .75rem; }
.course-table td:last-child { width: 1%; padding-left: 0; }
.course-table .area-edit { margin-left: 4px; font-size: .8125rem; color: var(--ink-2); }
.course-table .guess { font-size: .6875rem; font-weight: 700; color: var(--ink-2); background: var(--surface-2); padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }
.row-del { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); cursor: pointer; }
.row-del:hover { background: var(--red-soft); color: var(--red); }

/* 진행 상태와 오류 */
.status:empty { display: none; }
.status { display: flex; gap: 6px; align-items: flex-start; font-size: .9375rem; color: var(--ink-2); }
.status i { margin-top: 3px; }
.status.busy i { animation: spin 1s linear infinite; }
.status.error { color: var(--red); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn:disabled { opacity: .6; cursor: progress; }
.drop.over { border-color: var(--green); background: var(--green-soft); }
.chip.gen { border-style: dashed; color: var(--ink-2); }

/* 이용권 안내 */
.paywall { width: min(420px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.paywall::backdrop { background: rgb(21 24 27 / .45); }
.paywall h2 { margin-top: 10px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.paywall h2 .num { color: var(--green); }
.perks { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.perks li { display: flex; gap: 8px; align-items: center; }
.perks i { color: var(--green); }
.pay-actions { margin-top: 20px; display: grid; gap: 8px; }
@media print { .status, .paywall { display: none !important; } }
@media (prefers-color-scheme: dark) { .trial.pass { color: #08140d; } }
@media (max-width: 640px) {
  .course-table th, .course-table td { padding: 6px 8px; }
  .course-table th { white-space: nowrap; }
  .course-table td:first-child { min-width: 8.5em; }
  .course-table .grade { white-space: nowrap; }
  input.cell-edit { width: 3.2em; }
  select.cell-edit { max-width: 6.5em; font-size: .875rem; }
}

/* AI: 희망 사항, 계획 요약, 검증 기록 */
.wish-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wchip { font: inherit; font-size: .8125rem; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; }
.wchip:hover { border-color: var(--green); color: var(--green-ink); }
.ai-note { margin-top: 20px; padding: 16px 18px; border-radius: var(--r); background: var(--green-soft); color: var(--ink); display: grid; gap: 8px; }
.ai-note p { display: flex; gap: 8px; }
.ai-note i { color: var(--green); margin-top: 4px; flex: none; }
.ai-note .wish-used { font-size: .875rem; color: var(--ink-2); }
.trace { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.trace summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 700; font-size: .9375rem; }
.trace ol { margin: 0; padding: 0 16px 14px 40px; display: grid; gap: 8px; font-size: .9375rem; color: var(--ink-2); }
.trace ol b { color: var(--ink); margin-right: 6px; }
.trace .t-ok::marker { color: var(--green); }
.trace .t-bad::marker, .trace .t-bad > b { color: var(--red); }
.trace ul { margin: 4px 0 0; padding-left: 18px; font-size: .875rem; }
.replan { margin-top: 8px; padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); display: grid; gap: 10px; }
.replan .btn { justify-self: start; }

/* 학과 문의 */
.facts { list-style: none; margin: 24px 0 20px; padding: 0; display: grid; gap: 8px; }
.facts li { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .9375rem; color: var(--ink-2); }
.facts b { display: block; color: var(--ink); margin-bottom: 2px; }
#consult .status { margin-top: 12px; }
.consult-out { margin-top: 24px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
.consult-out h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 10px; }
.questions { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.mail { display: grid; gap: 8px; }
.mail textarea { font-size: .9375rem; line-height: 1.6; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 960px) { .consult-out { grid-template-columns: 1fr; } }
@media print {
  #consultGo, #consult .status, #consult .mail, .replan, .trace { display: none !important; }
  .consult-out { grid-template-columns: 1fr; }
}
select.cell-edit.bad { color: var(--red); border-color: var(--red); font-weight: 700; }
.course-table .grade select.cell-edit { font-variant-numeric: tabular-nums; }
.tscroll { overflow-x: auto; position: relative; }
.terms { grid-template-columns: minmax(0, 1fr); }
