/* 두두리 — 앱 디자인 G안(발라트로 계열)을 따른다. 토큰 출처: 앱 lib/core/design/app_theme.dart Palette.
   서체 = 앱 번들 도트 글꼴 Galmuri11 Bold(SIL OFL 1.1, Reserved Font Name 없음) — KS X 1001 한글 + 사이트 사용 글자로 서브셋해 자체 호스팅.
   배경 = 앱 셰이더(shaders/swirl.frag)와 같은 식을 어둡게 렌더한 bg.webp + CRT 주사선. 그림자는 번지지 않는 아래 턱. */
@font-face {
  font-family: "Galmuri11";
  src: url("fonts/Galmuri11-Bold.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #3a1418;
  --ink: #ffffff;
  --muted: #d5dcdf;
  --accent: #f5a623;
  --accent-strong: #a86a0b;
  --on-accent: #1a1a1a;
  --blue: #0093ff;
  --blue-dark: #005ca3;
  --red: #ff4b42;
  --red-dark: #a3241e;
  --gold: #f5c542;
  --surface: #3c4a52;
  --surface-soft: #263036;
  --line: #1b2226;
  --card: #efe9da;
  --card-ink: #2b2b2b;
  --shadow: 0 6px 0 var(--line);
  --pixel: "Galmuri11", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Hiragino Sans", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg) url("bg.webp") center / cover fixed;
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
}

/* CRT 주사선 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(0 0 0 / 9%) 0 1px, transparent 1px 3px);
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  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(--gold);
  outline-offset: 3px;
}

h1,
h2,
h3,
.brand,
.btn,
.badge,
summary,
.num {
  font-family: var(--pixel);
  letter-spacing: 0;
}

h1,
h2 {
  text-shadow: 0 3px 0 #1a1a1a, 2px 0 0 #1a1a1a, -2px 0 0 #1a1a1a;
}

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

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

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: 0 3px 0 var(--line);
}

.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 {
  color: var(--ink);
}

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

section {
  margin: 0 0 56px;
}

.hero {
  padding: 48px 0 40px;
  text-align: center;
}

.hero img.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  display: block;
  margin: 0 auto 24px;
  box-shadow: 0 8px 0 var(--line);
  transform: rotate(-4deg);
}

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

.hero h1 .gold {
  color: var(--gold);
}

.hero p.lead {
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 19px);
  max-width: 660px;
  margin: 0 auto 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 18px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 4px 0 var(--line);
  font-size: 14px;
  color: var(--gold);
}

.cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 80ms, box-shadow 80ms;
}

.btn:active {
  transform: translateY(4px);
  box-shadow: none !important;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 5px 0 var(--accent-strong);
}

.btn-ghost {
  background: var(--surface);
  box-shadow: 0 5px 0 var(--line);
}

h2 {
  font-size: clamp(24px, 3.6vw, 32px);
  margin: 0 0 8px;
}

.section-lead {
  color: var(--muted);
  margin: 0 0 22px;
}

/* 점수판: 피해(파랑) × 배수(빨강) — 앱 ScorePanel 을 옮긴 장식 */
.scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 28px;
  max-width: 420px;
  padding: 10px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-family: var(--pixel);
  font-size: 30px;
}

.scoreboard .chips,
.scoreboard .mult {
  flex: 1;
  padding: 4px 14px;
  border-radius: 8px;
  text-shadow: 0 2px 0 rgb(0 0 0 / 45%);
}

.scoreboard .chips {
  background: var(--blue);
  box-shadow: inset 0 -5px 0 var(--blue-dark);
  text-align: right;
}

.scoreboard .mult {
  background: var(--red);
  box-shadow: inset 0 -5px 0 var(--red-dark);
}

.scoreboard .x {
  color: var(--red);
}

.loop {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.loop-step,
.feature-card,
.principle {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.loop-step .num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 3px 0 var(--accent-strong);
  margin-bottom: 10px;
}

.loop-step h3,
.feature-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

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

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

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.chips span {
  background: var(--card);
  color: var(--card-ink);
  border-radius: 6px;
  padding: 2px 9px;
  font-size: 13px;
  box-shadow: 0 2px 0 var(--line);
}

.shots {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.shots img {
  width: min(260px, 44vw);
  height: auto;
  border-radius: 18px;
  border: 5px solid #1a1a1a;
  box-shadow: 0 8px 0 rgb(0 0 0 / 45%);
}

.shots img:nth-child(odd) {
  transform: rotate(-2deg);
}

.shots img:nth-child(even) {
  transform: rotate(2deg);
}

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

.principle strong {
  display: block;
  font-family: var(--pixel);
  font-size: 17px;
  margin-bottom: 6px;
}

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

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 4px 0 var(--line);
  padding: 14px 18px;
}

.faq-list summary {
  cursor: pointer;
  font-size: 16px;
}

.faq-list p {
  color: var(--muted);
  margin: 10px 0 0;
}

.support-form {
  display: grid;
  gap: 14px;
  max-width: 560px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 20px;
}

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

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

.support-form button {
  justify-self: start;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 5px 0 var(--accent-strong);
  font-family: var(--pixel);
  font-size: 16px;
  cursor: pointer;
}

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

#form-status {
  margin: 0;
  min-height: 1.4em;
  color: var(--gold);
}

.contact-card {
  display: inline-block;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 16px 20px;
  font-size: 17px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 18px;
}

.policy {
  background: rgb(38 48 54 / 94%);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 40px);
  margin-bottom: 56px;
}

.policy h1 {
  font-size: clamp(28px, 4.6vw, 40px);
  margin: 0 0 6px;
}

.policy h2 {
  font-size: 21px;
  margin: 34px 0 10px;
  text-shadow: none;
  color: var(--gold);
}

.policy p,
.policy li {
  color: #eef2f4;
}

.policy .meta {
  color: var(--muted);
  font-size: 14px;
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 15px;
}

.policy th,
.policy td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid #55656e;
}

.policy td:first-child {
  min-width: 7.5em;
}

.policy th {
  font-family: var(--pixel);
  color: var(--gold);
  font-weight: 400;
}

footer {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

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

@media (max-width: 640px) {
  .site-nav {
    gap: 12px;
  }

  .policy table,
  .policy thead,
  .policy tbody,
  .policy tr,
  .policy th,
  .policy td {
    display: block;
  }

  .policy thead {
    display: none;
  }

  .policy td {
    border-bottom: 0;
    padding: 4px 0;
  }

  .policy tr {
    border-bottom: 1px solid #55656e;
    padding: 8px 0;
  }
}

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

  .btn {
    transition: none;
  }
}
