/* ==========================================================================
   Gradecut — Naver Pay Blue Remaster (Home + Unified GNB + Search + Folding)
   Preserves existing AI 등급컷 / AI 라인 (대학 라인) / 등급컷 core layouts
   ========================================================================== */

:root {
  --bg-page: #f2f4f7;
  --ai: #2563eb;
  --ai-bg: #eff6ff;
  --ai-hover: #dbeafe;
  --ai-border: #bfdbfe;
  --hp-soft-btn: #e8f1ff;
  --hp-soft-btn-hover: #dbeafe;
  --hp-soft-btn-ink: #1d4ed8;
  --hp-dark-card: #1e2229;
  --hp-dark-btn: #343a45;
  --hp-hairline: #eceff3;
  --hp-card-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  --hp-icon-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  --bottom-nav-h: 62px;
}

[data-theme="dark"] {
  --bg-page: #0c111b;
  --ai: #60a5fa;
  --ai-bg: rgba(59, 130, 246, 0.16);
  --ai-hover: rgba(59, 130, 246, 0.24);
  --ai-border: rgba(96, 165, 250, 0.34);
  --hp-soft-btn: rgba(59, 130, 246, 0.18);
  --hp-soft-btn-hover: rgba(59, 130, 246, 0.28);
  --hp-soft-btn-ink: #93c5fd;
  --hp-dark-card: #1d2638;
  --hp-dark-btn: #2b3750;
  --hp-hairline: #243046;
  --hp-card-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
  --hp-icon-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Home view visibility */
.show-home body { background: var(--bg-page); }
.show-home .layout,
.show-home .crumbs,
.show-home #ai-cuts,
.show-home #admissions,
.show-home #guide,
.show-home #install { display: none !important; }
.show-home #home { display: block !important; }

/* ==========================================================================
   1. Unified Naver Pay Blue Top GNB
   ========================================================================== */
.top {
  height: 60px;
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--hp-hairline);
  box-shadow: none;
  gap: 16px;
}
.top-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.brand-section {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-left: -2px;
}

/* Bare solid-icon PC Nav (Naver Pay PC style — NO segmented gray pill box!) */
.site-views {
  background: transparent;
  padding: 0;
  border-radius: 0;
  gap: 2px;
  min-width: 0;
}
.site-views a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey);
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}
.site-views a svg {
  width: 17px;
  height: 17px;
  color: #a6b0bc;
  flex-shrink: 0;
  transition: color 150ms ease;
}
[data-theme="dark"] .site-views a svg { color: #64748b; }
.site-views a:hover {
  background: var(--hover);
  color: var(--ink);
}
.site-views a[aria-current="page"] {
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-weight: 700;
}
.site-views a[aria-current="page"] svg {
  color: var(--blue);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* PC Compact Unified Search */
.pc-search-wrap {
  position: relative;
  width: 210px;
}
.pc-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--ink);
  font-size: 13px;
  transition: background-color 150ms ease, border-color 150ms ease, width 180ms ease;
}
.pc-search-input::placeholder { color: var(--faint); }
.pc-search-input:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.pc-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
  pointer-events: none;
}

.top .meta {
  font-size: 12px;
  color: var(--faint);
  margin: 0;
  white-space: nowrap;
}
.show-home .top .meta,
.show-ai .top .meta,
.show-admissions .top .meta,
.show-placement .top .meta,
.show-guide .top .meta,
.show-install .top .meta { display: none; }
.top .crumbs { display: none; }

/* Responsive PC GNB guards for 7-tab topbar (prevents brand/nav overlap) */
@media (max-width: 1220px) {
  .top { padding: 0 16px; }
  .top .meta { display: none; }
  .pc-search-wrap { width: 156px; }
  .site-views a { padding: 7px 8px; font-size: 13.5px; gap: 4px; }
  .site-views a svg { width: 15px; height: 15px; }
}
@media (max-width: 1080px) {
  .brand-section { display: none; }
  .pc-search-wrap { width: 132px; }
  .site-views a { padding: 6px 7px; font-size: 13px; }
}

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: var(--bg-page);
  color: var(--grey);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover { background: var(--hover); color: var(--ink); }

/* Hide old standalone install-link in desktop GNB because 앱 설치 is now a first-class 5th tab */
.top .install-link { display: none; }

/* Mobile header behavior */
@media (max-width: 960px) {
  .top {
    height: 54px;
    padding: 0 16px;
  }
  .top .site-views,
  .top .pc-search-wrap,
  .top .meta { display: none; }
  /* On mobile Home, the seamless Naver Pay mobile top bar inside #home-mobile replaces .top */
  .show-home .top { display: none; }
  body {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 8px);
  }
}

/* ==========================================================================
   2. Mobile Fixed Bottom 5-Tab Navigation (Naver Pay style)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}
@media (max-width: 960px) {
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    padding: 6px 4px env(safe-area-inset-bottom, 0px);
    background: var(--paper);
    border-top: 1px solid var(--hp-hairline);
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.04);
  }
  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-bottom-nav a svg {
    width: 20px;
    height: 20px;
    color: #9ca3af;
  }
  [data-theme="dark"] .mobile-bottom-nav a svg { color: #64748b; }
  .mobile-bottom-nav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 700;
  }
  .mobile-bottom-nav a[aria-current="page"] svg {
    color: var(--ink);
  }
}

/* ==========================================================================
   3. Home View Switch (Mobile <= 960px vs PC > 960px)
   ========================================================================== */
.home-view {
  min-height: calc(100dvh - 60px);
  background: var(--bg-page);
}
.home-mobile { display: none; }
.home-pc { display: block; }

@media (max-width: 960px) {
  .home-view { min-height: 100dvh; }
  .home-mobile { display: block; }
  .home-pc { display: none; }
}

/* ==========================================================================
   4. MOBILE HOME (Naver Pay Mobile UX in Gradecut Blue)
   ========================================================================== */
.hm-top-zone {
  background: var(--paper);
  padding: 12px 0 18px;
}
.hm-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 14px 14px;
}
.hm-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.hm-logo svg { width: 24px; height: 24px; }

.hm-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.hm-search-input {
  width: 100%;
  height: 36px;
  padding: 0 10px 0 31px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--ink);
  font-size: 12.5px;
}
.hm-search-input::placeholder { color: var(--faint); }
.hm-search-input:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.hm-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
  pointer-events: none;
}

.hm-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.hm-icon-btn:active { background: var(--hover); }

/* Horizontal Swipeable 2-Page Quick Icon Grid */
.hm-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hm-carousel::-webkit-scrollbar { display: none; }

.hm-grid-page {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 16px;
  column-gap: 6px;
  padding: 4px 14px 14px;
}

.hm-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ink);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hm-tile:active .hm-sq { transform: scale(0.95); }

.hm-sq {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--hp-hairline);
  box-shadow: var(--hp-icon-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease;
}
.hm-sq.is-solid {
  background: var(--blue-solid);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.24);
}
.hm-sq.is-research {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.34);
}
.hm-sq.is-research svg { width: 32px; height: 32px; }
.hm-tile.is-research-tile span:last-child {
  color: var(--rs-violet);
  font-weight: 700;
}
.hm-sq svg { width: 30px; height: 30px; }
.hm-sq.is-solid svg { width: 32px; height: 32px; }
.hm-tile span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.02em;
}
.hm-score-tile .hm-score-label {
  font-weight: 700;
  color: var(--blue);
}
.hm-score-label small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--grey);
}

/* Naver Pay style swipe indicator */
.hm-swipe-bar {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding-top: 2px;
}
.hm-swipe-dot {
  width: 24px;
  height: 3.5px;
  border-radius: 999px;
  background: #dfe4ea;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 180ms ease, width 180ms ease;
}
[data-theme="dark"] .hm-swipe-dot { background: #334155; }
.hm-swipe-dot.is-active {
  width: 30px;
  background: var(--ink);
}

/* Mobile Cards Canvas */
.hm-canvas {
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* App Promo Card (Exact Naver Pay mixed-weight copy + dark pill) */
.hm-app-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 18px 20px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--hp-card-shadow);
  text-decoration: none;
  color: var(--ink);
}
.hm-app-copy {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hm-app-copy strong { font-weight: 700; }
.hm-app-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 9px;
  border-radius: 999px;
  background: #11161f;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
[data-theme="dark"] .hm-app-pill {
  background: var(--blue-solid);
}
.hm-app-pill svg { width: 22px; height: 22px; }

/* AI 등급컷 브리핑 Mobile Carousel */
.hm-brief-card {
  padding: 18px 0 16px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--hp-card-shadow);
  overflow: hidden;
}
.hm-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 12px;
  text-decoration: none;
  color: var(--ink);
}
.hm-brief-head h2 {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hm-brief-head svg { width: 18px; height: 18px; color: var(--faint); }

.hm-brief-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 18px;
  scroll-behavior: smooth;
  padding: 0 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hm-brief-track::-webkit-scrollbar { display: none; }

.hm-brief-item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--bg-page);
  border: none;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 140ms ease;
}
.hm-brief-item:active { background: var(--hover); }
.hm-brief-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hm-brief-top svg { width: 32px; height: 32px; flex-shrink: 0; }
.hm-brief-top strong {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hm-brief-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--grey);
  margin: 0;
}
.hm-brief-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  margin-top: 2px;
}

.hm-brief-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  margin: 12px 18px 0;
  padding: 3px;
  border-radius: 12px;
  background: var(--bg-page);
}
.hm-brief-index button {
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 7px 2px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.hm-brief-index button.is-active {
  background: var(--paper);
  color: var(--blue);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Quiet collapsed notes directly on canvas */
.hm-quiet-fold {
  padding: 4px 6px;
  font-size: 12px;
  color: var(--faint);
}
.hm-quiet-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  padding: 6px 2px;
  color: var(--faint);
}
.hm-quiet-fold > summary::-webkit-details-marker { display: none; }
.hm-quiet-fold-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hm-quiet-fold > summary svg.fold-chev {
  width: 15px;
  height: 15px;
  transition: transform 180ms ease;
}
.hm-quiet-fold[open] > summary svg.fold-chev { transform: rotate(180deg); }
.hm-quiet-body {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--grey);
  line-height: 1.55;
}
.hm-quiet-body ul {
  padding-left: 16px;
  display: grid;
  gap: 6px;
}

/* ==========================================================================
   5. PC HOME (Naver Pay PC Blue 2-Column Architecture — Page 14)
   ========================================================================== */
.hp-container {
  max-width: 1176px;
  margin: 0 auto;
  padding: 26px 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 24px;
  align-items: start;
}

.hp-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* Top 3 Category Cards (bare flat two-tone icons on pure white!) */
.hp-cat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.hp-cat-card {
  background: var(--paper);
  border-radius: 20px;
  padding: 20px 20px 22px;
  box-shadow: var(--hp-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hp-cat-card.is-research {
  background: linear-gradient(145deg, #f6f2ff 0%, #ede6ff 100%);
  border: 1.5px solid #d5c5fc;
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.11);
}
[data-theme="dark"] .hp-cat-card.is-research {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.18) 0%, rgba(109, 40, 217, 0.1) 100%);
  border-color: rgba(167, 139, 250, 0.36);
}
.hp-cat-card.is-research .hp-cat-head strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--rs-violet);
}
.hp-cat-card.is-research .hp-cat-head span {
  color: #6d28d9;
  font-weight: 600;
}
[data-theme="dark"] .hp-cat-card.is-research .hp-cat-head span {
  color: #c4b5fd;
}
.hp-research-badge {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
  letter-spacing: -0.01em;
}
.hp-cat-card.is-research .hp-cat-btn:hover {
  background: rgba(124, 58, 237, 0.1);
}
.hp-cat-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  color: var(--ink);
}
.hp-cat-head strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hp-cat-head span {
  font-size: 12px;
  color: var(--faint);
}
.hp-cat-head:hover span { color: var(--blue); }

.hp-cat-icons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.hp-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 2px;
  border-radius: 12px;
  transition: background-color 140ms ease, transform 140ms ease;
}
.hp-cat-btn:hover {
  background: var(--hover);
  transform: translateY(-1px);
}
.hp-cat-btn svg { width: 32px; height: 32px; }
.hp-cat-btn span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
}

/* Slim App Strip */
.hp-app-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 22px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--hp-card-shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform 140ms ease;
}
.hp-app-strip:hover { transform: translateY(-1px); }
.hp-app-strip-l {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hp-app-strip-l strong { font-size: 15px; font-weight: 700; }
.hp-app-strip-l span { font-size: 12px; font-weight: 600; color: var(--blue); }
.hp-app-strip-r {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.hp-app-strip-r svg { width: 22px; height: 22px; }

/* Split Action Card */
.hp-split-card {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--hp-card-shadow);
}
.hp-split-divider {
  width: 1px;
  height: 76px;
  background: var(--hp-hairline);
}
.hp-split-half {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hp-split-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hp-split-top strong { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.hp-split-top span { font-size: 13px; font-weight: 500; color: var(--faint); }
.hp-soft-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  background: var(--hp-soft-btn);
  color: var(--hp-soft-btn-ink);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 140ms ease;
}
.hp-soft-btn:hover {
  background: var(--hp-soft-btn-hover);
  color: var(--hp-soft-btn-ink);
}

/* Real-Data Visual Briefing Section */
.hp-brief {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hp-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hp-brief-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 17.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hp-brief-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hp-brief-links a,
.hp-brief-links button {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}
.hp-brief-links a:hover,
.hp-brief-links button:hover {
  color: var(--ink);
  background: rgba(15, 23, 42, 0.04);
}
.hp-brief-links a.is-accent,
.hp-brief-links button.is-accent {
  color: var(--blue);
  background: var(--ai-bg);
  font-weight: 700;
}
.hp-brief-pane {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  flex: 1 1 auto;
}
.hp-brief-pane[hidden] {
  display: none !important;
}
.hp-mini-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: var(--ai-bg);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
/* Compact mini calculator inside Home Briefing right card */
.hp-mini-calc {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}
.hp-mc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hp-hairline);
}
.hp-mc-row:last-child { border-bottom: none; padding-bottom: 2px; }
.hp-mc-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.hp-mc-left span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.hp-mc-left small {
  font-size: 11px;
  color: var(--faint);
}
.hp-mc-left select {
  height: 28px;
  line-height: 28px;
  padding: 0 22px 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--bg-page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 7px center;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  max-width: 112px;
}
.hp-mc-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.hp-mc-right i {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--faint);
  width: 8px;
  text-align: center;
}
.hp-mc-right input {
  width: 54px;
  height: 32px;
  line-height: 32px;
  padding: 0 6px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--bg-page);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.hp-mc-right input.is-wide { width: 128px; }
.hp-mc-right input:focus {
  background: var(--paper);
  border-color: var(--blue);
}
.hp-mc-right input::placeholder {
  color: #9aa3af;
  font-weight: 500;
  font-size: 11.5px;
  line-height: 32px;
}
.hp-mc-right input::-webkit-outer-spin-button,
.hp-mc-right input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hp-mc-right input[type="number"] { -moz-appearance: textfield; }
.hp-mc-g {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-page);
  color: var(--grey);
}
.hp-mc-g.is-g1 { background: #eff6ff; color: #2563eb; }
.hp-mc-g.is-g2 { background: #ecfeff; color: #0e7490; }
.hp-mc-g.is-g3 { background: #ecfdf5; color: #047857; }
.hp-mc-g.is-empty { color: var(--faint); opacity: 0.7; }
[data-theme="dark"] .hp-mc-g.is-g1 { background: rgba(37, 99, 235, 0.24); color: #93c5fd; }
[data-theme="dark"] .hp-mc-g.is-g2 { background: rgba(14, 116, 144, 0.25); color: #67e8f9; }
[data-theme="dark"] .hp-mc-g.is-g3 { background: rgba(4, 120, 87, 0.25); color: #6ee7b7; }

.hp-hist.is-freq .hp-hist-bar { width: 22px; }
.hp-hist.is-freq .hp-hist-lbl { font-size: 10.5px; }
.hp-hist.is-freq .hp-hist-pct { font-size: 10.5px; }

.hp-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.hp-data-card {
  background: var(--paper);
  border-radius: 20px;
  padding: 20px 22px 18px;
  box-shadow: var(--hp-card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
}
.hp-data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hp-data-head strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.hp-data-head a {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

/* Real Hairline Cut Table */
.hp-cut-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  border: none !important;
  margin: 0 !important;
}
.hp-cut-table th,
.hp-cut-table td {
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  background: transparent !important;
  white-space: nowrap;
}
.hp-cut-table th:nth-child(1), .hp-cut-table td:nth-child(1) { width: 42%; text-align: left; }
.hp-cut-table th:nth-child(2), .hp-cut-table td:nth-child(2) { width: 17%; text-align: right; }
.hp-cut-table th:nth-child(3), .hp-cut-table td:nth-child(3) { width: 17%; text-align: right; }
.hp-cut-table th:nth-child(4), .hp-cut-table td:nth-child(4) { width: 24%; text-align: right; }
.hp-cut-table th {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
  padding: 0 0 8px !important;
  border-bottom: 1px solid var(--hp-hairline) !important;
}
.hp-cut-table td {
  font-size: 13.5px;
  padding: 11px 0 !important;
  border-bottom: 1px solid var(--hp-hairline) !important;
  color: var(--grey);
}
.hp-cut-table tr:last-child td { border-bottom: none !important; padding-bottom: 2px !important; }
.hp-cut-table td:first-child {
  font-weight: 600;
  color: var(--ink);
}
.hp-cut-table td.is-c1 {
  font-weight: 700;
  color: var(--blue);
}
.hp-cut-table td.is-max {
  font-weight: 600;
  color: var(--ink);
}

/* Real Vertical Probability Bar Chart */
.hp-prob-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 6px;
}
.hp-prob-select {
  flex: 1 1 auto;
  min-width: 104px;
  max-width: 150px;
  height: 28px;
  padding: 0 24px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.hp-prob-select:hover,
.hp-prob-select:focus {
  border-color: var(--blue);
  outline: none;
}
.hp-prob-quick {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.hp-prob-quick button {
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--bg-page);
  color: var(--faint);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.hp-prob-quick button:hover {
  color: var(--ink);
}
.hp-prob-quick button.is-active {
  background: var(--ai-bg);
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.22);
  font-weight: 700;
}
.hp-cut-table tbody tr {
  cursor: pointer;
  transition: background-color 120ms ease;
}
.hp-cut-table tbody tr:hover td {
  color: var(--blue);
}
.hp-prob-sub {
  font-size: 12px;
  color: var(--grey);
  margin: 2px 0 0;
}
.hp-hist {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 8px;
  height: 138px;
  padding: 8px 6px 4px;
  margin: auto 0;
}
.hp-hist-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1;
  min-width: 0;
  height: 100%;
}
.hp-hist-pct {
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.hp-hist-col.is-peak .hp-hist-pct {
  color: var(--blue);
  font-weight: 700;
}
.hp-hist-bar {
  width: 28px;
  border-radius: 6px;
  background: #dce7fb;
  min-height: 6px;
  transition: height 280ms var(--ease-out);
}
[data-theme="dark"] .hp-hist-bar { background: rgba(96, 165, 250, 0.25); }
.hp-hist-col.is-peak .hp-hist-bar { background: var(--blue-solid); }
.hp-hist-lbl {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
  white-space: nowrap;
}
.hp-hist-col.is-peak .hp-hist-lbl {
  color: var(--ink);
  font-weight: 700;
}
.hp-data-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--hp-hairline);
  font-size: 12px;
  color: var(--grey);
}
.hp-data-foot a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

/* Right Sticky White Sidebar Panel */
.hp-side {
  position: sticky;
  top: 80px;
  background: var(--paper);
  border-radius: 24px;
  padding: 24px 22px 20px;
  box-shadow: var(--hp-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hp-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hp-side-head-l {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--ink);
}
.hp-side-head-l strong { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.hp-side-head-l span { font-size: 12.5px; color: var(--faint); }
.hp-side-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.hp-side-pill:hover { background: var(--hover); color: var(--ink); }

.hp-side-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--grey);
  text-decoration: none;
}
.hp-side-status svg { width: 18px; height: 18px; flex-shrink: 0; }
.hp-side-status strong { color: var(--blue); font-weight: 700; }

/* Dual Feature Hero Cards (Blue + Dark Ink) */
.hp-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.hp-dual-card {
  border-radius: 18px;
  padding: 16px 15px 14px;
  min-height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  color: #ffffff;
}
.hp-dual-card.is-blue { background: var(--blue-solid); }
.hp-dual-card.is-dark { background: var(--hp-dark-card); }
.hp-dual-top { display: flex; flex-direction: column; gap: 6px; }
.hp-dual-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}
.hp-dual-eyebrow svg { width: 17px; height: 17px; }
.hp-dual-val {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.hp-dual-sub {
  font-size: 11.5px;
  color: #dbeafe;
  line-height: 1.3;
}
.hp-dual-card.is-dark .hp-dual-sub {
  font-size: 13.5px;
  font-weight: 700;
  color: #93c5fd;
  line-height: 1.4;
}
.hp-dual-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}
.hp-dual-card.is-blue .hp-dual-btn { background: #1d4ed8; }
.hp-dual-card.is-blue .hp-dual-btn:hover { background: #1e40af; color: #ffffff; }
.hp-dual-card.is-dark .hp-dual-btn { background: var(--hp-dark-btn); }
.hp-dual-card.is-dark .hp-dual-btn:hover { background: #434b59; color: #ffffff; }

/* Quick Subject Row */
.hp-subj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-page);
  font-size: 12.5px;
}
.hp-subj-row > strong { color: var(--ink); font-weight: 700; }
.hp-subj-links { display: flex; align-items: center; gap: 8px; }
.hp-subj-links a {
  color: var(--grey);
  text-decoration: none;
  font-weight: 500;
}
.hp-subj-links a:hover { color: var(--blue); }

/* Sidebar Soft Blue Promo Banner Carousel + Pager */
.hp-promo-viewport {
  overflow: hidden;
  border-radius: 16px;
  background: var(--ai-bg);
}
.hp-promo-track {
  display: flex;
  will-change: transform;
}
.hp-promo {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--ai-bg);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 140ms ease;
}
.hp-promo-copy { display: flex; flex-direction: column; gap: 3px; }
.hp-promo-copy small { font-size: 11.5px; font-weight: 600; color: var(--blue); }
.hp-promo-copy strong { font-size: 14px; font-weight: 700; line-height: 1.4; }
.hp-promo svg { width: 42px; height: 42px; flex-shrink: 0; }

.hp-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: -6px;
}
.hp-pager button {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--grey);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hp-pager button:hover { background: var(--hover); color: var(--ink); }
.hp-pager span { font-size: 12px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Flat Sidebar Bottom Items */
.hp-side-list {
  padding-top: 12px;
  border-top: 1px solid var(--hp-hairline);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hp-flat-link,
.hp-flat-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 2px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  list-style: none;
}
.hp-flat-fold > summary::-webkit-details-marker { display: none; }
.hp-flat-link:hover,
.hp-flat-fold > summary:hover { color: var(--blue); }
.hp-flat-l {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hp-flat-l svg { width: 18px; height: 18px; flex-shrink: 0; }
.hp-flat-fold > summary svg.fold-chev {
  width: 15px;
  height: 15px;
  color: var(--faint);
  transition: transform 180ms ease;
}
.hp-flat-fold[open] > summary svg.fold-chev { transform: rotate(180deg); }
.hp-flat-body {
  margin: 4px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-page);
  font-size: 12px;
  line-height: 1.55;
  color: var(--grey);
}
.hp-flat-body ul {
  padding-left: 16px;
  display: grid;
  gap: 5px;
}

/* ==========================================================================
   6. Unified Live Search Dropdown (Mobile & PC)
   ========================================================================== */
.gc-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 290px;
  max-height: 64vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  z-index: 60;
  padding: 8px;
}
.pc-search-wrap .gc-search-panel {
  left: auto;
  right: 0;
  width: 340px;
}
.hm-search-wrap .gc-search-panel {
  position: fixed;
  top: 60px;
  left: 16px;
  right: 16px;
  min-width: 0;
  width: auto;
}
.gc-search-group {
  padding: 6px 8px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
  letter-spacing: -0.01em;
}
.gc-search-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.gc-search-item:hover,
.gc-search-item.is-selected {
  background: var(--ai-bg);
  color: var(--ink);
}
.gc-search-item-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.gc-search-item-main strong {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gc-search-item-main small {
  font-size: 11.5px;
  color: var(--faint);
}
.gc-search-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: var(--ai-bg);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.gc-search-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

/* ==========================================================================
   7. Folded Small AI Notes Accordions (Readable by Default!)
   ========================================================================== */
.gc-fold {
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 16px;
}
.gc-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--grey);
  cursor: pointer;
  list-style: none;
}
.gc-fold > summary::-webkit-details-marker { display: none; }
.gc-fold > summary::after {
  content: "펼치기 ⌄";
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  flex-shrink: 0;
}
.gc-fold[open] > summary::after {
  content: "접기 ⌃";
}
.gc-fold-body {
  padding-bottom: 14px;
}

.gc-fold-mini {
  margin: 4px 0 10px;
  font-size: 12.5px;
  color: var(--faint);
}
.gc-fold-mini > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  list-style: none;
  color: var(--faint);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.gc-fold-mini > summary::-webkit-details-marker { display: none; }
.gc-fold-mini > summary::after {
  content: "⌄";
  font-size: 12px;
  transition: transform 160ms ease;
}
.gc-fold-mini[open] > summary::after {
  transform: rotate(180deg);
}
.gc-fold-mini-body {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--grey);
  line-height: 1.55;
  display: grid;
  gap: 6px;
}
.gc-fold-mini-body p { margin: 0; font-size: 12.5px; }

/* AI 등급컷 4-Part Quick Anchor Strip (Preserving natural single-column tool!) */
.ai-part-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.ai-part-jumps button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--grey);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.ai-part-jumps button:hover {
  border-color: var(--blue-border);
  color: var(--blue);
  background: var(--ai-bg);
}

/* ==========================================================================
   8. Toast Banner ("준비 중입니다.")
   ========================================================================== */
.gc-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + 20px);
  transform: translate(-50%, 12px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(25, 31, 40, 0.94);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms var(--ease-out);
  white-space: nowrap;
}
@media (min-width: 961px) {
  .gc-toast { bottom: 32px; }
}
.gc-toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   9. PC Home Probability Grade Tabs (1·2·3등급) + Subject Row + Alert Badge
   ========================================================================== */
.hp-grade-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: var(--bg-page);
}
.hp-grade-tabs button {
  border: none;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.hp-grade-tabs button.is-active {
  background: var(--paper);
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.hp-subj-head {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.hp-subj-head:hover { color: var(--blue); }
.hp-subj-links { gap: 6px; font-size: 12px; }

.hp-alert-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hp-alert-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-page);
  color: var(--faint);
}
.hp-alert-badge.is-on {
  background: var(--ai-bg);
  color: var(--blue);
}

/* ==========================================================================
   10. Live 1·2·3등급 Probability Distribution Cards (AI 등급컷 → 등급별 확률)
   ========================================================================== */
.admission-panel,
#ai-calc,
#ai-abs,
#install-faq-title {
  scroll-margin-top: 76px;
}
.ai-prob-cards {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.ai-prob-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 16px 18px;
}
.ai-prob-subj {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.ai-prob-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 780px) {
  .ai-prob-cols {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.ai-prob-col {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ai-prob-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.ai-prob-col-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--grey);
}
.ai-prob-est {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.ai-prob-est strong {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
}
.ai-prob-est small {
  font-size: 11px;
  color: var(--faint);
}
.ai-prob-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-prob-bar-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--grey);
}
.ai-prob-bar-row.is-est {
  color: var(--ink);
  font-weight: 700;
}
.ai-prob-score { text-align: right; white-space: nowrap; }
.ai-prob-pct { text-align: right; white-space: nowrap; font-size: 11.5px; }
.ai-prob-track {
  height: 9px;
  border-radius: 999px;
  background: var(--bg-page);
  overflow: hidden;
  display: block;
}
.ai-prob-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #cbd5e1;
}
[data-theme="dark"] .ai-prob-fill { background: #334155; }
.ai-prob-col.is-g1 .ai-prob-bar-row.is-est .ai-prob-fill { background: #2563eb; }
.ai-prob-col.is-g1 .ai-prob-bar-row.is-est .ai-prob-pct { color: var(--blue); }
.ai-prob-col.is-g2 .ai-prob-bar-row.is-est .ai-prob-fill { background: #0e7490; }
.ai-prob-col.is-g2 .ai-prob-bar-row.is-est .ai-prob-pct { color: #0e7490; }
[data-theme="dark"] .ai-prob-col.is-g2 .ai-prob-bar-row.is-est .ai-prob-pct { color: #67e8f9; }
.ai-prob-col.is-g3 .ai-prob-bar-row.is-est .ai-prob-fill { background: #047857; }
.ai-prob-col.is-g3 .ai-prob-bar-row.is-est .ai-prob-pct { color: #047857; }
[data-theme="dark"] .ai-prob-col.is-g3 .ai-prob-bar-row.is-est .ai-prob-pct { color: #34d399; }

/* ==========================================================================
   11. Real-Time Cut Change Alert Banner & Modal
   ========================================================================== */
.gc-alert-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}
[data-theme="dark"] .gc-alert-banner {
  background: #1e293b;
  border: 1px solid var(--line-strong);
}
.gc-alert-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.gc-alert-banner-actions button {
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
#gc-alert-banner-go {
  background: var(--blue-solid);
  color: #ffffff;
}
#gc-alert-banner-close {
  background: transparent;
  color: #cbd5e1;
  padding: 6px 8px;
}

.gc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gc-modal {
  width: min(460px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  padding: 22px 22px 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gc-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.gc-modal-head h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 3px;
}
.gc-modal-sub {
  font-size: 12.5px;
  color: var(--faint);
}
.gc-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: var(--bg-page);
  color: var(--grey);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.gc-modal-close:hover { background: var(--hover); color: var(--ink); }

.gc-alert-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-page);
}
.gc-alert-toggle-row strong { font-size: 14px; font-weight: 700; display: block; margin-bottom: 2px; }
.gc-modal-hint { font-size: 11.5px; color: var(--faint); margin: 0; }

/* Toggle Switch */
.gc-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.gc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.gc-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background-color 180ms ease;
}
[data-theme="dark"] .gc-switch-track { background: #334155; }
.gc-switch-track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease;
}
.gc-switch input:checked + .gc-switch-track { background: var(--blue-solid); }
.gc-switch input:checked + .gc-switch-track::after { transform: translateX(20px); }

.gc-modal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gc-modal-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--grey);
}
.gc-modal-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gc-alert-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.gc-chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--grey);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.gc-chip.is-on {
  background: var(--ai-bg);
  border-color: var(--blue);
  color: var(--blue);
}

.gc-alert-conds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.gc-radio-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.gc-radio-pill input { accent-color: var(--blue-solid); }

.gc-alert-snapshot {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ai-bg);
  color: var(--hp-soft-btn-ink);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.gc-alert-log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gc-alert-log li {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-page);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
}
.gc-alert-log li.is-empty {
  color: var(--faint);
  text-align: center;
}

.gc-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding-top: 4px;
}
.gc-btn-soft,
.gc-btn-primary {
  height: 42px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.gc-btn-soft {
  background: var(--hp-soft-btn);
  color: var(--hp-soft-btn-ink);
}
.gc-btn-soft:hover { background: var(--hp-soft-btn-hover); }
.gc-btn-primary {
  background: var(--blue-solid);
  color: #ffffff;
}
.gc-btn-primary:hover { background: var(--blue-solid-hover); }


/* ==========================================================================
   12. Unified Npay Blue Design System (All Sub-Views + Tab Glider & Motion)
   ========================================================================== */

body {
  background: var(--bg-page);
}

/* View Visibility Guards */
.show-degrees #home,
.show-degrees #ai-cuts,
.show-degrees #admissions,
.show-degrees #guide,
.show-degrees #install { display: none !important; }

.show-ai #home,
.show-ai #degrees-layout,
.show-ai #admissions,
.show-ai #guide,
.show-ai #install { display: none !important; }

.show-admissions #home,
.show-admissions #degrees-layout,
.show-admissions #ai-cuts,
.show-admissions #guide,
.show-admissions #install { display: none !important; }

.show-install #home,
.show-install #degrees-layout,
.show-install #ai-cuts,
.show-install #guide,
.show-install #admissions { display: none !important; }

/* Sliding Active Pill Glider in Top GNB */
.site-views {
  position: relative;
  isolation: isolate;
}
.nav-glider {
  position: absolute;
  left: 0;
  top: 50%;
  height: 36px;
  width: 0;
  border-radius: 10px;
  background: var(--ai-bg);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform, width;
  transition:
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
}
.site-views a {
  position: relative;
  z-index: 1;
}
.site-views a[aria-current="page"] {
  color: var(--blue);
}

/* Natural Tab Switching & Content Swap Animations */
@keyframes gc-tab-enter-right {
  from {
    opacity: 0;
    transform: translate3d(18px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gc-tab-enter-left {
  from {
    opacity: 0;
    transform: translate3d(-18px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gc-tab-enter-fade {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gc-content-swap {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes gc-bnav-pop {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.anim-tab-right {
  animation: gc-tab-enter-right 290ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.anim-tab-left {
  animation: gc-tab-enter-left 290ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.anim-view-in {
  animation: gc-tab-enter-fade 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.anim-content-swap {
  animation: gc-content-swap 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
#mobile-bottom-nav a.anim-bnav-pop svg {
  animation: gc-bnav-pop 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Unified Sub-View Container & Npay Card Surface */
.admissions {
  max-width: 1176px;
  margin: 0 auto;
  padding: 20px 24px 64px;
}
.admissions.install {
  max-width: 780px;
}

.np-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
  padding: 2px 4px;
}
.np-page-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}
.np-page-title-wrap h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.np-page-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.np-head-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--hp-hairline);
  box-shadow: var(--hp-card-shadow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.np-head-pill:hover {
  border-color: var(--ai-border);
  color: var(--blue);
  background: var(--ai-bg);
}

.ai-part-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.ai-part-jumps button {
  height: 33px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--hp-hairline);
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  color: var(--grey);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms ease;
}
.ai-part-jumps button:hover {
  border-color: var(--ai-border);
  color: var(--blue);
  background: var(--ai-bg);
}
.ai-part-jumps button:active {
  transform: scale(0.97);
}

.admission-panel,
.ai-cuts .ai-panel {
  border-radius: 20px;
  border: 1px solid var(--hp-hairline);
  background: var(--paper);
  box-shadow: var(--hp-card-shadow);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.admission-provider-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey);
}
.admission-provider-pick select {
  min-width: 124px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-page);
  font-weight: 700;
  color: var(--ink);
}

/* ==========================================================================
   13. Degrees View (?view=degrees) — Npay 2-Column Clean Card Redesign
   ========================================================================== */

#degrees-layout.layout {
  max-width: 1176px;
  margin: 0 auto;
  padding: 20px 24px 64px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-height: 0;
}

#degrees-layout .tree {
  position: sticky;
  top: 76px;
  height: auto;
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--hp-hairline);
  border-radius: 20px;
  box-shadow: var(--hp-card-shadow);
  padding: 14px 12px 16px;
}

#degrees-layout .tree .search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 0;
  border: none;
}
.tree-search-icon {
  position: absolute;
  left: 11px;
  color: var(--faint);
  pointer-events: none;
}
#degrees-layout .tree .search input {
  width: 100%;
  height: 36px;
  padding: 0 30px 0 33px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--bg-page);
  color: var(--ink);
  font-size: 13px;
  transition: background-color 150ms ease, border-color 150ms ease;
}
#degrees-layout .tree .search input:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--blue);
}
#degrees-layout .tree .search kbd {
  position: absolute;
  right: 9px;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--faint);
}

#degrees-layout .tree h2 {
  margin: 12px 0 4px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--faint);
}
#degrees-layout .tree h2:first-child { margin-top: 2px; }
#degrees-layout .tree h2 > button {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  margin: 0 -8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
#degrees-layout .tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#degrees-layout .tree li button {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--grey);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
#degrees-layout .tree li button:hover,
#degrees-layout .tree h2 > button:hover {
  background: var(--hover);
  color: var(--ink);
}
#degrees-layout .tree button[aria-current="true"] {
  background: var(--ai-bg) !important;
  color: var(--blue) !important;
  font-weight: 700 !important;
}

#degrees-layout #main {
  padding: 0;
  max-width: none;
  min-width: 0;
}

/* Mobile Area & Subject Pills (Hidden on PC) */
.deg-mobile-nav {
  display: none;
}

.deg-card {
  background: var(--paper);
  border: 1px solid var(--hp-hairline);
  border-radius: 20px;
  box-shadow: var(--hp-card-shadow);
  padding: 24px 26px 18px;
}

.deg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}
.deg-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.deg-area-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--ai-bg);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.deg-card #title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.deg-unit-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
}

.deg-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.seg-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-page);
}
.seg-tabs[hidden] { display: none !important; }
.seg-tabs button {
  height: 31px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--grey);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.seg-tabs button:hover {
  color: var(--ink);
}
.seg-tabs button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* Quick Score Calculator Bar */
.deg-calc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--bg-page);
  border: none;
}
.deg-calc-input-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.deg-calc-input-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.deg-score-box {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.deg-score-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.deg-score-box input {
  width: 52px;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
  outline: none !important;
  box-shadow: none !important;
}
.deg-calc-max {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.deg-calc-output {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
  min-width: 0;
}
.deg-grade-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-solid);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.deg-calc-detail {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}
.deg-cta-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--hp-soft-btn);
  color: var(--hp-soft-btn-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, transform 120ms ease;
}
.deg-cta-btn:hover {
  background: var(--hp-soft-btn-hover);
  color: var(--hp-soft-btn-ink);
}
.deg-cta-btn:active { transform: scale(0.98); }

/* Clean 5-Provider Grade-Cut Table */
.deg-grid-wrap {
  border: 1px solid var(--hp-hairline);
  border-radius: 16px;
  overflow-x: auto;
  background: var(--paper);
}
.deg-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
}
.deg-table th,
.deg-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--hp-hairline);
  text-align: center;
  font-family: inherit;
  font-size: 14.5px;
  min-width: 0;
}
.deg-table tbody tr:last-child th,
.deg-table tbody tr:last-child td {
  border-bottom: none;
}
.deg-table thead th {
  background: #f8fafc;
  color: var(--grey);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 10px;
  border-bottom: 1px solid var(--hp-hairline);
  text-align: center !important;
}
.deg-table thead th.grade {
  text-align: left !important;
}
.ai-cut-table thead th:not(:first-child) {
  text-align: center !important;
}
[data-theme="dark"] .deg-table thead th {
  background: rgba(255, 255, 255, 0.03);
}
.deg-table th.grade {
  width: 78px;
  text-align: left;
  padding-left: 18px;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
}
.deg-table thead th.grade {
  background: #f8fafc;
  color: var(--faint);
}
[data-theme="dark"] .deg-table thead th.grade {
  background: rgba(255, 255, 255, 0.03);
}
.deg-table tbody td {
  color: var(--ink);
  font-weight: 500;
}
.deg-table tbody tr:first-child td {
  font-weight: 700;
}

/* AI Column Accent (Unified Npay Blue) */
.deg-table th.col-ai,
.deg-table td.col-ai {
  background: rgba(37, 99, 235, 0.045);
}
[data-theme="dark"] .deg-table th.col-ai,
[data-theme="dark"] .deg-table td.col-ai {
  background: rgba(59, 130, 246, 0.12);
}
.deg-table td.col-ai {
  color: var(--blue);
  font-weight: 700;
}
.deg-table tbody tr:first-child td.col-ai {
  font-weight: 800;
}
.th-ai-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-solid);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.deg-table td.col-official {
  color: #047857;
  font-weight: 700;
}
[data-theme="dark"] .deg-table td.col-official {
  color: #34d399;
}

/* User's Matching Grade Row */
.deg-table tbody tr.mine th,
.deg-table tbody tr.mine td {
  background: var(--ai-bg) !important;
}
.deg-table tbody tr.mine th.grade {
  color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue-solid);
}

/* Compact Card Footer Bar */
.deg-foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--faint);
}
.deg-foot-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.deg-mine-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ai-bg);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 700;
}
.deg-sources-fold {
  position: relative;
}
.deg-sources-fold summary {
  cursor: pointer;
  color: var(--grey);
  font-weight: 600;
  list-style: none;
}
.deg-sources-fold summary::-webkit-details-marker { display: none; }
.deg-sources-fold summary:hover { color: var(--blue); }
.deg-sources-list {
  margin: 8px 0 0;
  padding: 10px 14px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  border-radius: 12px;
  background: var(--bg-page);
}
.deg-sources-list a {
  color: var(--grey);
  text-decoration: none;
  font-size: 12px;
}
.deg-sources-list a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.deg-foot-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.deg-foot-actions button {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--hp-hairline);
  background: var(--paper);
  color: var(--grey);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.deg-foot-actions button:hover {
  background: var(--bg-page);
  color: var(--ink);
}

.foot {
  margin-top: 20px;
  padding: 8px 4px;
  border: none;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
}

/* Responsive Mobile Layout */
@media (max-width: 900px) {
  #degrees-layout.layout {
    display: block;
    padding: 12px 14px calc(var(--bottom-nav-h) + 28px);
  }
  #degrees-layout .tree {
    display: none !important;
  }
  .admissions {
    padding: 14px 14px calc(var(--bottom-nav-h) + 28px);
  }
  .admission-panel,
  .ai-cuts .ai-panel,
  .deg-card {
    padding: 18px 16px 16px;
    border-radius: 18px;
  }

  .deg-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }
  .deg-area-pills,
  .deg-subj-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .deg-area-pills::-webkit-scrollbar,
  .deg-subj-chips::-webkit-scrollbar { display: none; }

  .deg-area-pills button {
    flex-shrink: 0;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--hp-hairline);
    background: var(--paper);
    color: var(--grey);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .deg-area-pills button[aria-selected="true"] {
    background: var(--blue-solid);
    border-color: var(--blue-solid);
    color: #ffffff;
    font-weight: 700;
  }
  .deg-subj-chips button {
    flex-shrink: 0;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--hp-hairline);
    background: var(--paper);
    color: var(--grey);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
  }
  .deg-subj-chips button[aria-pressed="true"] {
    background: var(--ai-bg);
    border-color: var(--ai-border);
    color: var(--blue);
    font-weight: 700;
  }

  .deg-card #title { font-size: 19px; }
  .deg-controls { width: 100%; justify-content: space-between; }
  .seg-tabs button { padding: 0 9px; font-size: 12px; height: 29px; }

  .deg-calc-bar { padding: 11px 12px; gap: 8px 10px; }
  .deg-cta-btn { width: 100%; justify-content: center; margin-left: 0; }

  .deg-table th,
  .deg-table td {
    padding: 11px 4px;
    font-size: 13px;
  }
  .deg-table thead th {
    font-size: 11.5px;
    padding: 10px 3px;
  }
  .deg-table th.grade {
    width: 54px;
    padding-left: 10px;
    font-size: 12.5px;
  }
  .th-ai-pill {
    height: 20px;
    padding: 0 7px;
    font-size: 11px;
  }
}

/* ==========================================================================
   14. Clean Ledger Sheet Score Input (AI 등급컷 & AI 라인 추정 → 내 수능 성적, 시안 A)
   ========================================================================== */
:is(#ai-calc, #adm-calc).ai-ledger-card {
  padding: 0;
  overflow: hidden;
}
:is(#ai-calc, #adm-calc) .ai-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--hp-hairline);
}
:is(#ai-calc, #adm-calc) .ai-ledger-head h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
:is(#ai-calc, #adm-calc) .ai-ledger-head p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--faint);
}
:is(#ai-calc, #adm-calc) button.ai-ledger-reset {
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--faint);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
:is(#ai-calc, #adm-calc) button.ai-ledger-reset:hover {
  background: var(--bg-page);
  color: var(--ink);
}

/* AI 라인 추정 header controls & preset strip */
#adm-calc .adm-head-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#adm-calc label.adm-provider-wrap {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}
#adm-calc select.adm-provider-select {
  min-width: 108px;
  height: 34px;
  font-size: 12.5px;
}
#adm-calc .adm-preset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--hp-hairline);
}
#adm-calc .adm-mode-wrap,
#adm-calc .adm-preset-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#adm-calc .adm-mode-seg {
  background: var(--paper);
  border: 1px solid var(--line);
}
#adm-calc .adm-mode-seg button.is-on {
  background: var(--blue-bg);
  color: var(--blue);
  box-shadow: none;
}
#adm-calc.is-scorecard-mode .adm-ledger-block .ai-ledger-right label.ai-ledger-num {
  opacity: 0.72;
}
#adm-calc.is-scorecard-mode .adm-scorecard-drawer label.ai-ledger-num {
  background: var(--paper);
  border-color: var(--blue-border);
}
#adm-calc .adm-score-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  background: var(--paper);
}
#adm-calc .adm-score-summary-bar[hidden],
#adm-calc .adm-calc-body[hidden],
#adm-calc .adm-dirty-banner[hidden],
#adm-calc .adm-collapse-btn[hidden] {
  display: none !important;
}
#adm-calc .adm-score-summary-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
#adm-calc .adm-summary-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--bg-page);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#adm-calc .adm-summary-chip.is-prov {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}
#adm-calc .adm-summary-chip.is-abs {
  background: var(--panel);
  color: var(--grey);
  border: 1px solid var(--line);
}
#adm-calc button.adm-edit-toggle {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--blue-border);
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
#adm-calc button.adm-edit-toggle:hover {
  background: var(--blue-solid);
  border-color: var(--blue-solid);
  color: #ffffff;
}
#adm-calc .adm-dirty-banner {
  margin: 10px 24px 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--blue-bg);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 600;
}
#adm-calc button.ai-ledger-submit.is-dirty {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.24);
}
@media (max-width: 680px) {
  #adm-calc .adm-score-summary-bar {
    padding: 10px 14px;
    align-items: flex-start;
  }
  #adm-calc .adm-summary-chip {
    font-size: 11.5px;
    padding: 2px 7px;
  }
  #adm-calc .adm-dirty-banner {
    margin: 8px 16px 0;
  }
}
#adm-calc .adm-preset-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}
#adm-calc .admission-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#adm-calc button.admission-preset-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--grey);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}
#adm-calc button.admission-preset-btn:hover {
  border-color: var(--blue);
  background: var(--ai-bg);
  color: var(--blue);
}

:is(#ai-calc, #adm-calc) .ai-ledger {
  display: flex;
  flex-direction: column;
}
#adm-calc .adm-ledger-block {
  border-bottom: 1px solid var(--hp-hairline);
  background: var(--paper);
}
#adm-calc .adm-ledger-block > .ai-ledger-row {
  border-bottom: none;
}
:is(#ai-calc, #adm-calc) .ai-ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--hp-hairline);
  background: var(--paper);
}
:is(#ai-calc, #adm-calc) .ai-ledger-row[hidden] {
  display: none !important;
}
:is(#ai-calc, #adm-calc) .ai-ledger-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 190px;
}
:is(#ai-calc, #adm-calc) .ai-ledger-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  min-width: 44px;
  white-space: nowrap;
}
:is(#ai-calc, #adm-calc) .ai-ledger-abs-left .ai-ledger-name {
  min-width: auto;
}
:is(#ai-calc, #adm-calc) .ai-ledger-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
}

:is(#ai-calc, #adm-calc) .ai-ledger-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg-page);
}
:is(#ai-calc, #adm-calc) .ai-ledger-seg button {
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--grey);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  min-height: 0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
:is(#ai-calc, #adm-calc) .ai-ledger-seg button:hover {
  background: transparent;
  color: var(--ink);
}
:is(#ai-calc, #adm-calc) .ai-ledger-seg button.is-on {
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.09);
}

:is(#ai-calc, #adm-calc) select.ai-ledger-select {
  width: auto;
  min-width: 148px;
  min-height: 0;
  height: 36px;
  padding: 0 30px 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--bg-page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}
#adm-calc select.adm-grade-select {
  min-width: 96px;
  height: 38px;
  background-color: var(--paper);
  border-color: var(--line);
}
:is(#ai-calc, #adm-calc) select.ai-ledger-select:hover,
:is(#ai-calc, #adm-calc) select.ai-ledger-select:focus {
  border-color: var(--blue);
  background-color: var(--paper);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

:is(#ai-calc, #adm-calc) .ai-ledger-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--bg-page);
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1;
  color: var(--faint);
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num:focus-within {
  background: var(--paper);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num.is-disabled {
  opacity: 0.55;
}
:is(#ai-calc, #adm-calc) .ai-ledger-cap,
:is(#ai-calc, #adm-calc) .ai-ledger-suf {
  display: inline-flex;
  align-items: center;
  height: 22px;
  line-height: 22px;
  font-size: 12px;
  user-select: none;
  white-space: nowrap;
}
:is(#ai-calc, #adm-calc) .ai-ledger-cap {
  font-weight: 600;
  color: var(--faint);
}
:is(#ai-calc, #adm-calc) .ai-ledger-suf {
  font-weight: 500;
  color: var(--faint);
  margin-left: -1px;
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num input {
  width: 44px;
  min-width: 44px;
  height: 22px;
  line-height: 22px;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  text-align: right;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none;
}
#ai-calc #ai-calc-english-a,
#adm-calc #adm-korean-raw,
#adm-calc #adm-math-raw,
#adm-calc #adm-english-raw {
  width: 48px;
  min-width: 48px;
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num input:focus {
  border: none;
  box-shadow: none;
  background: transparent;
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num input:disabled {
  background: transparent;
  color: var(--faint);
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num input::placeholder {
  color: #b0b8c1;
  font-weight: 500;
  font-size: 12px;
  line-height: 22px;
}
[data-theme="dark"] :is(#ai-calc, #adm-calc) label.ai-ledger-num input::placeholder {
  color: #475569;
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num input::-webkit-outer-spin-button,
:is(#ai-calc, #adm-calc) label.ai-ledger-num input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num input[type="number"] {
  -moz-appearance: textfield;
}
:is(#ai-calc, #adm-calc) label.ai-ledger-num input[aria-invalid="true"] {
  color: var(--danger);
  background: transparent;
}
:is(#ai-calc, #adm-calc) .ai-ledger-plus {
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
  opacity: 0.6;
}
:is(#ai-calc, #adm-calc) .ai-ledger-out {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 88px;
}
:is(#ai-calc, #adm-calc) .ai-ledger-sum {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  min-width: 24px;
  text-align: right;
}
:is(#ai-calc, #adm-calc) .ai-ledger-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
:is(#ai-calc, #adm-calc) .ai-ledger-pill.is-g1 { background: #eff6ff; color: #2563eb; }
:is(#ai-calc, #adm-calc) .ai-ledger-pill.is-g2 { background: #ecfeff; color: #0e7490; }
:is(#ai-calc, #adm-calc) .ai-ledger-pill.is-g3 { background: #ecfdf5; color: #047857; }
:is(#ai-calc, #adm-calc) .ai-ledger-pill.is-g-other { background: var(--bg-page); color: var(--grey); }
:is(#ai-calc, #adm-calc) .ai-ledger-pill.is-empty { background: var(--bg-page); color: var(--faint); opacity: 0.7; }
[data-theme="dark"] :is(#ai-calc, #adm-calc) .ai-ledger-pill.is-g1 { background: rgba(37, 99, 235, 0.22); color: #93c5fd; }
[data-theme="dark"] :is(#ai-calc, #adm-calc) .ai-ledger-pill.is-g2 { background: rgba(14, 116, 144, 0.25); color: #67e8f9; }
[data-theme="dark"] :is(#ai-calc, #adm-calc) .ai-ledger-pill.is-g3 { background: rgba(4, 120, 87, 0.25); color: #6ee7b7; }

/* Inline 성적표 입력 drawer on AI 라인 추정 */
#adm-calc button.adm-scorecard-btn {
  height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}
#adm-calc button.adm-scorecard-btn:hover,
#adm-calc button.adm-scorecard-btn.is-open,
#adm-calc button.adm-scorecard-btn.has-val {
  background: var(--ai-bg);
  color: var(--blue);
}
#adm-calc .adm-scorecard-drawer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 13px;
}
#adm-calc .adm-scorecard-drawer[hidden] {
  display: none !important;
}

:is(#ai-calc, #adm-calc) .ai-ledger-abs-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--hp-hairline);
}
:is(#ai-calc, #adm-calc) .ai-ledger-abs-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 24px;
}
:is(#ai-calc, #adm-calc) .ai-ledger-abs-cell + .ai-ledger-abs-cell {
  border-left: 1px solid var(--hp-hairline);
}
:is(#ai-calc, #adm-calc) .ai-ledger-abs-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
:is(#ai-calc, #adm-calc) .ai-ledger-abs-row label.ai-ledger-num {
  background: var(--paper);
  border-color: var(--line);
}
:is(#ai-calc, #adm-calc) .ai-ledger-abs-row label.ai-ledger-num:focus-within {
  border-color: var(--blue);
}

#adm-calc details.adm-cuts-fold {
  margin: 0;
  padding: 11px 24px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--hp-hairline);
  background: var(--paper);
  font-size: 12.5px;
  color: var(--grey);
}
#adm-calc details.adm-cuts-fold summary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
  cursor: pointer;
}
#adm-calc details.adm-cuts-fold summary:hover { color: var(--ink); }

:is(#ai-calc, #adm-calc) .ai-calc-error {
  margin: 0;
  padding: 10px 24px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
}

:is(#ai-calc, #adm-calc) .ai-ledger-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px 16px;
  background: var(--paper);
}
:is(#ai-calc, #adm-calc) button.ai-ledger-lang-btn {
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--grey);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 9px;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}
:is(#ai-calc, #adm-calc) button.ai-ledger-lang-btn:hover {
  color: var(--blue);
  background: var(--bg-page);
}
:is(#ai-calc, #adm-calc) button.ai-ledger-submit {
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
}

@media (max-width: 680px) {
  :is(#ai-calc, #adm-calc) .ai-ledger-head { padding: 16px 16px 13px; }
  #adm-calc .adm-preset-bar { padding: 10px 16px; }
  :is(#ai-calc, #adm-calc) .ai-ledger-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 13px 16px;
  }
  :is(#ai-calc, #adm-calc) .ai-ledger-left {
    justify-content: space-between;
    min-width: 0;
  }
  :is(#ai-calc, #adm-calc) .ai-ledger-right {
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  :is(#ai-calc, #adm-calc) label.ai-ledger-num {
    flex: 1 1 auto;
    justify-content: space-between;
    padding: 0 10px;
  }
  :is(#ai-calc, #adm-calc) label.ai-ledger-num input { width: 44px; min-width: 44px; }
  :is(#ai-calc, #adm-calc) .ai-ledger-out { min-width: 72px; gap: 6px; }
  #adm-calc .adm-scorecard-drawer {
    padding: 0 16px 12px;
    justify-content: flex-start;
  }
  :is(#ai-calc, #adm-calc) .ai-ledger-abs-row {
    grid-template-columns: 1fr;
  }
  :is(#ai-calc, #adm-calc) .ai-ledger-abs-cell {
    padding: 11px 16px;
  }
  :is(#ai-calc, #adm-calc) .ai-ledger-abs-cell + .ai-ledger-abs-cell {
    border-left: none;
    border-top: 1px solid var(--hp-hairline);
  }
  :is(#ai-calc, #adm-calc) .ai-ledger-abs-row label.ai-ledger-num { flex: 0 0 auto; }
  #adm-calc details.adm-cuts-fold { padding: 11px 16px; }
  :is(#ai-calc, #adm-calc) .ai-ledger-foot {
    padding: 12px 16px 14px;
    flex-wrap: wrap;
  }
  :is(#ai-calc, #adm-calc) button.ai-ledger-submit {
    flex: 1 1 auto;
    justify-content: center;
  }
  :is(#ai-calc, #adm-calc) .ai-calc-error { padding: 10px 16px 0; }
}

/* Balance left subject column padding & vertical header alignment on AI 등급컷 tables */
.ai-cut-table thead th {
  vertical-align: middle;
}
.ai-cut-table thead th:first-child,
.ai-cut-table tbody th.ai-cut-name {
  padding-left: 18px;
}
@media (max-width: 680px) {
  .ai-cut-table thead th:first-child,
  .ai-cut-table tbody th.ai-cut-name {
    text-align: center;
    vertical-align: middle;
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* Center-align 도수분포표 headers & numeric cells without altering left column widths; keep bar cells left-aligned */
.ai-freq-table thead tr:first-child th,
.ai-freq-table thead th,
.ai-freq-table tbody th,
.ai-freq-table tbody td {
  text-align: center;
}
.ai-freq-table tbody td.ai-bar-cell {
  text-align: left;
}
.ai-freq-km :is(th, td).ai-ecol {
  font-size: 12.5px;
  padding-left: 2px;
  padding-right: 2px;
}
@media (max-width: 680px) {
  .ai-freq-km :is(th, td).ai-ecol {
    font-size: 11px;
    padding-left: 1px;
    padding-right: 1px;
    letter-spacing: -0.03em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-glider { transition: none !important; }
  .anim-tab-right,
  .anim-tab-left,
  .anim-view-in,
  .anim-content-swap,
  .hp-promo-copy.anim-promo-next,
  .hp-promo-copy.anim-promo-prev,
  .hp-promo svg.anim-promo-icon,
  #hp-pager-num.anim-promo-num,
  #mobile-bottom-nav a.anim-bnav-pop svg {
    animation: none !important;
  }
}

/* C01: 홈 간편 계산 입력 거부 표시 */
.hp-mc-g.is-invalid { background: var(--danger-bg, #fef2f2); color: var(--danger, #b91c1c); }
#hp-mini-calc-foot.is-error { color: var(--danger, #b91c1c); font-weight: 650; }
.hp-mini-calc input[aria-invalid="true"],
[id^="hp-mc-"][aria-invalid="true"] { border-color: var(--danger, #b91c1c) !important; background: var(--danger-bg, #fef2f2) !important; }

/* 배치표 바로가기 (2026-11-28) */
.hm-place-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 18px 18px 20px; border-radius: 20px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: var(--hp-card-shadow); text-decoration: none; color: #ffffff;
}
.hm-place-copy { display: flex; flex-direction: column; gap: 3px; letter-spacing: -0.02em; }
.hm-place-copy strong { font-size: 16px; font-weight: 800; }
.hm-place-copy span { font-size: 12.5px; font-weight: 600; color: #dbeafe; }
.hm-place-go { font-size: 26px; font-weight: 300; line-height: 1; color: #ffffff; }
.hp-place-strip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-radius: 16px; margin-bottom: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: var(--hp-card-shadow); text-decoration: none; color: #ffffff;
  transition: transform 140ms ease;
}
.hp-place-strip:hover { transform: translateY(-1px); }
.hp-place-strip-l { display: flex; align-items: baseline; gap: 12px; }
.hp-place-strip-l strong { font-size: 16px; font-weight: 800; }
.hp-place-strip-l span { font-size: 12.5px; font-weight: 600; color: #dbeafe; }
.hp-place-strip-r { font-size: 13.5px; font-weight: 700; }

/* 하단 메뉴 7칸(배치표 추가, 2026-11-28): 항목 수만큼 같은 폭으로 나눈다 */
@media (max-width: 960px) {
  #mobile-bottom-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-left: 2px; padding-right: 2px; }
  #mobile-bottom-nav a { font-size: 10px; letter-spacing: -0.03em; white-space: nowrap; }
}

/* ==========================================================================
   연구소 탭 (2026-12-01)
   ========================================================================== */
.show-research body { background: var(--bg-page); }
@media (max-width: 960px) {
  /* The article fills a phone viewport. A lateral entry would briefly widen the document. */
  #research.anim-tab-right, #research.anim-tab-left { animation-name: gc-tab-enter-fade; }
}
.show-research .layout,
.show-research .crumbs,
.show-research .top .meta { display: none !important; }
.show-degrees #research,
.show-ai #research,
.show-admissions #research,
.show-placement #research,
.show-guide #research,
.show-install #research,
.show-home #research { display: none !important; }

.admissions.research { max-width: 780px; }

.research-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 16px;
}
.research-filter button {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--grey);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.research-filter button:hover { background: var(--hover); color: var(--ink); }
.research-filter button[aria-pressed="true"] {
  background: var(--blue-solid);
  border-color: var(--blue-solid);
  color: #fff;
}

.research-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.research-list[hidden] { display: none; }
.research-item {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.research-item:hover { background: var(--hover); }
.research-tag { font-size: 12px; font-weight: 700; color: var(--blue); }
.research-item strong { font-size: 16px; font-weight: 750; letter-spacing: -0.02em; }
.research-item p { margin: 0; font-size: 14px; color: var(--grey); line-height: 1.55; }
.research-item time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

.research-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 48px 16px 44px;
  border-radius: 14px;
  background: var(--bg-page);
  text-align: center;
}
.research-empty[hidden] { display: none; }
.research-empty svg { width: 48px; height: 48px; margin-bottom: 6px; }
.research-empty strong { font-size: 17px; font-weight: 750; color: var(--ink); }
.research-empty span { font-size: 14px; color: var(--grey); }
@media (max-width: 480px) {
  .research-filter { gap: 5px; }
  .research-filter button { padding: 0 11px; font-size: 13px; }
}

/* 연구소 글: AI 등급컷 vs 기관 비교 (2026-12-01) */
:root {
  --rs-same: #cfd6e0;
  --rs-same-ink: #3b4657;
  --rs-high: #e11d48;
  --rs-low: #0891b2;
  --rs-high-bg: #ffe4ea;
  --rs-low-bg: #dff4f9;
  --rs-violet: #6d28d9;
  --rs-violet-bg: #efe9fd;
  --rs-summary-bg: #f6f3fe;
  --rs-summary-line: #e2d9fb;
}
[data-theme="dark"] {
  --rs-same: #3a4659;
  --rs-same-ink: #dbe3ee;
  --rs-high: #f43f5e;
  --rs-low: #0ea5c6;
  --rs-high-bg: rgba(244, 63, 94, 0.18);
  --rs-low-bg: rgba(14, 165, 198, 0.18);
  --rs-violet: #c4b5fd;
  --rs-violet-bg: rgba(139, 92, 246, 0.2);
  --rs-summary-bg: rgba(139, 92, 246, 0.1);
  --rs-summary-line: rgba(139, 92, 246, 0.3);
}
.research-article[hidden] { display: none; }
.research-article { display: grid; gap: 14px; }
.rs-loading { margin: 24px 0; color: var(--grey); text-align: center; }
.rs-back { justify-self: start; font-size: 13.5px; font-weight: 600; color: var(--grey); text-decoration: none; }
.rs-back:hover { color: var(--ink); }
.rs-head { display: grid; gap: 8px; }
.rs-kicker-row { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--grey); }
.rs-kicker { padding: 3px 10px; border-radius: 999px; background: var(--rs-violet-bg); color: var(--rs-violet); font-weight: 700; }
.rs-title { margin: 0; font-size: clamp(22px, 4.6vw, 30px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.25; color: var(--ink); }
.rs-sub { margin: 0; font-size: 15px; color: var(--grey); font-variant-numeric: tabular-nums; }
.rs-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--grey); }
.rs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rs-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
i.rs-same, .rs-seg.rs-same { background: var(--rs-same); }
i.rs-high, .rs-seg.rs-high { background: var(--rs-high); }
i.rs-low, .rs-seg.rs-low { background: var(--rs-low); }
.rs-note { margin: 0; font-size: 13px; color: var(--danger); }

.rs-card { display: grid; gap: 9px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.rs-card h3 { margin: 0 0 2px; font-size: 15px; font-weight: 750; color: var(--ink); }
.rs-bar-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 10px; }
.rs-bar-label { font-size: 14px; font-weight: 650; color: var(--ink); white-space: nowrap; }
.rs-bar { display: flex; gap: 2px; height: 26px; }
.rs-seg {
  display: flex; align-items: center; justify-content: center;
  flex-basis: 0; min-width: 20px; border-radius: 4px;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff;
}
.rs-seg.rs-same { color: var(--rs-same-ink); }

.rs-summary { padding: 14px 18px; border: 1px solid var(--rs-summary-line); border-radius: 14px; background: var(--rs-summary-bg); }
.rs-summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rs-summary li { position: relative; padding-left: 12px; font-size: 14px; line-height: 1.6; color: var(--ink); }
.rs-summary li::before { content: '·'; position: absolute; left: 0; color: var(--grey); }
.rs-foot, .rs-source { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--faint); }
.rs-source { padding-top: 10px; border-top: 1px solid var(--line); }

.rs-details { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.rs-details summary { cursor: pointer; padding: 13px 18px; font-size: 14px; font-weight: 700; color: var(--ink); }
.rs-details[open] summary { border-bottom: 1px solid var(--line); }
.rs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rs-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.rs-table th, .rs-table td { padding: 6px 8px; text-align: center; white-space: nowrap; }
.rs-table thead th { position: sticky; top: 0; background: var(--paper); font-weight: 700; color: var(--grey); border-bottom: 1px solid var(--line); }
.rs-table tbody th[scope="row"] { text-align: left; font-weight: 650; color: var(--ink); }
.rs-table tr.rs-first td, .rs-table tr.rs-first th { border-top: 1px solid var(--line); }
.rs-table .rs-group th { text-align: left; padding: 10px 8px 6px; font-size: 12.5px; color: var(--grey); background: var(--bg-page); }
.rs-table .rs-cut { color: var(--faint); }
.rs-table .rs-col-ai { font-weight: 750; color: var(--blue); }
#rs-v-simulation-body { display: grid; gap: 14px; padding: 12px; }
.rs-verdict-table tbody tr + tr { border-top: 1px solid var(--line); }
.rs-verdict-table td[data-val="prediction"] { color: var(--rs-violet); font-weight: 700; }
.rs-verdict-table th, .rs-verdict-table td { white-space: normal; word-break: keep-all; }
.rs-cell.rs-high { background: var(--rs-high-bg); color: var(--rs-high); font-weight: 700; }
.rs-cell.rs-low { background: var(--rs-low-bg); color: var(--rs-low); font-weight: 700; }

@media (max-width: 480px) {
  .rs-card, .rs-summary { padding: 14px; }
  .rs-bar-row { grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
  .rs-bar-label { font-size: 13px; }
  .rs-seg { min-width: 18px; font-size: 11.5px; }
}

/* 연구소: 핵심 수치 카드 */
.rs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rs-stat { display: grid; align-content: start; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); min-width: 0; }
.rs-stat strong { font-size: clamp(18px, 2.2vw, 24px); line-height: 1.2; font-weight: 850; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.rs-stat span { font-size: 12.5px; line-height: 1.4; color: var(--grey); word-break: keep-all; overflow-wrap: break-word; }
.rs-stat .rs-stat-violet { color: var(--rs-violet); }
.rs-stat .rs-stat-high { color: var(--rs-high); }
@media (max-width: 640px) {
  .rs-stats { grid-template-columns: 1fr; gap: 8px; }
  .rs-stat { grid-template-columns: 1fr; align-items: start; gap: 3px; padding: 12px 14px; }
  .rs-stat strong { font-size: 21px; line-height: 1.25; }
}

/* 하단 메뉴 터치 영역·아이폰 홈 표시줄 여백 (2026-12-01)
   viewport-fit=cover로 env(safe-area-inset-*)가 실제 값을 돌려준다. 홈 표시줄이 없는 기기도 아래 6px은 남긴다. */
@media (max-width: 960px) {
  :root {
    --bottom-nav-h: 64px;
    --bnav-safe: max(env(safe-area-inset-bottom, 0px), 6px);
  }
  body {
    padding-bottom: calc(var(--bottom-nav-h) + var(--bnav-safe) + 8px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  #mobile-bottom-nav {
    height: calc(var(--bottom-nav-h) + var(--bnav-safe));
    padding: 4px max(2px, env(safe-area-inset-right, 0px)) var(--bnav-safe) max(2px, env(safe-area-inset-left, 0px));
    align-items: stretch;
  }
  #mobile-bottom-nav a {
    min-height: 56px;
    gap: 4px;
    border-radius: 12px;
    font-size: clamp(10px, 2.9vw, 11px);
    letter-spacing: -0.03em;
  }
  #mobile-bottom-nav a svg {
    width: 22px;
    height: 22px;
  }
  #mobile-bottom-nav a:active {
    background: var(--hover);
  }
}

/* 연구소 조회수 (2026-12-01) */
.rs-views { margin: 0; font-size: 13px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.research-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.research-meta .research-views::before { content: '· '; }

/* 연구소: 입시 5사 적중 점검 (2026-12-01) */
.rs-acc-table b { font-weight: 750; color: var(--ink); }
.rs-acc-table .rs-n { display: block; font-size: 10.5px; color: var(--faint); font-weight: 500; }
.rs-acc-table .rs-dir { font-size: 11.5px; color: var(--faint); }
.rs-acc-table .rs-total th, .rs-acc-table .rs-total td { border-top: 1px solid var(--line); }
.rs-acc-years { padding: 12px 14px 0; margin: 0 0 8px; }
.rs-details .rs-foot { padding: 8px 14px 12px; }
.rs-cell.rs-same { color: var(--ink); }
.research-article > *, .rs-card > *, .rs-details > * { min-width: 0; }
.rs-table-wrap { max-width: 100%; }
@media (max-width: 480px) {
  .rs-acc-table th, .rs-acc-table td { padding: 6px 5px; font-size: 12.5px; }
}

/* 연구소 글 카드 이미지 (2026-12-01) */
.rs-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs-cards a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.rs-cards img { display: block; width: 100%; height: auto; }
.rs-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 480px) { .rs-cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 연구소 카드 크게 보기 (2026-12-01) */
.rs-lb-open, .rs-lb-open body { overflow: hidden; }
.rs-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgba(12, 17, 27, 0.92); }
.rs-lb-bar { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px; color: #fff; }
.rs-lb-close { font: inherit; font-size: 15px; font-weight: 700; height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: #fff; color: #191f28; cursor: pointer; }
.rs-lb-count { flex: 1; text-align: center; font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.8); font-variant-numeric: tabular-nums; }
.rs-lb-orig { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.8); text-decoration: none; padding: 8px 4px; }
.rs-lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px calc(16px + env(safe-area-inset-bottom, 0px)); }
.rs-lb-stage img { max-width: min(100%, 720px); max-height: 100%; width: auto; height: auto; min-width: 0; object-fit: contain; border-radius: 12px; background: #fff; }
.rs-lb-nav { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255,255,255,0.16); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.rs-lb-nav:disabled { opacity: 0.25; cursor: default; }
@media (max-width: 480px) { .rs-lb-nav { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); } .rs-lb-nav[data-lb="prev"] { left: 16px; } .rs-lb-nav[data-lb="next"] { right: 16px; } .rs-lb-stage { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } .rs-lb-stage img { max-width: 100%; } }

/* 연구소 확장 글 공통 컴포넌트 (2026-12-01) */
.rs-prose { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink); }
.rs-prose strong { font-weight: 750; }
.rs-meter-list { display: grid; gap: 8px; }
.rs-meter-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 62px; align-items: center; gap: 10px; }
.rs-meter-label { font-size: 13.5px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-meter-track { height: 22px; border-radius: 6px; background: var(--bg-page); overflow: hidden; display: flex; align-items: center; }
.rs-meter-fill { height: 100%; border-radius: 6px; min-width: 4px; background: var(--rs-violet); transition: width 0.25s ease; }
.rs-meter-fill.rs-fill-high { background: var(--rs-high); }
.rs-meter-fill.rs-fill-low { background: var(--rs-low); }
.rs-meter-fill.rs-fill-same { background: var(--rs-same); }
.rs-meter-val { text-align: right; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.rs-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; background: var(--bg-page); color: var(--grey); }
.rs-badge-violet { background: var(--rs-violet-bg); color: var(--rs-violet); }
.rs-badge-high { background: var(--rs-high-bg); color: var(--rs-high); }
.rs-badge-low { background: var(--rs-low-bg); color: var(--rs-low); }
.rs-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 14px 18px; border: 1px solid var(--rs-summary-line); border-radius: 14px; background: var(--rs-summary-bg); }
.rs-cta p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); font-weight: 600; }
.rs-cta-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--rs-violet); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.rs-cta-btn:hover { opacity: 0.92; }

/* 첫 화면 연구소 퀵칩 · D-Day · 보라 배너 · 결과 공유 버튼 (2026-12-02) */
.hp-side-head-r { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.gc-schedule-note { margin: 0; color: var(--grey); font-size: 12.5px; line-height: 1.5; word-break: keep-all; }
.gc-dday {
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; padding: 0 9px; border-radius: 999px;
  background: var(--rs-violet-bg); color: var(--rs-violet);
  font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.hp-promo.is-research {
  background: linear-gradient(135deg, #f5f0ff 0%, #ebe2ff 100%) !important;
  border: 1px solid #d5c5fc;
}
[data-theme="dark"] .hp-promo.is-research {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22) 0%, rgba(109, 40, 217, 0.12) 100%) !important;
  border-color: rgba(167, 139, 250, 0.36);
}
.hp-promo.is-research .hp-promo-copy small { color: var(--rs-violet); font-weight: 750; }
.hm-research-strip {
  display: grid; gap: 9px; padding: 13px 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, #f6f2ff 0%, #ede6ff 100%);
  border: 1px solid #d5c5fc;
}
[data-theme="dark"] .hm-research-strip {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.2) 0%, rgba(109, 40, 217, 0.1) 100%);
  border-color: rgba(167, 139, 250, 0.35);
}
.hm-research-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-decoration: none; color: var(--ink);
}
.hm-research-title { display: inline-flex; align-items: center; gap: 6px; }
.hm-research-title strong { font-size: 14px; font-weight: 800; color: var(--rs-violet); letter-spacing: -0.02em; }
.hm-research-chips {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 1px;
}
.hm-research-chips::-webkit-scrollbar { display: none; }
.hm-rchip {
  flex: none; display: inline-flex; align-items: center; height: 30px; padding: 0 11px;
  border-radius: 999px; background: var(--paper); border: 1px solid #d5c5fc;
  color: var(--ink); font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.hm-rchip:active { transform: scale(0.96); }
[data-theme="dark"] .hm-rchip { border-color: rgba(167, 139, 250, 0.36); }
#mobile-bottom-nav a.bnav-research { color: var(--rs-violet); }
.research-tags-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.research-badge-sim {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px;
  background: var(--rs-violet-bg); color: var(--rs-violet); font-size: 11px; font-weight: 750;
}
.rs-share-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.rs-share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1; white-space: nowrap;
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--rs-summary-line); background: var(--paper); color: var(--rs-violet); cursor: pointer;
}
.rs-share-btn:hover { background: var(--rs-violet); color: #fff; border-color: var(--rs-violet); }
.rs-share-btn.is-done { background: var(--rs-violet); color: #fff; border-color: var(--rs-violet); }
.rs-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.rs-subtabs button {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 12.5px; font-weight: 650; line-height: 1;
  height: 32px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--paper); color: var(--grey); cursor: pointer;
}
.rs-subtabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rs-split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs-mini-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-page); display: grid; gap: 5px; }
.rs-mini-box strong { font-size: 13.5px; color: var(--ink); }
.rs-mini-box p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--grey); word-break: keep-all; }
.rs-card-hero { display: grid; grid-template-columns: minmax(0, 360px); justify-content: center; gap: 6px; }
.rs-card-hero a { box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06); transition: transform 0.16s ease; }
.rs-card-hero a:hover { transform: translateY(-2px); }
.rs-card-hero .rs-foot { text-align: center; }
.rs-calc { display: grid; gap: 12px; padding: 16px 18px; border: 1.5px solid var(--rs-summary-line); border-radius: 14px; background: var(--rs-summary-bg); }
.rs-calc h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.35; }
.rs-calc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rs-calc-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; }
.rs-input-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#rs-prob-calc [hidden] { display: none; }
#rs-prob-result { display: grid; min-width: 0; gap: 8px; }
.rs-prob-summary { margin: 0; color: var(--ink); font-size: 14px; font-weight: 700; }
#rs-prob-calc .rs-share-btn:disabled { opacity: 0.55; cursor: default; }
.rs-input-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rs-field { display: grid; gap: 4px; min-width: 0; }
.rs-field label { font-size: 12px; font-weight: 700; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-field input[type="number"] {
  box-sizing: border-box; font: inherit; font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums;
  width: 100%; min-width: 80px; height: 38px; padding: 0 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.rs-field select {
  box-sizing: border-box; font: inherit; font-size: 13.5px; font-weight: 650;
  width: 100%; height: 38px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  max-width: 100%;
}
.rs-range-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 54px; align-items: center; gap: 10px; }
.rs-range-row label { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.rs-range-row input[type="range"] { width: 100%; accent-color: var(--rs-violet); cursor: pointer; }
.rs-range-val { text-align: right; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rs-violet); }
.rs-prob-bar { display: flex; height: 28px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--bg-page); }
.rs-prob-seg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 750; color: #fff; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; white-space: nowrap; transition: flex-grow 0.2s ease; }
.rs-prob-1 { background: var(--rs-violet); }
.rs-prob-2 { background: var(--rs-low); }
.rs-prob-3 { background: #64748b; }
.rs-prob-4 { background: var(--rs-same); color: var(--rs-same-ink); }
.rs-sim-list { display: grid; gap: 8px; }
.rs-reset-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1; white-space: nowrap;
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--grey); cursor: pointer;
}
.rs-reset-btn:hover { color: var(--ink); border-color: var(--ink); }
.rs-calc-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rs-calc-kpi { padding: 11px 13px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); display: grid; align-content: start; gap: 3px; min-width: 0; }
.rs-calc-kpi strong { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rs-violet); line-height: 1.3; word-break: keep-all; }
.rs-calc-kpi span { font-size: 12px; color: var(--grey); line-height: 1.4; word-break: keep-all; }
.rs-tier-guide { margin: 0; font-size: 12px; line-height: 1.5; color: var(--grey); word-break: keep-all; }
.rs-stance-list { display: grid; gap: 10px; }
.rs-stance-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 62px; align-items: center; gap: 10px; }
.rs-stance-name { font-size: 13.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.rs-stance-val { text-align: right; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-stance-val.is-high { color: var(--rs-high); }
.rs-stance-val.is-low { color: var(--rs-low); }
.rs-diverge-track { position: relative; height: 22px; border-radius: 6px; background: var(--bg-page); overflow: hidden; }
.rs-diverge-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; background: var(--line); z-index: 2; }
.rs-diverge-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; z-index: 1; }
.rs-diverge-bar.is-high { left: 50%; background: var(--rs-high); }
.rs-diverge-bar.is-low { right: 50%; background: var(--rs-low); }
.rs-diverge-axis { display: grid; grid-template-columns: 74px minmax(0, 1fr) 62px; gap: 10px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rs-diverge-ticks { grid-column: 2; display: flex; justify-content: space-between; }
@media (max-width: 520px) {
  .rs-calc { padding: 14px; }
  #rs-prob-calc .rs-table th, #rs-prob-calc .rs-table td { padding: 6px 3px; }
  .rs-meter-row { grid-template-columns: 92px minmax(0, 1fr) 56px; gap: 7px; }
  .rs-meter-label { font-size: 12.5px; }
  .rs-split-grid { grid-template-columns: 1fr; }
  .rs-calc-out { grid-template-columns: 1fr; }
  .rs-stance-row, .rs-diverge-axis { grid-template-columns: 58px minmax(0, 1fr) 56px; gap: 7px; }
  .rs-stance-name { font-size: 12.5px; }
  .rs-cta { flex-direction: column; align-items: stretch; }
  .rs-cta-btn { justify-content: center; }
}

/* ==================== INITIAL LOAD INTRO (시안 B · White Edition) ==================== */
html.intro-lock,
html.intro-lock body {
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}
.gc-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  overscroll-behavior: none;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}
.gc-intro.is-leaving {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}
.gc-intro-stage {
  position: relative;
  width: 360px;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gc-intro-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  border-radius: 999px;
  pointer-events: none;
}
.gc-intro-glow-b {
  width: 280px;
  height: 280px;
  margin: -155px 0 0 -175px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.13) 0%, rgba(37, 99, 235, 0) 70%);
}
.gc-intro-glow-v {
  width: 260px;
  height: 260px;
  margin: -105px 0 0 -85px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, rgba(124, 58, 237, 0) 70%);
}
.gc-intro-ring {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 112px;
  height: 112px;
  margin: -56px 0 0 -56px;
  border-radius: 999px;
  border: 2px solid rgba(59, 130, 246, 0.42);
  opacity: 0;
}
.gc-intro.is-playing .gc-intro-ring {
  animation: gcIntroRipple 0.86s cubic-bezier(0.16, 1, 0.3, 1) 0.62s both;
}
.gc-intro-orb {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  opacity: 0;
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.14));
  will-change: transform, opacity;
}
.gc-intro-orb svg,
.gc-intro-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.gc-intro.is-playing .gc-intro-orb {
  animation: gcIntroOrbit 0.76s cubic-bezier(0.16, 1, 0.3, 1) var(--d) both;
}
.gc-intro-mark {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 82px;
  height: 82px;
  margin: -41px 0 0 -41px;
  opacity: 0;
  filter: drop-shadow(0 14px 28px rgba(37, 99, 235, 0.28));
  will-change: transform, opacity;
}
.gc-intro.is-playing .gc-intro-mark {
  animation: gcIntroPop 0.58s cubic-bezier(0.22, 1.35, 0.36, 1) 0.60s both;
}
.gc-intro-copy {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(42% + 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.gc-intro-word {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.1;
  opacity: 0;
}
.gc-intro.is-playing .gc-intro-word {
  animation: gcIntroFadeUp 0.44s cubic-bezier(0.16, 1, 0.3, 1) 0.82s both;
}
.gc-intro-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  opacity: 0;
}
.gc-intro.is-playing .gc-intro-badge {
  animation: gcIntroFadeUp 0.44s cubic-bezier(0.16, 1, 0.3, 1) 0.94s both;
}

@keyframes gcIntroOrbit {
  0%   { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--r)) scale(0.58); }
  44%  { opacity: 1; transform: translate(var(--xm), var(--ym)) rotate(calc(var(--r) * 0.45)) scale(1); }
  88%  { opacity: 0.9; transform: translate(0, 0) rotate(0deg) scale(0.62); }
  100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.24); }
}
@keyframes gcIntroRipple {
  0%   { opacity: 0; transform: scale(0.52); }
  22%  { opacity: 0.85; }
  100% { opacity: 0; transform: scale(2.45); }
}
@keyframes gcIntroPop {
  0%   { opacity: 0; transform: scale(0.38); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes gcIntroFadeUp {
  0%   { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .gc-intro { display: none !important; }
}

/* 연구소 목록: 검색 · 분류 설명 · 정렬 · 시리즈 묶음 */
.research-search { display: block; margin: 6px 0 10px; }
.research-search input {
  width: 100%; height: 44px; padding: 0 14px; box-sizing: border-box;
  border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font: inherit; font-size: 16px;
}
.research-search input::placeholder { color: var(--faint); }
.research-search input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.research-panel .research-filter { margin: 0 0 10px; }
.research-cat-desc { margin: 0 0 10px; font-size: 13px; color: var(--grey); }
.research-cat-desc:empty { display: none; }
.research-sortbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 12px; }
.research-count { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.research-sort { display: flex; gap: 4px; }
.research-sort button {
  font: inherit; font-size: 12.5px; font-weight: 600; height: 30px; padding: 0 10px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--grey); cursor: pointer;
}
.research-sort button:hover { background: var(--hover); color: var(--ink); }
.research-sort button[aria-pressed="true"] { background: var(--hover); border-color: var(--line); color: var(--ink); }
.research-item.research-series:hover { background: var(--paper); }
.research-badge-series {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px;
  background: var(--hover); color: var(--grey); font-size: 11px; font-weight: 750;
}
.research-series-list { list-style: none; margin: 6px -8px 2px; padding: 0; display: grid; gap: 2px; }
.research-series-list a {
  display: block; padding: 8px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 600; line-height: 1.45;
}
.research-series-list a:hover { background: var(--hover); }
