/* 주사위 원정대 (Dice Brigade) — 앱 아이콘(DCP_ios1024.png / DCP_round.svg) 팔레트 네 색만.
   적 #C8321F 판 위에 상아 주사위, 먹 눈·깃대, 금 깃발. 아이콘처럼 외곽선 없이 평면 도형 +
   번짐 없는 아래쪽 두께 그림자. 구조는 products/wareureu 컴포넌트 클래스, 값만 교체. 고정 라이트. */

@font-face {
  font-family: "Do Hyeon";
  src: url("./fonts/DoHyeon-Regular-subset.woff2") format("woff2");
  font-weight: 400; /* 굵기 하나뿐 — 600+ 주면 가짜 볼드 */
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pixelify Sans";
  src: url("./fonts/PixelifySans-Bold-subset.woff2") format("woff2");
  font-weight: 700; /* 앱 번들 가변 폰트를 wght 700 으로 고정한 인스턴스(앱 AppType.pixel 과 같은 굵기) */
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --red: #c8321f;        /* 적 — 아이콘 바탕. 상아 글자 5.17:1 */
  --ivory: #fffbf0;      /* 상아 — 주사위 윗면 */
  --gold: #ffc83d;       /* 금 — 깃발. 먹 글자 10.82:1 */
  --ink: #2a1a12;        /* 먹 — 눈·깃대·본문. 상아 위 16.18:1 */
  --bg: #fff3d3;         /* 금 16% + 상아 */
  --muted: #61544c;      /* 먹 74% + 상아 — 상아 위 7.05:1, bg 위 6.60:1 */
  --accent: #c8321f;     /* bg 위 4.84:1, 상아 위 5.17:1 */
  --accent-strong: #2a1a12;
  --surface: #fffbf0;
  --surface-soft: #fff3d3;
  --line: #948a81;       /* 먹 50% + 상아 — 입력칸 테두리(비텍스트 3.27:1) */
  --rule: rgb(42 26 18 / 14%);
  --edge: rgb(42 26 18 / 16%);   /* 카드 아래 두께 */
  --red-edge: #912a1a;   /* 먹 35% + 적 — 아이콘 그림자 타원 톤 */
  --shadow: 0 6px 0 var(--edge);
  --shadow-sm: 0 4px 0 var(--edge);
  --display: "Do Hyeon", "Apple SD Gothic Neo", "Noto Sans KR", 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;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0;
}

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(--ink);
  outline-offset: 3px;
}

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

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

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 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;
}

/* 히어로 — 아이콘과 같은 적 판. 아이콘 PNG 바탕이 같은 #C8321F 라 주사위만 떠 보인다 */
.hero {
  margin: 12px 0 8px;
  padding: 44px 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--red);
  color: var(--ivory);
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--red-edge);
}

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

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

.h1-accent {
  color: var(--gold); /* 적 위 3.45:1 — 36px 이상 큰 글자에만 */
}

.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(--ivory);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 14px 5px 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.badge::before {
  content: "";
  width: 12px;
  height: 14px;
  background: linear-gradient(var(--ink), var(--ink)) left top / 2px 100% no-repeat, var(--gold);
  clip-path: polygon(0 0, 2px 0, 100% 30%, 2px 60%, 2px 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;
  box-shadow: 0 4px 0 var(--ink);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
}

.btn-ghost {
  background: var(--ivory);
  color: var(--ink);
}

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

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: min(320px, 100%);
  height: auto;
  display: block;
}

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

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

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

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

/* 눈썹 — 주사위 눈 개수 + 영문(Pixelify). Pixelify 숫자 2·5 는 작은 크기에서 8·S 처럼 보여 숫자는 Do Hyeon 으로 쓴다 */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.pip-row {
  display: inline-flex;
  gap: 4px;
}

.pip-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

/* 면 칩 — 색 + 글자(공·관·방·힐) 이중 구분 */
.face {
  display: inline-grid;
  place-items: center;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1;
  border-radius: 9px;
  white-space: nowrap;
}

.f-atk { background: var(--red); color: var(--ivory); }
.f-prc { background: var(--ivory); color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.f-def { background: var(--ivory); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.f-heal { background: var(--gold); color: var(--ink); }
.f-sp { background: var(--ink); color: var(--gold); }

.face-legend {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  color: var(--muted);
}

.face-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.face-legend .face {
  width: 26px;
  height: 26px;
  font-size: 14px;
  border-radius: 7px;
}

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

.hero-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-card h3 {
  font-size: 23px;
  line-height: 1.2;
  margin: 0;
}

.hero-card .job {
  font-size: 13.5px;
  color: var(--muted);
  margin: -6px 0 0;
}

.faces {
  list-style: none;
  padding: 0;
  margin: 2px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.faces .face {
  height: 38px;
}

.hero-card p:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.art-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: 16px 0 0;
}

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

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

.step-no {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1;
}

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

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

/* 규칙 그림 — 먹 쟁반 위 상아 주사위(실제 게임 화면이 아니라 규칙 설명용) */
.tray {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 10px;
  background: var(--ink);
  border-radius: 14px;
}

.die {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: var(--ivory);
  color: var(--ink);
  border-radius: 8px;
  font-family: var(--display);
  font-size: 14px;
  line-height: 1;
}

.die.is-locked {
  box-shadow: inset 0 0 0 3px var(--gold);
}

.die.is-rolling {
  background: transparent;
  color: var(--ivory);
  box-shadow: inset 0 0 0 2px var(--ivory);
  opacity: 0.75;
}

.order {
  list-style: none;
  margin: 0;
  padding: 10px;
  background: var(--ink);
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  counter-reset: ord;
}

.order li {
  counter-increment: ord;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 6px 2px;
  background: var(--ivory);
  border-radius: 8px;
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.1;
}

.order li::before {
  content: counter(ord);
  font-size: 12px;
  color: var(--red);
}

.foe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  background: var(--ink);
  border-radius: 14px;
}

.foe-name {
  color: var(--ivory);
  font-family: var(--display);
  font-size: 16px;
}

.intent {
  background: var(--red);
  color: var(--ivory);
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--display);
  font-size: 14px;
  white-space: nowrap;
}

/* 한 판 — 던전 지도 */
.track-panel {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px 20px 18px;
}

.track,
.zones {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.track {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.track::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: var(--ink);
  border-radius: 2px;
}

.node {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 56px;
  width: 100%;
  justify-self: center;
  background: var(--ivory);
  color: var(--ink);
  box-shadow: inset 0 0 0 2.5px var(--ink);
  border-radius: 10px;
  font-family: var(--display);
  font-size: clamp(15px, 2.6vw, 22px);
  line-height: 1;
}

.node-rest,
.node-boss {
  font-size: clamp(11px, 1.9vw, 16px);
}

.node-rest {
  background: var(--gold);
  box-shadow: none;
}

.node-boss {
  background: var(--red);
  color: var(--ivory);
  box-shadow: none;
}

/* 보스 칸에 아이콘의 깃발 */
.node-boss::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 16px;
  height: 18px;
  margin-bottom: 2px;
  background: linear-gradient(var(--ink), var(--ink)) left top / 2px 100% no-repeat, var(--gold);
  clip-path: polygon(0 0, 2px 0, 100% 28%, 2px 56%, 2px 100%, 0 100%);
}

.zones {
  margin-top: 10px;
}

.zone {
  text-align: center;
  font-family: var(--display);
  font-size: 15px;
  color: var(--muted);
  padding-top: 6px;
  border-top: 3px solid var(--rule);
}

.zone.z3 { grid-column: span 3; }
.zone.z2 { grid-column: span 2; border-top-color: transparent; }
.zone.z2:nth-child(3) { border-top-color: var(--rule); }

.track-panel .art-note {
  margin-top: 12px;
}

.run-notes {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

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

.feature-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px;
  border-top: 10px solid var(--ink);
}

.feature-card.is-red { border-top-color: var(--red); }
.feature-card.is-gold { border-top-color: var(--gold); }
.feature-card.is-ink { border-top-color: var(--ink); }
.feature-card.is-ivory { border-top-color: var(--line); }

.feature-card h3 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 8px;
}

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

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

.principle {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 18px 40px;
  position: relative;
}

/* 주사위 눈 하나 */
.principle::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 27px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
}

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

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

.faq-list details {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  margin-bottom: 12px;
}

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

.faq-list details[open] summary {
  color: var(--accent);
}

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

.contact-card {
  background: var(--surface);
  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-radius: 18px;
  box-shadow: var(--shadow);
  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(--bg);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  font-family: inherit;
  width: 100%;
}

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

.support-form button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.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: 22px;
  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-radius: 12px;
  box-shadow: var(--shadow-sm);
  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: 900px) {
  .loop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .hero-art {
    order: -1;
    justify-content: flex-start;
  }

  .hero-art img {
    width: 150px;
    margin: -10px 0 0 -14px;
  }
}

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

  .track-panel {
    padding: 22px 12px 16px;
  }

  .track,
  .zones {
    gap: 3px;
  }

  .node {
    border-radius: 7px;
  }

  .node-boss::after {
    width: 12px;
    height: 14px;
  }
}

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