/* Narrow, verified fixes layered after the preserved production stylesheets. */
/* 공고 요약 지표는 숫자와 갱신 시각이 한눈에 들어오도록 크기 위계를 강화한다. */
body.notice-page:not(.notice-detail-page) .hero-metrics {
  width: 100%;
  gap: 12px;
}

body.notice-page:not(.notice-detail-page) .notice-stat-card {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
}

body.notice-page:not(.notice-detail-page) .stat-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(11, 91, 211, .08);
}

body.notice-page:not(.notice-detail-page) .stat-icon.megaphone {
  box-shadow: inset 0 0 0 1px rgba(15, 135, 73, .1);
}

body.notice-page:not(.notice-detail-page) .stat-icon.clock {
  box-shadow: inset 0 0 0 1px rgba(230, 95, 43, .11);
}

body.notice-page:not(.notice-detail-page) .stat-icon.update {
  box-shadow: inset 0 0 0 1px rgba(114, 76, 183, .1);
}

body.notice-page:not(.notice-detail-page) .stat-icon svg {
  width: 26px;
  height: 26px;
}

body.notice-page:not(.notice-detail-page) .stat-copy {
  grid-template-rows: 18px 38px;
  gap: 5px;
}

body.notice-page:not(.notice-detail-page) .stat-copy > span {
  color: #334155;
  font-size: 14.5px;
  line-height: 18px;
  letter-spacing: -.01em;
}

body.notice-page:not(.notice-detail-page) .stat-copy strong {
  height: 38px;
  font-size: 32px;
  line-height: 38px;
  letter-spacing: -.025em;
}

body.notice-page:not(.notice-detail-page) .stat-copy strong em {
  font-size: .48em;
  letter-spacing: 0;
}

body.notice-page:not(.notice-detail-page) .stat-copy strong.stat-timestamp {
  height: 38px;
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: .01em;
}

@media (min-width: 1181px) {
  body.notice-page:not(.notice-detail-page) .notice-hero {
    grid-template-columns: minmax(0, 1fr) minmax(720px, 840px);
    gap: 24px;
  }

  body.notice-page:not(.notice-detail-page) .hero-metrics {
    max-width: 840px;
  }
}

/* 1400px 이상에서는 제목·검색창·추천 검색어와 통계 카드의 좌우 균형을 맞춘다. */
@media (min-width: 1400px) {
  body.notice-page:not(.notice-detail-page) .notice-hero {
    grid-template-columns: minmax(0, 1fr) 820px;
    gap: 18px;
  }

  body.notice-page:not(.notice-detail-page) .hero-copy {
    min-width: 0;
  }

  body.notice-page:not(.notice-detail-page) .hero-metrics {
    max-width: 820px;
    align-self: start;
  }

  body.notice-page:not(.notice-detail-page) .popular-searches {
    width: min(590px, 100%);
    margin-top: 10px;
    padding-bottom: 0;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
  }

  body.notice-page:not(.notice-detail-page) .popular-searches > span {
    flex: 0 0 auto;
    line-height: 30px;
    white-space: nowrap;
  }

  body.notice-page:not(.notice-detail-page) .popular-searches button {
    height: 30px;
    flex: 0 0 auto;
    padding: 0 13px;
    font-size: 13px;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  body.notice-page:not(.notice-detail-page) .hero-metrics {
    gap: 10px;
  }

  body.notice-page:not(.notice-detail-page) .notice-stat-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  body.notice-page:not(.notice-detail-page) .stat-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
  }

  body.notice-page:not(.notice-detail-page) .stat-icon svg {
    width: 24px;
    height: 24px;
  }

  body.notice-page:not(.notice-detail-page) .stat-copy {
    grid-template-rows: 16px 32px;
    gap: 5px;
  }

  body.notice-page:not(.notice-detail-page) .stat-copy > span {
    font-size: 12.5px;
    line-height: 16px;
  }

  body.notice-page:not(.notice-detail-page) .stat-copy strong {
    height: 32px;
    font-size: 26px;
    line-height: 32px;
  }

  body.notice-page:not(.notice-detail-page) .stat-copy strong.stat-timestamp {
    height: 32px;
    font-size: 13.5px;
    line-height: 1.12;
  }
}

@media (max-width: 380px) {
  body.notice-page:not(.notice-detail-page) .notice-stat-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding-inline: 10px;
  }

  body.notice-page:not(.notice-detail-page) .stat-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  body.notice-page:not(.notice-detail-page) .stat-copy > span {
    font-size: 11.5px;
  }

  body.notice-page:not(.notice-detail-page) .stat-copy strong {
    font-size: 24px;
  }

  body.notice-page:not(.notice-detail-page) .stat-copy strong.stat-timestamp {
    font-size: 12px;
  }
}

/* 회원가입 필수 항목은 라벨 바로 옆의 붉은 별표로 구분한다. */
body.notice-page.register-page .register-required-mark {
  display: inline;
  margin-left: 3px;
  color: #dc2626;
  font-size: 1.08em;
  font-weight: 950;
  line-height: 1;
  vertical-align: .04em;
}

body.notice-page.register-page .register-field-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

body.notice-page.register-page .register-username-availability {
  color: #dc2626;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

body.notice-page.register-page .register-username-availability.is-available {
  color: #15803d;
}

/* 빠른 분류의 파란 선택 배경은 하나의 인디케이터가 탭 사이를 이동한다. */
body.notice-page:not(.notice-detail-page) .notice-category-rail {
  position: relative;
  isolation: isolate;
}

body.notice-page:not(.notice-detail-page) .notice-category-rail::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: var(--category-indicator-width, 0);
  height: var(--category-indicator-height, 0);
  border-radius: 8px;
  background: var(--ref-blue, #0b5bd3);
  box-shadow: 0 8px 18px rgba(11, 91, 211, .22);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(
    var(--category-indicator-x, 0),
    var(--category-indicator-y, 0),
    0
  );
  transition:
    transform .38s cubic-bezier(.22, 1, .36, 1),
    width .38s cubic-bezier(.22, 1, .36, 1),
    height .38s cubic-bezier(.22, 1, .36, 1),
    opacity .14s ease;
  will-change: transform, width, height;
}

body.notice-page:not(.notice-detail-page) .notice-category-rail.has-sliding-indicator::before {
  opacity: 1;
}

body.notice-page:not(.notice-detail-page) .notice-category-rail.category-indicator-initializing::before {
  transition: none;
}

body.notice-page:not(.notice-detail-page) .notice-category-rail .category-tab {
  position: relative;
  z-index: 1;
  transition: color .18s ease, border-color .18s ease;
}

body.notice-page:not(.notice-detail-page) .notice-category-rail.has-sliding-indicator .category-tab.active {
  border-color: transparent;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  body.notice-page:not(.notice-detail-page) .notice-category-rail::before,
  body.notice-page:not(.notice-detail-page) .notice-category-rail .category-tab {
    transition: none;
  }
}

.favorite-button.is-pending,
.detail-interest-button.is-pending,
.company-recommendation-bookmark.is-pending {
  cursor: wait;
  opacity: .72;
}

/* 상단에는 이름만 선명하게 두고 플랜은 테두리·점 색상과 접근성 안내로 구분한다. */
body.notice-page .header-auth-controls {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.notice-page .header-auth-controls .auth-user-badge {
  --plan-accent: #94a3b8;
  --plan-soft: #f8fafc;
  --plan-avatar-bg: #e8edf3;
  --plan-avatar-fg: #526176;
  position: relative;
  box-sizing: border-box;
  width: auto;
  max-width: 190px;
  height: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 6px;
  border: 1.5px solid var(--plan-accent);
  border-radius: 12px;
  background: var(--plan-soft);
  color: #1c2c44;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 1px 2px rgba(34, 54, 84, .06);
  cursor: pointer;
  overflow: visible;
}

body.notice-page .header-auth-controls .auth-user-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--plan-avatar-bg);
  color: var(--plan-avatar-fg);
  font-size: 12px;
  font-weight: 900;
}

body.notice-page .header-auth-controls .auth-user-name {
  min-width: 0;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.notice-page .header-auth-controls .auth-plan-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--plan-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--plan-accent) 16%, transparent);
}

body.notice-page .header-auth-controls .auth-user-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  color: #7a8799;
}

body.notice-page .header-account-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  padding: 7px;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(18, 39, 68, .18);
}

body.notice-page .header-account-menu[hidden] {
  display: none;
}

body.notice-page .header-account-summary {
  display: grid;
  gap: 2px;
  padding: 8px 9px 10px;
  border-bottom: 1px solid #e7edf5;
  margin-bottom: 5px;
}

body.notice-page .header-account-summary strong {
  overflow: hidden;
  color: #1f304a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.notice-page .header-account-summary span {
  color: #768398;
  font-size: 11px;
  font-weight: 750;
}

body.notice-page .header-account-menu .header-account-menu-item,
body.notice-page .header-auth-controls .notice-login.auth-logout.header-account-menu-item {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #33445f;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

body.notice-page .header-account-menu .header-account-menu-item:hover,
body.notice-page .header-account-menu .header-account-menu-item:focus-visible,
body.notice-page .header-auth-controls .notice-login.auth-logout.header-account-menu-item:hover,
body.notice-page .header-auth-controls .notice-login.auth-logout.header-account-menu-item:focus-visible {
  background: #eef4fc;
  color: #1359ba;
  outline: 0;
}

body.notice-page .header-auth-controls .notice-login.auth-logout.header-account-menu-item {
  margin-top: 4px;
  border-top: 1px solid #edf1f6;
  border-radius: 0 0 8px 8px;
  color: #9e283a;
}

body.notice-page .header-auth-controls .auth-user-badge.is-premium {
  --plan-accent: #2f73d9;
  --plan-soft: #f7faff;
  --plan-avatar-bg: #e7f0ff;
  --plan-avatar-fg: #1558c9;
}

body.notice-page .header-auth-controls .auth-user-badge.is-business {
  --plan-accent: #c49a3b;
  --plan-soft: #fffdf8;
  --plan-avatar-bg: #22314a;
  --plan-avatar-fg: #f6d98c;
}

body.notice-page .header-auth-controls .auth-user-badge:hover {
  border-color: #7da6dc;
  background: #f1f7ff;
}

body.notice-page .header-auth-controls .auth-user-badge:focus-visible {
  outline: 3px solid rgba(11, 91, 211, .2);
  outline-offset: 2px;
}

body.notice-page .header-auth-controls .notice-login.auth-logout {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7a8799;
  box-shadow: none;
}

body.notice-page .header-auth-controls .notice-login.auth-logout svg {
  width: 18px;
  height: 18px;
}

body.notice-page .header-auth-controls .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.notice-page .header-auth-controls .notice-login.auth-logout:hover {
  background: #f1f5f9;
  color: #425168;
}

@media (max-width: 480px) {
  body.notice-page .header-auth-controls {
    gap: 4px;
  }

  body.notice-page .header-auth-controls .auth-user-badge {
    width: 40px;
    max-width: 40px;
    padding: 0 5px;
    justify-content: center;
  }

  body.notice-page .header-auth-controls .auth-user-name,
  body.notice-page .header-auth-controls .auth-user-chevron {
    display: none;
  }

  body.notice-page .header-auth-controls .auth-plan-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
  }

  body.notice-page .header-auth-controls .notice-login.auth-logout {
    width: 32px;
  }
}

body.notice-page .account-plan-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #f7faff;
}

body.notice-page .account-plan-summary span {
  color: #718096;
  font-size: 12px;
  font-weight: 750;
}

body.notice-page .account-plan-summary strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: #183d73;
  font-size: 14px;
}

body.notice-page .account-plan-summary a {
  color: #1766cc;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

/* 모바일에서도 계정·알림을 숨기지 않고 로고 오른쪽의 아이콘 묶음으로 유지한다. */
@media (max-width: 760px) {
  body.notice-page:not(.register-page) .notice-header {
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    overflow: visible;
  }

  body.notice-page:not(.register-page) .notice-brand {
    width: auto;
    min-width: 0;
    justify-self: start;
  }

  body.notice-page:not(.register-page) .brand-copy small,
  body.notice-page:not(.register-page) .notice-nav {
    display: none;
  }

  body.notice-page:not(.register-page) .notice-actions {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
    display: flex;
    justify-self: end;
    justify-content: flex-end;
    gap: 4px;
  }

  body.notice-page:not(.register-page) .notice-bell {
    width: 34px;
    height: 34px;
  }
}

/* FAQ 도움말 센터는 별도 내부 스크롤 없이 문서 흐름을 그대로 사용한다. */
body.faq-page .faq-item,
body.faq-page .faq-q-card {
  scroll-margin-block: 12px;
}

body.faq-page .faq-answer,
body.faq-page .faq-q-text,
body.faq-page .faq-q-answer,
body.faq-page .faq-inquiry-guide {
  overflow-wrap: anywhere;
}

/* 공고 목록과 상세 페이지가 같은 공통 헤더를 사용하므로 표시 규격도 같아야 한다.
   notices_ref.css의 과거 상세 전용 규칙이 로고 문구·메뉴·사용자 영역을 다시 바꾸는
   문제를 마지막 레이어에서 교정한다. */
body.notice-page.notice-detail-page .notice-header {
  height: 78px;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 30px;
}

body.notice-page.notice-detail-page .notice-brand {
  width: auto;
  min-width: 0;
  align-self: center;
  gap: 10px;
}

body.notice-page.notice-detail-page .brand-copy {
  display: block;
  min-width: 0;
}

body.notice-page.notice-detail-page .brand-copy small {
  display: block;
}

body.notice-page.notice-detail-page .notice-nav {
  height: 78px;
  gap: 48px;
}

body.notice-page.notice-detail-page .notice-nav a {
  height: 78px;
}

body.notice-page.notice-detail-page .notice-actions {
  min-width: 210px;
  align-self: center;
  gap: 12px;
}

body.notice-page.notice-detail-page .notice-bell {
  width: 38px;
  height: 44px;
}

@media (max-width: 980px) {
  body.notice-page.notice-detail-page .notice-header {
    height: 66px;
    min-height: 66px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 18px;
    padding: 0 28px;
  }

  body.notice-page.notice-detail-page .notice-nav {
    display: none;
  }

  body.notice-page.notice-detail-page .brand-copy strong {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
  }

  body.notice-page.notice-detail-page .brand-copy small {
    font-size: 12px;
    font-weight: 700;
  }

  body.notice-page.notice-detail-page .notice-actions {
    width: auto;
    min-width: 210px;
    height: 40px;
    margin-left: auto;
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  body.notice-page.notice-detail-page .notice-header {
    height: 66px;
    min-height: 66px;
    overflow: hidden;
    padding: 0 12px;
  }

  body.notice-page.notice-detail-page .notice-brand {
    width: auto;
    height: 48px;
  }

  body.notice-page.notice-detail-page .gov-emblem {
    display: block !important;
  }

  body.notice-page.notice-detail-page .brand-copy {
    display: block;
  }

  body.notice-page.notice-detail-page .brand-copy strong {
    font-size: 24px;
    line-height: 1;
  }

  body.notice-page.notice-detail-page .brand-copy small,
  body.notice-page.notice-detail-page .notice-actions {
    display: none;
  }
}

.company-recommendation-confirmation.is-mismatch {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.company-recommendation-confirmation.is-mismatch strong {
  color: #b91c1c;
}

.company-recommendation-feedback {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.company-recommendation-feedback span {
  margin-right: 2px;
  font-weight: 800;
}

.company-recommendation-feedback button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.company-recommendation-feedback button.active {
  border-color: #0b5bd3;
  background: #eaf2ff;
  color: #0b5bd3;
}

.company-recommendation-feedback button:disabled {
  cursor: wait;
  opacity: .65;
}

.company-quality-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #0b5bd3;
  border-radius: 8px;
  background: #fff;
  color: #0b5bd3;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1100px) {
  body.notice-page.register-page .register-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding-inline: 20px;
  }

  body.notice-page.register-page .register-header .notice-brand,
  body.notice-page.register-page .register-header .notice-actions {
    width: auto;
    min-width: 0;
  }

  body.notice-page.register-page .register-header .notice-nav {
    display: none;
  }

  body.notice-page.register-page .register-header .notice-actions {
    grid-column: 2;
    justify-self: end;
  }
}

@media (max-width: 640px) {
  body.notice-page.register-page .register-header {
    gap: 10px;
    height: auto;
    min-height: 62px;
    padding: 7px 14px;
  }

  body.notice-page.register-page .register-header .notice-brand {
    gap: 8px;
  }

  body.notice-page.register-page .register-header .gov-emblem {
    width: 38px;
    height: 30px;
  }

  body.notice-page.register-page .register-header .brand-copy {
    width: auto;
    min-width: 0;
    gap: 0;
  }

  body.notice-page.register-page .register-header .brand-copy strong {
    width: auto;
    font-size: 21px;
  }

  body.notice-page.register-page .register-header .brand-copy small {
    display: none;
  }

  body.notice-page.register-page .register-header .notice-actions {
    gap: 0;
  }

  body.notice-page.register-page .register-header .register-login-link {
    min-width: 68px;
    padding-inline: 14px;
  }
}

.company-email-actions {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0;
}

.company-email-send-button {
  min-width: 132px;
}

.company-email-badge.is-sent {
  color: #08783e;
  border-color: #a7e2c2;
  background: #edf9f2;
}

.company-email-badge.is-failed,
.company-email-badge.is-retry {
  color: #b42318;
  border-color: #f2b8b5;
  background: #fff2f1;
}

.company-email-badge.is-queued,
.company-email-badge.is-sending {
  color: #075ccf;
  border-color: #b8d2f5;
  background: #eef5ff;
}
