/* ============================================================
   iAID Design Tokens
   ------------------------------------------------------------
   브랜드 색상은 전부 로고(logo_top.png)에서 추출한 실측값에서
   파생시킨다. 임의의 보라/금색 계열을 도입하지 않는다.

     #00154C  navy      로고 심볼 안쪽 어두운 면
     #00438F  deep blue 로고 지배색 (primary)
     #0068B7  mid blue  로고 중간 면
     #52C3F1  sky       로고 좌측 밝은 면
     #23B8BC  teal      로고 중앙 청록 면
     #595757  gray      "iAID" 워드마크

   구조는 Wanted(Montage) 디자인 시스템 규약을 따른다.
     - dual neutral: 채도 0 gray(utility) + cool tinted neutral(UI 표면)
     - 텍스트 위계는 별도 hex가 아니라 alpha multiplier로 합성
     - 카드는 평면 + 1px 헤어라인, 그림자는 elevated 표면 전용
     - 17px 이상 헤딩은 네거티브 트래킹, body 이하는 positive
   ============================================================ */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  /* ---------- Brand (로고 추출) ---------- */
  --brand-50:  #EBF3FC;
  --brand-100: #D6E6F8;
  --brand-200: #A8C8EC;
  --brand-300: #6FA3DC;
  --brand-400: #3B82CC;
  --brand-500: #0068B7;  /* 로고 mid blue */
  --brand-600: #005AA3;
  --brand-700: #00438F;  /* 로고 deep blue — PRIMARY */
  --brand-800: #003876;
  --brand-900: #002A5C;
  --brand-950: #00154C;  /* 로고 navy */

  /* 로고 밝은 면 — accent 전용, CTA 에는 쓰지 않는다 */
  --sky-400:  #52C3F1;
  --sky-500:  #2FB0E6;
  --teal-500: #23B8BC;
  --teal-600: #1A9CA0;
  --teal-700: #0E6E78;  /* 히어로 그라디언트 종점 — 흰 글씨 5.97:1 */

  /* ---------- Gray (채도 0, utility 전용) ---------- */
  --gray-500: #7A7878;
  --gray-600: #595757;  /* 로고 워드마크 */
  --gray-700: #454343;

  /* ---------- Neutral (cool tinted, UI 표면 워크호스) ---------- */
  --neutral-50:  #F7F8FA;
  --neutral-75:  #F2F4F7;
  --neutral-100: #E9ECF1;
  --neutral-200: #DCE0E8;
  --neutral-300: #C3C9D4;
  --neutral-400: #A4ACBB;
  --neutral-500: #828B9C;
  --neutral-600: #666E7E;
  --neutral-700: #4E5665;   /* border alpha 베이스 */
  --neutral-800: #38404D;
  --neutral-825: #2E3540;   /* secondary text alpha 베이스 */
  --neutral-875: #252B34;   /* body text alpha 베이스 */
  --neutral-950: #171B21;
  --neutral-960: #12161B;   /* 다크 캔버스 */

  /* ---------- Semantic: Background ---------- */
  --bg-canvas:        #FFFFFF;
  --bg-surface:       #FFFFFF;
  --bg-subtle:        var(--neutral-50);
  --bg-muted:         var(--neutral-75);
  --bg-elevated:      #FFFFFF;
  --bg-inverse:       var(--neutral-960);
  --bg-brand:         var(--brand-700);
  --bg-brand-subtle:  var(--brand-50);

  /* ---------- Semantic: Foreground (alpha multiplier) ---------- */
  --fg-strong:    #12161B;
  --fg-default:   rgba(37, 43, 52, 0.88);
  --fg-secondary: rgba(46, 53, 64, 0.72);
  --fg-tertiary:  rgba(46, 53, 64, 0.43);
  --fg-disabled:  rgba(46, 53, 64, 0.28);
  --fg-on-brand:  #FFFFFF;
  --fg-brand:     var(--brand-700);
  --fg-link:      var(--brand-700);
  --fg-danger:    #C62828;   /* 흰 배경 5.62:1 */
  --bg-danger-subtle: #FDECEC;

  /* 그라디언트 위(어두운 표면) 전용 알파 사다리 */
  --fg-on-dark:           #FFFFFF;
  --fg-on-dark-default:   rgba(255, 255, 255, 0.88);
  --fg-on-dark-secondary: rgba(255, 255, 255, 0.61);
  --fg-on-dark-tertiary:  rgba(255, 255, 255, 0.43);

  /* ---------- Semantic: Border (neutral-700 알파) ---------- */
  --border-subtle:  rgba(78, 86, 101, 0.08);
  --border-default: rgba(78, 86, 101, 0.22);
  --border-strong:  rgba(78, 86, 101, 0.35);
  --border-brand:   var(--brand-700);
  --border-on-dark: rgba(255, 255, 255, 0.16);

  /* ---------- Brand gradient ----------
     문서화된 자리에만 사용한다: 마케팅 히어로 배너.
     CTA·헤더·카드 표면에는 적용하지 않는다. */
  --gradient-hero: linear-gradient(
    125deg,
    #00154C 0%,
    #00438F 45%,
    #0068B7 78%,
    #0E6E78 100%
  );

  /* ---------- Typography ---------- */
  --font-sans: "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Helvetica Neue", Arial, sans-serif;

  /* ---------- Spacing (4배수 기본, 시각보정용 2px 단계 포함) ---------- */
  --space-2: 2px;    --space-4: 4px;    --space-6: 6px;
  --space-8: 8px;    --space-10: 10px;  --space-12: 12px;
  --space-14: 14px;  --space-16: 16px;  --space-20: 20px;
  --space-24: 24px;  --space-28: 28px;  --space-32: 32px;  --space-40: 40px;
  --space-48: 48px;  --space-56: 56px;  --space-64: 64px;
  --space-80: 80px;  --space-96: 96px;  --space-128: 128px;

  /* ---------- Radius ---------- */
  --radius-2: 2px;   --radius-4: 4px;   --radius-8: 8px;
  --radius-12: 12px; --radius-16: 16px; --radius-20: 20px;
  --radius-24: 24px; --radius-32: 32px; --radius-full: 9999px;

  /* ---------- Elevation (ambient + key 2겹, elevated 표면 전용) ---------- */
  --shadow-1: 0 1px 2px rgba(23, 27, 33, 0.06), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-2: 0 2px 6px rgba(23, 27, 33, 0.07), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 6px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(23, 27, 33, 0.06);
  --shadow-4: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(23, 27, 33, 0.07);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* ---------- Motion (spring·bounce 없음) ---------- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-hover: 120ms;
  --dur-control: 150ms;
  --dur-reveal: 400ms;

  /* ---------- Icon masks (유니코드 글리프 대체) ---------- */
  --chevron-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");

  /* ---------- Layout ---------- */
  --header-h: 68px;   /* 데스크톱 고정 헤더 높이 */
  --content-max: 1200px;
  --content-pad: 24px;
}

/* ============================================================
   Base
   ============================================================ */

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.0057em;
  color: var(--fg-default);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "calt", "kern";
}

/* 포커스 링은 항상 visible 하게 유지한다 */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-700);
  outline-offset: 2px;
  border-radius: var(--radius-4);
}

.hero :where(a, button):focus-visible {
  outline-color: #FFFFFF;
}

/* ============================================================
   Typography scale
   17px 이상은 네거티브 트래킹, body 이하는 positive
   ============================================================ */

.t-display1 { font-size: 56px; font-weight: 700; line-height: 1.286; letter-spacing: -0.0319em; }
.t-display2 { font-size: 40px; font-weight: 700; line-height: 1.300; letter-spacing: -0.0282em; }
.t-display3 { font-size: 36px; font-weight: 700; line-height: 1.334; letter-spacing: -0.0270em; }
.t-title1   { font-size: 32px; font-weight: 700; line-height: 1.375; letter-spacing: -0.0253em; }
.t-title2   { font-size: 28px; font-weight: 700; line-height: 1.358; letter-spacing: -0.0236em; }
.t-title3   { font-size: 24px; font-weight: 700; line-height: 1.334; letter-spacing: -0.0230em; }
.t-heading1 { font-size: 22px; font-weight: 700; line-height: 1.364; letter-spacing: -0.0194em; }
.t-heading2 { font-size: 20px; font-weight: 700; line-height: 1.400; letter-spacing: -0.0120em; }
.t-headline1{ font-size: 18px; font-weight: 600; line-height: 1.445; letter-spacing: -0.0020em; }
.t-body1    { font-size: 16px; font-weight: 500; line-height: 1.500; letter-spacing: 0.0057em; }
.t-body1-read { font-size: 16px; font-weight: 500; line-height: 1.625; letter-spacing: 0.0057em; }
.t-body2    { font-size: 15px; font-weight: 500; line-height: 1.467; letter-spacing: 0.0096em; }
.t-label1   { font-size: 14px; font-weight: 500; line-height: 1.429; letter-spacing: 0.0145em; }
.t-label2   { font-size: 13px; font-weight: 500; line-height: 1.385; letter-spacing: 0.0194em; }
.t-caption1 { font-size: 12px; font-weight: 500; line-height: 1.334; letter-spacing: 0.0252em; }

/* ============================================================
   Buttons
   단일 강조색 정책: primary CTA 는 --bg-brand 하나로 통일.
   그라디언트 버튼을 만들지 않는다.
   ============================================================ */

.ib {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  height: 48px;
  padding: 0 var(--space-24);
  border: 1px solid transparent;
  border-radius: var(--radius-12);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.0057em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease),
    color var(--dur-hover) var(--ease);
}

.ib--sm { height: 40px; padding: 0 var(--space-20); font-size: 15px; border-radius: 10px; }
.ib--lg { height: 56px; padding: 0 var(--space-32); font-size: 17px; border-radius: 14px; }

/* solid — 화면당 가장 중요한 단일 액션 */
.ib--solid {
  background: var(--bg-brand);
  color: var(--fg-on-brand) !important;
}
.ib--solid:hover { background: var(--brand-800); color: var(--fg-on-brand) !important; }
.ib--solid:active { background: var(--brand-900); }

/* outlined — 같은 화면의 보조 액션 */
.ib--outlined {
  background: var(--bg-surface);
  border-color: var(--border-default);
  color: var(--fg-brand) !important;
}
.ib--outlined:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--fg-brand) !important; }

/* 어두운 표면(히어로) 위 변형 */
.ib--on-dark-solid {
  background: #FFFFFF;
  color: var(--brand-700) !important;
}
.ib--on-dark-solid:hover { background: var(--brand-50); color: var(--brand-800) !important; }

.ib--on-dark-outlined {
  background: transparent;
  border-color: var(--border-on-dark);
  color: var(--fg-on-dark) !important;
}
.ib--on-dark-outlined:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--fg-on-dark) !important;
}

/* ============================================================
   Surfaces
   카드는 1px 헤어라인이 구조를 짊어진다. 그림자를 올리지 않는다.
   ============================================================ */

.icard {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-16);
  transition:
    transform var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}
.icard:hover { transform: translateY(-2px); border-color: var(--border-default); }

/* ============================================================
   Scroll reveal
   ~400ms fade + 소폭 상승. bounce·scale·parallax 없음.
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-reveal) var(--ease),
    transform var(--dur-reveal) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* 모션 최소화 설정을 존중한다 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Iconography
   24x24 그리드, currentColor 상속. 이모지를 product UI 에
   인라인으로 쓰지 않는다 — monochrome SVG 로 대체한다.
   ============================================================ */

.ico {
  width: 1em;
  height: 1em;
  display: block;
  flex: none;
}

/* 아이콘은 원형 surface 안에 놓는다(빈 상태 패턴과 동일) */
.icon-surface {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 26px;
  border-radius: var(--radius-full);
  background: var(--bg-brand-subtle);
  color: var(--fg-brand);
}

.icon-surface--lg { width: 72px; height: 72px; font-size: 34px; }
.icon-surface--sm { width: 44px; height: 44px; font-size: 22px; }

/* 컬러 표면(히어로) 위 변형 */
.icon-surface--on-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

/* 본문 안 인라인 불릿용 */
.ico-bullet {
  width: 1em;
  height: 1em;
  vertical-align: -0.14em;
  margin-right: 0.35em;
  color: var(--fg-brand);
  flex: none;
}

/* ============================================================
   Line breaking
   한국어는 음절 단위로 줄바꿈되므로 디자인 단계에서 개행을 넣지 않는다.
   대신 브라우저가 줄을 고르게 나누도록 맡긴다.
     balance : 제목을 여러 줄에 균등 배분
     pretty  : 본문 마지막 줄에 단어 하나만 남는 고아(orphan) 방지
   한국어 단어가 음절로 쪼개지는 것은 keep-all 로 막는다.
   ============================================================ */

:where(h1, h2, h3, h4,
       .section-title, .hero h1,
       .service-hero-title, .infra-hero-title, .muscle-hero-title,
       .pub-hero-title, .product-info h3) {
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: break-word;
}

:where(p, li, .section-subtitle, .hero-subtitle, dd, figcaption) {
  text-wrap: pretty;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 산문 단락의 measure 제한.
   한 줄이 1000px 를 넘으면 시선 복귀가 어렵고, 마지막 줄에 단어 하나만
   남는 고아(orphan)가 생긴다. 46em ≒ 한글 46자 안팎. */
:where(.service-description-text,
       .infra-description-text,
       .research-highlight p,
       .muscle-research p,
       .muscle-cta-section p,
       .service-cta-section p,
       .pub-description p) {
  max-width: 46em;
}

/* 가운데 정렬된 블록은 제한한 폭도 가운데에 둔다 */
:where(.muscle-cta-section, .service-cta-section, .infra-cta) p {
  margin-inline: auto;
}

/* ════════════════════════════════════════════════════════════
   COMPONENT LAYER
   ------------------------------------------------------------
   지금까지 페이지마다 자기 히어로·카드·배지를 새로 정의하고 있었다.
   같은 역할의 표면이 페이지마다 다른 그림자·라운드·패딩을 갖는 것이
   통일감이 없는 근본 원인이었다.

   여기서 역할별 표면을 한 번만 정의하고, 각 페이지의 고유 클래스는
   아래 "PAGE CHROME" 절에서 이 표면에 연결한다.
   ════════════════════════════════════════════════════════════ */

/* ───────────── Layout ───────────── */

.iw {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-24);
}

.iw--narrow { max-width: 880px; }

/* 마케팅 섹션 수직 간격은 64–96px 를 표준으로 한다 */
.isection { padding-block: var(--space-96); }
.isection--tight { padding-block: var(--space-64); }
.isection--subtle { background: var(--bg-subtle); }
.isection--inverse { background: var(--brand-950); color: #FFFFFF; }

/* ───────────── Page header ─────────────
   서브 페이지의 표준 머리말. 그라디언트를 쓰지 않는다 —
   그라디언트는 메인 히어로 한 자리에만 둔다. */

.page-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: var(--space-64) var(--space-48);
  text-align: left;
}

.page-header__eyebrow {
  display: block;
  margin-bottom: var(--space-12);
  color: var(--fg-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.0194em;
}

.page-header__title {
  margin: 0;
  color: var(--fg-strong);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.0282em;
}

.page-header__sub {
  margin: var(--space-12) 0 0;
  max-width: 46em;
  color: var(--fg-secondary);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
}

/* ───────────── Section header ───────────── */

.isection__title {
  margin: 0 0 var(--space-12);
  color: var(--fg-strong);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.375;
  letter-spacing: -0.0253em;
}

.isection__sub {
  margin: 0 0 var(--space-48);
  max-width: 46em;
  color: var(--fg-secondary);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
}

/* ───────────── Surfaces ─────────────
   카드 위계는 1px 헤어라인이 짊어진다. 그림자를 올리지 않는다. */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-16);
  padding: var(--space-24);
  transition:
    transform var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.card--lg { border-radius: var(--radius-20); padding: var(--space-40); }
.card--flush { padding: 0; overflow: hidden; }

.card--link:hover,
a.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
}

.card__title {
  margin: 0 0 var(--space-8);
  color: var(--fg-strong);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.445;
  letter-spacing: -0.002em;
}

.card__text {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

/* ───────────── Grid ───────────── */

.igrid { display: grid; gap: var(--space-20); }
.igrid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.igrid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.igrid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ───────────── List cell ─────────────
   행 사이 1px 헤어라인으로 구조를 만든다. */

.list-cell {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  padding: var(--space-14) 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--fg-default);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.0096em;
}

.list-cell:last-child { border-bottom: 0; }

/* ───────────── Divider ───────────── */

.divider { height: 1px; border: 0; background: var(--border-subtle); margin-block: var(--space-32); }
.divider--strong { background: var(--border-default); }

/* ───────────── Chip / Tag / Badge ───────────── */

.chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 var(--space-14);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--fg-default);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.0194em;
  transition: background-color var(--dur-hover) var(--ease);
}

.chip--brand {
  background: var(--bg-brand-subtle);
  border-color: transparent;
  color: var(--fg-brand);
  font-weight: 600;
}

/* invert-fill — 채도가 아니라 명도로 강조한다 */
.chip--active {
  background: var(--fg-strong);
  border-color: var(--fg-strong);
  color: #FFFFFF;
  font-weight: 600;
}

.chip--on-dark {
  background: rgba(0, 21, 76, 0.18);
  border-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 var(--space-12);
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--fg-default);
  font-size: 13px;
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  padding: 5px var(--space-8);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.0194em;
}

.badge--brand   { background: var(--bg-brand-subtle); color: var(--fg-brand); }
.badge--solid   { background: var(--bg-brand); color: #FFFFFF; }
.badge--accent  { background: var(--teal-500); color: #04262B; }
.badge--neutral { background: var(--neutral-100); color: var(--fg-default); }

/* ───────────── Stat ───────────── */

.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-16);
  padding: var(--space-24);
}

.stat__num {
  display: block;
  color: var(--brand-950);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.0282em;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  display: block;
  margin-top: var(--space-6);
  color: var(--fg-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.0194em;
}

/* ───────────── Alert ───────────── */

.alert {
  display: flex;
  gap: var(--space-12);
  padding: var(--space-14) var(--space-16);
  border-radius: var(--radius-12);
  font-size: 15px;
  line-height: 1.6;
}

.alert--info    { background: var(--bg-brand-subtle); color: var(--brand-900); }
.alert--warning { background: #FDF3E4; color: #7A4A00; }

/* ───────────── Table ───────────── */

.itable { width: 100%; border-collapse: collapse; }

.itable th {
  text-align: left;
  padding: var(--space-12) var(--space-14);
  border-bottom: 1px solid var(--border-default);
  color: var(--fg-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.0194em;
}

.itable td {
  padding: var(--space-14);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--fg-default);
  font-size: 14px;
  font-weight: 500;
}

.itable tbody tr:hover { background: var(--bg-subtle); }
.itable .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ════════════════════════════════════════════════════════════
   PAGE CHROME
   각 페이지가 따로 만들던 히어로·카드를 위 표면에 연결한다.
   그라디언트 슬래브를 걷어내고 캔버스 위 머리말로 바꾼다.
   ════════════════════════════════════════════════════════════ */

/* 서브 페이지 머리말 = 스펙의 hero-banner.
   풀블리드 슬래브가 아니라 캔버스 위에 얹힌 둥근 배너다.
   그라디언트가 허용되는 문서화된 자리이며, 카피는 좌하단에 앵커한다. */
.tech-hero,
.contact-hero,
.pub-hero,
.service-hero,
.infra-hero,
.muscle-hero,
.hero-section,
.team-vision-section {
  position: relative;
  background: var(--bg-canvas);
  border-bottom: 0;
  color: var(--fg-default);
  padding: var(--space-32) var(--space-24) var(--space-24);
  text-align: left;
  overflow: visible;
}

/* 데스크톱 헤더는 position:fixed 다. 머리말이 그 아래로 깔리지 않도록
   헤더 높이만큼 상단 여백을 더한다. */
@media (min-width: 992px) {
  .tech-hero,
  .contact-hero,
  .pub-hero,
  .service-hero,
  .infra-hero,
  .muscle-hero,
  .hero-section,
  .team-vision-section,
  .page-header {
    padding-top: calc(var(--header-h) + var(--space-56));
  }
}

/* 회전하던 장식 오버레이는 구조에서 제거한다 */
.tech-hero::before,
.contact-hero::before,
.pub-hero::before,
.service-hero::before,
.infra-hero::before,
.muscle-hero::before,
.hero-section::before {
  display: none !important;
}

/* contact 의 제목은 이 장식 래퍼 안에 들어 있다. 래퍼를 숨기면 제목까지
   사라지므로, 좌우 장식선만 지우고 래퍼는 흐름에 남긴다. */
.contact-hero-decoration {
  display: flex !important;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  margin-bottom: 0;
}

.contact-hero-decoration .hero-line { display: none; }

.tech-hero-content,
.contact-hero-content,
.pub-hero-content,
.service-hero-content,
.infra-hero-content,
.muscle-hero-content,
.hero-section .hero-content,
.team-vision-container {
  display: flex;
  flex-direction: column;
  justify-content: center;   /* 바닥 앵커 → 세로 가운데 */
  align-items: flex-start;
  width: 100%;
  max-width: var(--content-max);
  min-height: 232px;
  margin-inline: auto;
  /* 기하학적 가운데는 눈에 낮아 보인다 — 아래를 더 비워 광학 중심으로 */
  padding: var(--space-32, 32px) var(--space-40, 40px) var(--space-48, 48px);
  border-radius: var(--radius-16);
  background: linear-gradient(120deg, #00154C 0%, #00438F 58%, #0E6E78 100%);
  color: #FFFFFF;
  text-align: left;
  overflow: hidden;
}

/* 배너 안쪽은 어두운 표면이다 */
.tech-hero-content *,
.contact-hero-content *,
.pub-hero-content *,
.service-hero-content *,
.infra-hero-content *,
.muscle-hero-content *,
.hero-section .hero-content *,
.team-vision-container * {
  text-shadow: none;
}

/* 페이지 제목 — display2 */
.tech-hero h1,
.contact-hero h1,
.pub-hero-title,
.service-hero-title,
.infra-hero-title,
.muscle-hero-title,
.hero-section .hero-title,
.service-hero h1,
.pub-hero h1,
.infra-hero h1,
.muscle-hero h1,
.hero-section h1,
.team-vision-section h1 {
  margin: 0;
  max-width: 18em;
  color: #FFFFFF;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.0282em;
  text-shadow: none;
}

.tech-hero p,
.contact-hero p,
.pub-hero-subtitle,
.service-hero-subtitle,
.infra-hero-subtitle,
.muscle-hero-subtitle,
.hero-section .hero-subtitle,
.service-hero > * > p,
.pub-hero > * > p,
.infra-hero > * > p,
.muscle-hero > * > p,
.hero-section > * > p {
  margin: var(--space-12) 0 0;
  max-width: 44em;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  text-shadow: none;
}

/* 머리말 아이콘은 캔버스 위 brand-subtle 원형으로 */
.pub-hero-icon,
.service-hero-icon,
.infra-hero-icon,
.muscle-hero-icon {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
  margin-bottom: var(--space-20);
}

/* 머리말 배지 — 어두운 표면 전제가 사라졌으므로 brand 배지로 */
.hero-badge,
.hero-badges .badge-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  height: 30px;
  padding: 0 var(--space-12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-full);
  background: rgba(0, 21, 76, 0.22);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.0194em;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-20); }

/* 페이지별 카드 → 공통 표면 */
.problem-card,
.benefit-card,
.feature-card,
.stat-card,
.showcase-card,
.category-card,
.publication-card,
.pub-card,
.project-card,
.service-stat-card,
.team-ceo-card,
.team-partner-card,
.pub-stat-card,
.stat-box,
.info-card,
.result-card,
.spec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-16);
  box-shadow: none;
  transition:
    transform var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.problem-card:hover,
.benefit-card:hover,
.feature-card:hover,
.showcase-card:hover,
.category-card:hover,
.publication-card:hover,
.pub-card:hover,
.project-card:hover,
.team-partner-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
  box-shadow: none;
}

/* about_team 의 비전 배너도 같은 머리말 규칙을 따른다 */
.team-vision-section::before,
.team-vision-section::after { display: none !important; }

.team-vision-section h1,
.team-vision-section h2,
.team-vision-title {
  color: var(--fg-strong);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.0282em;
  text-shadow: none;
}

.team-vision-section p,
.team-vision-subtitle {
  color: var(--fg-secondary);
  font-size: 17px;
  font-weight: 500;
  text-shadow: none;
}

/* 장식용 밑줄 바 — 위계는 타이포가 짊어진다 */
.team-section-title::after { display: none !important; }

.team-ceo-line {
  height: 1px !important;
  background: var(--border-subtle) !important;
  border: 0;
}

/* ───────── 제목 램프 통일 ─────────
   페이지마다 2rem·2.2rem·2.5rem 에 색도 #00438F·#333·#1a1a1a 로 제각각이었다.
   역할은 두 가지뿐이다: 섹션 제목(title1) 과 카드 제목(headline1). */

.section-title,
.infra-section-title,
.muscle-section-title,
.service-section-title,
.team-section-title,
.muscle-feature-title,
.infra-cta-title,
.pub-section-title,
.service-cta-title,
.muscle-cta-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.375;
  letter-spacing: -0.0253em;
  color: var(--fg-strong);
}

.feature-title,
.category-title,
.project-title,
.publication-title,
.pub-card-title,
.showcase-title,
.problem-card h3,
.benefit-card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.445;
  letter-spacing: -0.002em;
  color: var(--fg-strong);
}

/* about_team 의 비전 배너에는 제목 태그가 없고 <p> 두 개뿐이다.
   첫 문장을 페이지 제목 위계로 올린다. */
.team-vision-container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

.team-vision-subtitle {
  margin: 0;
  color: #FFFFFF !important;
  font-size: 40px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  letter-spacing: -0.0282em;
  max-width: 18em;
}

.team-vision-desc {
  margin: var(--space-12) 0 0;
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 17px !important;
  font-weight: 500 !important;
}

/* 흰 카드가 흰 배경 위에 놓이면 헤어라인만으로는 구조가 읽히지 않는다.
   카드를 담는 표면은 bg-subtle 로 내린다(메인 제품 섹션과 같은 리듬). */
.team-content,
.product-showcase,
.info-section {
  background: var(--bg-subtle) !important;
}

/* 배너 바로 아래 섹션은 위쪽 여백을 줄여 배너와 붙여 읽히게 한다 */
.tech-hero + section,
.service-hero + *,
.infra-hero + *,
.muscle-hero + *,
.pub-hero + *,
.hero-section + section {
  padding-top: var(--space-64);
}

/* 배너가 Bootstrap .container 안에 중첩된 페이지가 있어 폭이 1110px 로
   좁아졌다. 배너 자신이 아닌 중간 컨테이너는 폭 제한을 풀어
   모든 페이지의 배너가 --content-max 로 맞도록 한다.
   (컨테이너가 곧 배너인 경우는 :not() 으로 제외한다) */
.tech-hero    > .container:not(.tech-hero-content),
.service-hero > .container:not(.service-hero-content),
.hero-section > .container:not(.hero-content),
.contact-hero > .container:not(.contact-hero-content),
.pub-hero     > .container:not(.pub-hero-content),
.infra-hero   > .container:not(.infra-hero-content),
.muscle-hero  > .container:not(.muscle-hero-content),
.team-vision-section > .container:not(.team-vision-container) {
  max-width: none;
  width: 100%;
  padding-inline: 0;
  margin-inline: 0;
}

/* about_team 의 배너는 padding-inline 이 있는 래퍼(.team-main-wrapper) 안에
   들어 있어 다른 페이지보다 좌우 20px 씩 좁았다. 래퍼 패딩을 상쇄해
   모든 페이지의 배너 폭·좌측 정렬을 일치시킨다.
   (래퍼 패딩은 576px 아래에서 10px 로 줄어든다) */
.team-main-wrapper { --wrap-pad: 20px; }

@media (max-width: 576px) {
  .team-main-wrapper { --wrap-pad: 10px; }
}

.team-main-wrapper .team-vision-section {
  margin-inline: calc(-1 * var(--wrap-pad, 20px));
}

/* ════════════════════════════════════════════════════════════
   AUTH / FORM
   로그인·회원가입·찾기 화면은 자체 팔레트(#0caBE0)와 2px 보더,
   카드 그림자를 쓰고 있어 나머지 사이트와 따로 놀았다.
   폼 컨트롤 규격을 시스템으로 통일한다.
   ════════════════════════════════════════════════════════════ */

.login-page, .signup-page, .findemail-page, .findpw-page, .unlock-page {
  font-family: var(--font-sans);
  background: var(--bg-subtle);
}

/* 카드 — 그림자 대신 헤어라인 */
.login-card,
.signup-card,
.findemail-card,
.findpw-card,
.unlock-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-16);
  box-shadow: none;
}

/* input — height 48 / radius 12 / 1px hairline / 16px */
.input-field {
  height: 48px;
  padding: 0 var(--space-16);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-12);
  background: var(--bg-surface);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg-strong);
  transition:
    border-color var(--dur-control) var(--ease),
    box-shadow var(--dur-control) var(--ease);
}

.input-field::placeholder { color: var(--fg-tertiary); }

.input-field:hover { border-color: var(--border-strong); }

.input-field:focus {
  outline: none;
  border-color: var(--border-brand);
  box-shadow: 0 0 0 3px rgba(0, 67, 143, 0.16);
}

/* primary — lg(48 / r12 / 16·700). hover 는 darken, lift 하지 않는다 */
.btn-primary {
  height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius-12);
  background: var(--bg-brand);
  color: var(--fg-on-brand);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.0057em;
  box-shadow: none;
  transition: background-color var(--dur-hover) var(--ease);
}

.btn-primary:hover {
  background: var(--brand-800);
  transform: none;
  box-shadow: none;
}

.btn-primary:active { background: var(--brand-900); }

/* 소셜 버튼 — outlined. 브랜드 자산 색(Kakao 등)은 각 페이지 값을 유지한다 */
.btn-social {
  height: 48px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-12);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  box-shadow: none;
  transition:
    background-color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.btn-social:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  transform: none;
  box-shadow: none;
}

/* 카카오 버튼: 공식 노랑(#FEE500), 호버는 한 단계 진하게 */
.btn-kakao:hover { background: #F5DC00; border-color: #F5DC00; }

/* 구분선·보조 링크 */
.divider span { color: var(--fg-secondary); font-size: 13px; }
.divider::before, .divider::after { border-bottom-color: var(--border-subtle); }

.footer-links a {
  color: var(--fg-brand);
  font-size: 14px;
  font-weight: 500;
}

/* ───────── SweetAlert2 ─────────
   기본 확인 버튼 색(#3085d6)은 흰 글씨 대비가 3.85 로 미달이고
   사이트 팔레트와도 무관하다. 다이얼로그를 시스템에 맞춘다. */
.swal2-popup {
  border-radius: var(--radius-20) !important;
  font-family: var(--font-sans) !important;
}

.swal2-title { color: var(--fg-strong) !important; letter-spacing: -0.0194em; }
.swal2-html-container { color: var(--fg-secondary) !important; }

.swal2-confirm.swal2-styled {
  height: 48px;
  padding: 0 var(--space-24) !important;
  background-color: var(--bg-brand) !important;
  color: var(--fg-on-brand) !important;
  border: 0 !important;
  border-radius: var(--radius-12) !important;
  font-family: var(--font-sans) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.swal2-confirm.swal2-styled:hover { background-color: var(--brand-800) !important; }

.swal2-cancel.swal2-styled {
  height: 48px;
  padding: 0 var(--space-24) !important;
  background-color: var(--bg-surface) !important;
  color: var(--fg-default) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-12) !important;
  font-family: var(--font-sans) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.swal2-deny.swal2-styled {
  background-color: var(--fg-danger) !important;
  border-radius: var(--radius-12) !important;
}

/* 가운데 정렬된 섹션 제목 바로 아래의 설명문은 함께 가운데로 맞춘다.
   (논문 목록·카드 같은 콘텐츠 블록은 좌측 정렬을 유지한다) */
.service-description-text,
.infra-description-text {
  text-align: center;
  margin-inline: auto;
}

/* ───────── 왼쪽 액센트 띠 제거 ─────────
   컬러 left-rail 카드는 쓰지 않는다. 구조는 1px 헤어라인이 짊어진다. */
.pub-card,
.citation-box,
.publication-card,
.publication-item,
.project-details li,
.muscle-alert,
.research-highlight {
  border-left: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08)) !important;
  border-radius: var(--radius-12, 12px);
}

.citation-box,
.research-highlight,
.project-details li {
  background: var(--bg-subtle, #F7F8FA);
  border: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08)) !important;
}

.muscle-alert {
  background: #FDF3E4;
  border: 1px solid rgba(122, 74, 0, 0.16) !important;
}

/* ───────── 역량 칩 그리드 ─────────
   고정 열 그리드라 5개짜리 묶음이 4+1 로 쪼개지고,
   1개짜리 묶음은 한 칩이 가로 전체를 차지했다.
   내용 폭 칩을 가운데로 흘려 마지막 줄이 자연스럽게 정렬되도록 한다. */
.category-items {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8, 8px);
}

.category-item {
  flex: 0 1 auto;
  padding: var(--space-10, 10px) var(--space-16, 16px) !important;
  border-radius: var(--radius-full, 9999px) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.category-item:hover {
  transform: none !important;
  box-shadow: none !important;
  background: var(--brand-800, #003876) !important;
}

/* ───────── 인증 카드 수직 정렬 ─────────
   flex 컨테이너였지만 align/justify 가 normal 이라 카드가 위로 붙고
   고정 헤더에 가렸다. */
.login-page,
.signup-page,
.findemail-page,
.findpw-page,
.unlock-page {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 100vh;
  padding: calc(var(--header-h, 68px) + var(--space-16, 16px)) var(--space-20, 20px) 0;
}

/* 이 래퍼 안에는 카드와 <footer> 가 함께 들어 있다.
   래퍼에 max-width:440px 이 걸려 있어 푸터까지 눌려 세로로 길어지고,
   그 때문에 카드가 화면 가운데로 내려오지 못했다.
   폭 제한을 카드로 옮기고 카드만 남는 공간의 가운데에 둔다. */
.login-page .login-wrapper,
.signup-page .signup-wrapper,
.findemail-page .findemail-wrapper,
.findpw-page .findpw-wrapper,
.unlock-page .unlock-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
}

.login-page .login-card,
.signup-page .signup-card,
.findemail-page .findemail-card,
.findpw-page .findpw-card,
.unlock-page .unlock-card {
  width: 100%;
  max-width: 440px;
  margin-block: auto;
  margin-inline: auto;
}

.signup-page .signup-card { max-width: 560px; }
/* 이메일 찾기 / 이메일 확인(비밀번호 찾기): 입력칸 + 버튼이 한 줄에 들어가야 해서 넓게 */
.findemail-page .findemail-card,
.findpw-page .findpw-card { max-width: 560px; }

.login-page .login-wrapper > footer,
.signup-page .signup-wrapper > footer,
.findemail-page .findemail-wrapper > footer,
.findpw-page .findpw-wrapper > footer,
.unlock-page .unlock-wrapper > footer {
  width: 100%;
  margin-top: var(--space-48, 48px);
}

/* ════════════════════════════════════════════════════════════
   BANNER — 아이콘 + 제목 한 줄 배치
   아이콘이 제목 위에 따로 얹혀 있어 어색했다. 아이콘을 제목 왼쪽에
   두고, 부제·배지는 제목 글줄에 맞춰 들여 정렬한다.
   ════════════════════════════════════════════════════════════ */
.service-hero-content:has(> .icon-surface),
.infra-hero-content:has(> .icon-surface),
.muscle-hero-content:has(> .icon-surface),
.pub-hero-content:has(> .icon-surface),
.contact-hero-content:has(> .icon-surface) {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-20, 20px);
  row-gap: 0;
  align-content: center;     /* 바닥 앵커 → 세로 가운데 */
  align-items: center;
  justify-items: start;
}

.service-hero-content > .icon-surface,
.infra-hero-content > .icon-surface,
.muscle-hero-content > .icon-surface,
.pub-hero-content > .icon-surface,
.contact-hero-content > .icon-surface {
  grid-column: 1;
  grid-row: 1;
  width: 56px !important;
  height: 56px !important;
  font-size: 28px !important;
  margin: 0 !important;
}

.service-hero-content:has(> .icon-surface) > :not(.icon-surface),
.infra-hero-content:has(> .icon-surface) > :not(.icon-surface),
.muscle-hero-content:has(> .icon-surface) > :not(.icon-surface),
.pub-hero-content:has(> .icon-surface) > :not(.icon-surface),
.contact-hero-content:has(> .icon-surface) > :not(.icon-surface) {
  grid-column: 2;
}

@media (max-width: 576px) {
  .service-hero-content > .icon-surface,
  .infra-hero-content > .icon-surface,
  .muscle-hero-content > .icon-surface,
  .pub-hero-content > .icon-surface,
  .contact-hero-content > .icon-surface {
    width: 44px !important;
    height: 44px !important;
    font-size: 22px !important;
  }
  .service-hero-content:has(> .icon-surface),
  .infra-hero-content:has(> .icon-surface),
  .muscle-hero-content:has(> .icon-surface),
  .pub-hero-content:has(> .icon-surface),
  .contact-hero-content:has(> .icon-surface) { column-gap: var(--space-14, 14px); }
}

/* ════════════════════════════════════════════════════════════
   BANNER — 로고 워터마크 (서브 페이지)
   우측 상단에 로고 하나를 시계방향 사선(왼쪽 위 → 오른쪽 아래)으로
   걸쳐 둔다. 메인과 달리 움직이지 않는다. 카피는 좌하단에 앵커되므로
   겹치지 않고, 겹치더라도 불투명도가 낮아 대비를 해치지 않는다.
   ════════════════════════════════════════════════════════════ */
.tech-hero-content,
.contact-hero-content,
.pub-hero-content,
.service-hero-content,
.infra-hero-content,
.muscle-hero-content,
.hero-section .hero-content,
.team-vision-container {
  position: relative;
  isolation: isolate;
}

.tech-hero-content::after,
.contact-hero-content::after,
.pub-hero-content::after,
.service-hero-content::after,
.infra-hero-content::after,
.muscle-hero-content::after,
.hero-section .hero-content::after,
.team-vision-container::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -72px;
  width: 460px;
  aspect-ratio: 467 / 160;
  background: url('/static/images/watermark_logo.png') no-repeat center / contain;
  opacity: 0.08;
  transform: rotate(18deg);
  transform-origin: center;
  pointer-events: none;
  z-index: -1;
}

@media (max-width: 768px) {
  .tech-hero-content::after,
  .contact-hero-content::after,
  .pub-hero-content::after,
  .service-hero-content::after,
  .infra-hero-content::after,
  .muscle-hero-content::after,
  .hero-section .hero-content::after,
  .team-vision-container::after {
    top: -20px;
    right: -56px;
    width: 280px;
  }
}

/* 워터마크가 부제와 겹치는 좁은 화면을 대비해 부제 대비를 올린다 */
.tech-hero p,
.contact-hero p,
.pub-hero-subtitle,
.service-hero-subtitle,
.infra-hero-subtitle,
.muscle-hero-subtitle,
.hero-section .hero-subtitle,
.service-hero > * > p,
.pub-hero > * > p,
.infra-hero > * > p,
.muscle-hero > * > p,
.hero-section > * > p {
  color: rgba(255, 255, 255, 0.92);
}

/* 제품 배너의 상단 배지 — 제목과의 간격을 줄여 제목을 위로 끌어올린다 */
.hero-section .hero-badge { margin-bottom: var(--space-14, 14px) !important; }

/* Aid-U 배너 — 배지 줄의 margin-bottom(32px) 이 배너를 253px 로 늘리며
   제목을 위 끝에 붙여 놓았다. 여백을 걷고, 아래쪽 무게는 배지 줄이
   잡아주므로 이 배너는 위아래 여백을 같게 둔다. */
.hero-section .hero-badges { margin-bottom: 0 !important; }

.hero-section .hero-content:has(> .hero-badges) {
  padding-top: var(--space-40, 40px);
  padding-bottom: var(--space-40, 40px);
}


/* ============================================================
   ACCOUNT AREA — 로그인 후 화면 (헤더 사용자 메뉴, 프로필, 계정,
   분석권 충전, 비밀번호/전화번호 변경, 회원 탈퇴)
   예전 credit.css / login.css / account.css / profile.css 가 헤더를
   통해 전역으로 로드되므로, 여기서는 페이지 범위 선택자로 덮어쓴다.
   ============================================================ */

/* ---------- 헤더 사용자 메뉴 (header.js 가 그리는 드롭다운) ---------- */
#user-nav-item { position: relative; }

#user-nav-item .user_icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full, 9999px);
  background: var(--brand-50, #EBF3FC);
  color: var(--brand-700, #00438F);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--dur-hover, 120ms) var(--ease, ease);
}
#user-nav-item .user_icon:hover { background: var(--brand-100, #D6E6F8); }

/* 예전 규칙: opacity .8, 고정 높이 250px, 회색 테두리 → 반투명하고 삐뚤어 보였다 */
#user-nav-item .user_menu {
  position: absolute !important;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  width: 248px;
  height: auto;
  padding: 8px;
  background: var(--bg-elevated, #FFFFFF);
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-12, 12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 1;
  text-align: left;
  z-index: 1001 !important;
}

#user-nav-item .user_menu_name {
  margin: 0 0 6px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08));
  color: var(--fg-strong, #12161B);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

#user-nav-item .user_menu_list { margin: 0; padding: 0; list-style: none; }
#user-nav-item .user_menu_list > li { margin: 0; border: 0; border-radius: 8px; }
#user-nav-item .user_menu_list > li:hover { opacity: 1; }
#user-nav-item .user_menu_list > li > a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--fg-default, rgba(37, 43, 52, 0.88));
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--dur-hover, 120ms) var(--ease, ease);
}
#user-nav-item .user_menu_list > li > a:hover {
  background: var(--bg-muted, #F2F4F7);
  color: var(--fg-strong, #12161B);
}

/* 보유 분석권: 아이콘 · 라벨 · 숫자(오른쪽) */
#user-nav-item .user_menu_credit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-brand-subtle, #EBF3FC);
}
#user-nav-item .user_menu_credit > p { margin: 0; }
#user-nav-item .user_menu_credit .credit_icon { order: 0; width: 18px; height: 18px; }
#user-nav-item .user_menu_credit > p:last-child {
  order: 1;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 13px;
  font-weight: 600;
}
#user-nav-item .user_menu_credit .credit_amount {
  order: 2;
  margin-left: auto;
  padding: 0;
  color: var(--brand-700, #00438F);
  font-size: 16px;
  font-weight: 700;
}

#user-nav-item .user_menu .signout-button {
  display: block;
  width: 100%;
  height: auto;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08));
  border-radius: 0 0 8px 8px;
  background: none;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
#user-nav-item .user_menu .signout-button:hover {
  background: var(--bg-muted, #F2F4F7);
  color: var(--fg-strong, #12161B);
}

/* ---------- 공통 캔버스: 회색 바탕 위 흰 카드, 고정 헤더 아래에서 시작 ---------- */
body:has(> .viewport-container),
body:has(.account-container),
body:has(.charge-container) {
  background: var(--bg-subtle, #F7F8FA);
}

/* 예전에는 margin-top 40px 뿐이라 카드 윗부분이 고정 헤더(68px) 밑에 가려졌다 */
.viewport-container {
  width: min(520px, calc(100% - 32px));
  margin: calc(var(--header-h, 68px) + 48px) auto 96px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.viewport-container .contents-container {
  width: 100%;
  margin: 0;
  padding: 36px 32px;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-16, 16px);
  box-shadow: none;
  text-align: left;
}

/* 주 버튼 (예전: 짙은 회색 #343a40, 높이 35, 너비 30%) */
.viewport-container .contents-main-submit-button,
.account-container ~ * .contents-main-submit-button,
.page_wrapper .modal .contents-main-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 120px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-brand, #00438F);
  color: var(--fg-on-brand, #FFFFFF);
  font-size: 15px;
  font-weight: 600;
  opacity: 1;
  box-shadow: none;
  text-shadow: none;
  transition: background-color var(--dur-hover, 120ms) var(--ease, ease);
}
.viewport-container .contents-main-submit-button:hover,
.viewport-container .contents-main-submit-button:focus,
.page_wrapper .modal .contents-main-submit-button:hover {
  background: var(--brand-800, #003876);
  color: var(--fg-on-brand, #FFFFFF);
  opacity: 1;
}
.viewport-container .contents-main-submit-button strong { font-weight: inherit; }

/* 보조 버튼 (예전: 높이 30, 회색 테두리, 호버 시 회색으로 꽉 참) */
.page_wrapper .contents_sub_button,
.viewport-container .contents_sub_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 8px;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
  font-size: 14px;
  font-weight: 600;
  transition: background-color var(--dur-hover, 120ms) var(--ease, ease), border-color var(--dur-hover, 120ms) var(--ease, ease);
}
.page_wrapper .contents_sub_button:hover,
.viewport-container .contents_sub_button:hover {
  background: var(--bg-muted, #F2F4F7);
  border-color: var(--border-strong, rgba(78, 86, 101, 0.35));
  color: var(--fg-strong, #12161B);
}
.page_wrapper .contents_sub_button:disabled {
  background: var(--brand-700, #00438F);
  border-color: var(--brand-700, #00438F);
  color: #FFFFFF;
}

/* 입력칸 */
.viewport-container input[type="text"],
.viewport-container input[type="password"],
.viewport-container input[type="email"],
.viewport-container input[type="tel"],
.viewport-container input[type="number"],
.page_wrapper .calendar_text {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 10px;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
  font-size: 15px;
  box-shadow: none;
}
.viewport-container input:focus,
.page_wrapper .calendar_text:focus {
  outline: none;
  border-color: var(--brand-700, #00438F);
  box-shadow: 0 0 0 3px rgba(0, 67, 143, 0.12);
}

/* ---------- 프로필 ---------- */
.viewport-container.profile-container { border: 0; padding: 0; background: transparent; }

.profile-contents-container .profile_email {
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  color: var(--fg-strong, #12161B);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.012em;
  text-transform: none;
  word-break: break-all;
}

.profile-contents-container .profile_box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08));
}
.profile-contents-container .profile_box:last-of-type { border-bottom: 0; }

.profile-contents-container .profile_title {
  width: 96px;
  margin: 0;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 14px;
  font-weight: 600;
}
.profile-contents-container .profile_contents {
  flex: 1;
  margin: 0;
  color: var(--fg-strong, #12161B);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.profile-contents-container .profile_input_container { gap: 8px; }
.profile-contents-container .profile_input { height: 40px; }

/* 행 안의 수정/저장/취소 버튼: 작은 보조 버튼, 저장만 주 버튼 */
.profile-contents-container .profile_button {
  width: auto !important;
  min-width: 0;
  height: 34px;
  margin: 0 0 0 auto;
  padding: 0 14px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 8px;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
  font-size: 13px !important;
  font-weight: 600;
}
.profile-contents-container .profile_button:hover,
.profile-contents-container .profile_button:focus {
  background: var(--bg-muted, #F2F4F7);
  color: var(--fg-strong, #12161B);
}
.profile-contents-container .profile_button.profile_save {
  margin-left: 0;
  border-color: var(--brand-700, #00438F);
  background: var(--brand-700, #00438F);
  color: #FFFFFF;
}
.profile-contents-container .profile_button.profile_save:hover { background: var(--brand-800, #003876); color: #FFFFFF; }
.profile-contents-container .profile_button.profile_cancel { margin-left: 0; }
/* 저장·취소는 평소 숨김 (profile.css 의 display:none 을 위 공통 버튼 규칙이 덮지 않게).
   수정 버튼을 누르면 profile.html 스크립트가 inline style 로 보여준다. */
.profile-contents-container .profile_button.profile_save,
.profile-contents-container .profile_button.profile_cancel { display: none; }

/* 회원 탈퇴: 위험 동작이라 눈에 덜 띄는 빨간 글자 버튼으로 */
.profile-contents-container .profile_button.profile_delete_account_button {
  display: flex;
  margin: 28px auto 0;
  height: 40px;
  padding: 0 16px;
  border-color: transparent;
  background: none;
  color: var(--fg-danger, #C62828);
  font-size: 14px !important;
}
.profile-contents-container .profile_button.profile_delete_account_button:hover {
  background: var(--bg-danger-subtle, #FDECEC);
  color: var(--fg-danger, #C62828);
}
/* 버튼 안 링크에 style="color: white" 가 박혀 있어 투명 배경에서 글자가 사라진다 */
.profile-contents-container .profile_delete_account_button a { color: inherit !important; }

.profile-contents-container .profile_error { font-size: 13px; }

/* ---------- 회원 탈퇴 (delete_account) ---------- */
.profile-contents-container .verify_button,
.profile-contents-container .cancel_button {
  height: 44px;
  min-width: 120px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}
.profile-contents-container .verify_button {
  border: 0;
  background: var(--fg-danger, #C62828);
  color: #FFFFFF;
}
.profile-contents-container .verify_button:hover { background: #A61E1E; }
.profile-contents-container .cancel_button {
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
}
.profile-contents-container .cancel_button:hover { background: var(--bg-muted, #F2F4F7); }
.profile-contents-container .withdrawal-warning {
  margin-top: 20px !important;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-danger-subtle, #FDECEC);
  color: var(--fg-danger, #C62828) !important;
  font-size: 13px !important;
  text-align: left;
}

/* ---------- 계정 / 분석권 충전 (page_wrapper) ---------- */
.page_wrapper:has(.account-container),
.page_wrapper:has(.charge-container) {
  padding: calc(var(--header-h, 68px) + 48px) 16px 96px;
}

.page_wrapper .account-container,
.page_wrapper .charge-container,
.page_wrapper .credit_payment_container {
  width: min(760px, 100%);
  margin: 0 auto;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-16, 16px);
  box-shadow: none;
}

/* 계정 요약: 왼쪽 사용자, 오른쪽 보유 분석권 */
.page_wrapper .account-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
}
.page_wrapper .account-user-container,
.page_wrapper .account-info-container { width: auto; margin: 0; padding: 0; }
.page_wrapper .account-user-container { text-align: left; }
.page_wrapper .account-info-container { text-align: right; }
.page_wrapper .account-container .user_name {
  margin: 0 0 4px;
  padding: 0;
  color: var(--fg-strong, #12161B);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.012em;
  text-transform: none;
}
.page_wrapper .account-container .user_email {
  margin: 0;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 14px;
}
.page_wrapper .account-container .credit-title {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--fg-strong, #12161B);
  font-size: 16px;
  font-weight: 700;
}
.page_wrapper .credit_button-container { display: flex; gap: 8px; justify-content: flex-end; }

.page_wrapper .credit_icon { width: 22px; height: 22px; }

/* 충전 내역 */
.page_wrapper .credit_payment_container { margin-top: 20px; padding: 24px 28px; }
.page_wrapper .payment-title {
  width: auto;
  margin: 0 0 12px;
  color: var(--fg-strong, #12161B);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.012em;
  text-align: left;
}
.page_wrapper .payment_headers,
.page_wrapper .payment_contents { width: 100%; }
.page_wrapper .payment_headers {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 13px;
  font-weight: 600;
}
.page_wrapper .payment_contents {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08));
  color: var(--fg-default, rgba(37, 43, 52, 0.88));
  font-size: 14px;
}
.page_wrapper .payment_contents > button { height: 32px; padding: 0 10px; font-size: 13px; }

/* 모달 (사용량, 영수증, 결제 취소) */
.page_wrapper .modal-content {
  border: 0;
  border-radius: var(--radius-16, 16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(23, 27, 33, 0.07);
  padding: 28px;
}
.page_wrapper .modal-content .close { color: var(--fg-tertiary, rgba(46, 53, 64, 0.43)); font-weight: 400; }
.page_wrapper .modal-content .close:hover { color: var(--fg-strong, #12161B); }

/* 사용량 조회의 날짜 선택 달력(jQuery UI).
   달력의 z-index 가 1 이라 z-index 1000 인 모달 뒤에 가려져 안 보였다. */
#ui-datepicker-div {
  z-index: 1100 !important;
  padding: 8px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-12, 12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: var(--bg-elevated, #FFFFFF);
  font-family: var(--font-sans);
  font-size: 13px;
}
#ui-datepicker-div .ui-datepicker-header {
  border: 0;
  background: none;
  color: var(--fg-strong, #12161B);
  font-weight: 700;
}
#ui-datepicker-div td a, #ui-datepicker-div td span {
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: center;
}
#ui-datepicker-div td a:hover { background: var(--bg-muted, #F2F4F7); }
#ui-datepicker-div .ui-state-active {
  background: var(--brand-700, #00438F) !important;
  color: #FFFFFF !important;
}

/* 분석권 충전 */
/* 분석권 수량 → 결제 금액 계산 줄.
   예전엔 회색 박스에 파란 테두리 입력칸 두 개가 나란히 있어 어느 쪽이
   입력칸인지 알기 어려웠다. 왼쪽만 입력칸처럼 두고, 오른쪽 금액은 글자로 보여준다.
   (클래스 이름은 charge.js 가 참조하므로 그대로 둔다) */
.page_wrapper .charge-container .credit_noti {
  display: flex;
  flex-wrap: wrap;                 /* 안내 문구는 아래 줄 전체를 쓴다 */
  justify-content: center;         /* 수량과 금액을 가운데로 모은다 */
  align-items: center;
  gap: 4px 20px;
  padding: 20px 24px;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-12, 12px);
}
.page_wrapper .charge-container .credit_noti > p { margin: 0; }
.page_wrapper .charge-container .credit_noti .credit_cost {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 15px;
  font-weight: 600;
}
/* 금액 묶음(세 번째 p). 안내 문구 p 가 생겨서 :last-of-type 으로는 잡히지 않는다 */
.page_wrapper .charge-container .credit_noti .credit_cost:nth-of-type(3) { gap: 6px; }
.page_wrapper .charge-container .credit_noti > p:not(.credit_cost):not(.credit_noti_help) {
  color: var(--fg-tertiary, rgba(46, 53, 64, 0.43));
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}
.page_wrapper .charge-container .credit_cost_amount.left {
  width: 132px !important;
  height: 52px !important;
  padding: 0 14px !important;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22)) !important;
  border-radius: 10px !important;
  background: var(--bg-surface, #FFFFFF) !important;
  color: var(--fg-strong, #12161B) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  text-align: center !important;
}
/* 수량 1씩 조절 버튼 (기본 스피너 대신) */
.page_wrapper .charge-container .credit_step {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 50%;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-hover, 120ms) var(--ease, ease), border-color var(--dur-hover, 120ms) var(--ease, ease);
}
.page_wrapper .charge-container .credit_step:hover {
  background: var(--bg-muted, #F2F4F7);
  border-color: var(--border-strong, rgba(78, 86, 101, 0.35));
}
.page_wrapper .charge-container .credit_step:active { background: var(--neutral-100, #E9ECF1); }

/* 숫자 조절 화살표(스피너)를 숨긴다. 오른쪽에 자리를 차지해서
   가운데 정렬한 숫자가 왼쪽으로 치우쳐 보였다. */
.page_wrapper .charge-container .credit_cost_amount.left {
  -moz-appearance: textfield;
  appearance: textfield;
}
.page_wrapper .charge-container .credit_cost_amount.left::-webkit-outer-spin-button,
.page_wrapper .charge-container .credit_cost_amount.left::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.page_wrapper .charge-container .credit_cost_amount.left:focus {
  border-color: var(--brand-700, #00438F) !important;
  box-shadow: 0 0 0 3px rgba(0, 67, 143, 0.12);
}
/* 오른쪽은 읽기 전용이라 입력칸처럼 보이지 않게 */
/* 금액은 글자 수만큼만 차지하게 한다(폭은 charge.html 의 스크립트가 size 로 맞춘다).
   고정 폭이면 0원일 때 ₩ 와 숫자 사이가 벌어지고, 자릿수가 늘면 붙어 보인다. */
.page_wrapper .charge-container .credit_cost_amount.right {
  width: auto;
  min-width: 0;
  max-width: 220px;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--brand-700, #00438F) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  text-align: right !important;
  text-decoration: none !important;
  letter-spacing: -0.012em;
}

/* 박스 안 안내 문구 (수량 직접 입력 가능) */
.page_wrapper .charge-container .credit_noti_help {
  flex-basis: 100%;
  margin: 14px 0 0 !important;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08));
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 640px) {
  .page_wrapper .charge-container .credit_noti { gap: 10px; text-align: center; }
  .page_wrapper .charge-container .credit_noti_help { text-align: center; }
  .page_wrapper .charge-container .credit_noti .credit_cost,
  .page_wrapper .charge-container .credit_noti .credit_cost:nth-of-type(3) { justify-content: center; }
  .page_wrapper .charge-container .credit_cost_amount.left { width: 100% !important; }
}

.page_wrapper .charge-container { padding: 16px 16px 24px; }
.page_wrapper .charge-container .charge-info-container { width: 100%; padding: 16px 16px 8px; }
.page_wrapper .charge-container .contents-main-submit-button.checkout-button {
  height: 48px;
  min-width: 220px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-brand, #00438F);   /* 예전 노란색(#FFC53D) → 브랜드 */
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  box-shadow: none;
}
.page_wrapper .charge-container .contents-main-submit-button.checkout-button:hover {
  background: var(--brand-800, #003876);
  transform: none;
}

@media (max-width: 640px) {
  .viewport-container .contents-container { padding: 28px 20px; }
  .page_wrapper .account-container { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .page_wrapper .account-info-container { text-align: left; }
  .page_wrapper .account-container .credit-title,
  .page_wrapper .credit_button-container { justify-content: flex-start; }
  .page_wrapper .credit_payment_container { padding: 20px; }
}

/* ---------- 분석권 아이콘: 'i' 글자가 든 동그라미 → 티켓 아이콘 ----------
   마크업(<p class="credit_icon">i</p>)은 그대로 두고, 글자는 숨긴 뒤
   브랜드 색으로 칠한 SVG 마스크를 보여준다. */
#user-nav-item .user_menu_credit .credit_icon,
.page_wrapper .credit_icon {
  flex: none;
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--brand-700, #00438F);
  color: transparent;
  font-size: 0;
  line-height: 0;
  vertical-align: middle;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M13 5v2M13 17v2M13 11v2'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M13 5v2M13 17v2M13 11v2'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 제목 줄: 아이콘 · 제목 · 보조문구를 한 줄 가운데 정렬 */
.page_wrapper .credit-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 20px;
  color: var(--fg-strong, #12161B);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.4;
}
.page_wrapper .credit-title > * { margin: 0; }
.page_wrapper .credit-title h6 { font-size: 18px; font-weight: 700; }
.page_wrapper .credit-title .credit-period {
  width: auto;
  margin: 0;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
/* 계정 요약의 '분석권: 0' 은 오른쪽 정렬 */
.page_wrapper .account-container .credit-title { justify-content: flex-end; margin-bottom: 12px; font-size: 16px; }
.page_wrapper .account-container .current_user_credit { color: var(--brand-700, #00438F); font-size: 20px; }

@media (max-width: 640px) {
  .page_wrapper .account-container .credit-title { justify-content: flex-start; }
  .page_wrapper .credit-title .credit-period { width: 100%; }
}

/* ---------- 비밀번호 확인/변경, 전화번호 변경: 안내문 + 폼을 한 카드로 ----------
   마크업: .viewport-container > .announcement-container(제목·설명) + .contents-container(폼)
   예전엔 안내문이 카드 밖에 80% 폭으로 떠 있었다. */
.viewport-container:has(> .announcement-container) {
  padding: 36px 32px;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-16, 16px);
}
.viewport-container > .announcement-container {
  width: auto;
  margin: 0 0 24px;
  padding: 0;
  text-align: left;
}
.viewport-container .announcement-title {
  margin: 0 0 8px;
  color: var(--fg-strong, #12161B);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.019em;
}
.viewport-container .announcement-contents {
  margin: 0;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 14px;
  line-height: 1.6;
}
.viewport-container:has(> .announcement-container) > .contents-container {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

/* 폼 요소는 카드 폭을 꽉 채운다 (예전: 입력칸 80%, 좌우 padding 10%) */
.viewport-container .contents-container form { width: 100%; margin: 0; }
.viewport-container .contents-container .input-field {
  width: 100%;
  margin: 0 0 10px;
  padding: 0 44px 0 14px;
}
/* account.css 의 .contents-main-submit-button { width: 80% !important } 를 이기려면 !important */
.viewport-container .contents-container form > .contents-main-submit-button,
.viewport-container .contents-container form > button.contents-main-submit-button {
  width: 100% !important;
  margin: 6px 0 0 !important;
}
/* 비밀번호 보기 아이콘: inline style(right:14%) 을 입력칸 안쪽으로 */
.viewport-container .password-type-button {
  top: 12px !important;
  right: 14px !important;
  color: var(--fg-tertiary, rgba(46, 53, 64, 0.43)) !important;
  cursor: pointer;
}

/* 전화번호 변경: 국가번호 · 번호 · 코드 전송을 같은 높이 한 줄로 */
.viewport-container .phone-container,
.viewport-container .authentication-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.viewport-container .phone-container .input-field,
.viewport-container .authentication-container .input-field { flex: 1; margin: 0; padding: 0 14px; }
.viewport-container .phone-container .dropdown-container { flex: none; width: auto; }
.viewport-container .dropdown-button.countrycode-button {
  width: 72px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 10px;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
  font-size: 15px;
  font-weight: 600;
}
.viewport-container .authentication-button {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-brand, #00438F);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.viewport-container .authentication-button:hover { background: var(--brand-800, #003876); }

/* ---------- 회원 탈퇴 버튼 줄 ---------- */
.profile-contents-container .button-group {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 16px 0 0;
  border: 0;
}
.profile-contents-container .verify_button,
.profile-contents-container .cancel_button { width: auto; }
/* Cancel 링크도 style="color: white" 가 박혀 있다 */
.profile-contents-container .cancel_button a { color: inherit !important; }

@media (max-width: 640px) {
  .viewport-container:has(> .announcement-container) { padding: 28px 20px; }
}

/* ---------- 분석권 충전 화면: 충전 카드 · 필수 동의 · 결제 버튼 ---------- */

/* +10, +50 ... 카드에 티켓 아이콘을 붙여 '무엇을' 충전하는지 보이게 한다.
   아이콘은 프로필 메뉴/제목에서 쓰는 것과 같은 모양. */
.page_wrapper .charge-container .credit_charge_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.page_wrapper .charge-container .credit_charge_icon::after {
  content: "";
  flex: none;
  width: 26px;
  height: 26px;
  transform: rotate(-24deg);   /* 티켓을 비스듬히 눕혀 놓은 모양 */
  background: var(--brand-700, #00438F);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M13 5v2M13 17v2M13 11v2'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M13 5v2M13 17v2M13 11v2'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 필수 동의 줄: 결제수단 카드와 구분되도록 테두리 없는 가벼운 줄로 둔다.
   (결제수단은 '고르는 것', 동의는 '확인하는 것'이라 모양을 달리한다) */
.page_wrapper .charge-container .term_contents {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.page_wrapper .charge-container .term_contents input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand-700, #00438F);
  cursor: pointer;
}
.page_wrapper .charge-container .term_contents label {
  flex: 1;
  margin: 0;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}

/* 동의 전에는 결제 버튼을 회색 비활성으로 보여준다 */
.page_wrapper .charge-container .contents-main-submit-button.checkout-button.disabled,
.page_wrapper .charge-container .contents-main-submit-button.checkout-button:disabled,
.page_wrapper .charge-container .contents-main-submit-button.checkout-button.disabled:hover,
.page_wrapper .charge-container .contents-main-submit-button.checkout-button:disabled:hover {
  background: var(--neutral-200, #E4E7EC);
  color: rgba(46, 53, 64, 0.55);   /* --fg-disabled 는 회색 배경 위에서 너무 흐려 읽기 어렵다 */
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* 사용량 조회의 기간 버튼: 지금 어떤 기간을 보고 있는지 표시가 없어서
   눌러도 아무 일도 안 일어나는 것처럼 보였다. 선택된 것을 채워서 보여준다. */
.page_wrapper .usage_modal .usage-period-button.active,
.page_wrapper .usage_modal .usage-period-button.active:hover {
  border-color: var(--brand-700, #00438F);
  background: var(--brand-700, #00438F);
  color: #FFFFFF;
}

/* ════════════════════════════════════════════════════════════
   UPLOAD — 체성분 분석 CT 업로드 화면
   이 화면만 디자인 시스템에 연결돼 있지 않았다. upload.css 가 body 를
   흰 배경으로 칠하고, 버튼은 Bootstrap 기본색(파랑/초록/빨강)이 뒤섞여
   있었다. 캔버스 + 카드 구조로 맞추고 버튼 위계를 한 벌로 통일한다.
   범위는 #upload-section 이 있는 화면으로 한정한다.
   ════════════════════════════════════════════════════════════ */

body:has(#upload-section) {
  padding-top: 0;
  background: var(--bg-subtle, #F7F8FA);
  font-family: inherit;
}

/* 고정 헤더 아래로 본문을 내리고 폭을 잡는다 */
body:has(#upload-section) > .container {
  max-width: 1160px;
  margin: 0 auto;
  padding: calc(var(--header-h, 68px) + 40px) 16px 96px;
}

/* ───────── 제목 줄 ───────── */
body:has(#upload-section) > .container > .d-flex > h2 {
  margin: 0;
  color: var(--fg-strong, #12161B);
  font-size: 24px !important;
  font-weight: 700;
  letter-spacing: -0.019em;
}
#select-folder-btn.btn {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-brand, #00438F);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
}
#select-folder-btn.btn:hover { background: var(--brand-800, #003876); }

/* ───────── 업로드 카드 ───────── */
#upload-section {
  padding: 24px;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-16, 16px);
}

/* 드롭존: 파란 점선 + 200px 고정 높이 → 차분한 표면으로 */
#upload-section #dropzone {
  height: auto;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  line-height: 1.6;
  text-align: center;
  border: 1.5px dashed var(--border-strong, rgba(78, 86, 101, 0.35));
  border-radius: var(--radius-12, 12px);
  background: var(--bg-subtle, #F7F8FA);
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 15px;
  font-weight: 500;
}
#upload-section #dropzone:hover,
#upload-section #dropzone.dragover {
  border-color: var(--brand-700, #00438F);
  background: var(--brand-50, #EBF3FC);
  color: var(--brand-700, #00438F);
}

/* ───────── 동작 버튼 줄 ─────────
   Bootstrap 기본색을 걷어내고 위계를 셋으로 줄인다.
   주요 동작(분석) = 브랜드 채움 / 보조 = 흰 아웃라인 / 파괴적 = 빨간 글씨 */
#upload-section > .btn,
#upload-section > .btn-like-select {
  height: 38px;
  margin: 16px 8px 0 0;
  padding: 0 14px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 8px;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
  font-size: 14px;
  font-weight: 600;
  vertical-align: top;
  transition: background-color 120ms ease, border-color 120ms ease;
}
#upload-section > .btn:hover,
#upload-section > .btn-like-select:hover {
  background: var(--bg-muted, #F2F4F7);
  border-color: var(--border-strong, rgba(78, 86, 101, 0.35));
  color: var(--fg-strong, #12161B);
}

/* select 는 화살표를 직접 그려 준다(브라우저 기본 화살표 제거) */
#upload-section > .btn-like-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%234E5665'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* 주요 동작 */
#upload-section > #inference-btn.btn {
  border-color: var(--bg-brand, #00438F);
  background: var(--bg-brand, #00438F);
  color: #FFFFFF;
}
#upload-section > #inference-btn.btn:hover {
  border-color: var(--brand-800, #003876);
  background: var(--brand-800, #003876);
  color: #FFFFFF;
}

/* 파괴적 동작 */
#upload-section > #delete-btn.btn,
#upload-section > #delete-failed-btn.btn { color: var(--danger-600, #C62828); }
#upload-section > #delete-btn.btn:hover,
#upload-section > #delete-failed-btn.btn:hover {
  border-color: var(--danger-600, #C62828);
  background: #FDF3F3;
  color: var(--danger-600, #C62828);
}

/* ───────── 시리즈 목록 카드 ───────── */
#series-list {
  margin-top: 24px !important;
  padding: 24px;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-16, 16px);
}
#series-list > h4 {
  margin: 0 0 16px;
  color: var(--fg-strong, #12161B);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

#series-list > .table { margin: 0; }
#series-list > .table thead th {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  background: none;
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
#series-list > .table tbody td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08));
  color: var(--fg-primary, #2E3540);
  font-size: 14px;
  vertical-align: middle;
}
#series-list > .table tbody tr:hover { background: var(--bg-subtle, #F7F8FA); }
#series-list .sortable { cursor: pointer; }
#series-list .sort-icon { color: var(--fg-tertiary, rgba(46, 53, 64, 0.43)); font-size: 11px; }

/* 페이지 번호 */
#series-pagination button {
  min-width: 32px;
  height: 32px;
  margin: 0 3px;
  padding: 0 8px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 8px;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-primary, #2E3540);
  font-size: 13px;
  font-weight: 600;
}
#series-pagination button:hover:not(:disabled) { background: var(--bg-muted, #F2F4F7); }
#series-pagination button:disabled { color: var(--fg-disabled, rgba(46, 53, 64, 0.28)); cursor: not-allowed; }

/* ───────── 저장된 시리즈 모달 ───────── */
body:has(#upload-section) .modal-content-large {
  padding: 28px;
  border-radius: var(--radius-16, 16px);
  background: var(--bg-surface, #FFFFFF);
}
body:has(#upload-section) .modal-content-large > h5 {
  margin: 0 0 16px;
  color: var(--fg-strong, #12161B);
  font-size: 18px;
  font-weight: 700;
}
body:has(#upload-section) .modal-content-large .table thead th {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
body:has(#upload-section) .modal-content-large .table tbody td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle, rgba(78, 86, 101, 0.08));
  font-size: 14px;
  vertical-align: middle;
}
body:has(#upload-section) .modal-content-large .btn {
  height: 38px;
  margin: 0 4px;
  padding: 0 14px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 8px;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
  font-size: 14px;
  font-weight: 600;
}
body:has(#upload-section) .modal-content-large .btn:hover {
  background: var(--bg-muted, #F2F4F7);
  border-color: var(--border-strong, rgba(78, 86, 101, 0.35));
}
body:has(#upload-section) .modal-content-large #delete-saved-btn { color: var(--danger-600, #C62828); }
body:has(#upload-section) .modal-content-large #download-result-excel-btn {
  border-color: var(--bg-brand, #00438F);
  background: var(--bg-brand, #00438F);
  color: #FFFFFF;
}

@media (max-width: 640px) {
  body:has(#upload-section) > .container { padding: calc(var(--header-h, 68px) + 24px) 16px 64px; }
  #upload-section { padding: 20px 16px; }
  #series-list { padding: 20px 16px; overflow-x: auto; }
  body:has(#upload-section) > .container > .d-flex { flex-wrap: wrap; gap: 12px; }
}

/* ───────── 아이콘 · 상태 배지 · 진행 표시 ─────────
   버튼 글자 앞에 붙어 있던 이모지(🗑️ 💾 ❌ 📋 …)를 걷어내고,
   같은 자리에 브랜드 색으로 칠한 SVG 마스크 아이콘을 붙인다.
   문구는 static/lang/*.json 에서 이모지를 뺐다. */

#upload-section > .btn::before,
#select-folder-btn.btn::before,
#series-list > h4::before,
body:has(#upload-section) .modal-content-large .btn::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
}
#upload-section > .btn,
#select-folder-btn.btn,
body:has(#upload-section) .modal-content-large .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#series-list > h4 { display: flex; align-items: center; }
#series-list > h4::before { width: 18px; height: 18px; color: var(--brand-700, #00438F); }

/* 아이콘이 필요 없는 버튼 */
#upload-section > #gotoviewer-btn.btn::before,
body:has(#upload-section) .modal-content-large #select-saved-all-btn::before,
body:has(#upload-section) .modal-content-large #close-saved-modal-btn::before { content: none; }

/* lucide: folder */
#select-folder-btn.btn::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E");
}

/* lucide: sparkles — 분석 */
#upload-section > #inference-btn.btn::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3Z'/%3E%3C/svg%3E");
}

/* lucide: trash-2 — 선택 삭제 */
#upload-section > #delete-btn.btn::before,
body:has(#upload-section) .modal-content-large #delete-saved-btn::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E");
}

/* lucide: archive — 완료된 데이터 보기 */
#upload-section > #view-saved-btn.btn::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='5' x='2' y='3' rx='1'/%3E%3Cpath d='M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8M10 12h4'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='5' x='2' y='3' rx='1'/%3E%3Cpath d='M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8M10 12h4'/%3E%3C/svg%3E");
}

/* lucide: circle-x — 유효하지 않은 데이터 삭제 */
#upload-section > #delete-failed-btn.btn::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E");
}

/* lucide: list — 업로드된 시리즈 */
#series-list > h4::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E");
}

/* lucide: rotate-ccw — 되돌리기 */
body:has(#upload-section) .modal-content-large #revert-saved-btn::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
}

/* lucide: download — 결과 엑셀 */
body:has(#upload-section) .modal-content-large #download-result-excel-btn::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E");
}

/* 드롭존 아이콘 (upload-cloud) */
#upload-section #dropzone::before {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 13v8M8 17l4-4 4 4'/%3E%3Cpath d='M20.9 18.4A5 5 0 0 0 18 9h-1.3A8 8 0 1 0 4 16.7'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 13v8M8 17l4-4 4 4'/%3E%3Cpath d='M20.9 18.4A5 5 0 0 0 18 9h-1.3A8 8 0 1 0 4 16.7'/%3E%3C/svg%3E") no-repeat center / contain;
}
#upload-section #dropzone { flex-direction: column; }

/* ───────── 상태 배지 ─────────
   ✅ ❌ ⏳ 이모지를 대신한다. 색만으로 구분하지 않도록 글자를 함께 둔다. */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}
.status-pill.is-done    { background: #E8F4EC; color: #1B7F4B; }
.status-pill.is-fail    { background: #FDECEC; color: #C62828; }
.status-pill.is-confirm { background: var(--brand-50, #EBF3FC); color: var(--brand-700, #00438F); }
.status-pill.is-wait    { background: var(--bg-muted, #F2F4F7); color: var(--fg-secondary, rgba(46, 53, 64, 0.72)); }

/* 대기 중 표시 점.
   줄마다 따로 깜빡이면 목록 전체가 어지러워 깜빡임은 뺐다.
   (예전: animation: iaid-pulse-dot 1.4s ease-in-out infinite) */
.status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

/* ───────── 추론/업로드 진행 표시 ─────────
   외부 애니메이션 라이브러리 없이 CSS 로만 만든다.
   CT 한 장을 위아래로 훑는 모양. */
.infer-scan {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 4px auto 14px;
  border: 1.5px solid var(--brand-200, #A8C8EC);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 45%, rgba(0, 104, 183, 0.18) 0%, rgba(0, 104, 183, 0) 62%),
    var(--brand-50, #EBF3FC);
  overflow: hidden;
}
.infer-scan::after {
  /* 가운데 놓인 단면 실루엣 */
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px solid var(--brand-300, #6FA3DC);
  border-radius: 50%;
}
.infer-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(0, 67, 143, 0) 0%,
    var(--brand-500, #0068B7) 20%,
    var(--sky, #52C3F1) 50%,
    var(--brand-500, #0068B7) 80%,
    rgba(0, 67, 143, 0) 100%);
  box-shadow: 0 0 10px 2px rgba(82, 195, 241, 0.55);
  animation: iaid-scan 1.7s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes iaid-scan {
  0%   { transform: translateY(4px);  opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(62px); opacity: 0; }
}

/* 모션 최소화 설정을 존중한다 */
@media (prefers-reduced-motion: reduce) {
  .infer-scan-line { animation: none; top: 33px; opacity: 1; }
}

/* 진행 모달 자체도 카드 톤으로 */
body:has(#upload-section) #loading-modal {
  padding: 28px 32px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: var(--radius-16, 16px);
  /* 두 번째 그림자가 뒷배경을 덮는다. 업로드·추론 중에는 취소 버튼 말고는
     아무것도 눌리지 않는데, 배경이 멀쩡해 보여서 표를 눌러보게 만들었다.
     완료 데이터 모달(.modal-overlay)은 이미 뒤를 어둡게 하고 있어 이쪽만 예외였다.

     모달이 transform 으로 가운데 정렬돼 있어 ::before 에 position:fixed 를 줘도
     뷰포트가 아니라 모달이 기준이 된다. 그래서 레이아웃에 영향이 없는
     그림자 확산으로 화면 전체를 덮는다.
     0.3 : .modal-overlay(0.5)보다 옅게. 업로드는 몇 분씩 이어진다.
     blur 는 쓰지 않는다. 추론 모달은 1초마다 갱신돼 매번 화면 전체를 다시 그린다. */
  box-shadow: 0 12px 32px rgba(18, 22, 27, 0.14),
              0 0 0 100vmax rgba(15, 23, 42, 0.3);
}
body:has(#upload-section) #loading-modal #modal-message {
  margin: 0;
  color: var(--fg-strong, #12161B);
  font-size: 15px;
  font-weight: 600;
}
body:has(#upload-section) #loading-modal .modal-content { flex-direction: column; }
body:has(#upload-section) #loading-modal .btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-default, rgba(78, 86, 101, 0.22));
  border-radius: 8px;
  background: var(--bg-surface, #FFFFFF);
  color: var(--fg-strong, #12161B);
  font-size: 14px;
  font-weight: 600;
}
body:has(#upload-section) #loading-modal .btn:hover { background: var(--bg-muted, #F2F4F7); }

/* Bootstrap 의 .modal-content 가 카드 모양을 갖고 있어 진행 모달이
   카드 안에 카드로 겹쳐 보였다. 안쪽은 투명하게 두고 바깥만 카드로 쓴다. */
body:has(#upload-section) #loading-modal { min-width: 320px; }
body:has(#upload-section) #loading-modal > .modal-content {
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  gap: 0;
}
body:has(#upload-section) #loading-modal #modal-message { white-space: nowrap; }

/* 진행 모달 내용 가운데 정렬 (min-width 만으로는 내용이 왼쪽으로 치우쳤다) */
body:has(#upload-section) #loading-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
  min-width: 0;
}
body:has(#upload-section) #loading-modal > .modal-content {
  width: 100%;
  align-items: center;
}

/* 진행 모달이 320px 로 좁아 답답했다. 여유를 준다. */
body:has(#upload-section) #loading-modal {
  /* 배지 3개가 한 줄에 들어가야 한다(약 334px + 좌우 여백).
     폭이 모자라면 두 줄로 밀리거나 가로 스크롤이 생긴다. */
  width: 460px;
  max-width: calc(100vw - 32px);
  padding: 36px;
}
body:has(#upload-section) #loading-modal #modal-message {
  /* upload.css 의 `animation: pulse 1.5s infinite` 가 문구 전체를
     흐려졌다 진해졌다 하게 만들고 있었다(제목·막대·배지가 통째로 숨 쉼). */
  animation: none;
  /* 가운데 정렬 때문에 내용 폭으로 줄어들어 진행 막대가 좁아 보였다 */
  width: 100%;
  font-size: 15px;
  line-height: 1.5;
}
body:has(#upload-section) #loading-modal .modal-content > .mt-3 { margin-top: 20px !important; }
body:has(#upload-section) .infer-scan {
  width: 88px;
  height: 88px;
  margin: 2px auto 18px;
  border-radius: 18px;
}
body:has(#upload-section) .infer-scan::after { inset: 21px; }
@keyframes iaid-scan {
  0%   { transform: translateY(4px);  opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(82px); opacity: 0; }
}

/* 저장된 시리즈 모달: width:90% 라 큰 화면에서 지나치게 넓어진다 */
body:has(#upload-section) .modal-content-large {
  width: min(90%, 1040px);
  max-height: 86vh;
}

/* 폭이 넉넉해졌으니 긴 문구는 줄바꿈되게 둔다 (nowrap 이면 넘칠 수 있다) */
body:has(#upload-section) #loading-modal #modal-message { white-space: normal; }

/* ───────── 분석 진행 표시 ─────────
   숫자를 한 줄에 몰아넣어 읽기 어려웠다.
   제목 · 진행 막대 · 상태 배지 세 덩어리로 나눈다. */
body:has(#upload-section) #loading-modal .infer-title {
  display: block;
  color: var(--fg-strong, #12161B);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.014em;
}

body:has(#upload-section) #loading-modal .infer-bar {
  display: block;
  height: 8px;
  margin: 18px 0 16px;
  border-radius: 999px;
  background: var(--bg-muted, #F2F4F7);
  overflow: hidden;
}
body:has(#upload-section) #loading-modal .infer-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-700, #00438F), var(--brand-500, #0068B7));
  transition: width 300ms ease;
}

body:has(#upload-section) #loading-modal .infer-counts {
  display: flex;
  flex-wrap: wrap;    /* 숫자가 커져 배지가 길어져도 가로로 넘치지 않게 */
  justify-content: center;
  gap: 8px;
  margin-top: 16px;   /* 분석 모달에는 진행 막대가 없으므로 여기서 간격을 준다 */
}
body:has(#upload-section) #loading-modal.is-upload .infer-counts { margin-top: 0; }
body:has(#upload-section) #loading-modal .infer-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-muted, #F2F4F7);
  color: var(--fg-secondary, rgba(46, 53, 64, 0.72));
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
/* 색만으로 구분하지 않도록 글자를 함께 둔다. 아이콘은 보조 신호.
   이모지가 아니라 마스크로 칠하므로 배지 색을 그대로 따라간다. */
body:has(#upload-section) #loading-modal .infer-chip::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
}
/* 완료 — 체크 */
body:has(#upload-section) #loading-modal .infer-chip.is-done::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
/* 진행 — 뇌 */
body:has(#upload-section) #loading-modal .infer-chip.is-run::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M11.25 3.2a3 3 0 0 0-4.6 1.5 3 3 0 0 0-2.4 4.1 3 3 0 0 0-.3 4.5 3 3 0 0 0 2 4.3 3 3 0 0 0 5.3 1.3Z'/%3E%3Cpath d='M12.75 3.2a3 3 0 0 1 4.6 1.5 3 3 0 0 1 2.4 4.1 3 3 0 0 1 .3 4.5 3 3 0 0 1-2 4.3 3 3 0 0 1-5.3 1.3Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M11.25 3.2a3 3 0 0 0-4.6 1.5 3 3 0 0 0-2.4 4.1 3 3 0 0 0-.3 4.5 3 3 0 0 0 2 4.3 3 3 0 0 0 5.3 1.3Z'/%3E%3Cpath d='M12.75 3.2a3 3 0 0 1 4.6 1.5 3 3 0 0 1 2.4 4.1 3 3 0 0 1 .3 4.5 3 3 0 0 1-2 4.3 3 3 0 0 1-5.3 1.3Z'/%3E%3C/svg%3E");
}
/* 업로드 배지에는 아이콘을 두지 않는다(제목 옆으로 옮겼다).
   공통 ::before 가 마스크 없이 남으면 네모로 보이므로 아예 끈다. */
body:has(#upload-section) #loading-modal .infer-chip.is-upload::before { content: none; }

/* 업로드 — 제출(위로 올리기). 제목 왼쪽에 둔다 */
body:has(#upload-section) #loading-modal.is-upload .infer-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
body:has(#upload-section) #loading-modal.is-upload .infer-title::before {
  content: "";
  flex: none;
  width: 19px;
  height: 19px;
  background: var(--brand-700, #00438F);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  -webkit-mask-size: contain;     mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E");
}

/* 실패 — X */
body:has(#upload-section) #loading-modal .infer-chip.is-fail::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}
body:has(#upload-section) #loading-modal .infer-chip b {
  /* 크기는 같게 두고 굵기로만 구분한다 (크기까지 다르면 들쭉날쭉해 보인다) */
  color: inherit;
  font-size: inherit;
  font-weight: 800;
}
body:has(#upload-section) #loading-modal .infer-chip.is-done { background: #E8F4EC; color: #1B7F4B; }
body:has(#upload-section) #loading-modal .infer-chip.is-run  { background: var(--brand-50, #EBF3FC); color: var(--brand-700, #00438F); }
/* 움직이는 것은 '지금 돌아가는 중' 배지의 뇌 아이콘 하나뿐이다.
   배지 전체나 막대까지 깜빡이면 시선이 분산된다. */
body:has(#upload-section) #loading-modal .infer-chip.is-run::before {
  animation: iaid-brain-blink 1.4s ease-in-out infinite;
}
@keyframes iaid-brain-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* done/failed 는 개수가 늘어난 순간에만 잠깐 진하게 찼다가 돌아온다 */
body:has(#upload-section) #loading-modal .infer-chip.is-done.is-bump {
  animation: iaid-bump-done 900ms ease-out;
}
@keyframes iaid-bump-done {
  0%, 45%  { background: #1B7F4B; color: #FFFFFF; }
  100%     { background: #E8F4EC; color: #1B7F4B; }
}
body:has(#upload-section) #loading-modal .infer-chip.is-fail.is-bump {
  animation: iaid-bump-fail 900ms ease-out;
}
@keyframes iaid-bump-fail {
  0%, 45%  { background: #C62828; color: #FFFFFF; }
  100%     { background: #FDECEC; color: #C62828; }
}
body:has(#upload-section) #loading-modal .infer-chip.is-fail { background: #FDECEC; color: #C62828; }
body:has(#upload-section) #loading-modal .infer-chip.is-upload { background: var(--brand-50, #EBF3FC); color: var(--brand-700, #00438F); }
/* 실패가 0 이면 굳이 빨갛게 둘 이유가 없다 */
body:has(#upload-section) #loading-modal .infer-chip.is-zero {
  background: var(--bg-muted, #F2F4F7);
  color: var(--fg-tertiary, rgba(46, 53, 64, 0.43));
}

@media (prefers-reduced-motion: reduce) {
  body:has(#upload-section) #loading-modal .infer-bar i { transition: none; }
  body:has(#upload-section) #loading-modal .infer-chip.is-run::before,
  body:has(#upload-section) #loading-modal .infer-chip.is-bump { animation: none; }
}
/* 제목 줄은 단어 중간에서 끊기지 않게 */
body:has(#upload-section) #loading-modal #modal-message {
  word-break: keep-all;
  text-wrap: balance;
}

/* 업로드 중에는 스캔 모션을 감춘다. 업로드는 영상을 훑는 작업이 아니다. */
body:has(#upload-section) #loading-modal.is-upload .infer-scan { display: none; }
body:has(#upload-section) #loading-modal.is-upload .infer-title { margin-top: 4px; }

/* 업로드 막대는 깜빡이지 않는다. 길이가 늘어나는 것만으로 충분하다.
   (예전: animation: iaid-bar-breathe 1.5s ease-in-out infinite) */

/* 도는 표시 — 서버 처리 대기처럼 진행률을 알 수 없는 구간에 쓴다 */
body:has(#upload-section) #loading-modal .infer-spinner {
  display: block;
  width: 38px;
  height: 38px;
  margin: 2px auto 16px;
  border: 3px solid var(--brand-100, #D6E6F8);
  border-top-color: var(--brand-700, #00438F);
  border-radius: 50%;
  animation: iaid-spin 800ms linear infinite;
}
@keyframes iaid-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  body:has(#upload-section) #loading-modal .infer-spinner { animation-duration: 2.4s; }
}

/* 진행률을 알 수 없는 중간 단계: 스캔 모션만 끄고 도는 표시를 쓴다 */
body:has(#upload-section) #loading-modal.is-busy .infer-scan { display: none; }
