:root {
  --navy: #17345f;
  --navy-deep: #102746;
  --blue: #2764c8;
  --blue-soft: #eaf2ff;
  --cyan: #31b7c6;
  --ink: #172033;
  --muted: #617087;
  --line: #dbe3ef;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --warn: #bc6815;
  --warn-soft: #fff5e7;
  --success: #177a59;
  --success-soft: #e9f8f2;
  --shadow: 0 18px 45px rgba(20, 49, 88, .09);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Pretendard", "Noto Sans KR", Arial, sans-serif; line-height: 1.55; }
button, input { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.topbar { height: 68px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--navy-deep); color: white; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; }
.wordmark span, .brand-mark { display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--cyan), var(--blue)); font-family: Georgia, serif; font-style: italic; }
.wordmark span { width: 35px; height: 35px; border-radius: 10px; }
.account { display: flex; gap: 18px; align-items: center; font-size: .92rem; }
.text-button { border: 0; padding: 5px 0; background: transparent; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.workspace, .admin-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 70px; }
.course-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; color: var(--navy-deep); font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.2; letter-spacing: -.04em; }
.course-head p:last-child { margin: 9px 0 0; color: var(--muted); }
.status-chip { flex: 0 0 auto; padding: 8px 13px; border: 1px solid #c8d8ef; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: .88rem; font-weight: 750; }
.layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.main-column { display: grid; gap: 18px; }
.side-column { display: grid; gap: 18px; position: sticky; top: 20px; }
.panel { padding: 27px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 5px 18px rgba(20, 49, 88, .04); }
.panel h2 { margin: 2px 0 0; color: var(--navy-deep); font-size: 1.25rem; letter-spacing: -.02em; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.step-label { color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.problem-panel { border-top: 4px solid var(--navy); }
.problem-text { margin: 22px 0 18px; padding: 17px 19px; border-left: 3px solid var(--cyan); background: #f7fafc; font-size: 1.03rem; }
.function-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.function-tags span { padding: 5px 10px; border-radius: 7px; background: var(--blue-soft); color: var(--navy); font: 700 .82rem Consolas, monospace; }
.action-panel { box-shadow: var(--shadow); }
.action-panel > p { color: var(--muted); }
.action-row { display: flex; gap: 10px; margin-top: 22px; }
.primary-button, .secondary-button, .google-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border-radius: 10px; padding: 0 17px; font-weight: 750; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid var(--blue); color: white; background: var(--blue); box-shadow: 0 6px 14px rgba(39, 100, 200, .2); }
.primary-button:hover { background: #1f54ac; }
.secondary-button { min-height: 40px; border: 1px solid #c9d5e6; color: var(--navy); background: white; }
.upload-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-top: 20px; padding: 16px; border: 1px dashed #aac0dd; border-radius: 12px; background: #f8fbff; }
.upload-box input { position: absolute; opacity: 0; pointer-events: none; }
.selected-file { color: var(--muted); overflow-wrap: anywhere; }
.message { margin-top: 15px; padding: 12px 14px; border-radius: 9px; background: var(--blue-soft); color: var(--navy); }
.message.error { color: #8c2d25; background: #fff0ee; }
.message.success { color: var(--success); background: var(--success-soft); }
.feedback-head { display: flex; gap: 14px; align-items: center; }
.feedback-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 900; font-size: 1.25rem; }
.hint-box { margin: 20px 0; padding: 16px 18px; border-radius: 11px; color: #6d4317; background: var(--warn-soft); }
.progress-panel h2 { margin-bottom: 22px; }
.metric { display: flex; align-items: center; justify-content: space-between; margin: 11px 0; color: var(--muted); }
.metric strong { color: var(--navy-deep); }
.progress-track { height: 7px; margin: 19px 0 24px; overflow: hidden; border-radius: 99px; background: #e4eaf2; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .25s ease; }
.activity-list { display: grid; gap: 9px; margin: 0; }
.activity-list div { display: flex; justify-content: space-between; }
.activity-list dt { color: var(--muted); }
.activity-list dd { margin: 0; font-weight: 750; }
.side-note { padding: 20px; border-radius: 15px; color: #dce9ff; background: var(--navy); }
.side-note p { margin: 7px 0 0; color: #bdcce2; font-size: .9rem; }
.mini-sheet { margin: 20px 0; overflow-x: auto; }
.mini-sheet table { width: 100%; border-collapse: collapse; background: white; }
.mini-sheet th, .mini-sheet td { min-width: 130px; padding: 10px 13px; border: 1px solid #9eacbd; text-align: center; }
.mini-sheet th { color: var(--navy-deep); background: #dfeaf7; }
.formula-field { display: grid; gap: 6px; margin: 10px 0; }
.formula-field label { font-size: .87rem; color: var(--muted); font-weight: 650; }
.formula-field input { width: 100%; padding: 12px 14px; border: 1px solid #aab8ca; border-radius: 9px; font-family: Consolas, monospace; }
#correctionForm .primary-button { margin-top: 8px; }
.login-page { min-height: 100vh; background: radial-gradient(circle at 13% 17%, #315a8e 0, transparent 31%), linear-gradient(135deg, #0d203b 0%, #173b69 56%, #216077 100%); }
.login-shell { width: min(1080px, calc(100% - 40px)); min-height: 100vh; margin: auto; display: grid; grid-template-columns: 1.2fr .8fr; gap: 90px; align-items: center; }
.login-copy { color: white; }
.login-copy .eyebrow { color: #77dbe4; }
.login-copy h1 { color: white; font-size: clamp(2.5rem, 5vw, 4.2rem); }
.login-copy > p:last-of-type { max-width: 620px; color: #ccdaeb; font-size: 1.08rem; }
.process-line { display: flex; align-items: center; margin-top: 40px; color: #dae6f5; font-size: .85rem; font-weight: 700; }
.process-line i { width: 22px; height: 1px; margin: 0 9px; background: #75a8c6; }
.login-card { padding: 38px 34px; border: 1px solid rgba(255,255,255,.45); border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 25px 70px rgba(3, 17, 36, .28); }
.brand-mark { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 25px; font-size: 1.3rem; }
.login-card h2 { margin: 0; color: var(--navy-deep); font-size: 1.45rem; }
.login-card > p { color: var(--muted); }
.google-button { width: 100%; margin-top: 18px; border: 1px solid #c8d1df; background: white; color: #26364c; }
.google-button:hover { background: #f6f8fb; }
.google-g { margin-right: 12px; color: #2868d7; font-weight: 900; }
.login-card .privacy-note { margin: 16px 0 0; font-size: .78rem; text-align: center; }
.legal-links { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .82rem; }
.legal-links a { text-underline-offset: 3px; }
.login-card .legal-links { margin-top: 8px; }
.site-footer { width: min(1180px, calc(100% - 40px)); margin: -38px auto 0; padding: 0 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: .82rem; }
.site-footer .legal-links { justify-content: flex-end; }
.legal-page { min-height: 100vh; background: linear-gradient(180deg, #edf4fc 0, var(--canvas) 260px); }
.legal-topbar { padding: 0 max(24px, calc((100vw - 880px) / 2)); }
.legal-shell { width: min(880px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 72px; }
.legal-heading { margin-bottom: 24px; }
.legal-heading p:last-child { margin: 10px 0 0; color: var(--muted); }
.legal-summary { margin-bottom: 18px; padding: 20px 22px; border: 1px solid #bfd2eb; border-radius: 14px; color: var(--navy-deep); background: var(--blue-soft); }
.legal-summary strong { display: block; margin-bottom: 6px; }
.legal-card { padding: 34px 38px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 9px 28px rgba(20, 49, 88, .06); }
.legal-card section + section { margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--line); }
.legal-card h2 { margin: 0 0 12px; color: var(--navy-deep); font-size: 1.13rem; }
.legal-card h3 { margin: 20px 0 8px; color: var(--navy-deep); font-size: 1rem; }
.legal-card p { margin: 8px 0; }
.legal-card ul { margin: 10px 0; padding-left: 22px; }
.legal-card li + li { margin-top: 7px; }
.legal-card a { color: var(--blue); text-underline-offset: 3px; }
.legal-contact { padding: 16px 18px; border-radius: 11px; background: #f5f8fc; }
.legal-back { display: inline-flex; margin-top: 24px; color: var(--navy); font-weight: 750; text-underline-offset: 4px; }
.admin-shell { width: min(1320px, calc(100% - 40px)); }
.table-wrap { overflow-x: auto; }
.table-panel { padding: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
.table-panel th, .table-panel td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table-panel th { color: white; background: var(--navy); font-size: .83rem; }
.table-panel td { font-size: .9rem; }
.table-panel tbody tr:hover { background: #f7faff; }
.pass-text { color: var(--success); font-weight: 750; }
@media (max-width: 860px) {
  .layout-grid { grid-template-columns: 1fr; }
  .side-column { position: static; grid-row: 1; }
  .progress-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; }
  .progress-panel h2, .progress-track, .activity-list { grid-column: 1 / -1; }
  .metric { display: grid; justify-items: center; gap: 4px; }
  .login-shell { grid-template-columns: 1fr; gap: 40px; padding: 65px 0; }
  .login-copy h1 { font-size: 2.7rem; }
}
@media (max-width: 560px) {
  .workspace, .admin-shell { width: min(100% - 24px, 1180px); padding-top: 26px; }
  .topbar { height: 60px; padding: 0 13px; }
  .account #userName { display: none; }
  .course-head { align-items: flex-start; flex-direction: column; }
  .panel { padding: 20px; border-radius: 14px; }
  .panel-heading { align-items: stretch; flex-direction: column; }
  .secondary-button { align-self: flex-start; }
  .upload-box { grid-template-columns: 1fr; }
  .process-line { flex-wrap: wrap; row-gap: 8px; }
  .site-footer { width: min(100% - 24px, 1180px); margin-top: -24px; flex-direction: column; align-items: flex-start; }
  .site-footer .legal-links { justify-content: flex-start; }
  .legal-shell { width: min(100% - 24px, 880px); padding-top: 32px; }
  .legal-card { padding: 24px 20px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
