@font-face { font-family: "Noto Sans Thai"; src: url("/static/fonts/noto-sans-thai-thai-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: optional; }
@font-face { font-family: "Noto Sans Thai"; src: url("/static/fonts/noto-sans-thai-thai-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: optional; }
@font-face { font-family: "Noto Sans Thai"; src: url("/static/fonts/noto-sans-thai-thai-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: optional; }
@font-face { font-family: "Noto Sans Thai"; src: url("/static/fonts/noto-sans-thai-thai-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700 900; font-display: optional; }
@font-face { font-family: "Noto Sans"; src: url("/static/fonts/noto-sans-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: optional; }
@font-face { font-family: "Noto Sans"; src: url("/static/fonts/noto-sans-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: optional; }
@font-face { font-family: "Noto Sans"; src: url("/static/fonts/noto-sans-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: optional; }
@font-face { font-family: "Noto Sans"; src: url("/static/fonts/noto-sans-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700 900; font-display: optional; }

:root {
  color-scheme: light;
  --paper: #f5efe4;
  --surface: #fffaf1;
  --surface-2: #efe2cf;
  --ink: #2d211b;
  --muted: #74645a;
  --line: #d8c4ad;
  --brown: #7c4a2f;
  --brown-dark: #4e2e20;
  --honey: #f6c453;
  --green: #43854a;
  --red: #b94738;
  --shadow: 0 24px 70px rgba(66, 39, 25, 0.13);
  --surface-raised: #fffdf8;
  --input-bg: #ffffff;
  --topbar-bg: rgba(255, 250, 241, .93);
  --step-bg: rgba(255, 250, 241, .7);
  --mobile-menu-bg: rgba(255, 250, 241, .98);
  --alert-bg: #fff0ed;
  --selected-green-bg: #f5fbf3;
  --selected-warm-bg: #fff8e8;
  --package-selected-bg: #fff9df;
  --package-selected-border: #d58a24;
  --package-selected-accent: #43854a;
  --package-selected-glow: rgba(246, 196, 83, .52);
  --package-selected-ring: rgba(67, 133, 74, .2);
  --package-selected-chip-bg: #2f7a47;
  --package-selected-chip-text: #ffffff;
  --color-paper-card: var(--surface);
  --color-paper-soft: var(--surface-2);
  --color-ink: var(--ink);
  --color-muted: var(--muted);
  --color-rule: var(--line);
  --color-accent: var(--brown);
  --color-accent-deep: var(--brown-dark);
  font-family: "Noto Sans Thai", "Noto Sans", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #17110e;
  --surface: #241a15;
  --surface-2: #35271f;
  --surface-raised: #2b201a;
  --input-bg: #201713;
  --ink: #fff7ed;
  --muted: #c8b5a7;
  --line: #5d4639;
  --brown: #e59a68;
  --brown-dark: #6e3824;
  --honey: #ffd270;
  --green: #78c984;
  --red: #ff8d7e;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --topbar-bg: rgba(31, 22, 18, .94);
  --step-bg: rgba(43, 32, 26, .72);
  --mobile-menu-bg: rgba(36, 26, 21, .98);
  --alert-bg: #3d211d;
  --selected-green-bg: #223428;
  --selected-warm-bg: #392b1d;
  --package-selected-bg: #31291a;
  --package-selected-border: #ffd270;
  --package-selected-accent: #78c984;
  --package-selected-glow: rgba(255, 210, 112, .34);
  --package-selected-ring: rgba(120, 201, 132, .22);
  --package-selected-chip-bg: #ffd270;
  --package-selected-chip-text: #241a15;
}

html[data-theme="dark"] .package-card.has-promotion {
  background: linear-gradient(145deg, #3b2b1d, #2c2119);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body, button, input, a { font-family: "Noto Sans Thai", "Noto Sans", sans-serif; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(246, 196, 83, .2), transparent 27rem),
    radial-gradient(circle at 95% 42%, rgba(67, 133, 74, .1), transparent 28rem),
    linear-gradient(rgba(124, 74, 47, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 74, 47, .035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(67, 133, 74, .32); outline-offset: 3px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 2px solid var(--ink);
  background: var(--topbar-bg);
  backdrop-filter: none;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { border: 0; border-radius: 0; background: transparent; image-rendering: pixelated; box-shadow: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .96rem; font-weight: 900; }
.brand small { color: var(--muted); font-size: .64rem; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; }
.topbar nav a { padding: 9px 13px; border-radius: 999px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.topbar nav a:hover, .topbar nav a.active { background: var(--surface-2); color: var(--brown); }
.back-link { padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .75rem; font-weight: 800; }
.theme-toggle { width: 46px; height: 46px; display: inline-grid; flex: 0 0 46px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.theme-toggle:hover { border-color: var(--brown); color: var(--brown); }
.theme-icon { grid-area: 1 / 1; font-family: "Font Awesome 6 Free"; font-size: 1.05rem; font-style: normal; font-weight: 900; }
.theme-toggle .theme-icon-sun,
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun,
html:not([data-theme="dark"]) .theme-toggle .theme-icon-moon { display: inline-block; }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(250px, 325px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(35px, 6vw, 74px);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 84px) 0 100px;
}
.intro { position: sticky; top: 120px; }
.eyebrow, .panel-head p, .result > p { margin: 0; color: var(--brown); font-size: .67rem; font-weight: 900; letter-spacing: .12em; }
.intro h1 { margin: 13px 0 17px; font-size: clamp(2.4rem, 4.7vw, 3.9rem); line-height: 1.08; letter-spacing: 0; }
.intro h1 em { color: var(--green); font-style: normal; }
.intro > p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.8; }
.step-list { margin: 32px 0 0; padding: 5px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--step-bg); list-style: none; }
.step-list li { min-height: 70px; display: grid; grid-template-columns: 43px 1fr; align-items: center; gap: 7px; padding: 12px 15px; border-left: 3px solid transparent; color: #9c8b7f; }
.step-list li + li { border-top: 1px solid var(--line); }
.step-list li.active { border-left-color: var(--brown); background: var(--surface); color: var(--ink); }
.step-list li.complete { border-left-color: var(--green); color: var(--muted); }
.step-list b { color: currentColor; font-size: .72rem; font-variant-numeric: tabular-nums; }
.step-list strong, .step-list small { display: block; }
.step-list strong { font-size: .74rem; }
.step-list small { margin-top: 2px; font-size: .61rem; }
.security-note { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 13px 15px; border: 1px solid rgba(67, 133, 74, .28); border-radius: 14px; background: rgba(67, 133, 74, .07); }
.security-note > span { width: 27px; height: 27px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--green); color: white; font-weight: 900; }
.security-note p { margin: 0; }
.security-note strong, .security-note small { display: block; }
.security-note strong { font-size: .68rem; }
.security-note small { margin-top: 2px; color: var(--muted); font-size: .58rem; line-height: 1.5; }

.workspace { min-width: 0; }
.alert { margin-bottom: 14px; padding: 14px 16px; border: 1px solid rgba(185, 71, 56, .35); border-radius: 14px; background: var(--alert-bg); color: var(--red); font-size: .75rem; font-weight: 700; line-height: 1.6; }
.panel { position: relative; scroll-margin-top: 92px; padding: clamp(24px, 4vw, 42px); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(246,196,83,.08), transparent 35%), var(--surface); box-shadow: var(--shadow); }
.panel::before { position: absolute; height: 4px; content: ""; inset: 0 0 auto; background: linear-gradient(90deg, var(--brown), var(--honey), var(--green)); }
.panel-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 15px; margin-bottom: 28px; }
.panel-head > span { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); color: var(--brown); font-size: .78rem; font-weight: 900; }
.panel-head h2 { margin: 2px 0 0; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.25; letter-spacing: 0; }
.panel-head small { display: block; margin-top: 4px; color: var(--muted); font-size: .69rem; line-height: 1.6; }

.edition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.choice, .channel, .package-card { border: 1px solid var(--line); background: var(--surface-raised); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.choice:hover, .channel:hover:not(:disabled), .package-card:hover { transform: translateY(-2px); }
.choice { min-height: 112px; display: grid; grid-template-columns: 48px 1fr 24px; align-items: center; gap: 13px; padding: 18px; border-radius: 18px; text-align: left; }
.choice > b { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--surface-2); color: var(--brown); font-size: 1.15rem; }
.choice strong, .choice small { display: block; }
.choice strong { font-size: .84rem; }
.choice small { margin-top: 4px; color: var(--muted); font-size: .63rem; }
.choice i { opacity: 0; color: var(--green); font-style: normal; font-weight: 900; }
.choice .platform-status { width: fit-content; display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .58rem; font-style: normal; font-weight: 800; line-height: 1; }
.choice .platform-status::before { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; content: ""; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.choice .platform-status[data-state="ready"] { border-color: rgba(67, 133, 74, .32); background: rgba(67, 133, 74, .09); color: var(--green); }
.choice .platform-status[data-state="unavailable"] { border-color: rgba(185, 71, 56, .32); background: rgba(185, 71, 56, .08); color: var(--red); }
.choice.selected { border-color: var(--brown); box-shadow: 0 0 0 3px rgba(124, 74, 47, .1); }
.choice.selected i { opacity: 1; }

.player-box { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-raised); }
.player-avatar { min-height: 126px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, var(--brown), var(--brown-dark)); color: var(--honey); box-shadow: inset 0 0 0 6px rgba(255,255,255,.08); }
.player-avatar span { font-size: 3rem; font-weight: 900; text-transform: uppercase; }
.player-box label { display: flex; flex-direction: column; justify-content: center; }
.player-box label > span, .voucher-box label > span { margin-bottom: 8px; font-size: .73rem; font-weight: 900; }
.player-box label > span b { margin-left: 6px; padding: 3px 7px; border-radius: 7px; background: var(--surface-2); color: var(--brown); font-size: .56rem; }
input { width: 100%; height: 58px; padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--input-bg); color: var(--ink); font-size: .86rem; }
input:focus { border-color: var(--brown); box-shadow: 0 0 0 4px rgba(124, 74, 47, .1); outline: 0; }
.player-box label small, .voucher-box label small { display: block; margin-top: 8px; color: var(--muted); font-size: .64rem; line-height: 1.5; }
.player-box label small.ok { color: var(--green); }
.player-box label small.error, .voucher-box label small.error { color: var(--red); }

.section-title { display: flex; align-items: center; gap: 11px; margin: 24px 0 13px; }
.section-title:first-of-type { margin-top: 0; }
.section-title > b { width: 29px; height: 29px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--brown); color: white; font-size: .66rem; }
.section-title strong, .section-title small { display: block; }
.section-title strong { font-size: .76rem; }
.section-title small { margin-top: 2px; color: var(--muted); font-size: .61rem; }
.channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.channel { min-height: 126px; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 11px; padding: 15px; border-radius: 17px; text-align: left; }
.channel > b { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--brown); font-size: .65rem; }
.channel > .channel-logo { overflow: hidden; padding: 3px; background: white; box-shadow: inset 0 0 0 1px rgba(124,74,47,.08); }
.channel-logo img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 9px; }
.channel strong, .channel small, .channel em { display: block; }
.channel strong { font-size: .73rem; }
.channel small { margin-top: 3px; color: var(--muted); font-size: .58rem; line-height: 1.35; }
.channel em { margin-top: 7px; color: var(--green); font-size: .56rem; font-style: normal; font-weight: 700; }
.channel.selected { border-color: var(--green); background: var(--selected-green-bg); box-shadow: 0 0 0 3px rgba(67,133,74,.1); }
.channel:disabled { cursor: not-allowed; opacity: .55; }
.channel:disabled em { color: var(--red); }

.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.package-grid > p { grid-column: 1 / -1; color: var(--muted); font-size: .7rem; }
.package-card { position: relative; min-height: 104px; padding: 18px 15px; border-radius: 16px; text-align: left; }
.package-card strong { display: block; font-size: 1.2rem; }
.package-card strong small { margin-left: 4px; color: var(--muted); font-size: .56rem; }
.package-card > span { display: block; margin-top: 7px; color: var(--brown); font-size: .68rem; font-weight: 800; }
.package-card em { position: absolute; top: 9px; right: 9px; padding: 3px 7px; border-radius: 999px; background: var(--honey); font-size: .5rem; font-style: normal; font-weight: 900; }
.package-card.selected {
  border-color: var(--package-selected-border);
  background:
    radial-gradient(circle at 18% 12%, var(--package-selected-glow), transparent 42%),
    linear-gradient(145deg, var(--package-selected-bg), var(--surface-raised) 76%);
  box-shadow:
    0 0 0 4px var(--package-selected-ring),
    0 0 34px var(--package-selected-glow),
    0 20px 44px rgba(67, 133, 74, .16);
  transform: translateY(-3px);
}
.package-card.selected::before {
  position: absolute;
  inset: 0;
  border: 2px solid color-mix(in srgb, var(--package-selected-accent) 70%, transparent);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}
.package-card.selected::after {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--package-selected-chip-bg);
  color: var(--package-selected-chip-text);
  content: "เลือกอยู่";
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgba(67, 133, 74, .18);
}
.package-card.selected strong { color: var(--package-selected-accent); }
.package-card.selected > span { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .package-card.selected {
    animation: package-selected-glow 1.7s ease-in-out infinite;
  }
}

@keyframes package-selected-glow {
  50% {
    box-shadow:
      0 0 0 5px var(--package-selected-ring),
      0 0 46px var(--package-selected-glow),
      0 24px 52px rgba(67, 133, 74, .2);
  }
}

.voucher-box { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-raised); }
.voucher-box label { display: block; }
.voucher-rate { display: flex; align-items: flex-start; gap: 11px; margin: 4px 0 16px; padding: 0 2px 14px; border-bottom: 1px solid var(--line); }
.voucher-rate > i { flex: 0 0 auto; margin-top: 2px; color: var(--green); font-size: .85rem; }
.voucher-rate span, .voucher-rate strong, .voucher-rate small { display: block; }
.voucher-rate strong { color: var(--ink); font-size: .7rem; }
.voucher-rate small { margin-top: 4px; color: var(--green); font-size: .61rem; font-weight: 750; line-height: 1.55; }
.announce { display: flex; align-items: center; gap: 11px; margin-top: 20px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); }
.announce input { width: 18px; height: 18px; accent-color: var(--green); }
.announce strong, .announce small { display: block; }
.announce strong { font-size: .7rem; }
.announce small { color: var(--muted); font-size: .59rem; }
.checkout-status { margin: 11px 2px 0; color: var(--muted); font-size: .65rem; text-align: right; }
.checkout-status.error { color: var(--red); }
.checkout-status.ready { color: var(--green); }

.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.actions.end { justify-content: flex-end; }
.actions > small { color: var(--muted); font-size: .6rem; }
.primary, .secondary { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border-radius: 999px; font-size: .75rem; font-weight: 900; }
.primary { border: 1px solid var(--brown); background: var(--brown); color: white; box-shadow: 0 10px 24px rgba(124,74,47,.18); }
.primary:hover:not(:disabled) { background: var(--brown-dark); transform: translateY(-1px); }
.primary:disabled { cursor: not-allowed; opacity: .48; }
.secondary { border: 1px solid var(--line); background: var(--input-bg); }

.countdown { padding: 8px 11px; border-radius: 11px; background: var(--surface-2); color: var(--brown); font-size: .9rem; font-variant-numeric: tabular-nums; }
.payment-grid { display: grid; grid-template-columns: minmax(230px, .85fr) minmax(0, 1.15fr); gap: 22px; }
.qr-card { padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface-raised); text-align: center; }
.qr-card .payment-wordmark { width: min(100%, 210px); height: 62px; display: block; margin: 0 auto 10px; object-fit: contain; border-radius: 9px; aspect-ratio: auto; }
.payment-qr-frame { width: 100%; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: 11px; background: #fff; }
.payment-qr-frame > * { grid-area: 1 / 1; }
.payment-qr-frame > i { color: var(--brown); font-size: 1.4rem; animation: spin 1s linear infinite; }
.payment-qr-frame[data-loading="false"] > i { display: none; }
.qr-card .payment-qr { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 11px; background: #fff; }
.qr-card small { display: block; margin-top: 8px; color: var(--muted); font-size: .58rem; }
.qr-card .qr-scan-hint { margin-top: 12px; color: var(--ink); font-size: .68rem; font-weight: 800; }
.qr-card .qr-reference { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) 34px; align-items: center; gap: 6px; margin-top: 4px; color: #998b82; font-size: .56rem; letter-spacing: .025em; }
.qr-reference > span { min-width: 0; text-align: center; }
.qr-reference code { display: block; margin-top: 2px; color: inherit; font: 700 .98em/1.45 "Noto Sans", monospace; overflow-wrap: anywhere; user-select: all; }
.reference-copy { position: relative; width: 34px; height: 34px; min-height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--input-bg); color: var(--brown); font-size: .72rem; transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.reference-copy span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.reference-copy:hover { border-color: var(--brown); background: var(--surface-2); transform: scale(1.025); }
.reference-copy[data-copied="true"] { border-color: var(--green); color: var(--green); }
.summary { padding: 3px 0; }
.summary > span { color: var(--muted); font-size: .65rem; font-weight: 700; }
.summary h3 { margin: 5px 0 0; color: var(--brown); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; }
.summary > p { margin: 5px 0 15px; color: var(--red); font-size: .64rem; font-weight: 800; }
.summary dl { margin: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-raised); }
.summary dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 13px; }
.summary dl div + div { border-top: 1px solid var(--line); }
.summary dt, .summary dd { margin: 0; font-size: .65rem; }
.summary dt { color: var(--muted); }
.summary dd { text-align: right; font-weight: 800; }
.waiting { display: flex; align-items: center; gap: 11px; margin-top: 13px; padding: 12px 14px; border-radius: 14px; background: rgba(246,196,83,.16); }
.waiting[data-tone="error"] { color: #a62f24; background: rgba(185,71,56,.12); box-shadow: inset 3px 0 0 var(--red); }
.waiting[data-tone="success"] { color: #276f35; background: rgba(67,133,74,.12); box-shadow: inset 3px 0 0 var(--green); }
.waiting > i { width: 12px; height: 12px; flex: 0 0 auto; border: 3px solid rgba(124,74,47,.25); border-top-color: var(--brown); border-radius: 50%; animation: spin 1.35s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.waiting strong, .waiting small { display: block; }
.waiting strong { font-size: .65rem; }
.waiting small { color: var(--muted); font-size: .57rem; }

.result { padding-block: 64px; text-align: center; }
.result-icon { width: 72px; height: 72px; display: grid; margin: 0 auto 18px; place-items: center; border-radius: 22px; background: rgba(67,133,74,.12); color: var(--green); font-size: 2rem; font-weight: 900; }
.waiting-icon { background: rgba(246,196,83,.2); color: var(--brown); }
.result-spinner { width: 70px; height: 70px; margin: 0 auto 18px; border: 6px solid rgba(124,74,47,.14); border-top-color: var(--green); border-right-color: var(--honey); border-radius: 50%; animation: spin 1.65s linear infinite; filter: drop-shadow(0 9px 20px rgba(67,133,74,.13)); }
.success-icon { animation: success-pop .62s cubic-bezier(.16,1,.3,1) backwards, success-glow 1.8s ease-in-out .55s 2; }
@keyframes success-pop { 0% { opacity: 0; transform: scale(.35) rotate(-18deg); } 70% { transform: scale(1.14) rotate(3deg); } }
@keyframes success-glow { 50% { box-shadow: 0 0 0 12px rgba(67,133,74,.08), 0 0 38px rgba(67,133,74,.22); } }
.success-details { width: min(620px, 100%); margin: 25px auto 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); text-align: left; }
.success-details div { display: grid; grid-template-columns: minmax(110px,.7fr) minmax(0,1.3fr); gap: 15px; padding: 12px 15px; }
.success-details div + div { border-top: 1px solid var(--line); }
.success-details dt, .success-details dd { margin: 0; font-size: .72rem; }
.success-details dt { color: var(--muted); }
.success-details dd { min-width: 0; text-align: right; font-weight: 900; }
.success-details code { color: var(--brown); font: 700 .92em/1.5 "Noto Sans", monospace; overflow-wrap: anywhere; user-select: all; }
.success-details .success-reference { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.success-thanks { width: min(610px, 100%); margin: 18px auto 0; padding: 13px 17px; border: 1px solid rgba(67,133,74,.22); border-radius: 14px; background: rgba(67,133,74,.07); color: var(--green); font-size: .78rem; font-weight: 750; line-height: 1.75; }
.success-thanks i { margin-right: 6px; color: var(--red); }

.system-tooltip { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 22px; background: rgba(34,24,19,.52); backdrop-filter: blur(2px) brightness(.86); opacity: 0; transition: opacity .22s ease; }
.system-tooltip[hidden] { display: none; }
.system-tooltip.is-open { opacity: 1; }
.system-tooltip-card { width: min(560px,100%); display: grid; grid-template-columns: 52px minmax(0,1fr) 40px; align-items: start; gap: 16px; padding: 22px; border: 1px solid rgba(185,71,56,.35); border-radius: 20px; background: var(--surface); box-shadow: 0 32px 100px rgba(34,24,19,.38); transform: translateY(14px) scale(.97); transition: transform .26s cubic-bezier(.16,1,.3,1); }
.system-tooltip.is-open .system-tooltip-card { transform: translateY(0) scale(1); }
.system-tooltip-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: white; background: var(--red); font-size: 1.18rem; }
.system-tooltip-card p { margin: 2px 0 4px; color: var(--red); font-size: .61rem; font-weight: 900; letter-spacing: .12em; }
.system-tooltip-card h2 { margin: 0 0 6px; font-size: 1.2rem; }
.system-tooltip-card span { color: var(--muted); font-size: .8rem; line-height: 1.65; }
.system-tooltip-card button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--input-bg); }
.result h2 { margin: 6px 0 9px; font-size: clamp(1.6rem, 4vw, 2.3rem); }
.result > span { color: var(--muted); font-size: .76rem; line-height: 1.7; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }

body > footer { min-height: 76px; display: flex; align-items: center; gap: 24px; padding: 20px max(22px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .66rem; }
body > footer nav { display: flex; gap: 14px; margin-left: auto; }
body > footer a:hover { color: var(--brown); }

@media (max-width: 900px) {
  .topbar nav { display: none; }
  .back-link { margin-left: auto; }
  .page-shell { grid-template-columns: 1fr; }
  .intro { position: static; }
  .step-list { display: grid; grid-template-columns: repeat(3, 1fr); }
  .step-list li { grid-template-columns: 35px 1fr; border-left: 0; border-bottom: 3px solid transparent; }
  .step-list li + li { border-top: 0; border-left: 1px solid var(--line); }
  .step-list li.active { border-left: 0; border-bottom-color: var(--brown); }
  .security-note { max-width: 520px; }
}
@media (min-width: 901px) {
  .topbar .mobile-menu { display: none !important; }
}
@media (max-width: 680px) {
  .topbar { min-height: 68px; padding: 10px 16px; }
  .brand small, .back-link { display: none; }
  .page-shell { width: min(100% - 24px, 620px); padding: 34px 0 70px; }
  .intro h1 { font-size: 2.45rem; }
  .step-list { grid-template-columns: 1fr; }
  .step-list li + li { border-top: 1px solid var(--line); border-left: 0; }
  .step-list li.active { border-left: 3px solid var(--brown); border-bottom: 0; }
  .panel { padding: 22px 17px; border-radius: 20px; }
  .panel-head { grid-template-columns: 44px 1fr; }
  .panel-head > span { width: 44px; height: 44px; }
  .panel-head > .countdown { grid-column: 1 / -1; width: fit-content; margin-left: auto; }
  .edition-grid, .channel-grid, .package-grid, .payment-grid { grid-template-columns: 1fr; }
  .player-box { grid-template-columns: 82px 1fr; gap: 13px; padding: 14px; }
  .player-avatar { min-height: 92px; }
  .player-avatar span { font-size: 2rem; }
  .actions { flex-wrap: wrap; }
  .actions .primary, .actions .secondary { flex: 1 1 150px; }
  .actions > small { width: 100%; text-align: center; }
  .result-actions { flex-direction: column; }
  body > footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  body > footer nav { margin: 5px 0 0; }
}
/* 2026-08 UX refresh: larger type, responsive navigation, skin preview, and homepage footer. */
html { font-size: 17.5px; }
body { font-size: 1rem; line-height: 1.55; }

.topbar {
  display: block;
  min-height: 78px;
  padding: 0 20px;
}
.topbar-inner {
  position: relative;
  width: min(1180px, 100%);
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
}
.brand strong { font-size: 1.08rem; }
.brand small { margin-top: 3px; font-size: .72rem; }
.topbar .desktop-nav { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.topbar .desktop-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; font-size: .84rem; }
.topbar-menu { position: relative; }
.topbar-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  color: var(--muted);
  cursor: pointer;
  font-size: .84rem;
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
}
.topbar-menu summary::-webkit-details-marker { display: none; }
.topbar-menu summary > i { font-size: .62rem; transition: transform .18s ease; }
.topbar-menu[open] summary, .topbar-menu summary:hover { color: var(--brown); }
.topbar-menu[open] summary > i { transform: rotate(180deg); }
.topbar-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 240px;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--mobile-menu-bg);
  box-shadow: 0 24px 60px rgba(45, 33, 27, .2);
}
.topbar-menu__panel--right { right: 0; left: auto; }
.topbar .desktop-nav .topbar-menu__panel a { border-radius: 10px; color: var(--muted); }
.topbar .desktop-nav .topbar-menu__panel a:hover { background: var(--surface-2); color: var(--brown); }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; }
.menu-toggle {
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex: 0 0 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.menu-toggle span { width: 21px; height: 2px; display: block; border-radius: 99px; background: var(--ink); transition: transform .18s ease, opacity .18s ease; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.topbar .mobile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  min-width: min(320px, calc(100vw - 28px));
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--mobile-menu-bg);
  box-shadow: 0 24px 60px rgba(45, 33, 27, .2);
  opacity: 0;
  transform: translateY(-9px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease;
}
.topbar .mobile-menu[hidden] { display: none; }
.topbar .mobile-menu.is-open { opacity: 1; transform: translateY(0) scale(1); }
.topbar .mobile-menu a { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; padding: 13px 14px; border-radius: 12px; color: var(--muted); font-size: .9rem; font-weight: 800; }
.topbar .mobile-menu a i { color: var(--brown); text-align: center; }
.topbar .mobile-menu a:hover, .topbar .mobile-menu a.active { background: var(--surface-2); color: var(--brown-dark); }

.eyebrow, .panel-head p, .result > p { font-size: .74rem; }
.intro > p { font-size: .96rem; }
.step-list strong { font-size: .84rem; }
.step-list small { font-size: .72rem; }
.security-note strong { font-size: .78rem; }
.security-note small { font-size: .68rem; }
.security-note > span { width: 34px; height: 34px; }
.alert { font-size: .86rem; }
.panel-head > span { font-size: .86rem; }
.panel-head small { font-size: .79rem; }
.choice strong { font-size: .94rem; }
.choice small { font-size: .73rem; }
.choice .platform-status { font-size: .66rem; }
.choice > b i { opacity: 1; font-size: 1.05rem; }
.choice > .choice-check { opacity: 0; color: var(--green); }
.choice.selected > .choice-check { opacity: 1; }
.player-box label > span, .voucher-box label > span { font-size: .84rem; }
.player-box label > span b { font-size: .66rem; }
input { font-size: .96rem; }
.player-box label small, .voucher-box label small { font-size: .76rem; }
.section-title strong { font-size: .87rem; }
.section-title small { font-size: .72rem; }
.channel strong { font-size: .83rem; }
.channel small { font-size: .69rem; }
.channel em { font-size: .67rem; }
.package-grid > p { font-size: .82rem; }
.package-card strong small { font-size: .66rem; }
.package-card > span { font-size: .8rem; }
.package-card em { font-size: .62rem; }
.announce strong { font-size: .82rem; }
.announce small { font-size: .7rem; }
.checkout-status { font-size: .76rem; }
.primary, .secondary { min-height: 50px; gap: 9px; font-size: .84rem; }
.actions > small { font-size: .72rem; }
.qr-card small { font-size: .69rem; }
.summary > span, .summary > p, .summary dt, .summary dd { font-size: .76rem; }
.waiting strong { font-size: .76rem; }
.waiting small { font-size: .68rem; }
.result > span { font-size: .88rem; }

.player-box { grid-template-columns: 138px minmax(0, 1fr); align-items: stretch; }
.player-preview { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 156px; }
.player-preview > small { margin-top: 9px; color: var(--muted); font-size: .61rem; font-weight: 900; letter-spacing: .1em; }
.player-avatar {
  position: relative;
  width: 104px;
  min-height: 104px;
  height: 104px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--brown), var(--brown-dark));
}
.player-avatar #avatarFallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.5rem; }
.player-avatar.has-skin #avatarFallback { display: none; }
.player-avatar img { position: absolute; width: 832px; max-width: none; height: auto; image-rendering: pixelated; }
.player-avatar .skin-face { left: -104px; top: -104px; }
.player-avatar .skin-hat { left: -520px; top: -104px; }
.presence { width: fit-content; display: inline-flex; align-items: center; gap: 7px; margin-top: 9px; padding: 6px 10px; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.presence[hidden] { display: none; }
.presence.online { background: rgba(67, 133, 74, .11); color: var(--green); }
.presence.offline { background: rgba(116, 100, 90, .11); color: var(--muted); }
.presence i { font-size: .55rem; }

body > footer.site-footer {
  min-height: 0;
  display: block;
  padding: 0;
  border-top: 3px solid var(--ink);
  background: var(--brown-dark);
  color: #fffaf1;
  font-size: 1rem;
}
.footer-grid {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) repeat(3, minmax(145px, 1fr));
  gap: clamp(28px, 5vw, 62px);
  margin: 0 auto;
  padding: 62px 0 48px;
}
.footer-brand { max-width: 410px; }
.footer-logo { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-logo img { border: 0; border-radius: 0; background: transparent; image-rendering: pixelated; box-shadow: none; }

.back-to-top{position:fixed;z-index:950;right:18px;bottom:18px;width:46px;height:46px;display:grid;place-items:center;color:#fff;background:#603824;border:1px solid rgba(255,255,255,.18);border-radius:999px;box-shadow:0 14px 38px rgba(54,30,18,.26);opacity:0;visibility:hidden;transform:translateY(10px);transition:.2s ease;cursor:pointer}.back-to-top.is-visible{opacity:1;visibility:visible;transform:none}.back-to-top:hover{transform:translateY(-3px)}
.footer-logo strong, .footer-logo small { display: block; }
.footer-logo strong { font-size: 1.12rem; font-weight: 900; }
.footer-logo small { margin-top: 3px; color: var(--honey); font-size: .75rem; font-weight: 700; }
.footer-brand > p, .footer-column a, .footer-column span, .footer-bottom { color: rgba(255, 250, 241, .72); }
.footer-brand > p { margin: 0; font-size: .82rem; line-height: 1.8; }
.footer-brand .footer-powered { margin-top: 18px; color: #fffaf1; }
.footer-powered a { color: var(--honey); font-weight: 900; }
body > footer.site-footer nav { margin-left: 0; }
.footer-column { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; }
.footer-column h2 { margin: 0 0 8px; color: #fffaf1; font-size: .85rem; font-weight: 900; }
.footer-column h2 i { width: 20px; color: var(--honey); }
.footer-column a, .footer-column span { font-size: .8rem; line-height: 1.55; }
.footer-column a:hover { color: var(--honey); }
.footer-bottom { width: min(1180px, calc(100% - 40px)); display: grid; grid-template-columns: auto minmax(280px, 1fr); gap: 35px; margin: 0 auto; padding: 25px 0 30px; border-top: 1px solid rgba(255, 250, 241, .18); font-size: .7rem; line-height: 1.65; }
.footer-bottom p { margin: 0; }
.footer-disclaimer { max-width: 720px; justify-self: end; text-align: right; }

@media (max-width: 1040px) {
  .back-link { display: none; }
}
@media (max-width: 900px) {
  .topbar .desktop-nav { display: none; }
  .menu-toggle { display: flex; margin-left: auto; }
  .footer-grid { grid-template-columns: 1.4fr repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  html { font-size: 17px; }
  .topbar, .topbar-inner { min-height: 70px; }
  .topbar { padding-inline: 14px; }
  .brand img { width: 42px; height: 42px; }
  .player-box { grid-template-columns: 1fr; }
  .player-preview { min-height: 126px; }
  .player-avatar { width: 96px; height: 96px; min-height: 96px; }
  .player-avatar img { width: 768px; }
  .player-avatar .skin-face { left: -96px; top: -96px; }
  .player-avatar .skin-hat { left: -480px; top: -96px; }
  .footer-grid { width: min(100% - 30px, 620px); grid-template-columns: 1fr 1fr; gap: 30px 24px; padding: 48px 0 38px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-column:last-child { grid-column: 1 / -1; }
  .footer-bottom { width: min(100% - 30px, 620px); grid-template-columns: 1fr; gap: 10px; }
  .footer-disclaimer { justify-self: start; text-align: left; }
}
