/* ==========================================================================
   CastZ MMO - site design system ("field dossier")
   Shared by every page. Page-specific rules live in the page's own <style>.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0b0b0c;
  --coal: #111113;
  --char: #18181b;
  --iron: #232327;
  --steel: #2e2e33;
  --line: rgba(233, 228, 218, 0.09);
  --line-strong: rgba(233, 228, 218, 0.18);

  --bone: #ebe6dc;
  --ash: #aaa49b;
  --smoke: #77726b;

  --red: #d42a20;
  --red-hi: #ee3a2e;
  --red-deep: #7a120d;
  --red-wash: rgba(212, 42, 32, 0.12);
  --amber: #d8a32b;
  --amber-wash: rgba(216, 163, 43, 0.12);
  --moss: #7c9a62;

  --font-display: "Chakra Petch", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", "Chakra Petch", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "IBM Plex Sans Thai", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 64px;
  --cut: 10px;          /* chamfer size on buttons/panels */
  --r: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 160ms;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Film grain over the whole page. Plain opacity (no blend mode) keeps scrolling cheap on phones. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
hr { border: 0; height: 1px; background: var(--line); margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.cz-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.cz-wrap--narrow { max-width: 860px; }
.cz-section { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.cz-section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.cz-section--coal { background: var(--coal); }
.cz-section + .cz-section--coal, .cz-section--coal + .cz-section { border-top: 1px solid var(--line); }
.cz-grid { display: grid; gap: clamp(20px, 3vw, 32px); }
.cz-stack > * + * { margin-top: 16px; }

/* ---------- Type ---------- */
.cz-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ash);
}
.cz-kicker b { color: var(--red-hi); font-weight: 500; letter-spacing: .14em; }
.cz-kicker::before { content: ""; width: 22px; height: 1px; background: var(--red); }
.cz-h1 { font-size: clamp(34px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.02em; }
.cz-h2 { font-size: clamp(26px, 3.6vw, 42px); }
.cz-h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 600; }
.cz-lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ash); max-width: 62ch; }
.cz-muted { color: var(--ash); }
.cz-faint { color: var(--smoke); }
.cz-red { color: var(--red-hi); }
.cz-mono { font-family: var(--font-mono); }
.cz-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 720px; }
.cz-head--split {
  max-width: none; grid-template-columns: 1fr; align-items: end;
}
@media (min-width: 900px) {
  .cz-head--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; }
}

/* ---------- Buttons ---------- */
.cz-btn {
  --bg: var(--iron); --fg: var(--bone);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  border: 0; cursor: pointer;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: .02em;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.cz-btn svg { width: 18px; height: 18px; flex: none; }
.cz-btn:hover { --bg: var(--steel); }
.cz-btn:active { transform: translateY(1px); }
.cz-btn--primary { --bg: var(--red); --fg: #fff; }
.cz-btn--primary:hover { --bg: var(--red-hi); }
.cz-btn--ghost { --bg: rgba(233, 228, 218, .05); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cz-btn--ghost:hover { --bg: rgba(233, 228, 218, .1); }
.cz-btn--discord { --bg: rgba(88, 101, 242, .14); --fg: #b9c0ff; box-shadow: inset 0 0 0 1px rgba(88, 101, 242, .35); }
.cz-btn--discord:hover { --bg: rgba(88, 101, 242, .26); --fg: #fff; }
.cz-btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; --cut: 7px; }
.cz-btn--lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.cz-btn--block { width: 100%; }
.cz-btn { max-width: 100%; }
/* Long Thai labels must wrap on phones instead of overflowing their container. */
@media (max-width: 560px) {
  .cz-btn { white-space: normal; text-align: center; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; }
  .cz-nav .cz-btn { white-space: nowrap; padding-top: 0; padding-bottom: 0; }
}
.cz-btn[disabled], .cz-btn.is-disabled { opacity: .5; pointer-events: none; }
.cz-icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  background: rgba(233, 228, 218, .04); border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer; transition: background var(--fast), border-color var(--fast), color var(--fast);
}
.cz-icon-btn:hover { background: rgba(233, 228, 218, .09); border-color: var(--line-strong); }
.cz-icon-btn svg { width: 18px; height: 18px; }
.cz-link { color: var(--bone); border-bottom: 1px solid var(--red); padding-bottom: 1px; transition: color var(--fast); }
.cz-link:hover { color: var(--red-hi); }

/* ---------- Icons (sprite: /ui/icons.svg) ---------- */
.cz-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter; }
.cz-i--fill { fill: currentColor; stroke: none; }

/* ---------- Navigation ---------- */
.cz-nav {
  position: sticky; top: 0; z-index: 500;
  height: var(--nav-h);
  background: rgba(11, 11, 12, .86);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}
.cz-nav__in { height: 100%; display: flex; align-items: center; gap: 20px; }
.cz-nav__brand { display: flex; align-items: center; flex: none; }
.cz-nav__brand img { height: 34px; width: auto; }
.cz-nav__links { display: none; align-items: center; gap: 4px; margin-left: 12px; }
.cz-nav__links a {
  position: relative; padding: 8px 12px; font-size: 14px; color: var(--ash);
  transition: color var(--fast);
}
.cz-nav__links a:hover, .cz-nav__links a[aria-current="page"] { color: var(--bone); }
.cz-nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--red);
}
.cz-nav__side { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cz-nav__menu { display: inline-grid; }
/* Small phones: everything in the bar must fit in ~343px. */
@media (max-width: 480px) {
  .cz-nav__in { gap: 10px; }
  .cz-nav__side { gap: 6px; }
  .cz-nav__brand img { height: 28px; }
  .cz-nav__side .cz-btn .cz-i { display: none; }
  .cz-nav__side .cz-btn { padding: 0 12px; }
}
@media (max-width: 359px) {
  .cz-nav__side .cz-status { display: none !important; }
}
@media (min-width: 1024px) {
  .cz-nav__links { display: flex; }
  .cz-nav__menu { display: none; }
}

/* Desktop dropdown (e.g. guides). Opens on hover/focus with pointer, and on click via castz.js. */
.cz-dd { position: relative; }
.cz-dd__btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; background: none; border: 0; cursor: pointer;
  font-size: 14px; color: var(--ash); transition: color var(--fast);
}
.cz-dd__btn .cz-i { width: 14px; height: 14px; transition: transform var(--fast); }
.cz-dd__btn:hover, .cz-dd.is-open .cz-dd__btn, .cz-dd__btn[aria-current="page"] { color: var(--bone); }
.cz-dd.is-open .cz-dd__btn .cz-i { transform: rotate(180deg); }
.cz-dd__panel {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 510; min-width: 280px;
  padding: 8px 0; background: var(--coal); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 140ms var(--ease), transform 140ms var(--ease), visibility 0s linear 140ms;
}
.cz-dd.is-open .cz-dd__panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: hover) and (pointer: fine) {
  .cz-dd:hover .cz-dd__panel, .cz-dd:focus-within .cz-dd__panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}
.cz-dd__panel a { display: flex; gap: 12px; padding: 9px 16px; font-size: 14px; color: var(--ash); }
.cz-dd__panel a:hover, .cz-dd__panel a[aria-current="page"] { color: var(--bone); background: rgba(233, 228, 218, .04); }
.cz-dd__panel a span { font-family: var(--font-mono); font-size: 11px; color: var(--smoke); padding-top: 3px; min-width: 18px; }
.cz-dd__panel a[aria-current="page"] span { color: var(--red-hi); }

/* Mobile drawer */
.cz-drawer {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 499;
  background: var(--ink);
  display: flex; flex-direction: column;
  padding: 12px var(--gutter) 32px;
  overflow-y: auto;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s linear 180ms;
}
.cz-drawer.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.cz-drawer a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 2px; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
}
.cz-drawer a::after { content: "→"; color: var(--smoke); font-family: var(--font-mono); }
.cz-drawer a[aria-current="page"] { color: var(--red-hi); }
.cz-drawer__group { margin-top: 18px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--smoke); }
.cz-drawer__group + a { border-top: 1px solid var(--line); }
.cz-drawer a.cz-drawer__sub { font-family: var(--font-body); font-size: 16px; font-weight: 500; padding: 13px 2px; color: var(--ash); }
.cz-drawer a.cz-btn {
  justify-content: center; margin-top: 20px; padding: 0 22px; border-bottom: 0;
  font-size: 15px;
}
.cz-drawer a.cz-btn::after { content: none; }
@media (min-width: 1024px) { .cz-drawer { display: none; } }
body.cz-lock { overflow: hidden; }

/* Live status chip (online counter). JS may set inline colours; layout lives here. */
.cz-status {
  display: none; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line-strong); background: rgba(233, 228, 218, .03);
  font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; cursor: default;
}
.cz-status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-hi); display: block; flex: none; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (max-width: 420px) { .cz-status { padding: 0 9px; font-size: 11.5px; } }

/* ---------- Panels & framing ---------- */
.cz-panel { position: relative; background: var(--coal); border: 1px solid var(--line); }
.cz-panel--pad { padding: clamp(18px, 3vw, 28px); }
/* Viewfinder corner marks */
.cz-frame { position: relative; }
.cz-frame::before, .cz-frame::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none; z-index: 2;
  border-color: var(--red); border-style: solid;
}
.cz-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.cz-frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.cz-cut { clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }

/* Hazard tape divider */
.cz-tape {
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 10px, var(--ink) 10px 20px);
  opacity: .85;
}
.cz-rule { display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--smoke); }
.cz-rule::before, .cz-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Badges */
.cz-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--ash);
}
.cz-badge--red { border-color: rgba(238, 58, 46, .45); color: #ff8a80; background: var(--red-wash); }
.cz-badge--amber { border-color: rgba(216, 163, 43, .45); color: #f0c463; background: var(--amber-wash); }

/* ---------- Data strip ---------- */
.cz-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cz-facts > div { padding: 16px 14px 18px 0; border-bottom: 1px solid var(--line); }
.cz-facts > div:nth-child(odd) { border-right: 1px solid var(--line); }
.cz-facts > div:nth-child(even) { padding-left: 14px; }
.cz-facts dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--smoke); }
.cz-facts dd { margin: 4px 0 0; font-family: var(--font-display); font-size: clamp(18px, 2.2vw, 24px); font-weight: 700; color: var(--bone); }
@media (min-width: 760px) {
  .cz-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cz-facts > div { padding-left: 18px !important; border-right: 1px solid var(--line); }
  .cz-facts > div:first-child { padding-left: 0 !important; }
  .cz-facts > div:last-child { border-right: 0; }
}

/* ---------- Ledger (numbered feature rows) ---------- */
.cz-ledger { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.cz-ledger__row { display: grid; grid-template-columns: 56px 1fr; gap: 6px 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cz-ledger__no { grid-row: span 2; font-family: var(--font-mono); font-size: 13px; color: var(--red-hi); padding-top: 4px; }
.cz-ledger__row h3 { font-size: 19px; font-weight: 600; }
.cz-ledger__row p { color: var(--ash); font-size: 15px; }
@media (min-width: 860px) {
  .cz-ledger { grid-template-columns: 1fr 1fr; column-gap: 48px; }
}

/* ---------- Tables ---------- */
.cz-table-wrap { overflow-x: auto; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.cz-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cz-table th, .cz-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cz-table thead th {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--smoke); background: var(--coal);
}
.cz-table tbody tr:last-child td { border-bottom: 0; }
.cz-table tbody th { font-weight: 600; color: var(--bone); white-space: nowrap; }
.cz-table td { color: var(--ash); }

/* ---------- Accordion (FAQ) ---------- */
.cz-faq { border-top: 1px solid var(--line); }
.cz-faq__item { border-bottom: 1px solid var(--line); }
.cz-faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 0; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-size: clamp(16px, 1.8vw, 18px); font-weight: 600; color: var(--bone);
}
.cz-faq__q:hover { color: #fff; }
.cz-faq__mark { position: relative; width: 14px; height: 14px; flex: none; }
.cz-faq__mark::before, .cz-faq__mark::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--red-hi); transition: transform var(--fast) var(--ease); }
.cz-faq__mark::after { transform: rotate(90deg); }
.cz-faq__item.is-open .cz-faq__mark::after { transform: rotate(0deg); }
.cz-faq__a { max-height: 0; overflow: hidden; transition: max-height 260ms var(--ease); }
.cz-faq__a > div { padding: 0 34px 22px 0; color: var(--ash); font-size: 15.5px; }

/* ---------- Prose ---------- */
.cz-prose { color: var(--ash); font-size: 16px; }
.cz-prose > * + * { margin-top: 14px; }
.cz-prose h2, .cz-prose h3 { color: var(--bone); margin-top: 32px; }
.cz-prose h3 { font-size: 20px; }
.cz-prose strong { color: var(--bone); font-weight: 600; }
.cz-prose em { color: var(--bone); font-style: normal; border-bottom: 1px dotted var(--smoke); }
.cz-prose ul, .cz-prose ol { padding-left: 22px; }
.cz-prose li + li { margin-top: 8px; }
.cz-prose ul li::marker { color: var(--red); }
.cz-prose ol li::marker { color: var(--red-hi); font-family: var(--font-mono); }
.cz-prose a { color: var(--bone); border-bottom: 1px solid var(--red); }
.cz-prose code, .cz-prose kbd { font-family: var(--font-mono); font-size: .92em; background: var(--char); border: 1px solid var(--line); padding: 1px 6px; }

/* ---------- Forms ---------- */
.cz-field { display: grid; gap: 7px; }
.cz-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ash); }
.cz-input, .cz-select, .cz-textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--ink); color: var(--bone);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  font: inherit; font-size: 16px; /* 16px stops iOS zoom on focus */
  transition: border-color var(--fast), background var(--fast);
}
.cz-input::placeholder, .cz-textarea::placeholder { color: var(--smoke); }
.cz-input:hover, .cz-select:hover, .cz-textarea:hover { border-color: rgba(233, 228, 218, .28); }
.cz-input:focus, .cz-select:focus, .cz-textarea:focus { outline: none; border-color: var(--red-hi); background-color: #0e0e10; }
.cz-help { font-size: 13px; color: var(--smoke); }
.cz-alert { padding: 12px 14px; border-left: 3px solid var(--line-strong); background: var(--char); font-size: 14.5px; color: var(--ash); }
.cz-alert--error { border-left-color: var(--red-hi); background: rgba(212, 42, 32, .1); color: #ffb4ad; }
.cz-alert--ok { border-left-color: var(--moss); background: rgba(124, 154, 98, .1); color: #c8dcb7; }
.cz-alert--warn { border-left-color: var(--amber); background: var(--amber-wash); color: #f3d38a; }

/* ---------- Tabs ---------- */
.cz-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.cz-tabs::-webkit-scrollbar { display: none; }
.cz-tab {
  flex: none; padding: 12px 16px; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--smoke);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--fast), border-color var(--fast);
}
.cz-tab:hover { color: var(--bone); }
.cz-tab[aria-selected="true"], .cz-tab.is-active { color: var(--bone); border-bottom-color: var(--red); }

/* ---------- Modal ---------- */
.cz-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: none; align-items: center; justify-content: center;
  padding: 16px; background: rgba(5, 5, 6, .82);
}
.cz-modal__box {
  position: relative; width: 100%; max-width: 860px; max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--coal); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
}
.cz-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.cz-modal__body { flex: 1; overflow-y: auto; padding: 14px 20px 22px; overscroll-behavior: contain; }
@media (max-width: 560px) {
  .cz-modal { align-items: flex-end; padding: 0; }
  .cz-modal__box { max-height: 90vh; border-left: 0; border-right: 0; border-bottom: 0; }
}

/* ---------- Breadcrumb ---------- */
.cz-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--smoke); }
.cz-crumbs a { color: var(--ash); transition: color var(--fast); }
.cz-crumbs a:hover { color: var(--bone); }
.cz-crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--steel); }
.cz-crumbs [aria-current] { color: var(--red-hi); }

/* ---------- Document pages (guides, info, policy) ---------- */
.cz-doc-head {
  position: relative; overflow: hidden;
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(122, 18, 13, .2) 0%, rgba(122, 18, 13, 0) 75%),
    var(--ink);
}
.cz-doc-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; opacity: .55; pointer-events: none;
  background: url("/ui/art/skyline.svg") center bottom / auto 100% repeat-x;
}
.cz-doc-head .cz-wrap { position: relative; z-index: 1; }
.cz-doc-head h1 { margin-top: 18px; max-width: 920px; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.12; }
.cz-doc-head .cz-kicker { margin-top: 22px; }
.cz-doc-meta { margin-top: 14px; font-family: var(--font-mono); font-size: 12.5px; color: var(--smoke); }
.cz-doc { display: grid; gap: 44px; padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
@media (min-width: 1024px) { .cz-doc { grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; } }
.cz-doc__body { min-width: 0; }
.cz-doc__body > section + section { margin-top: 40px; }
/* Original guide markup nests content in plain divs; give every block a consistent rhythm. */
.cz-doc__body section > * + *, .cz-doc__body section > div > * + * { margin-top: 12px; }
.cz-doc__body h2 { font-size: clamp(20px, 2.4vw, 26px); scroll-margin-top: calc(var(--nav-h) + 20px); }
.cz-doc__body h3 { font-size: 17px; }
.cz-doc__body .cz-table-wrap { margin-top: 16px; }
.cz-doc__body img { max-width: 100%; border: 1px solid var(--line); }
.cz-brief { margin-bottom: 40px; padding: 20px 22px; background: var(--coal); border: 1px solid var(--line); border-left: 3px solid var(--red); }
.cz-brief h2 { font-size: 18px !important; margin: 0 0 8px !important; color: var(--bone); }
.cz-brief p { color: var(--ash); font-size: 15.5px; }
.cz-qa { padding: 16px 18px; background: var(--coal); border: 1px solid var(--line); }
.cz-qa + .cz-qa { margin-top: 10px; }
.cz-qa h3 { font-size: 16px !important; margin: 0 !important; color: var(--bone); }
.cz-qa p { margin-top: 6px !important; font-size: 15px; }
.cz-doc-faq { padding-top: 36px; border-top: 1px solid var(--line); }
.cz-doc-faq > h2 { margin-bottom: 18px; }
.cz-doc-keywords { padding-top: 24px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--smoke); }
.cz-doc-keywords em { border: 0 !important; color: var(--ash) !important; }
.cz-doc-cta { display: flex; flex-wrap: wrap; gap: 12px; padding: 28px 0 clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
@media (max-width: 560px) { .cz-doc-cta .cz-btn { flex: 1 1 100%; } }

/* Blocks used inside document pages */
.cz-callout {
  position: relative; padding: clamp(22px, 4vw, 34px);
  background: linear-gradient(135deg, rgba(122, 18, 13, .38), rgba(122, 18, 13, .06) 62%), var(--coal);
  border: 1px solid rgba(238, 58, 46, .35);
}
.cz-callout > * + * { margin-top: 12px !important; }
.cz-callout h2 { margin: 0 !important; font-size: clamp(20px, 2.6vw, 28px) !important; }
.cz-callout p { color: var(--ash); }
.cz-doc__body .cz-callout { margin: 8px 0 36px; }
.cz-callout--end { margin-top: 44px !important; }
.cz-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px !important; }
@media (max-width: 560px) { .cz-actions .cz-btn, .cz-callout > .cz-btn { width: 100%; } }
.cz-card { padding: 16px 18px; background: var(--coal); border: 1px solid var(--line); }
.cz-card + .cz-card { margin-top: 10px; }
.cz-card h3 { font-size: 16px !important; margin: 0 !important; color: var(--bone); }
.cz-card p { margin-top: 6px !important; font-size: 15px; }
.cz-cards { display: grid; gap: 10px; margin-top: 16px; }
.cz-cards .cz-card + .cz-card { margin-top: 0; }
@media (min-width: 640px) { .cz-cards { grid-template-columns: 1fr 1fr; } }
.cz-note { padding: 20px 22px; background: var(--coal); border: 1px solid var(--line); border-top: 2px solid var(--steel); }
.cz-step { padding: 18px 0; border-bottom: 1px solid var(--line); }
.cz-step:first-child { border-top: 1px solid var(--line); }
.cz-step + .cz-step { margin-top: 0 !important; }
.cz-step__in { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.cz-step__in > div + div > * + * { margin-top: 6px; }
.cz-step__no { font-family: var(--font-mono); font-size: 34px; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(238, 58, 46, .85); }
.cz-step h3 { font-size: 18px !important; margin: 0 !important; color: var(--bone); }

/* Aside: table of contents + related pages */
.cz-aside { display: grid; gap: 28px; align-content: start; }
@media (min-width: 1024px) { .cz-aside { position: sticky; top: calc(var(--nav-h) + 28px); align-self: start; } }
.cz-toc > h2, .cz-aside > div:not(.cz-callout) > h2 { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--smoke); margin-bottom: 10px; }
.cz-toc { display: none; }
@media (min-width: 1024px) { .cz-toc { display: block; } }
.cz-toc a { display: block; padding: 7px 0 7px 14px; border-left: 1px solid var(--line); font-size: 14px; color: var(--ash); transition: color var(--fast), border-color var(--fast); }
.cz-toc a:hover { color: var(--bone); }
.cz-toc a.is-active { color: var(--bone); border-left: 2px solid var(--red); padding-left: 13px; }
.cz-related { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cz-related a { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ash); transition: color var(--fast); }
.cz-related a:hover { color: var(--bone); }
.cz-related a span { font-family: var(--font-mono); font-size: 11px; color: var(--smoke); padding-top: 3px; min-width: 18px; }
.cz-related a[aria-current="page"] { color: var(--bone); }
.cz-related a[aria-current="page"] span { color: var(--red-hi); }

/* ---------- Footer ---------- */
.cz-foot { border-top: 1px solid var(--line); background: var(--coal); padding: 40px 0 28px; font-size: 14px; color: var(--smoke); }
.cz-foot__grid { display: grid; gap: 28px; }
.cz-foot__brand img { height: 30px; width: auto; margin-bottom: 12px; }
.cz-foot__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cz-foot h4 { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ash); margin-bottom: 12px; }
.cz-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cz-foot a { color: var(--ash); transition: color var(--fast); }
.cz-foot a:hover { color: var(--bone); }
.cz-foot__base { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; }
@media (min-width: 860px) {
  .cz-foot__grid { grid-template-columns: 1.2fr 2fr; }
  .cz-foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 520ms var(--ease), transform 520ms var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
/* Visibility helpers only hide; they never change an element's own display type. */
@media (max-width: 759px) { .cz-only-desktop { display: none !important; } }
@media (min-width: 760px) { .cz-only-mobile { display: none !important; } }
.cz-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Refinements (shared) ---------- */
/* Long Thai headings break into balanced lines instead of leaving one word dangling. */
h1, h2, .cz-h1, .cz-h2 { text-wrap: balance; }
/* Server messages can contain long unbroken strings; never let them overflow. */
.cz-alert { overflow-wrap: anywhere; }
/* Native validation state after the user has interacted. */
.cz-input:user-invalid, .cz-select:user-invalid, .cz-textarea:user-invalid { border-color: var(--red-hi); }

/* Native select with a CastZ chevron (kept on focus because focus only changes background-color). */
.cz-select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23aaa49b' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; }

/* Dropdown separator (e.g. "ข้อมูล WarZ" under the guide list). */
.cz-dd__panel a.cz-dd__sep { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
