/* 도깨비 자판기 (Goblin Vending) — 앱 아이콘(SSL_ios1024.png / SSL_round.svg) 팔레트 4색만 쓴다:
   청록 #0E4744 · 도깨비 적 #E4432D · 부적 금 #FFC83D · 상아 #F6E7C8.
   아이콘의 언어 = 외곽선 없는 둥근 판, 상아 뿔·송곳니 삼각형, 금빛 부적 카드 위 붉은 획, 금화 원.
   구조는 products/wareureu 카드형 컴포넌트, 값만 교체. 고정 라이트. 파생 색은 CLAUDE.md "디자인 근거". */

@font-face {
  font-family: "Black Han Sans";
  src: url("./fonts/BlackHanSans-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pixelify Sans";
  src: url("./fonts/PixelifySans-Bold-subset.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --teal: #0e4744;        /* 청록 — 아이콘 바탕. 잉크·히어로 판·외곽선·그림자 */
  --red: #e4432d;         /* 도깨비 적 — 자판기 몸통·뿔·밑줄·포커스. 글자색으로 쓰지 않는다(상아 위 3.34:1) */
  --gold: #ffc83d;        /* 부적 금 — 버튼·배지·부적 카드. 위 글자는 청록(6.78:1) */
  --ivory: #f6e7c8;       /* 상아 — 바탕. 청록 판 위 글자(8.58:1) */
  --bg: #f6e7c8;
  --ink: #0e4744;         /* 상아 위 8.58:1 */
  --muted: #3c675e;       /* 청록 80% + 상아 20% — 상아 위 5.22:1, surface-soft 위 4.72:1 */
  --accent: #e4432d;      /* 밑줄·점·포커스 링(비글자, 상아 대비 3.34:1) */
  --accent-strong: #0e4744;
  --surface: #f6e7c8;
  --surface-soft: #e8ddc0; /* 상아 94% + 청록 6% — 입력칸·표 머리 */
  --line: #0e4744;
  --rule: rgb(14 71 68 / 18%);
  --tile-empty: rgb(246 231 200 / 12%); /* 청록 판 위 빈칸 = 상아 12% */
  --shadow: 5px 5px 0 #0e4744;
  --shadow-sm: 3px 3px 0 #0e4744;
  --display: "Black Han Sans", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --pixel: "Pixelify Sans", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --body: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Black Han Sans 는 한 굵기(400)뿐 — 600+ 를 주면 가짜 볼드가 된다. */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.005em;
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* 청록 판 위에서는 적색 링이 2.57:1 이라 금색 링(6.78:1)으로 바꾼다. */
.hero a:focus-visible,
.story a:focus-visible {
  outline-color: var(--gold);
}

.site-header {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-size: 21px;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

main {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

/* 히어로 — 아이콘과 같은 청록 판 */
.hero {
  margin: 12px 0 8px;
  padding: 44px 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--teal);
  color: var(--ivory);
  border-radius: 28px;
  box-shadow: 6px 6px 0 var(--red);
}

.hero a {
  color: var(--ivory);
}

.hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  display: block;
  margin-bottom: 20px;
  box-shadow: 4px 4px 0 var(--red);
}

.wordmark {
  display: block;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin: 0 0 6px;
}

.hero h1 {
  font-size: clamp(36px, 5.8vw, 60px);
  line-height: 1.16;
  margin: 0 0 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero p.lead {
  font-size: clamp(16px, 2.2vw, 18px);
  max-width: 540px;
  margin: 0 0 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--teal);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

/* 뿔 모양 점 — 아이콘의 상아 뿔을 적색 삼각형으로 */
.badge::before {
  content: "";
  width: 10px;
  height: 9px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}

.btn:active {
  transform: translate(2px, 2px);
}

.btn-primary {
  background: var(--gold);
  color: var(--teal);
  box-shadow: 3px 3px 0 var(--red);
}

.btn-primary:active {
  box-shadow: 1px 1px 0 var(--red);
}

.hero .btn-primary {
  color: var(--teal);
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border: 2px solid var(--ivory);
  padding: 9px 18px;
}

.store-note {
  font-size: 13.5px;
  margin: 14px 0 0;
}

/* ── 설명용 자판기 그림(실제 게임 화면 아님) ─────────────────────────── */
.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.machine {
  --cell: clamp(30px, 7.6vw, 42px);
  --gap: 5px;
  --pad: 10px;
  position: relative;
  padding-top: 40px;
}

.horn {
  position: absolute;
  top: 0;
  width: 58px;
  height: 58px;
  background: var(--ivory);
}

.horn-l {
  left: 2px;
  clip-path: polygon(0 0, 100% 72%, 30% 100%);
}

.horn-r {
  right: 2px;
  clip-path: polygon(100% 0, 70% 100%, 0 72%);
}

.machine-body {
  position: relative;
  background: var(--red);
  border-radius: 30px;
  padding: 12px 14px 16px;
  /* 몸통 오른쪽 어두운 띠 = 청록 22% 덧칠(아이콘의 측면 띠) */
  box-shadow: inset -16px 0 0 rgb(14 71 68 / 22%);
}

.machine-brow {
  height: 30px;
  border-radius: 12px;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 0 4px 12px;
}

.machine-brow i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
}

.machine-window {
  position: relative;
  background: var(--teal);
  border-radius: 16px;
  padding: var(--pad);
}

.board {
  display: grid;
  grid-template-columns: repeat(5, var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap);
}

.board i {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--tile-empty);
  font-style: normal;
  font-family: var(--display);
  font-size: calc(var(--cell) * 0.46);
  line-height: 1;
  color: var(--teal);
}

.board i.s {
  background: var(--ivory);
}

.board i.g {
  background: var(--gold);
}

/* 창 밖 칸 — 코인을 벌지 못한다는 뜻으로 흐리게 */
.board i.off {
  opacity: 0.45;
}

.board i b {
  position: absolute;
  top: -7px;
  right: -7px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  padding: 3px 4px;
  border-radius: 5px;
  background: var(--gold);
  color: var(--teal);
  z-index: 2;
}

/* 3×3 활성 창 — 금색 틀(번짐 없음) */
.spin-window {
  --col: 1;
  --row: 0;
  position: absolute;
  left: calc(var(--pad) + var(--col) * (var(--cell) + var(--gap)) - 5px);
  top: calc(var(--pad) + var(--row) * (var(--cell) + var(--gap)) - 5px);
  width: calc(var(--cell) * 3 + var(--gap) * 2 + 10px);
  height: calc(var(--cell) * 3 + var(--gap) * 2 + 10px);
  border: 3px solid var(--gold);
  border-radius: 12px;
  pointer-events: none;
}

.machine-tray {
  position: relative;
  height: 58px;
  margin: 14px 12px 0;
  border-radius: 14px;
  background: var(--teal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding-bottom: 10px;
  overflow: hidden;
}

/* 송곳니 — 아이콘 동전 투입구의 상아 삼각형 두 개 */
.machine-tray::before,
.machine-tray::after {
  content: "";
  position: absolute;
  top: 0;
  width: 22px;
  height: 20px;
  background: var(--ivory);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.machine-tray::before {
  left: 18%;
}

.machine-tray::after {
  right: 18%;
}

.coin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
}

.coin-sm {
  width: 16px;
  height: 16px;
  /* 두 번째 금화 = 금 + 청록 15% 덧칠(아이콘의 어두운 금화) */
  box-shadow: inset 0 0 0 20px rgb(14 71 68 / 15%);
}

.machine-feet {
  display: flex;
  justify-content: space-between;
  padding: 0 44px;
}

.machine-feet i {
  width: 36px;
  height: 12px;
  border-radius: 0 0 6px 6px;
  background: var(--red);
  box-shadow: inset 0 0 0 20px rgb(14 71 68 / 40%);
}

.art-note {
  font-size: 12.5px;
  margin: 0;
  text-align: center;
}

section {
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}

.hero + section {
  border-top: 0;
}

section h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.28;
  margin: 0 0 8px;
}

section > p.section-lead {
  color: var(--muted);
  max-width: 660px;
  margin: 0 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.eyebrow::before {
  content: "";
  width: 11px;
  height: 10px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

/* 한 라운드의 흐름 — 네 장면 */
.loop {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.loop-step {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 30px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--teal);
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 15px;
}

.loop-step h3 {
  font-size: 21px;
  margin: 0;
}

.loop-step p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

/* 장면 안 작은 화면 — 청록 판 */
.screen {
  --cell: 22px;
  --gap: 3px;
  --pad: 8px;
  position: relative;
  align-self: center;
  background: var(--teal);
  border-radius: 14px;
  padding: var(--pad);
  min-height: 112px;
  display: grid;
  place-items: center;
}

.screen .board i {
  border-radius: 5px;
}

.screen .spin-window {
  border-width: 2px;
  border-radius: 8px;
  left: calc(var(--pad) + var(--col) * (var(--cell) + var(--gap)) - 3px);
  top: calc(var(--pad) + var(--row) * (var(--cell) + var(--gap)) - 3px);
  width: calc(var(--cell) * 3 + var(--gap) * 2 + 6px);
  height: calc(var(--cell) * 3 + var(--gap) * 2 + 6px);
}

.screen-wide {
  align-self: stretch;
  padding: 14px;
}

.combo {
  --cell: 34px;
  --gap: 4px;
  display: flex;
  gap: 18px;
}

.combo .board {
  grid-template-columns: repeat(2, var(--cell));
}

.gauge {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--ivory);
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 12px;
}

.gauge + .gauge {
  margin-top: 10px;
}

.gauge .bar {
  height: 14px;
  border-radius: 7px;
  background: var(--tile-empty);
  overflow: hidden;
}

.gauge .bar b {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: var(--gold);
}

.gauge .bar b.rent {
  background: var(--red);
}

.gauge-label-ko {
  font-family: var(--display);
  font-weight: 400;
  font-size: 13px;
}

.offers {
  --cell: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.offers .board {
  grid-template-columns: repeat(3, var(--cell));
  gap: 8px;
}

.offers .pick {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal);
  background: var(--ivory);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

/* 특징 — 부적 카드: 금빛 머리띠 + 아이콘의 붉은 획 */
/* 6장 = 넓은 화면 3열 × 2줄 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.talisman {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gold);
  border-bottom: 2px solid var(--line);
  padding: 10px 16px;
  color: var(--teal);
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.16em;
}

.talisman svg {
  width: 17px;
  height: 32px;
  flex: none;
}

.talisman path {
  fill: none;
  stroke: var(--red);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-body {
  padding: 16px 20px 20px;
}

.feature-card h3 {
  font-size: 21px;
  margin: 0 0 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* 봉인된 자판기 — 청록 띠 위 세 인물의 대사 */
.story {
  background: var(--teal);
  color: var(--ivory);
  border-top: 0;
  border-radius: 28px;
  padding: 44px 40px;
  margin: 8px 0;
}

.story + section {
  border-top: 0;
}

.story .eyebrow {
  color: var(--gold);
}

.story > p.section-lead {
  color: var(--ivory);
}

.cast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.cast figure {
  margin: 0;
}

.cast blockquote {
  position: relative;
  margin: 0 0 14px;
  background: var(--ivory);
  color: var(--teal);
  border-radius: 16px;
  padding: 16px 18px;
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.45;
}

/* 말꼬리 = 아이콘의 송곳니 삼각형 */
.cast blockquote::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -14px;
  width: 20px;
  height: 15px;
  background: var(--ivory);
  clip-path: polygon(0 0, 100% 0, 30% 100%);
}

.cast figcaption strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
  color: var(--gold);
}

.cast figcaption span {
  font-size: 14px;
}

.story .art-note {
  text-align: left;
  margin-top: 20px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.principle {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.principle strong {
  display: block;
  margin-bottom: 4px;
}

.principle span {
  color: var(--muted);
  font-size: 14px;
}

.faq-list details {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.faq-list details[open] {
  box-shadow: var(--shadow-sm);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
}

.faq-list p {
  color: var(--ink);
  margin: 10px 0 0;
  font-size: 14.5px;
}

.contact-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  text-align: center;
  max-width: 520px;
}

.contact-card a {
  font-size: 18px;
  font-weight: 700;
}

.support-form {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: grid;
  gap: 16px;
  max-width: 520px;
}

.support-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.support-form select,
.support-form input,
.support-form textarea {
  background: var(--surface-soft);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  font-family: inherit;
}

.support-form button {
  justify-self: start;
  background: var(--gold);
  color: var(--teal);
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 11px 24px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}

.support-form button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.support-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

#form-status {
  font-size: 13.5px;
  color: var(--muted);
  min-height: 1.2em;
  margin: 0;
}

.form-note {
  color: var(--muted);
  font-size: 14px;
  max-width: 640px;
}

footer {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--rule);
  padding: 28px 0 44px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

footer a {
  color: var(--muted);
}

/* Breadcrumb — 화면 표시와 BreadcrumbList 스키마를 1:1로 맞춘다. */
.breadcrumb {
  font-size: 13px;
  line-height: 1.5;
}

.breadcrumb ol {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4px 0 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
}

.breadcrumb a {
  color: inherit;
}

/* 방침 본문 — 긴 글이라 읽기 폭을 좁힌다. */
.policy {
  max-width: 780px;
  padding: 28px 0 48px;
}

.policy h1 {
  font-size: clamp(32px, 4.8vw, 44px);
  margin: 0 0 6px;
}

.policy .meta-date {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 28px;
}

.policy h2 {
  font-size: 21px;
  margin: 32px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.policy ol,
.policy ul {
  padding-left: 1.4em;
}

.policy li + li {
  margin-top: 6px;
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 2px solid var(--line);
  font-size: 14px;
  margin: 12px 0;
  display: block;
  overflow-x: auto;
}

.policy th,
.policy td {
  border: 1px solid var(--rule);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

.policy th {
  background: var(--surface-soft);
}

@media (max-width: 960px) {
  .loop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 30px 22px;
    gap: 32px;
  }

  .story {
    padding: 32px 22px;
  }
}

@media (max-width: 560px) {
  .loop {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .machine {
    --cell: 28px;
    --gap: 4px;
  }

  .horn {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
