/* =========================
   01. 디자인 토큰
========================= */
:root {
  --primary: #AD1C4C;
  --primary-dark: #8F153E;
  --primary-soft: rgba(173, 28, 76, 0.12);

  --secondary: #5BC2E7;
  --secondary-dark: #2FA8D6;
  --secondary-soft: rgba(91, 194, 231, 0.14);

  --bg: #f4f7fb;
  --card: rgba(255, 255, 255, 0.94);
  --card-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(31, 41, 55, 0.08);

  --success-bg: #dcfce7;
  --success-text: #166534;
  --warning-bg: #fff0c4;
  --warning-text: #9a5d00;
  --claim-bg: #d8f2fb;
  --claim-text: #1175a4;

  --shadow-lg: 0 20px 44px rgba(22, 34, 51, 0.10);
  --shadow-md: 0 12px 28px rgba(22, 34, 51, 0.08);
  --shadow-sm: 0 6px 16px rgba(22, 34, 51, 0.06);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

/* =========================
   02. 기본 설정
========================= */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(166, 9, 61, 0.10), transparent 32%),
    radial-gradient(circle at top right, rgba(91, 194, 231, 0.18), transparent 28%),
    linear-gradient(180deg, #fffdfb 0%, #f9fbff 42%, #f3f7fc 100%);
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

img[src*="emblem"],
img[alt*="엠블럼"],
img[alt*="Emblem"],
.emblem-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

/* =========================
   03. 배경 / 레이아웃
========================= */
.brand-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.brand-grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(166, 9, 61, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 194, 231, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
}

.wrap,
.bind-wrap {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
}

/* =========================
   04. 히어로
========================= */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-bottom: 14px;
  color: #fff;
  box-shadow: 0 18px 36px rgba(166, 9, 61, 0.16);
  background: linear-gradient(
    135deg,
    rgba(166, 9, 61, 0.96) 0%,
    rgba(166, 9, 61, 0.90) 48%,
    rgba(91, 194, 231, 0.84) 100%
  );
}

.hero::before {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hero::after {
  content: "";
  position: absolute;
  left: -44px;
  bottom: -74px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 200px);
  gap: 16px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-mark {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-mark img {
  width: min(100%, 176px);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.16));
  transform: translateY(2px);
}

.brand-badge,
.bind-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.sub {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
}

.hero-side,
.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-side {
  justify-content: flex-end;
}

.hero-link {
  display: inline-flex;
  text-decoration: none;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 112px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.hero-chip-soft {
  opacity: 0.95;
}

.hero-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* =========================
   05. 카드 공통
========================= */
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: end;
}

.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* =========================
   06. 검색 영역
========================= */
.search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
  width: min(560px, 100%);
}

.search-box {
  flex: 1 1 280px;
  min-width: 0;
}

.search-label,
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}

.search-box input,
.bind-form input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(31, 41, 55, 0.11);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  outline: none;
  font-size: 15px;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.15s ease;
}

.search-box input:focus,
.bind-form input:not([type="checkbox"]):not([type="hidden"]):focus {
  border-color: rgba(91, 194, 231, 0.92);
  box-shadow: 0 0 0 4px rgba(91, 194, 231, 0.16);
  background: #fff;
}

/* =========================
   07. 버튼
========================= */
button,
.primary-btn,
.ghost-btn,
.btn-primary {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.20s ease,
    opacity 0.20s ease;
}

button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.btn-primary:hover {
  transform: translateY(-1px);
}

button:active,
.primary-btn:active,
.ghost-btn:active,
.btn-primary:active {
  transform: translateY(0);
}

button:disabled,
.primary-btn:disabled,
.ghost-btn:disabled,
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.primary-btn,
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #c10f4b 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(166, 9, 61, 0.18);
}

.ghost-btn {
  background: rgba(17, 24, 39, 0.08);
  color: var(--text);
}

/* =========================
   08. 최근 검색
========================= */
.quick-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.quick-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.recent-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.90);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.recent-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.recent-chip.is-empty {
  cursor: default;
  opacity: 0.7;
}

/* =========================
   09. 통계 카드
========================= */
.stats,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat,
.stat-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  min-width: 0;
}

.stat:hover,
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat.total,
.stat-card.total {
  background:
    linear-gradient(180deg, rgba(166, 9, 61, 0.04), rgba(166, 9, 61, 0.01)),
    rgba(255, 255, 255, 0.94);
}

.stat.waiting,
.stat-card.waiting {
  background:
    linear-gradient(180deg, rgba(255, 193, 7, 0.06), rgba(255, 193, 7, 0.02)),
    rgba(255, 255, 255, 0.94);
}

.stat.done,
.stat-card.done,
.stat.complete,
.stat-card.complete {
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.06), rgba(22, 163, 74, 0.02)),
    rgba(255, 255, 255, 0.94);
}

.stat.bound,
.stat-card.bound {
  background:
    linear-gradient(180deg, rgba(91, 194, 231, 0.08), rgba(91, 194, 231, 0.03)),
    rgba(255, 255, 255, 0.94);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.stat b,
.stat-value {
  display: block;
  margin-top: 8px;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--primary);
}

/* =========================
   09-1. 마감 안내
========================= */
.marking-closed-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 14px 18px;
  margin-top: 14px;
  border-radius: 20px;
  border: 1px solid rgba(166, 9, 61, 0.16);
  background: linear-gradient(135deg, rgba(166, 9, 61, 0.12) 0%, rgba(166, 9, 61, 0.05) 100%);
  box-shadow: var(--shadow-md);
  color: var(--primary);
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-align: center;
}

.marking-closed-notice::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 8px rgba(166, 9, 61, 0.10);
  flex: 0 0 10px;
}

/* =========================
   10. 필터
========================= */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.filter-btn {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #c10f4b 100%);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(166, 9, 61, 0.16);
}

/* =========================
   11. 메타 / 갱신
========================= */
.meta-row,
.updated {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 0 rgba(91, 194, 231, 0.45);
  animation: pulseDot 1.8s infinite;
  display: inline-block;
  margin-right: 6px;
}

.sync-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* =========================
   12. 요약 카드
========================= */
.summary-card {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}

.summary-kicker {
  color: var(--secondary-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-title {
  margin: 6px 0 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.summary-box {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  padding: 14px 12px;
  box-shadow: var(--shadow-md);
  min-width: 0;
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  word-break: keep-all;
}

.summary-value {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  word-break: break-word;
}

.summary-message,
.foot-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(91, 194, 231, 0.12);
  color: var(--text);
  line-height: 1.65;
  border: 1px solid rgba(91, 194, 231, 0.18);
  font-size: 14px;
}

/* =========================
   13. 상태 배지
========================= */
.badge,
.state-chip,
.claim-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.state-complete,
.badge.complete,
.badge.done {
  background: var(--success-bg);
  color: var(--success-text);
}

.state-waiting,
.badge.waiting {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.claim-bound {
  background: var(--claim-bg);
  color: var(--claim-text);
}

.claim-none {
  background: #f3f4f6;
  color: #4b5563;
}

/* =========================
   14. 테이블
========================= */
.table-wrap {
  overflow: auto;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  scrollbar-width: thin;
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(166, 9, 61, 0.22);
  border-radius: 999px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  background: #fafbfc;
}

.td-empty {
  text-align: center;
}

/* =========================
   15. 모바일 리스트
========================= */
.mobile-list {
  display: none;
  gap: 12px;
  margin-top: 14px;
}

.mobile-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.mobile-item h3 {
  margin: 0 0 10px;
  font-size: 30px;
}

.mobile-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   16. 바인드 페이지
========================= */
.bind-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.bind-card {
  width: min(100%, 660px);
  padding: 24px;
}

.bind-card.sub {
  color: var(--muted);
}

.bind-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 16px;
  align-items: center;
}

.bind-emblem {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bind-emblem img {
  width: 100%;
  max-width: 112px;
  filter: drop-shadow(0 10px 22px rgba(166, 9, 61, 0.14));
}

.info-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  line-height: 1.7;
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.bind-form {
  margin-top: 18px;
}

.field {
  margin-bottom: 14px;
}

.agree {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  line-height: 1.6;
  font-size: 14px;
}

.agree input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 22px;
  border-radius: 6px;
  accent-color: var(--primary);
}

.agree span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.msg {
  margin-top: 12px;
  min-height: 20px;
  font-size: 14px;
  font-weight: 800;
}

.msg.ok {
  color: var(--success-text);
}

.msg.err {
  color: #b91c1c;
}

.bind-help {
  color: var(--muted);
}

.hidden-iframe {
  width: 0;
  height: 0;
  border: 0;
  position: absolute;
  left: -9999px;
}

/* =========================
   17. 푸터
========================= */
.footer {
  margin-top: 18px;
  padding: 18px 12px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-trigger {
  display: inline;
  font-weight: 900;
  color: inherit;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
}

.admin-trigger:hover {
  opacity: 0.72;
}

.admin-trigger:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================
   18. 태블릿 보정
========================= */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-side,
  .hero-actions {
    justify-content: flex-start;
  }

  .hero-mark {
    justify-content: center;
  }

  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .marking-closed-notice {
    min-height: 54px;
    padding: 12px 14px;
    font-size: 17px;
  }

  .summary-box {
    padding: 12px 10px;
    border-radius: 16px;
  }

  .summary-label {
    font-size: 11px;
  }

  .summary-value {
    font-size: 16px;
  }
}

/* =========================
   19. 761~846px 폭 보정
   - 가로 스크롤 방지
   - 카드 잘림 방지
========================= */
@media (min-width: 761px) and (max-width: 846px) {
  html,
  body {
    overflow-x: hidden;
  }

  .wrap {
    max-width: 100%;
    padding: 12px;
  }

  .card {
    padding: 14px;
    overflow: hidden;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search {
    width: 100%;
    min-width: 0;
  }

  .search-box {
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-box input {
    width: 100%;
    min-width: 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-side,
  .hero-actions {
    justify-content: flex-start;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-link,
  .hero-chip {
    width: 100%;
    min-width: 0;
  }

  .hero-chip {
    padding: 0 10px;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
  }

  .stats,
  .stats-grid,
  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .stat,
  .stat-card,
  .summary-box {
    min-width: 0;
    overflow: hidden;
  }

  .stat-label,
  .summary-label,
  .summary-value,
  .section-sub,
  .sub,
  .mobile-meta,
  td,
  th {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .summary-value,
  .stat-value,
  .stat b {
    line-height: 1.25;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 13px;
  }

  td {
    white-space: normal;
    word-break: break-word;
  }
}

/* =========================
   20. 모바일
========================= */
@media (max-width: 760px) {
  .wrap {
    padding: 10px;
  }

  .card {
    padding: 14px;
    margin-bottom: 10px;
    min-height: auto !important;
    height: auto !important;
  }

  .topbar {
    gap: 10px;
    align-items: stretch;
  }

  .section-title {
    font-size: 18px;
  }

  .section-sub,
  .sub {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
  }

  .search,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    width: 100%;
    gap: 8px;
    margin-top: 8px;
  }

  .search-box {
    flex: 1 1 auto;
  }

  .search-box input,
  .bind-form input:not([type="checkbox"]):not([type="hidden"]) {
    min-height: 50px;
    font-size: 15px;
  }

  .hero-side,
  .hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
    justify-content: initial;
  }

  .hero-link,
  .hero-chip {
    width: 100%;
    min-width: 0;
  }

  .hero-chip {
    min-height: 48px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 12px;
  }

  .primary-btn,
  .ghost-btn,
  .btn-primary,
  button {
    width: 100%;
    min-height: 50px;
    font-size: 14px;
  }

  .filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .filter-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 13px;
    padding: 0 8px;
  }

  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .marking-closed-notice {
    min-height: 54px;
    padding: 12px 14px;
    font-size: 17px;
  }

  .summary-box {
    padding: 10px 8px;
    border-radius: 16px;
    min-height: auto !important;
    height: auto !important;
  }

  .summary-label {
    font-size: 10px;
    line-height: 1.2;
  }

  .summary-value {
    margin-top: 6px;
    font-size: 15px;
  }

  .stats,
  .stats-grid {
    gap: 8px;
  }

  .stat,
  .stat-card {
    padding: 12px 10px;
    border-radius: 16px;
  }

  .stat-label {
    font-size: 11px;
    line-height: 1.2;
    word-break: keep-all;
  }

  .stat b,
  .stat-value {
    margin-top: 6px;
    font-size: clamp(18px, 4.8vw, 22px);
  }

  .table-wrap {
    display: none;
  }

  .mobile-list {
    display: grid;
  }

  .bind-head {
    grid-template-columns: 1fr;
  }

  .bind-emblem {
    justify-content: center;
    text-align: center;
  }

  .agree {
    gap: 10px;
    font-size: 13px;
  }

  .agree input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-basis: 20px;
  }

  .stats,
  .stats-grid,
  .filter-bar,
  .summary-grid,
  .meta-row,
  .updated,
  .quick-row {
    margin-top: 10px;
    gap: 8px;
  }

  .summary-card,
  .mobile-item,
  .foot-note {
    min-height: auto !important;
    height: auto !important;
  }

  .card,
  .summary-card,
  .mobile-item,
  .search,
  .topbar {
    align-content: start;
    justify-content: flex-start;
  }

  .summary-card:empty,
  .mobile-list:empty,
  .table-wrap:empty,
  .quick-row:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* =========================
   21. 초소형 모바일
========================= */
@media (max-width: 420px) {
  .wrap {
    padding: 8px;
  }

  .card {
    padding: 12px;
    border-radius: 18px;
  }

  .section-title {
    font-size: 17px;
  }

  .search-box input,
  .bind-form input:not([type="checkbox"]):not([type="hidden"]) {
    min-height: 48px;
    font-size: 14px;
  }

  .primary-btn,
  .ghost-btn,
  .btn-primary,
  button {
    min-height: 48px;
    font-size: 14px;
  }

  .stats,
  .stats-grid {
    gap: 6px;
  }

  .stat,
  .stat-card {
    padding: 10px 8px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat b,
  .stat-value {
    font-size: 18px;
  }

  .hero-side,
  .hero-actions {
    gap: 6px;
  }

  .hero-chip {
    min-height: 44px;
    font-size: 11px;
    padding: 0 6px;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    min-height: 44px;
    font-size: 12px;
    padding: 0 6px;
  }

  .summary-grid {
    gap: 6px;
  }

  .summary-box {
    padding: 8px 6px;
  }

  .summary-label {
    font-size: 9px;
  }

  .summary-value {
    font-size: 13px;
  }
}
/* =========================
   22. 카카오톡 플로팅 버튼
========================= */
.kakao-float-btn {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 56px;
  padding: 0 18px;
  border-radius: 999px;

  background: #FEE500;
  color: #191919;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;

  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.kakao-float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.kakao-float-btn:active {
  transform: translateY(0);
}

.kakao-float-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.kakao-float-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.kakao-float-text {
  white-space: nowrap;
}

.kakao-float-btn--circle {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

.kakao-float-btn--circle .kakao-float-text {
  display: none;
}

@media (max-width: 768px) {
  .kakao-float-btn {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    min-height: 52px;
    padding: 0 16px;
    font-size: 14px;
  }

  .kakao-float-btn--circle {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }
}

/* =========================
   23. 모션 최소화
========================= */
@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(91, 194, 231, 0.45);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(91, 194, 231, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(91, 194, 231, 0);
  }
}

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

/* Marking notice gate */
.notice-gate {
    margin: 18px 0 12px;
    padding: 14px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.06));
    border-radius: 18px;
    display: grid;
    gap: 12px;
}
.notice-gate-copy strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 4px;
}
.notice-gate-copy span,
.agree-guide {
    display: block;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}
.notice-open-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 13px 14px;
    background: #0f172a;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}
.notice-open-btn:active {
    transform: translateY(1px);
}
.notice-confirmed {
    border-color: rgba(22, 163, 74, 0.28);
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.10), rgba(34, 197, 94, 0.07));
}
.notice-confirmed .notice-open-btn {
    background: #15803d;
}
.agree-disabled {
    opacity: 0.58;
    cursor: not-allowed;
}
.agree-disabled input {
    cursor: not-allowed;
}
.notice-modal.hidden {
    display: none;
}
.notice-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.notice-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(6px);
}
.notice-modal-card {
    position: relative;
    width: min(680px, 100%);
    max-height: min(86vh, 760px);
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.32);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.notice-modal-head {
    padding: 20px 20px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.notice-modal-head h2 {
    margin: 8px 0 0;
    font-size: 22px;
    color: #0f172a;
}
.notice-close-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
    border-radius: 999px;
    padding: 9px 12px;
    font-weight: 700;
    cursor: pointer;
}
.notice-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
}
.marking-notice-list {
    margin: 0;
    padding-left: 22px;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.65;
}
.marking-notice-list li + li {
    margin-top: 9px;
}
.notice-modal-actions {
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    background: #f8fafc;
}
.modal-open {
    overflow: hidden;
}

/* Delivery request page */
.delivery-card h1 {
    margin-bottom: 8px;
}
.delivery-form textarea {
    min-height: 96px;
    resize: vertical;
}
.address-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}
.address-search-btn {
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    background: #0f172a;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.readonly-input {
    background: #f8fafc;
    color: #334155;
}
.delivery-complete-box {
    border-radius: 18px;
    border: 1px solid rgba(22, 163, 74, 0.25);
    background: rgba(22, 163, 74, 0.08);
    color: #14532d;
    padding: 16px;
    line-height: 1.55;
}
@media (max-width: 520px) {
    .address-row {
        grid-template-columns: 1fr;
    }
    .address-search-btn {
        min-height: 46px;
    }
}

.bind-form textarea {
  width: 100%;
  border: 1px solid rgba(31, 41, 55, 0.11);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  outline: none;
  font-size: 15px;
  line-height: 1.55;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}
.bind-form textarea:focus {
  border-color: rgba(91, 194, 231, 0.92);
  box-shadow: 0 0 0 4px rgba(91, 194, 231, 0.16);
  background: #fff;
}

/* =========================
   24. Index notice popup
========================= */
.notice-reopen-btn {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
}

.notice-reopen-btn:focus-visible,
.notice-close-btn:focus-visible,
.notice-modal-actions .primary-btn:focus-visible {
  outline: 3px solid rgba(91, 194, 231, 0.55);
  outline-offset: 3px;
}

.notice-modal--index {
  padding: clamp(12px, 2.8vw, 24px);
}

.notice-modal--index .notice-modal-card {
  width: min(720px, 100%);
  max-height: min(88dvh, 780px);
  cursor: pointer;
}

.notice-modal--index .notice-modal-body {
  overscroll-behavior: contain;
}

.notice-modal-desc {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  word-break: keep-all;
}

.notice-modal--index .notice-modal-actions .primary-btn {
  width: 100%;
  min-height: 48px;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .notice-modal--index .notice-modal-card {
    width: min(76vw, 720px);
    max-height: 84dvh;
  }
}

@media (max-width: 768px) {
  .notice-modal--index {
    align-items: flex-end;
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  .notice-modal--index .notice-modal-card {
    width: 100%;
    max-height: 88dvh;
    border-radius: 22px 22px 18px 18px;
  }

  .notice-modal-head {
    padding: 16px 16px 12px;
    gap: 10px;
  }

  .notice-modal-head h2 {
    font-size: 20px;
  }

  .notice-close-btn {
    padding: 8px 11px;
    font-size: 13px;
  }

  .notice-modal-body {
    padding: 15px 18px;
  }

  .marking-notice-list {
    padding-left: 19px;
    font-size: 13px;
    line-height: 1.62;
  }

  .marking-notice-list li + li {
    margin-top: 7px;
  }

  .notice-modal-actions {
    padding: 14px 16px 16px;
  }
}

@media (max-width: 380px) {
  .notice-modal-head {
    flex-direction: column;
    align-items: stretch;
  }

  .notice-close-btn {
    width: 100%;
  }
}


/* =========================
   25. Index notice popup refinement
   - close button removed
   - centered NOTICE heading
   - larger no-scroll-first layout
========================= */
.notice-modal--index {
  padding: clamp(8px, 2vw, 18px);
}

.notice-modal--index .notice-modal-card {
  width: min(1040px, calc(100vw - 24px));
  min-height: min(520px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.99));
  border: 1px solid rgba(91, 194, 231, 0.22);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.34);
}

.notice-modal--index .notice-modal-head,
.notice-modal-head--center {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(16px, 2.2vw, 24px) clamp(18px, 3vw, 34px) clamp(12px, 1.6vw, 18px);
  background:
    radial-gradient(circle at 50% 0%, rgba(91, 194, 231, 0.22), transparent 58%),
    linear-gradient(180deg, rgba(239, 250, 255, 0.96), rgba(255, 255, 255, 0.96));
  border-bottom: 1px solid rgba(91, 194, 231, 0.2);
}

.notice-title-wrap {
  width: 100%;
}

.notice-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 146px;
  min-height: 38px;
  padding: 7px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172a, #17405f 46%, #5bc2e7);
  color: #ffffff;
  font-size: clamp(18px, 2.4vw, 30px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.12em;
  box-shadow: 0 12px 28px rgba(91, 194, 231, 0.32);
}

.notice-modal--index .notice-modal-head h2 {
  margin: 12px 0 0;
  color: #0f172a;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.12;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.notice-modal--index .notice-modal-desc {
  margin: 8px 0 0;
  color: #475569;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 700;
}

.notice-modal--index .notice-modal-body {
  flex: 1 1 auto;
  padding: clamp(14px, 2vw, 24px) clamp(18px, 2.8vw, 34px);
  overflow: visible;
}

.notice-modal--index .marking-notice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 52px);
  row-gap: 8px;
  margin: 0;
  padding-left: 24px;
  color: #1e293b;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.48;
  word-break: keep-all;
}

.notice-modal--index .marking-notice-list li,
.notice-modal--index .marking-notice-list li + li {
  margin-top: 0;
  padding-left: 2px;
}

.notice-modal--index .marking-notice-list li::marker {
  color: #0f7ea8;
  font-weight: 900;
}

.notice-modal--index .notice-modal-actions {
  padding: clamp(12px, 1.7vw, 18px) clamp(18px, 2.8vw, 34px) clamp(16px, 2vw, 22px);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.4), rgba(239, 250, 255, 0.92));
  border-top: 1px solid rgba(91, 194, 231, 0.18);
}

.notice-modal--index .notice-modal-actions .primary-btn {
  min-height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #17405f 48%, #5bc2e7);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
}

.notice-reopen-btn:focus-visible,
.notice-modal-actions .primary-btn:focus-visible,
.notice-modal-card:focus-visible {
  outline: 3px solid rgba(91, 194, 231, 0.55);
  outline-offset: 3px;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .notice-modal--index .notice-modal-card {
    width: min(94vw, 920px);
    min-height: auto;
  }

  .notice-modal--index .marking-notice-list {
    column-gap: 30px;
    font-size: 13.5px;
    line-height: 1.43;
  }
}

@media (max-width: 768px) {
  .notice-modal--index {
    align-items: center;
    padding: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }

  .notice-modal--index .notice-modal-card {
    width: 100%;
    min-height: auto;
    max-height: calc(100dvh - 16px);
    border-radius: 22px;
  }

  .notice-modal--index .notice-modal-head,
  .notice-modal-head--center {
    padding: 14px 14px 10px;
  }

  .notice-kicker {
    min-width: 128px;
    min-height: 34px;
    padding: 6px 18px;
    font-size: clamp(17px, 6vw, 24px);
  }

  .notice-modal--index .notice-modal-head h2 {
    margin-top: 9px;
    font-size: clamp(20px, 6.2vw, 27px);
  }

  .notice-modal--index .notice-modal-desc {
    margin-top: 5px;
    font-size: 11.5px;
  }

  .notice-modal--index .notice-modal-body {
    padding: 11px 14px 9px;
  }

  .notice-modal--index .marking-notice-list {
    display: block;
    padding-left: 18px;
    font-size: clamp(11.2px, 3.25vw, 12.6px);
    line-height: 1.36;
    letter-spacing: -0.035em;
  }

  .notice-modal--index .marking-notice-list li + li {
    margin-top: 4px;
  }

  .notice-modal--index .notice-modal-actions {
    padding: 10px 14px 13px;
  }

  .notice-modal--index .notice-modal-actions .primary-btn {
    min-height: 44px;
    border-radius: 14px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .notice-modal--index .notice-modal-card {
    max-height: calc(100dvh - 10px);
  }

  .notice-modal--index .notice-modal-head,
  .notice-modal-head--center {
    padding: 10px 10px 7px;
  }

  .notice-kicker {
    min-width: 112px;
    min-height: 29px;
    padding: 5px 14px;
    font-size: 16px;
  }

  .notice-modal--index .notice-modal-head h2 {
    margin-top: 6px;
    font-size: 18px;
  }

  .notice-modal--index .notice-modal-desc {
    font-size: 10.8px;
  }

  .notice-modal--index .notice-modal-body {
    padding: 8px 10px 7px;
  }

  .notice-modal--index .marking-notice-list {
    padding-left: 16px;
    font-size: 10.6px;
    line-height: 1.28;
    letter-spacing: -0.055em;
  }

  .notice-modal--index .marking-notice-list li + li {
    margin-top: 2.5px;
  }

  .notice-modal--index .notice-modal-actions {
    padding: 8px 10px 10px;
  }

  .notice-modal--index .notice-modal-actions .primary-btn {
    min-height: 38px;
    font-size: 12.5px;
  }
}

@media (max-height: 640px) and (max-width: 768px) {
  .notice-modal--index .notice-modal-desc {
    display: none;
  }

  .notice-modal--index .notice-modal-head h2 {
    margin-top: 5px;
  }

  .notice-modal--index .marking-notice-list {
    font-size: 10.2px;
    line-height: 1.22;
  }

  .notice-modal--index .marking-notice-list li + li {
    margin-top: 2px;
  }

  .notice-modal--index .notice-modal-actions .primary-btn {
    min-height: 36px;
  }
}

/* =========================
   26. Index notice popup color match
   - reference color: #AD1C4C
========================= */
.notice-modal--index .notice-modal-backdrop {
  background: rgba(64, 7, 30, 0.64);
}

.notice-reopen-btn {
  background: rgba(173, 28, 76, 0.92);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 10px 24px rgba(80, 10, 38, 0.18);
}

.notice-reopen-btn:hover {
  background: rgba(191, 40, 88, 0.96);
}

.notice-modal--index .notice-modal-card {
  border: 1px solid rgba(173, 28, 76, 0.30);
  box-shadow: 0 34px 90px rgba(80, 10, 38, 0.34);
}

.notice-modal--index .notice-modal-head,
.notice-modal-head--center {
  background:
    radial-gradient(circle at 50% 0%, rgba(173, 28, 76, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(255, 246, 249, 0.98), rgba(255, 255, 255, 0.98));
  border-bottom: 1px solid rgba(173, 28, 76, 0.20);
}

.notice-kicker {
  background: linear-gradient(135deg, #7F1235 0%, #AD1C4C 54%, #C63A69 100%);
  box-shadow: 0 12px 28px rgba(173, 28, 76, 0.30);
}

.notice-modal--index .notice-modal-head h2 {
  color: #7F1235;
}

.notice-modal--index .notice-modal-desc {
  color: #6F4254;
}

.notice-modal--index .marking-notice-list li::marker {
  color: #AD1C4C;
}

.notice-modal--index .notice-modal-actions {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.40), rgba(255, 246, 249, 0.94));
  border-top: 1px solid rgba(173, 28, 76, 0.18);
}

.notice-modal--index .notice-modal-actions .primary-btn {
  background: linear-gradient(135deg, #7F1235 0%, #AD1C4C 54%, #C63A69 100%);
  box-shadow: 0 14px 30px rgba(80, 10, 38, 0.24);
}

.notice-reopen-btn:focus-visible,
.notice-modal-actions .primary-btn:focus-visible,
.notice-modal-card:focus-visible {
  outline: 3px solid rgba(173, 28, 76, 0.46);
  outline-offset: 3px;
}

