:root {
  color-scheme: light;
  --ink: #111316;
  --graphite: #22262b;
  --muted: #69717d;
  --line: #e4e7ea;
  --surface: #f4f6f7;
  --white: #fff;
  --green: #00bd45;
  --green-dark: #009b39;
  --danger: #b42318;
  font-family: Inter, "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-size: 16px; line-height: 1.55; word-break: keep-all; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(0,189,69,.28); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--white); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.topbar { position: sticky; z-index: 20; top: 0; display: flex; min-height: 72px; padding: 0 clamp(20px,4vw,56px); align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 11px; line-height: 1.05; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--graphite); color: var(--green); font-size: 1.2rem; font-weight: 950; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.13rem; font-weight: 900; letter-spacing: -.045em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.top-links { display: flex; gap: 22px; color: #4c535c; font-size: .9rem; font-weight: 650; }
.top-links a:hover { color: var(--ink); }

.auth-shell { display: grid; width: min(calc(100% - 40px),1160px); min-height: calc(100vh - 72px); margin: 0 auto; padding: clamp(52px,7vw,96px) 0; grid-template-columns: 1.05fr .95fr; gap: clamp(54px,8vw,110px); align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--green-dark); font-size: .78rem; font-weight: 850; letter-spacing: .16em; }
.auth-intro h1 { margin: 0 0 24px; font-size: clamp(2.8rem,5.4vw,5rem); line-height: 1.04; letter-spacing: -.064em; }
.auth-intro > p:not(.eyebrow):not(.app-note) { max-width: 570px; margin: 0; color: #505761; font-size: 1.08rem; }
.scope-list { display: grid; max-width: 560px; margin: 44px 0 32px; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.scope-list li { display: flex; min-height: 62px; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); font-weight: 720; }
.scope-list span { color: var(--green-dark); font-size: .76rem; font-weight: 850; }
.app-note { max-width: 560px; margin: 0; padding: 16px 18px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: .88rem; }

.auth-card { padding: clamp(28px,4vw,46px); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 70px rgba(17,19,22,.08); }
.auth-tabs { display: grid; margin-bottom: 34px; padding: 4px; grid-template-columns: 1fr 1fr; border-radius: 11px; background: var(--surface); }
.auth-tab { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; }
.auth-tab.is-active { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(17,19,22,.08); }
.auth-heading h2 { margin: 0 0 8px; font-size: clamp(1.6rem,3vw,2.15rem); letter-spacing: -.045em; }
.auth-heading > p:last-child { margin: 0 0 26px; color: var(--muted); }
.social-auth { display: grid; gap: 10px; }
.social-button { display: flex; min-height: 50px; padding: 0 16px; align-items: center; justify-content: center; gap: 10px; border: 1px solid #ccd1d5; border-radius: 10px; background: var(--white); cursor: pointer; font-weight: 750; }
.social-button:hover { background: var(--surface); }
.social-button:disabled { cursor: not-allowed; opacity: .54; background: var(--surface); }
.social-symbol { font-size: .72rem; }
.google-logo { width: 20px; height: 20px; object-fit: contain; }
.divider { display: flex; margin: 24px 0; align-items: center; gap: 12px; color: #90969d; font-size: .76rem; }
.divider::before, .divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field span { font-size: .88rem; font-weight: 750; }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #cfd4d8; border-radius: 9px; background: var(--white); color: var(--ink); }
.field input[type=file] { padding: 10px 12px; }
.field input:focus, .field select:focus { border-color: var(--green-dark); }
.field small { color: var(--muted); font-size: .78rem; }
.primary-button { display: inline-flex; width: 100%; min-height: 50px; padding: 0 20px; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: var(--graphite); color: var(--white); cursor: pointer; font-weight: 800; }
.primary-button:hover { background: #08090a; }
.primary-button:disabled { cursor: wait; opacity: .56; }
.primary-button.compact { width: auto; min-height: 44px; }
.secondary-auth-button { display: block; min-height: 40px; margin: 8px auto 0; padding: 0 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .84rem; font-weight: 680; }
.secondary-auth-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.form-message { min-height: 22px; margin: 12px 0 0; color: var(--danger); font-size: .86rem; }
.form-message.is-success { color: var(--green-dark); }
.auth-footnote { margin: 20px 0 0; color: var(--muted); font-size: .76rem; text-align: center; }
.auth-footnote a { text-decoration: underline; text-underline-offset: 3px; }

.workspace { display: grid; min-height: calc(100vh - 72px); grid-template-columns: 246px minmax(0,1fr); background: var(--surface); }
.sidebar { position: sticky; top: 72px; display: flex; height: calc(100vh - 72px); padding: 24px 18px; flex-direction: column; border-right: 1px solid var(--line); background: var(--white); }
.account-block { display: flex; min-height: 68px; padding: 10px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.account-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--graphite); color: var(--green); font-weight: 900; }
.account-block strong, .account-block small { display: block; overflow: hidden; max-width: 150px; text-overflow: ellipsis; white-space: nowrap; }
.account-block small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.workspace-nav { display: grid; gap: 6px; margin-top: 24px; }
.nav-item { display: grid; min-height: 62px; padding: 10px 12px; justify-items: start; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.nav-item span { font-weight: 790; }
.nav-item small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.nav-item.is-active { background: var(--graphite); color: var(--white); }
.nav-item.is-active small { color: #bbc1c7; }
.logout-button { min-height: 44px; margin-top: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--white); cursor: pointer; color: var(--muted); }
.workspace-main { min-width: 0; padding: clamp(28px,5vw,68px); }
.workspace-panel { width: min(100%,1120px); margin: 0 auto; }
.panel-heading { display: flex; margin-bottom: 34px; align-items: flex-end; justify-content: space-between; gap: 24px; }
.panel-heading h1 { margin: 0; font-size: clamp(2.25rem,5vw,4rem); line-height: 1.04; letter-spacing: -.06em; }
.panel-heading > div > p:last-child:not(.eyebrow) { max-width: 620px; margin: 13px 0 0; color: var(--muted); }
.summary-grid { display: grid; margin-bottom: 22px; grid-template-columns: repeat(2,1fr); gap: 14px; }
.summary-card { display: grid; min-height: 150px; padding: 24px; align-content: space-between; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.summary-card > span { color: #4d545d; font-weight: 720; }
.summary-card strong { font-size: 2.6rem; line-height: 1; letter-spacing: -.05em; }
.summary-card small { color: var(--muted); }
.content-block, .claim-form { margin-top: 14px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.block-heading { display: flex; min-height: 40px; margin-bottom: 12px; align-items: center; justify-content: space-between; gap: 18px; }
.block-heading h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.025em; }
.quiet-label { color: var(--muted); font-size: .76rem; }
.record-list { border-top: 1px solid var(--ink); }
.record-row { display: grid; min-height: 78px; padding: 16px 0; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; border-bottom: 1px solid var(--line); }
.record-row strong, .record-row small { display: block; }
.record-row small { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.status-pill { display: inline-flex; min-height: 30px; padding: 0 10px; align-items: center; border-radius: 99px; background: var(--surface); color: #4f5660; font-size: .76rem; font-weight: 780; }
.status-pill.success { background: #e9f8ef; color: #087934; }
.status-pill.action { background: #fff4e5; color: #9a5800; }
.loading-row { padding: 25px 0; color: var(--muted); }
.empty-state { padding: 38px 12px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); }
.empty-state p { margin: 0; }

.search-bar { display: grid; margin-bottom: 14px; grid-template-columns: 1fr auto; border: 1px solid #cfd4d8; border-radius: 12px; background: var(--white); overflow: hidden; }
.search-bar:focus-within { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(0,189,69,.12); }
.search-bar input { min-width: 0; min-height: 56px; padding: 0 17px; border: 0; outline: 0; }
.search-bar button { min-width: 90px; border: 0; background: var(--graphite); color: var(--white); cursor: pointer; font-weight: 790; }
.search-results { border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; }
.compact-empty { padding: 46px 20px; }
.search-result { display: grid; width: 100%; min-height: 74px; padding: 15px 18px; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: var(--white); cursor: pointer; text-align: left; }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--surface); }
.search-result strong, .search-result small { display: block; }
.search-result small { margin-top: 4px; color: var(--muted); }
.search-result > span:last-child { color: var(--green-dark); font-weight: 790; }
.new-academy-row { display: flex; min-height: 64px; padding: 0 6px; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); }
.text-button { min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--green-dark); cursor: pointer; font-weight: 790; }
.connection-steps { display: grid; margin: 0 0 22px; padding: 0; grid-template-columns: repeat(3,1fr); list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; }
.connection-steps li { position: relative; display: flex; min-height: 58px; padding: 0 18px; align-items: center; gap: 10px; color: #8a9198; }
.connection-steps li + li { border-left: 1px solid var(--line); }
.connection-steps span { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #cfd4d8; border-radius: 50%; font-size: .76rem; font-weight: 850; }
.connection-steps strong { font-size: .88rem; }
.connection-steps li.is-active { background: #f7fbf8; color: var(--ink); }
.connection-steps li.is-active span { border-color: var(--green-dark); background: var(--green-dark); color: var(--white); }
.connection-steps li.is-complete span { border-color: var(--green-dark); color: var(--green-dark); }
.academy-search-layout { display: grid; grid-template-columns: minmax(340px,.92fr) minmax(390px,1.08fr); gap: 16px; align-items: stretch; }
.academy-results-panel, .map-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.academy-results-panel { display: flex; flex-direction: column; }
.search-results { max-height: 430px; overflow-y: auto; }
.search-result.is-selected { position: relative; background: #f2faf5; box-shadow: inset 3px 0 0 var(--green-dark); }
.search-result.is-selected > span:last-child { color: var(--ink); }
.map-panel { display: flex; flex-direction: column; }
.map-panel-heading { display: flex; min-height: 50px; margin-bottom: 12px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.map-panel-heading .eyebrow { margin-bottom: 4px; }
.map-panel-heading h2 { margin: 0; font-size: 1.18rem; letter-spacing: -.03em; }
.map-state { padding: 6px 9px; border-radius: 99px; background: var(--surface); color: var(--muted); font-size: .74rem; font-weight: 760; white-space: nowrap; }
.academy-map { position: relative; display: grid; min-height: 370px; overflow: hidden; place-items: center; border: 1px solid #d9dde1; border-radius: 13px; background: #eef1f2; }
.academy-map::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.58) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.58) 1px,transparent 1px); background-size: 36px 36px; content: ""; }
.academy-map.is-live::before { display: none; }
.map-fallback { position: relative; z-index: 1; max-width: 310px; padding: 26px; color: var(--muted); text-align: center; }
.map-fallback strong, .map-fallback p { display: block; }
.map-fallback strong { margin: 12px 0 7px; color: var(--ink); }
.map-fallback p { margin: 0; font-size: .86rem; }
.map-pin-preview { position: relative; display: block; width: 30px; height: 38px; margin: 0 auto; border-radius: 50% 50% 50% 0; background: var(--graphite); transform: rotate(-45deg); box-shadow: 0 8px 22px rgba(17,19,22,.18); }
.map-pin-preview::after { position: absolute; top: 8px; left: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--green); content: ""; }
.selected-academy-card { display: grid; gap: 14px; padding-top: 16px; }
.selected-academy-card strong, .selected-academy-card p, .selected-academy-card small { display: block; }
.selected-academy-card p { margin: 4px 0 0; color: var(--muted); }
.selected-academy-card small { margin-top: 3px; color: #8a9198; }
.location-actions { display: grid; grid-template-columns: 1.15fr .85fr; gap: 8px; }
.secondary-button { min-height: 50px; padding: 0 16px; border: 1px solid #cfd4d8; border-radius: 10px; background: var(--white); cursor: pointer; font-weight: 770; }
.secondary-button:hover { background: var(--surface); }
.location-message { min-height: 20px; margin: -2px 0 0; color: var(--danger); font-size: .82rem; }
.form-grid { display: grid; margin-top: 22px; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field.wide { grid-column: 1 / -1; }
.confirmed-location { display: flex; margin: 16px 0 4px; padding: 15px 16px; align-items: center; gap: 12px; border-radius: 12px; background: #eef8f1; }
.confirmation-mark { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--green-dark); color: var(--white); font-weight: 900; }
.confirmed-location strong, .confirmed-location small { display: block; }
.confirmed-location small { margin-top: 2px; color: var(--muted); }
.check-field { display: flex; min-height: 48px; margin: 2px 0 12px; padding: 11px 13px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.check-field.wide { grid-column: 1 / -1; }
.check-field input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--green-dark); }
.check-field span { font-size: .88rem; font-weight: 700; }
.form-section-heading { display: flex; margin: 28px 0 -8px; padding-top: 24px; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.form-section-heading span { font-weight: 820; }
.form-section-heading small { color: var(--muted); }
.operator-fields { margin-top: 18px; }
.security-note, .notice-box { margin: 8px 0 20px; padding: 16px 18px; border-radius: 12px; background: var(--surface); }
.security-note strong, .notice-box strong { display: block; margin-bottom: 4px; }
.security-note p, .notice-box p { margin: 0; color: var(--muted); font-size: .87rem; }
.academy-selector { display: grid; margin-bottom: 18px; gap: 8px; }
.academy-chip { display: flex; min-height: 54px; padding: 0 16px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.academy-chip small { color: var(--muted); }
.plan-grid { display: grid; margin-bottom: 16px; grid-template-columns: repeat(2,1fr); gap: 14px; }
.plan-card { display: grid; min-height: 168px; padding: 24px; align-content: space-between; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.plan-card span { color: var(--muted); font-weight: 720; }
.plan-card strong { font-size: 2rem; letter-spacing: -.04em; }
.plan-card small { color: var(--muted); }
.plan-card.featured { border: 2px solid var(--graphite); }
.mobile-workspace-header, .mobile-nav { display: none; }
.toast { position: fixed; z-index: 50; right: 20px; bottom: 20px; max-width: 360px; padding: 14px 17px; border-radius: 11px; background: var(--graphite); color: var(--white); box-shadow: 0 14px 40px rgba(17,19,22,.2); }

@media (max-width: 860px) {
  .topbar { min-height: 64px; padding: 0 18px; }
  .brand small, .top-links a:first-child { display: none; }
  .auth-shell { width: min(calc(100% - 32px),620px); min-height: auto; padding: 46px 0 70px; grid-template-columns: 1fr; gap: 38px; }
  .auth-card { grid-row: 1; }
  .auth-intro { grid-row: 2; }
  .auth-intro h1 { font-size: clamp(2.7rem,12vw,4.2rem); }
  .scope-list { margin-top: 32px; }
  .workspace { display: block; min-height: calc(100vh - 64px); padding-bottom: 68px; }
  .sidebar { display: none; }
  .workspace-main { padding: 24px 16px 44px; }
  .mobile-workspace-header { display: flex; min-height: 44px; margin-bottom: 30px; align-items: center; justify-content: space-between; }
  .mobile-workspace-header button { min-height: 40px; border: 0; background: transparent; color: var(--muted); }
  .mobile-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom); grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
  .mobile-nav button { border: 0; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 740; }
  .mobile-nav button.is-active { color: var(--green-dark); }
  .panel-heading { align-items: flex-start; }
  .panel-heading h1 { font-size: 2.6rem; }
  .summary-grid, .plan-grid { grid-template-columns: 1fr; }
  .academy-search-layout { grid-template-columns: 1fr; }
  .academy-map { min-height: 320px; }
}

@media (max-width: 560px) {
  .auth-shell { width: min(calc(100% - 24px),620px); padding-top: 34px; }
  .auth-card { padding: 24px 18px; border-radius: 16px; }
  .panel-heading { flex-direction: column; }
  .primary-button.compact { width: 100%; }
  .summary-card { min-height: 132px; }
  .content-block, .claim-form { padding: 19px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .check-field.wide { grid-column: auto; }
  .new-academy-row { align-items: flex-start; flex-direction: column; gap: 0; padding: 10px 4px; }
  .record-row { grid-template-columns: 1fr; gap: 10px; }
  .connection-steps li { min-height: 54px; padding: 0 8px; justify-content: center; }
  .connection-steps li strong { display: none; }
  .academy-results-panel, .map-panel { padding: 14px; }
  .location-actions { grid-template-columns: 1fr; }
  .form-section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
