@import url('./fonts.css');

/* ─── 토큰 ──────────────────────────────────────────────────────── */
:root {
  --paper: #f4f4f1;
  --card: #ffffff;
  --ink: #0c0c09;
  --ink-soft: #54544c;
  --line: #e2e2dc;
  --line-strong: #cfcfc7;
  --indigo: #312c85;
  --indigo-weak: #ebeaf6;
  --warn: #d97706;
  --ok: #16a34a;
  --danger: #b42318;   /* 글자용 — 흰 바탕에서 6.4:1 */

  --sans: 'Pretendard Variable', 'Geist', system-ui, sans-serif;
  --latin: 'Geist', 'Pretendard Variable', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  --wrap: 1180px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #141412;
    --card: #1c1c1a;
    --ink: #ededea;
    --ink-soft: #b2b2a9;
    --line: #2e2e2a;
    --line-strong: #3d3d38;
    --indigo: #8f88e8;
    --indigo-weak: #23214a;
    --ok: #4ade80;
    --danger: #ff9a8f;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #141412;
  --card: #1c1c1a;
  --ink: #ededea;
  --ink-soft: #b2b2a9;
  --line: #2e2e2a;
  --line-strong: #3d3d38;
  --indigo: #8f88e8;
  --indigo-weak: #23214a;
  --ok: #4ade80;
  --danger: #ff9a8f;
  color-scheme: dark;
}

/* ─── 바닥 ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* hidden 은 UA 스타일이라 .btn 의 display 에 밀린다. 숨기라면 숨어야 한다. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17.5px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  /* 한국어는 낱말 중간에서 끊으면 안 읽힌다 */
  word-break: keep-all;
  overflow-wrap: break-word;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
p {
  margin: 0;
}
a {
  color: var(--indigo);
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 2px;
}
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ─── 모집 띠 ───────────────────────────────────────────────────── */
.band {
  background: var(--indigo);
  color: #fff;
}
:root[data-theme='dark'] .band,
:root:not([data-theme='light']) .band {
  color: #141412;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .band {
    color: #fff;
  }
}
.band__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding-block: 9px;
  font-size: 15px;
}
.band__name {
  font-weight: 700;
}
.band__meta {
  opacity: 0.86;
}
.band__go {
  margin-left: auto;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── 헤더 ──────────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.brand {
  font-family: var(--latin);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand b {
  color: var(--indigo);
  font-weight: 700;
}

.iconbtn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.iconbtn:hover {
  border-color: var(--line-strong);
}
.iconbtn svg {
  width: 17px;
  height: 17px;
}
:root[data-theme='dark'] .i-sun,
:root:not([data-theme='light']) .i-sun {
  display: none;
}
:root[data-theme='dark'] .i-moon,
:root:not([data-theme='light']) .i-moon {
  display: block;
}
.i-moon {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .i-sun {
    display: block;
  }
  :root:not([data-theme='dark']) .i-moon {
    display: none;
  }
}

/* ─── 버튼 ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding-inline: 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.btn--fill {
  background: var(--indigo);
  color: #fff;
}
:root[data-theme='dark'] .btn--fill,
:root:not([data-theme='light']) .btn--fill {
  color: #141412;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .btn--fill {
    color: #fff;
  }
}
.btn--fill:hover {
  background: color-mix(in srgb, var(--indigo) 86%, var(--ink));
}
.btn--line {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--line:hover {
  border-color: var(--ink-soft);
}
.btn--sm {
  height: 36px;
  padding-inline: 14px;
  font-size: 15px;
}
.btn--lg {
  height: 52px;
  padding-inline: 28px;
  font-size: 17.5px;
}
/* 짙은 히어로 위에서 쓰는 버튼 — 테마와 무관하게 고정 */
.btn--pop {
  background: #fff;
  color: #221d5e;
}
.btn--pop:hover {
  background: #ece9ff;
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}
.hero :focus-visible,
.close :focus-visible {
  outline-color: #fff;
}

/* 글자 링크처럼 보이는 버튼 */
.linkbtn {
  background: none;
  border: 0;
  padding: 2px 4px;
  font: inherit;
  font-size: 15px;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linkbtn:hover {
  color: var(--ink);
}

/* ─── 히어로 — 꽉 채운 블록. 두 테마 모두 짙은 바탕에 흰 글씨 ──────── */
.hero {
  background: #2a2570;
  color: #fff;
  padding-block: 56px 60px;
  overflow: hidden;
}
:root[data-theme='dark'] .hero,
:root:not([data-theme='light']) .hero {
  background: #1d1a4e;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .hero {
    background: #2a2570;
  }
}
.hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.hero__kicker {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
}
.hero__kicker b {
  font-weight: 800;
}
.hero h1 {
  font-size: clamp(36px, 7.4vw, 66px);
  letter-spacing: -0.045em;
  line-height: 1.12;
}
.hero__lede {
  margin-top: 20px;
  max-width: 38ch;
  font-size: 17.5px;
  color: rgba(255, 255, 255, 0.76);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.hero__fine {
  margin-top: 14px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
}

/* ─── 측정 숫자 띠 ──────────────────────────────────────────────── */
.stats {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding-block: 36px 28px;
}
.stats__in {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 20px;
}
@media (min-width: 820px) {
  .stats__in {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat b {
  display: block;
  font-family: var(--latin);
  font-variant-numeric: tabular-nums;
  font-size: clamp(38px, 6vw, 54px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--indigo);
}
.stat b i {
  font-style: normal;
  font-size: 0.42em;
  font-weight: 600;
  margin-left: 2px;
}
.stat span {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.stats__note {
  margin-top: 26px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* 히어로 비주얼 = 피커 그 자체 */
.picker {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  /* 짙은 히어로 안에 있으므로 글자색을 명시한다. 안 하면 흰 글씨가 된다. */
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(12, 12, 9, 0.04), 0 12px 32px -18px rgba(12, 12, 9, 0.3);
}
.picker__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
}
.picker__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}
.picker__count {
  margin-left: auto;
  font-size: 13.5px;
}
.picker__body {
  padding: 14px;
}
.picker__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}
.picker__head span {
  font-weight: 400;
  color: var(--ink-soft);
}
.picker__head--mute {
  margin-top: 14px;
  color: var(--ink-soft);
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #e8e8e2, #d8d8d0);
  overflow: hidden;
}
:root[data-theme='dark'] .tile,
:root:not([data-theme='light']) .tile {
  background: linear-gradient(135deg, #2a2a26, #3a3a34);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .tile {
    background: linear-gradient(135deg, #e8e8e2, #d8d8d0);
  }
}
.tile::after {
  content: '';
  position: absolute;
  inset: 22% 18% 30%;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.tile--wide::after {
  inset: 34% 12% 34%;
}
.tile--tall::after {
  inset: 12% 30% 12%;
}
.tile__res {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: -0.02em;
}
.tile--pick {
  border-color: var(--indigo);
  box-shadow: inset 0 0 0 2px var(--indigo);
}
.tile--pick .tile__check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--card);
}
.tile--pick .tile__check svg {
  width: 10px;
  height: 10px;
}
.tile--out {
  opacity: 0.38;
  filter: saturate(0.2);
}
/* 어두운 배경에서는 0.38 이면 사라져 버린다 */
:root[data-theme='dark'] .tile--out,
:root:not([data-theme='light']) .tile--out {
  opacity: 0.62;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .tile--out {
    opacity: 0.38;
  }
}
.tile__why {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--warn);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.picker__fold {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

/* 결과 — 떠 있는 박스를 하나 더 만들지 않고 피커 패널 안쪽 바닥에 붙인다 */
.picker__out {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--indigo) 5%, var(--card));
}
.frame {
  width: 68px;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  background: #0c0c09;
  /* 어두운 카드 위에서 묻히지 않도록 테두리를 밝게 */
  border: 1px solid color-mix(in srgb, var(--ink) 28%, var(--card));
  position: relative;
  overflow: hidden;
  flex: none;
}
.frame::before {
  content: '';
  position: absolute;
  inset: 16% 8% 32%;
  border-radius: 4px;
  background: linear-gradient(140deg, #4a4a44, #2a2a26);
}
.frame__cap {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 12px;
  height: 5px;
  border-radius: 2px;
  background: #f4f4f1;
}
.frame__cap + .frame__cap {
  bottom: 21px;
  right: 22px;
}
.result__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.4;
}
.result__sub {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .wrap {
    padding-inline: 48px;
  }
  .hero {
    padding-block: 96px 56px;
  }
  .hero__in {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 56px;
    align-items: center;
  }
  .grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ─── 섹션 공통 ─────────────────────────────────────────────────── */
.sec {
  padding-block: 64px;
}
.sec + .sec {
  border-top: 1px solid var(--line);
}
/* 한 칸 걸러 바탕을 바꿔 긴 페이지가 밋밋해지지 않게 한다 */
.sec--alt {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sec--alt + .sec {
  border-top: 0;
}
.sec h2 {
  font-size: clamp(24px, 3.6vw, 34px);
  max-width: 18ch;
}
.sec__lede {
  margin-top: 14px;
  max-width: 42ch;
  color: var(--ink-soft);
}
@media (min-width: 900px) {
  .sec {
    padding-block: 96px;
  }
}

/* ─── 단계 — 상자 넷이 아니라 이어진 흐름 ─────────────────────────── */
.flow {
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 32px;
}
@media (min-width: 820px) {
  .flow {
    grid-template-columns: repeat(4, 1fr);
    gap: 0 28px;
  }
}
.flow__i {
  position: relative;
  padding-left: 48px;
}
@media (min-width: 820px) {
  .flow__i {
    padding-left: 0;
    padding-top: 46px;
  }
}
.flow__n {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--card);
  font-family: var(--latin);
  font-size: 16px;
  font-weight: 700;
}
/* 번호를 잇는 선 — 마지막 칸에는 그리지 않는다 */
.flow__i::before {
  content: '';
  position: absolute;
  background: var(--line-strong);
}
@media (max-width: 819px) {
  .flow__i::before {
    left: 15px;
    top: 40px;
    width: 2px;
    bottom: -34px;
  }
}
@media (min-width: 820px) {
  .flow__i::before {
    left: 40px;
    right: -28px;
    top: 15px;
    height: 2px;
  }
}
.flow__i:last-child::before {
  display: none;
}
.flow__i h3 {
  padding-top: 5px;
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
@media (min-width: 820px) {
  .flow__i h3 {
    padding-top: 0;
  }
}
.flow__i p {
  margin-top: 8px;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 32ch;
}
.flow__i kbd {
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  background: var(--paper);
  white-space: nowrap;
}

/* ─── 근거 (카드 세트가 아니라 정의 목록) ────────────────────────── */
.facts {
  margin-top: 40px;
  display: grid;
  gap: 0;
}
.fact {
  display: grid;
  gap: 6px 28px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
}
.fact:last-child {
  border-bottom: 1px solid var(--line);
}
@media (min-width: 760px) {
  .fact {
    grid-template-columns: minmax(0, 19ch) minmax(0, 1fr) auto;
    align-items: start;
  }
}
.fact h3 {
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.fact p {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 48ch;
}
.fact__n {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  padding-top: 2px;
}
.fact__n em {
  font-style: normal;
  color: var(--ink-soft);
}

/* ─── 한 달 동안 받는 것 ────────────────────────────────────────── */
/* 바로 앞 '근거' 절과 같은 모양이 반복되지 않도록 다른 결로 짠다 */
.gets {
  margin-top: 40px;
  display: grid;
  gap: 28px 40px;
}
@media (min-width: 720px) {
  .gets {
    grid-template-columns: 1fr 1fr;
  }
}
.get {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.get h3 {
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.get p {
  margin-top: 8px;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 36ch;
}

/* ─── 포함되는 것 — 앞 절과 모양이 겹치지 않게 체크 목록으로 ─────── */
.incl {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
@media (min-width: 760px) {
  .incl {
    grid-template-columns: 1fr 1fr;
    gap: 4px 36px;
  }
}
.incl li {
  position: relative;
  padding: 16px 0 16px 38px;
  border-bottom: 1px solid var(--line);
}
.incl li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 19px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--indigo);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E") center/contain no-repeat;
}
.incl li::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 25px;
  width: 10px;
  height: 5px;
  border-left: 2.2px solid var(--card);
  border-bottom: 2.2px solid var(--card);
  transform: rotate(-45deg);
}
.incl h3 {
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.incl p {
  margin-top: 5px;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 34ch;
}

/* ─── 마지막 — 요금 + 신청 ──────────────────────────────────────── */
.close {
  background: #2a2570;
  color: #fff;
  padding-block: 64px 72px;
}
:root[data-theme='dark'] .close,
:root:not([data-theme='light']) .close {
  background: #1d1a4e;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .close {
    background: #2a2570;
  }
}
.close__in {
  display: grid;
  gap: 32px;
}
@media (min-width: 860px) {
  .close__in {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 56px;
  }
}
.close h2 {
  font-size: clamp(28px, 4.4vw, 42px);
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.close p {
  margin-top: 16px;
  max-width: 44ch;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.76);
}
.close__fine {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 15px !important;
}
.close__act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
@media (min-width: 860px) {
  .close__act {
    flex-direction: column;
    align-items: stretch;
  }
}
.close__doc {
  background: none;
  border: 0;
  padding: 2px 4px;
  font: inherit;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
}
.close__doc:hover {
  color: #fff;
}

/* ─── 모바일 하단 고정 ──────────────────────────────────────────── */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #2a2570;
  color: #fff;
  transform: translateY(110%);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dock--on {
  transform: none;
}
.dock__price {
  font-size: 15px;
  margin-right: auto;
}
.dock__price b {
  font-family: var(--latin);
  font-variant-numeric: tabular-nums;
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
@media (min-width: 860px) {
  .dock {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dock {
    transition: none;
  }
}

/* ─── 신청 페이지 ───────────────────────────────────────────────── */
.formpage {
  padding-block: 44px 72px;
}

/* 결과 한 줄만 있는 짧은 화면(/go/). 내용이 적어도 푸터는 바닥에 붙여 둔다. */
.page--center {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.page--center .formpage {
  flex: 1;
}
.formpage__in {
  max-width: 760px;
}
.formpage__head h1 {
  font-size: clamp(28px, 5vw, 38px);
}
.formpage__head > p {
  margin-top: 12px;
  color: var(--ink-soft);
  max-width: 44ch;
}
.formpage__price {
  margin-top: 16px !important;
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--indigo-weak);
  color: var(--indigo) !important;
  font-size: 15px;
  font-weight: 600;
}
.formpage__price b {
  font-family: var(--latin);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.opt {
  font-weight: 400;
  color: var(--ink-soft);
}

/* ─── 신청 폼 ───────────────────────────────────────────────────── */
.apply {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  padding: 26px 20px 28px;
}
@media (min-width: 760px) {
  .apply {
    padding: 34px;
  }
}
.fields {
  display: grid;
  gap: 18px;
}
@media (min-width: 680px) {
  .fields {
    grid-template-columns: 1fr 1fr;
  }
  .f--full {
    grid-column: 1 / -1;
  }
}
.f label,
.bankset legend {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0;
}
.f label .req,
.bankset legend .req {
  color: var(--indigo);
  margin-left: 2px;
}
.bankset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.f input,
.f textarea,
.f select {
  width: 100%;
  font: inherit;
  /* 16px 미만이면 iOS 가 포커스할 때 화면을 확대해 칸을 밀어낸다 */
  font-size: 17.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.f textarea {
  min-height: 74px;
  resize: vertical;
}
.f input:focus,
.f textarea:focus,
.f select:focus {
  border-color: var(--indigo);
  outline: none;
  box-shadow: 0 0 0 3px var(--indigo-weak);
}
.f__hint {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
/* 좁은 화면에서 계좌번호를 3등분하면 입력할 수가 없다.
   order 로 위치를 바꾸면 키보드·스크린리더 순서가 어긋나므로 그냥 쌓는다. */
.bank {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
@media (min-width: 560px) {
  .bank {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 0.8fr);
  }
}

/* 동의 */
.agree {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.agree__all {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}
.agree__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 15px;
}
.agree__row + .agree__row {
  border-top: 1px solid var(--line);
}
.agree input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: var(--indigo);
  flex: none;
  margin: 0;
}
.agree__row label {
  cursor: pointer;
}
.tag {
  font-size: 13.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--indigo-weak);
  color: var(--indigo);
  flex: none;
}
.tag--opt {
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.agree__view {
  margin-left: auto;
  font-size: 15px;
  background: none;
  border: none;
  color: var(--indigo);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 2px 4px;
  flex: none;
}
.apply__submit {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}
.apply__note {
  font-size: 15px;
  color: var(--ink-soft);
}

/* 모달 */
dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: 82vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(12, 12, 9, 0.5);
}
.dlg__bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.dlg__bar h3 {
  font-size: 17.5px;
  margin-right: auto;
}
.dlg__body {
  padding: 18px;
  font-size: 16px;
  line-height: 1.8;
}
.dlg__body h4 {
  margin: 22px 0 6px;
  font-size: 16px;
}
.dlg__body h4:first-child {
  margin-top: 0;
}
.dlg__body p {
  color: var(--ink-soft);
  margin-bottom: 8px;
}

/* ─── 푸터 ──────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 32px 48px;
  font-size: 15px;
  color: var(--ink-soft);
}
.foot__in {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
}
.foot a {
  color: var(--ink-soft);
}
.foot .brand {
  margin-right: auto;
  font-size: 16px;
}
/* .agree__view 의 margin-left:auto 가 푸터에서 링크를 흩어놓는다 */
.foot .agree__view {
  margin-left: 0;
  color: var(--ink-soft);
}

/* ─── 모션 ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .tile--pick {
    animation: settle 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  }
  .tile--pick:nth-of-type(2) {
    animation-delay: 0.08s;
  }
  .tile--pick:nth-of-type(6) {
    animation-delay: 0.16s;
  }
  @keyframes settle {
    from {
      transform: scale(0.9);
      box-shadow: inset 0 0 0 0 var(--indigo);
    }
  }
}

/* ─── 로그인 ─────────────────────────────────────────────────────── */
.formpage__in--narrow {
  max-width: 460px;
}
.fields--one {
  grid-template-columns: 1fr;
}
@media (min-width: 680px) {
  .fields--one {
    grid-template-columns: 1fr;
  }
}
.notice {
  margin: 18px 0 0;
  min-height: 1.4em;
  font-size: 15px;
  color: var(--ink-soft);
}
.notice[data-tone='warn'] {
  color: var(--danger);
  font-weight: 600;
}
.notice[data-tone='ok'] {
  color: var(--ok);
  font-weight: 600;
}
.formpage__alt {
  margin-top: 22px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
}
.formpage__alt a {
  color: var(--indigo);
  font-weight: 600;
  text-underline-offset: 3px;
}
.apply__note[data-tone='warn'] {
  color: var(--danger);
  font-weight: 600;
}
.apply__note[data-tone='ok'] {
  color: var(--ok);
  font-weight: 600;
}

/* ─── 문의 — 오픈톡방 ─────────────────────────────────────────────── */
/* 주소가 설정되지 않으면 common.js 가 hidden 을 풀지 않는다. */
/* 제 너비를 지키면서 줄만 바꾼다. flex 항목에 flex-basis:100% 를 주면 늘어나 버린다. */
.apply__submit:has(.chatbtn)::after {
  content: '';
  flex-basis: 100%;
  height: 0;
  order: 1;
}
.chatbtn {
  order: 2;
  flex: 0 0 auto;
}
.chatbtn svg {
  width: 17px;
  height: 17px;
  flex: none;
  opacity: 0.85;
}
.foot__in [data-openchat] {
  cursor: pointer;
}

/* ─── 운영 화면 ───────────────────────────────────────────────────── */
.who {
  margin-left: auto;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--indigo-weak);
  color: var(--indigo);
  font-size: 13.5px;
  font-weight: 700;
}
.seg + .seg {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.seg h2 {
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.seg__sub {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}
.seg .fields {
  margin-top: 18px;
}
.switches {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
.sw {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  cursor: pointer;
}
.sw input {
  width: 18px;
  height: 18px;
  accent-color: var(--indigo);
  flex: none;
}
.f__hint code {
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 1px 4px;
  border-radius: var(--r-sm);
  background: var(--paper);
}

/* ─── 운영 — 표와 거르기 ─────────────────────────────────────────── */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.filters {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filters input[type='search'],
.filters select {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 9px 12px;
}
.filters input[type='search'] {
  flex: 1 1 220px;
  min-width: 0;
}
.filters select {
  flex: 0 0 auto;
}
.tablewrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  white-space: nowrap;
}
.tbl th,
.tbl td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.tbl thead th {
  background: var(--paper);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tbl td.act {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tbl .empty {
  padding: 22px 12px;
  color: var(--ink-soft);
  text-align: center;
}
.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  background: var(--paper);
  border: 1px solid var(--line);
}
.chip--pending {
  background: #fff4e5;
  border-color: #f3d6a8;
  color: #8a5300;
}
.chip--active {
  background: #e8f6ec;
  border-color: #bfe3c9;
  color: #1a6b32;
}
.chip--suspended,
.chip--rejected {
  background: #fdecea;
  border-color: #f3c3bd;
  color: #9b2317;
}
:root[data-theme='dark'] .chip--pending,
:root:not([data-theme='light']) .chip--pending {
  background: #3a2c12;
  border-color: #5c4521;
  color: #f0c47a;
}
:root[data-theme='dark'] .chip--active,
:root:not([data-theme='light']) .chip--active {
  background: #14301d;
  border-color: #255936;
  color: #86d9a1;
}
:root[data-theme='dark'] .chip--suspended,
:root[data-theme='dark'] .chip--rejected,
:root:not([data-theme='light']) .chip--suspended,
:root:not([data-theme='light']) .chip--rejected {
  background: #3a1a16;
  border-color: #5e2a23;
  color: #f0a79d;
}
.pager {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}
.subform {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.subform h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.subform .fields {
  margin-top: 16px;
}
.ask {
  padding: 22px 22px 20px;
  display: grid;
  gap: 12px;
}
.ask h3 {
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.ask p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.ask__act {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
#askDlg {
  width: min(100% - 32px, 420px);
}


/* ─── 비밀번호 칸 — 쳐지고 있는지 보이게 ───────────────────────── */
.pwwrap {
  position: relative;
  display: block;
}
.pwwrap input {
  padding-right: 46px !important;
}
.pweye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.pweye:hover {
  color: var(--indigo);
}
.pweye svg {
  width: 19px;
  height: 19px;
}
.pwwarn {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--danger);
}
