@charset "UTF-8";
:root { --teal: #087e72; --teal-dark: #066158; --teal-soft: #eaf5f1; --ink: #233732; --muted: #596d65; --line: #dce6e0; --bg: #f4f7f5; font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; color: var(--ink); font-size: 16px; font-synthesis: none; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
button, a, input, select, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #2d9bca; outline-offset: 3px; }
input, select { border: 1px solid #b9cbc0; border-radius: 8px; min-height: 44px; padding: 9px 11px; color: var(--ink); background: white; min-width: 0; }
input:hover, select:hover { border-color: #6c9983; }
input:disabled, select:disabled { opacity: .5; background: #f2f4f3; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 22px; accent-color: var(--teal); cursor: pointer; }
input.invalid { border: 2px solid #c44343; background: #fff5f5; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
a { color: var(--teal); }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: white; padding: 14px; }
.skip-link:focus { top: 8px; }
main { max-width: 1248px; padding: 28px 24px 0; margin: auto; }
h1 { font-size: 30px; letter-spacing: -1px; line-height: 1.4; }
.button, .next-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.secondary { background: white; color: var(--ink); border-color: #bdcec4; }
.secondary:hover { background: #edf5f0; }
.primary, .next-button, .result-button { background: var(--teal); color: white; }
.primary:hover, .next-button:hover, .result-button:hover { background: var(--teal-dark); }
.estimate-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #c6e1d4; background: var(--teal-soft); padding: 20px 24px; border-radius: 12px; margin-bottom: 24px; }
.estimate-banner strong { font-size: 17px; }
.estimate-banner p { color: var(--muted); font-size: 14px; margin-top: 5px; }
.cutoff-label { display: flex; align-items: center; gap: 12px; font-size: 14px; flex-shrink: 0; }
.cutoff-label select { font-weight: 600; border-color: #87b49e; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.card { background: white; border: 1px solid var(--line); border-radius: 12px; }
.muted, .small { color: var(--muted); font-size: 13px; }
.editor-card { overflow: hidden; }
.editor-tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; gap: 5px; border-bottom: 1px solid var(--line); background: #fafcfb; }
.editor-tabs button { min-height: 48px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; }
.editor-tabs button:hover { background: #edf5f0; }
.editor-tabs button[aria-selected=true] { color: white; background: var(--teal); }
.panel-inner { padding: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.section-description { font-size: 14px; color: var(--muted); line-height: 1.7; }
.semester-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 14px; }
.semester-tabs button { min-height: 46px; padding: 10px 16px; border: 1px solid #bdcec4; border-radius: 8px; color: var(--muted); background: white; font-size: 14px; }
.semester-tabs button.active { background: var(--teal-soft); color: var(--teal-dark); border: 2px solid var(--teal); font-weight: 700; padding: 9px 15px; }
.semester-tabs button.complete:not(.active) { border-color: #80b69c; color: var(--teal-dark); }
.semester-topline { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 12px; gap: 10px; }
.semester-topline .muted { font-weight: 400; }
.grade-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 15px; }
.grade-table th { background: #f2f6f3; color: #53695c; font-size: 13px; padding: 12px 8px; text-align: center; }
.grade-table th:first-child { text-align: left; width: 37%; border-radius: 6px 0 0 0; }
.grade-table th:last-child { width: 13%; border-radius: 0 6px 0 0; }
.grade-table td { padding: 9px 8px; border-bottom: 1px solid #e7ede9; height: 64px; text-align: center; }
.grade-table td:first-child { font-weight: 600; text-align: left; }
.grade-table td input[type=number], .grade-table select { width: 100%; text-align: center; }
.grade-table input[type=checkbox] { vertical-align: middle; }
.subject-name { display: flex; align-items: center; gap: 8px; }
.subject-index { font-size: 12px; font-weight: 400; color: #84958b; }
.elective-select { font-size: 13px; padding-left: 4px; padding-right: 4px; }
.grade-table tr.excluded td { color: #8d9b93; background: #fafbfa; }
.grade-table tr.excluded td:first-child { text-decoration: line-through; }
.art-table th:nth-child(2) { width: 50%; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 8px; border-radius: 6px; background: transparent; color: var(--teal-dark); font-size: 14px; }
.text-button:hover { background: var(--teal-soft); }
.text-button svg { width: 17px; height: 17px; }
.add-subject { margin-top: 6px; }
.add-row { display: flex; gap: 8px; padding: 12px 0; }
.add-row input { min-width: 0; flex: 1; }
.table-caption { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 12px; }
.table-total { background: #f2f7f4; padding: 16px; margin-top: 18px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table-total>span { font-size: 13px; color: var(--muted); line-height: 1.7; }
.table-total>div { flex-shrink: 0; }
.table-total strong { font-size: 23px; color: var(--teal); font-variant-numeric: tabular-nums; }
.table-total small { font-size: 13px; margin-left: 4px; color: var(--muted); }
.section-divider { height: 1px; background: var(--line); margin: 28px 0; }
.panel-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fafcfb; border-top: 1px solid var(--line); padding: 16px 24px; }
.panel-bottom>span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.next-button { flex-shrink: 0; }
.storage-note { font-size: 12px; color: var(--muted); line-height: 1.8; }
.results-column { position: sticky; top: 20px; }
.score-card { border-radius: 12px; background: white; border: 1px solid #b8d7c7; padding: 24px; }
.score-card-top { display: flex; align-items: center; gap: 7px; font-size: 16px; }
.score-status { margin-left: auto; color: #66786e; background: #f0f3f1; border-radius: 5px; padding: 4px 7px; font-size: 12px; }
.score-status.ready { background: var(--teal-soft); color: var(--teal-dark); }
.score-main { text-align: center; padding: 24px 0 18px; }
.score-main>span { font-size: 15px; }
.score-value { margin: 8px 0; font-variant-numeric: tabular-nums; }
.score-value strong { font-size: 44px; color: var(--teal); letter-spacing: -1px; }
.score-value>span { font-size: 16px; margin-left: 6px; color: var(--muted); }
.score-main p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.score-main h2, .target-result h2 { font-size: 15px; font-weight: 600; }
.target-result { margin-top: 18px; padding: 16px 12px; border: 1px solid #c7d8ed; border-radius: 8px; background: #f3f7fd; text-align: center; }
.target-result .score-value strong { color: #315a94; font-size: 38px; }
.target-result p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.target-result #target-difference { color: #315a94; font-weight: 600; }
.target-academic { margin: 8px 0 5px; font-size: 12px; color: var(--muted); }
.target-note { color: #315a94; font-size: 14px; line-height: 1.7; margin: 12px 0; }
.target-fill { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 10px; padding: 16px; background: #f3f7fd; border-radius: 8px; margin-bottom: 22px; }
.target-fill label { display: grid; gap: 6px; min-width: 0; font-size: 13px; }
.target-fill input, .target-fill select { width: 100%; }
.target-fill button { grid-column: 1/-1; }
.academic-preview { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; padding: 12px; border-radius: 8px; background: var(--teal-soft); }
.academic-preview strong { font-size: 19px; color: var(--teal-dark); font-variant-numeric: tabular-nums; }
.academic-preview small { color: var(--muted); }
.score-divider { height: 1px; background: var(--line); margin: 20px 0; }
.breakdown-row { margin: 18px 0; }
.breakdown-label { display: flex; align-items: center; justify-content: space-between; font-size: 14px; gap: 8px; }
.breakdown-label>span { display: flex; gap: 7px; align-items: center; }
.breakdown-label strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.breakdown-label small { font-size: 12px; color: var(--muted); }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.breakdown-current { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 5px 0; }
.breakdown-values { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.breakdown-values>div { display: flex; flex-direction: column; gap: 4px; }
.breakdown-values small { font-size: 11px; color: var(--muted); }
.breakdown-values strong { font-size: 17px; color: var(--teal-dark); font-variant-numeric: tabular-nums; }
.breakdown-values>div+div strong { color: #315a94; }
.progress-track { height: 5px; background: #edf2ee; border-radius: 3px; overflow: hidden; margin-top: 7px; }
.progress-fill { height: 100%; background: var(--teal); border-radius: 3px; transition: width .2s; }
.tone-1 .legend-dot, .tone-1 .progress-fill { background: #73a58a; }
.tone-2 .legend-dot, .tone-2 .progress-fill { background: #99a66b; }
.tone-3 .legend-dot, .tone-3 .progress-fill { background: #bca16f; }
.result-button { width: 100%; justify-content: space-between; }
.attendance-card { border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-top: 16px; }
.attendance-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.attendance-heading strong { font-size: 23px; color: var(--teal); }
.attendance-heading small { color: var(--muted); font-size: 13px; }
.attendance-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.attendance-fields label { display: grid; gap: 8px; font-size: 13px; }
.attendance-fields input { width: 100%; text-align: center; }
.attendance-conversion { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 12px 0 4px; }
.zero-button { border: 1px solid #b8d5c4; background: var(--teal-soft); width: 100%; margin-top: 8px; }
.activity-base { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; border-radius: 8px; background: var(--teal-soft); margin: 20px 0 26px; font-size: 14px; }
.activity-base strong { font-size: 24px; color: var(--teal); }
.activity-base small { font-size: 13px; margin-left: 4px; }
.award-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.award-grid label, .leadership-row label { display: grid; gap: 7px; font-size: 13px; }
.award-grid input { width: 100%; text-align: center; }
.leadership-rows { display: grid; gap: 12px; margin-top: 16px; }
.leadership-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 34px; gap: 8px; background: #f4f7f5; border-radius: 8px; padding: 14px; }
.leadership-row input, .leadership-row select { width: 100%; font-size: 14px; padding: 8px; }
.remove-role { align-self: end; min-height: 44px; color: #94504d; background: transparent; font-size: 25px; }
.role-status { grid-column: 1/-1; font-size: 12px; color: var(--muted); line-height: 1.7; }
.role-status.valid { color: var(--teal-dark); }
.empty-roles { padding: 22px; text-align: center; border: 1px dashed #bdcfc3; border-radius: 8px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.forecast-card { margin-top: 24px; padding: 24px; scroll-margin-top: 20px; }
.forecast-period { font-size: 14px; color: var(--muted); margin: 8px 0 18px; }
.forecast-table { width: 100%; border-collapse: collapse; font-size: 15px; table-layout: fixed; }
.forecast-table th, .forecast-table td { padding: 14px 12px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.forecast-table thead th { background: #f2f6f3; font-size: 13px; font-weight: 500; color: var(--muted); }
.forecast-table th:first-child { text-align: left; }
.forecast-table tbody th { font-weight: 600; }
.forecast-table small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.7; margin-top: 3px; }
.forecast-table strong { color: var(--teal-dark); }
.forecast-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.forecast-totals>div { background: var(--teal-soft); padding: 16px; border-radius: 8px; display: flex; flex-direction: column; gap: 7px; }
.forecast-totals span { font-size: 14px; color: var(--muted); }
.forecast-totals strong { font-size: 25px; color: var(--teal-dark); font-variant-numeric: tabular-nums; }
.forecast-totals small { color: var(--muted); font-size: 13px; font-weight: 400; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); padding: 14px 22px; background: #244d3b; color: white; border-radius: 9px; font-size: 14px; opacity: 0; pointer-events: none; z-index: 30; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-score { display: none; }
.noscript { padding: 20px; text-align: center; }
@media (max-width: 1000px) {
  .content-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
  .panel-inner, .student-card, .score-card { padding: 20px; }
  .subject-index { display: none; }
  .grade-table th:first-child { width: 33%; }
  .grade-table th:last-child { width: 13%; }
  .grade-table td, .grade-table th { padding-left: 5px; padding-right: 5px; }
  .panel-bottom { flex-direction: column; align-items: stretch; padding: 16px 20px; }
  .panel-bottom>span { text-align: center; }
  .attendance-fields { grid-template-columns: repeat(2, 1fr); }
  .leadership-row { grid-template-columns: 1fr 1fr; }
  .remove-role { grid-column: 2; justify-self: end; padding: 0 15px; }
}
@media (max-width: 760px) {
  main { padding: 22px 16px 90px; }
  h1 { font-size: 25px; }
  .estimate-banner { flex-direction: column; align-items: stretch; padding: 18px; gap: 16px; }
  .cutoff-label { justify-content: space-between; }
  .cutoff-label select { flex: 1; max-width: 210px; }
  .content-grid { grid-template-columns: 1fr; gap: 20px; }
  .results-column { position: static; }
  .panel-inner { padding: 20px 16px; }
  .editor-tabs { padding: 6px; gap: 3px; }
  .editor-tabs button { font-size: 14px; }
  .section-head h2 { font-size: 19px; }
  .section-description { font-size: 13px; }
  .semester-tabs { gap: 7px; }
  .semester-tabs button { padding: 10px 12px; font-size: 13px; flex: 1; min-width: 105px; }
  .semester-tabs button.active { padding: 9px 11px; }
  .grade-table { font-size: 14px; }
  .grade-table th { font-size: 12px; }
  .grade-table th:first-child { width: 32%; }
  .grade-table th:last-child { width: 13%; }
  .grade-table td { padding: 9px 4px; }
  .grade-table td input[type=number], .grade-table select { padding: 8px 3px; font-size: 16px; }
  .grade-table .elective-select { font-size: 12px; }
  .grade-table th, .grade-table td { overflow-wrap: anywhere; }
  .subject-name { gap: 0; }
  .table-total { flex-direction: column; align-items: flex-start; padding: 14px; }
  .table-total>div { align-self: flex-end; }
  .semester-topline { font-size: 15px; }
  .semester-topline .muted { font-size: 12px; }
  .panel-bottom { padding: 16px; }
  .text-button { font-size: 13px; }
  .score-card { padding: 22px; }
  .score-value strong { font-size: 46px; }
  .attendance-card { padding: 16px; }
  .attendance-fields label { font-size: 12px; }
  .award-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head:has(h3) { align-items: flex-start; flex-direction: column; }
  .forecast-card { padding: 20px 14px; }
  .forecast-card h2 { font-size: 19px; }
  .forecast-table { font-size: 13px; }
  .forecast-table td, .forecast-table th { padding: 12px 4px; }
  .forecast-table thead th { font-size: 11px; }
  .forecast-table small { font-size: 11px; }
  .forecast-table tbody th small { display: none; }
  .forecast-totals { gap: 8px; }
  .forecast-totals>div { padding: 12px; }
  .forecast-totals span { font-size: 12px; }
  .forecast-totals strong { font-size: 22px; }
  .forecast-totals small { display: block; font-size: 12px; }
  .mobile-score { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 15; width: 100%; background: var(--teal-dark); color: white; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -3px 16px #163d2415; min-height: 68px; text-align: left; }
  .mobile-score>span:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
  .mobile-score small { font-size: 12px; }
  .mobile-score strong { font-size: 22px; font-variant-numeric: tabular-nums; }
  .mobile-score>span:last-child { font-size: 13px; flex-shrink: 0; }
  .toast { bottom: 86px; width: max-content; text-align: center; }
  footer { line-height: 1.8; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

main>h1 { margin-bottom: 20px; }
.estimate-banner { padding: 16px 20px; background: white; border-color: var(--line); }
.cutoff-label { width: 100%; justify-content: space-between; font-size: 16px; font-weight: 600; }
.cutoff-label select { min-width: 190px; }
.semester-tabs { margin-top: 0; }
.panel-bottom { justify-content: flex-end; }
.forecast-card { padding: 18px 22px; }
.forecast-card summary { cursor: pointer; min-height: 28px; font-size: 15px; font-weight: 600; }
.forecast-card[open] summary { margin-bottom: 18px; }
.score-main { padding-top: 14px; }
@media(max-width: 760px) { .forecast-card { padding: 16px; } .cutoff-label { flex-wrap: wrap; gap: 10px; font-size: 14px; } .cutoff-label select { min-width: 150px; } }
@media print { .mobile-score, .toast, .next-button, .add-subject { display: none; } main { padding: 0; } .results-column { position: static; } }
