/* 아포카라인 게임 사이트 첫 화면. 색은 앱 테마(app/lib/ui/theme.dart)의 모래색 바탕·호박색 강조·청회색 글자를 따른다. */
@font-face { font-family: "Gothic A1"; src: url("/fonts/gothic-a1-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gothic A1"; src: url("/fonts/gothic-a1-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Gothic A1"; src: url("/fonts/gothic-a1-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #f6f2ec;
  --surface: #fffdf9;
  --ink: #1d2830;
  --ink-soft: #4a5a66;
  --line: #e3dbcf;
  --accent: #d98e2b;
  --accent-ink: #2c1700;
  --accent-strong: #a8640f;
  /* 진한 호박색 위 글자: 흰색(4.6:1) */
  --accent-strong-ink: #ffffff;
  --focus: #3d5566;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151b21;
    --surface: #1c242c;
    --ink: #e8e3db;
    --ink-soft: #a9b4bd;
    --line: #2d3943;
    --accent: #f0b160;
    --accent-ink: #3a2400;
    /* 어두운 화면에서는 강조색을 한 단계 밝혀 짙은 글자를 그대로 둔다(흰 글자는 1.9:1 로 읽히지 않음). */
    --accent-strong: #f6c88a;
    --accent-strong-ink: #3a2400;
    --focus: #9fb6c6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Gothic A1", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  /* 한국어는 낱말 중간에서 줄을 바꾸지 않는다(빈칸에서만). */
  word-break: keep-all;
  overflow-wrap: anywhere;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, 760px); margin-inline: auto; }

.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.back { color: var(--ink-soft); font-size: 0.9rem; text-underline-offset: 4px; }
.back:hover { color: var(--ink); }

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 56px 0 10px; text-wrap: balance; }
.lead { color: var(--ink-soft); margin: 0 0 36px; max-width: 60ch; }

.games { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.game {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.game h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 6px; }
.game-text > p { margin: 0 0 14px; max-width: 62ch; }

.facts { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 12px; font-size: 0.9rem; }
.facts div { display: flex; gap: 8px; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; }

details { font-size: 0.92rem; color: var(--ink-soft); }
summary { cursor: pointer; color: var(--ink); font-weight: 600; width: fit-content; }
details p { margin: 8px 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
pre { margin: 6px 0 0; }
pre code { display: inline-block; padding: 8px 12px; }

.actions { display: flex; flex-direction: column; gap: 10px; align-self: start; min-width: 132px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover { border-color: var(--ink-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-strong-ink); }

.foot { color: var(--ink-soft); font-size: 0.82rem; padding: 40px 0 48px; }

@media (max-width: 560px) {
  h1 { margin-top: 36px; }
  .game { grid-template-columns: 1fr; }
  .actions { flex-direction: row; }
  .actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
