/* หน้าแจ้งปิดระบบเดิมของ KaiOnline
 * ค่าทั้งหมดคัดจาก design system V4 ที่ใช้จริง:
 * _archive/Code/kaionline-v4/packages/ui/src/tokens.css + design.md (ลูกค้าเลือก 2026-10-12)
 * ใช้เฉพาะโทเคนที่หน้านี้ต้องใช้ ห้ามใส่ค่าสีหรือขนาดดิบในส่วนล่างของไฟล์ */

@font-face {
  font-family: "Anuphan";
  font-weight: 400 500;
  font-display: swap;
  src: url(/fonts/anuphan-thai.woff2) format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Anuphan";
  font-weight: 400 500;
  font-display: swap;
  src: url(/fonts/anuphan-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Prompt";
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/prompt-600-thai.woff2) format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Prompt";
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/prompt-600-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* V4 tokens */
  --color-paper: oklch(98.8% 0.006 95);
  --color-surface: oklch(99.3% 0.005 95);
  --color-chip: oklch(96.2% 0.010 95);
  --color-band-from: oklch(94.5% 0.034 250);
  --color-band-to: oklch(96.5% 0.022 250);
  --color-ink: oklch(25% 0.03 262);
  --color-ink-2: oklch(45% 0.025 262);
  --color-ink-3: oklch(50% 0.022 262);
  --color-rule: oklch(91% 0.012 262);
  --color-accent: oklch(55% 0.17 255);
  --color-accent-hover: oklch(51% 0.17 255);
  --color-accent-active: oklch(48% 0.17 255);
  --color-accent-ink: oklch(99% 0.005 95);
  --color-fresh: oklch(74% 0.11 165);
  --color-sun: oklch(84% 0.13 92);
  --color-sun-wash: oklch(94.5% 0.075 95);
  --color-sun-ink: oklch(44% 0.1 80);
  --ring: oklch(45% 0.16 255);

  --font-display: "Prompt", "Anuphan", -apple-system, sans-serif;
  --font-body: "Anuphan", -apple-system, "Segoe UI", sans-serif;

  --text-sm: 0.78125rem;
  --text-md: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2.125rem;

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  --radius-chip: 8px;
  --radius-card: 20px;
  --radius-sheet: 32px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px oklch(30% 0.04 262 / 0.05), 0 5px 16px oklch(30% 0.04 262 / 0.09);
  --shadow-cta: 0 4px 14px oklch(55% 0.17 255 / 0.3);
  --shadow-cta-hover: 0 8px 22px oklch(55% 0.17 255 / 0.38);

  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-slow: 300ms;

  --max-w-narrow: 48rem;

  /* สีภาพประกอบ — ไล่จากโทเคนเดิม (blue-200 legacy, fresh-wash, sun) ให้เข้าชุดกับภาพ hero ของ V4 */
  --ill-sky: oklch(88% 0.06 250);
  --ill-sky-2: oklch(82% 0.075 250);
  --ill-mint: oklch(90% 0.06 165);
  --ill-mint-2: oklch(84% 0.08 165);
  --ill-line: oklch(86% 0.03 250);
  --ill-line-2: oklch(91% 0.02 250);
  --ill-frame: oklch(62% 0.14 250);
  --ill-ground: oklch(86% 0.04 250);
  --ill-shadow: oklch(30% 0.04 262 / 0.07);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-slow: 120ms; --ease-spring: linear; }
}

*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--max-w-narrow);
  margin-inline: auto;
  padding: var(--space-sm) var(--space-sm) var(--space-lg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── หัวหน้า: wordmark เหมือนเว็บเดิม ─────────────────────────── */
.site-head { padding-block: var(--space-xs) var(--space-md); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 44px;
  color: var(--color-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
  border-radius: var(--radius-chip);
}
.brand img { width: 28px; height: 28px; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }

main { flex: 1; }

/* ── ภาพประกอบบนแถบฟ้าจาง ───────────────────────────────────── */
.hero {
  margin: 0;
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, var(--color-band-from), var(--color-band-to));
  box-shadow: var(--shadow-card);
  padding: var(--space-md) var(--space-sm) var(--space-xs);
  overflow: hidden;
}
.hero svg { display: block; width: 100%; height: auto; max-width: 30rem; margin-inline: auto; }

.i-sky { fill: var(--ill-sky); }
.i-sky-2 { fill: var(--ill-sky-2); }
.i-mint { fill: var(--ill-mint); }
.i-mint-2 { fill: var(--ill-mint-2); }
.i-paper { fill: var(--color-surface); }
.i-line { fill: var(--ill-line); }
.i-line-2 { fill: var(--ill-line-2); }
.i-fresh { fill: var(--color-fresh); }
.i-sun { fill: var(--color-sun); }
.i-ground { fill: var(--ill-ground); }
.i-shadow { fill: var(--ill-shadow); }
.i-frame { fill: var(--color-surface); stroke: var(--ill-frame); stroke-width: 6; }
.i-tick { fill: none; stroke: var(--color-surface); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.i-todo { fill: none; stroke: var(--ill-sky-2); stroke-width: 2.5; }

/* character moment เดียวของหน้า: กล่องใบบนวางลงมา · ease-out ไม่ใช่ spring — design.md V4 ให้ spring เฉพาะกดปุ่มหลักกับหัวใจ */
.i-drop { animation: drop 520ms var(--ease-out) 240ms both; }
@keyframes drop { from { transform: translateY(-28px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── ข้อความ ─────────────────────────────────────────────────── */
.copy { margin-top: var(--space-lg); }

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-lg);
  color: var(--color-ink-2);
  max-width: 42rem;
}

/* ── แผงสถานะ ────────────────────────────────────────────────── */
.status {
  margin-top: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-sm) var(--space-md);
}

.status h2 {
  margin: 0 0 var(--space-3xs);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.25;
}

.status dl { margin: 0; }

.status .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 48px;
  padding-block: var(--space-2xs);
}
.status .row + .row { border-top: 1px solid var(--color-rule); }
.status dt { color: var(--color-ink-2); }
.status dd { margin: 0; text-align: right; font-weight: 500; }

.badge {
  display: inline-block;
  padding: 2px var(--space-xs);
  border-radius: var(--radius-chip);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.6;
}
.badge-off { background: var(--color-chip); color: var(--color-ink-2); }
.badge-wip { background: var(--color-sun-wash); color: var(--color-sun-ink); }

.note { margin: var(--space-md) 0 0; color: var(--color-ink-2); }

/* ── ปุ่มหลัก (ใช้ในหน้า 404) ───────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: var(--space-md);
  padding-inline: var(--space-md);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: var(--shadow-cta);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-spring);
}
.btn-primary:hover { background: var(--color-accent-hover); box-shadow: var(--shadow-cta-hover); }
.btn-primary:active { background: var(--color-accent-active); transform: scale(0.97); }

/* ── ท้ายหน้า ────────────────────────────────────────────────── */
.site-foot {
  margin-top: var(--space-xl);
  font-size: var(--text-sm);
  color: var(--color-ink-3);
}

/* fade-slide reveal ครั้งเดียวตอนโหลด */
.reveal { animation: reveal var(--dur-slow) var(--ease-out) both; }
.reveal-2 { animation-delay: 60ms; }
.reveal-3 { animation-delay: 120ms; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .i-drop { animation: none; }
  .reveal { animation-name: fade; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}

@media (min-width: 768px) {
  .page { padding: var(--space-md) var(--space-lg) var(--space-lg); }
  .hero { border-radius: var(--radius-sheet); padding: var(--space-lg) var(--space-lg) var(--space-sm); }
  .copy { margin-top: var(--space-xl); }
  h1 { font-size: var(--text-3xl); }

  /* สามสถานะเรียงเป็นแถวเดียว ตาไม่ต้องวิ่งข้ามแผงกว้าง 700px ทีละบรรทัด */
  .status dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .status .row { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--space-3xs); padding: var(--space-xs) var(--space-md) var(--space-2xs) 0; }
  .status .row + .row { border-top: 0; border-left: 1px solid var(--color-rule); padding-left: var(--space-md); }
  .status dd { text-align: left; }
}
