/*
Theme Name: ABC222 Local Preview
Theme URI: https://abc222slot.cc/
Author: ABC222 local prototype
Description: Local-only homepage prototype for ABC222. Not approved for production.
Version: 0.2.0
Text Domain: abc222-local-preview
*/

:root {
  --navy-950: #071126;
  --navy-900: #0b1735;
  --navy-800: #102452;
  --blue-500: #2b6fff;
  --blue-300: #6fa1ff;
  --gold-500: #ff9b3d;
  --gold-300: #ffd28f;
  --red-500: #ff5267;
  --text: #f7f9ff;
  --muted: #aebbd7;
  --line: rgba(174, 187, 215, .17);
  --surface: rgba(16, 36, 82, .72);
  --shadow: 0 22px 55px rgba(0, 0, 0, .28);
  --radius-lg: 28px;
  --radius-md: 18px;
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(64, 120, 255, .20), transparent 29rem),
    radial-gradient(circle at 95% 9%, rgba(255, 155, 61, .14), transparent 27rem),
    var(--navy-950);
  font-family: "Noto Sans Thai", "Tahoma", system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; }

.wrap { width: min(calc(100% - 40px), var(--content)); margin: 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-300);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold-500); border-radius: 2px; }
.section { padding: 88px 0; }
.section-head { max-width: 700px; margin-bottom: 30px; }
.section-head h2 { margin: 10px 0 10px; font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.15; }
.section-head p { margin: 0; color: var(--muted); }

.top-strip {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 38, .72);
  color: var(--muted);
  font-size: .82rem;
}
.top-strip .wrap { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.top-strip strong { color: var(--gold-300); }

.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 38, .85);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px;
  color: #1c2030; background: linear-gradient(135deg, #ffd789, #ff8b2e 70%);
  font-weight: 950; box-shadow: 0 8px 26px rgba(255, 155, 61, .28);
}
.brand-copy strong { display: block; font-size: 1.04rem; letter-spacing: .05em; }
.brand-copy span { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .15em; }
.main-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--muted); font-size: .9rem; transition: color .2s ease; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 19px;
  border: 1px solid transparent; border-radius: 13px; font-size: .88rem; font-weight: 800;
  transition: transform .2s ease, filter .2s ease, border-color .2s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); filter: brightness(1.08); }
.btn-primary { color: #1c2030; background: linear-gradient(135deg, #ffd486, var(--gold-500)); box-shadow: 0 10px 25px rgba(255, 155, 61, .18); }
.btn-ghost { border-color: rgba(174, 187, 215, .28); color: var(--text); background: rgba(255,255,255,.03); }

.hero { position: relative; overflow: hidden; padding: 92px 0 70px; }
.hero::after { content: ""; position: absolute; right: -160px; top: 30px; width: 520px; height: 520px; border: 1px solid rgba(111,161,255,.22); border-radius: 50%; box-shadow: 0 0 0 50px rgba(111,161,255,.025), 0 0 0 100px rgba(111,161,255,.02); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.07fr .93fr; gap: 62px; align-items: center; }
.hero h1 { max-width: 740px; margin: 15px 0 22px; font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: .98; letter-spacing: -.05em; }
.hero h1 span { color: var(--gold-300); }
.hero-lead { max-width: 620px; margin: 0; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 15px; color: #8595b8; font-size: .75rem; }
.hero-panel { position: relative; padding: 28px; border: 1px solid rgba(111,161,255,.3); border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(26, 62, 129, .87), rgba(12, 27, 64, .88)); box-shadow: var(--shadow); }
.hero-panel::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255, 210, 143, .16); border-radius: 20px; pointer-events: none; }
.panel-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 44px; }
.panel-top small { color: var(--gold-300); letter-spacing: .12em; text-transform: uppercase; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; color: #bdeed0; font-size: .74rem; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #53df88; box-shadow: 0 0 0 5px rgba(83,223,136,.12); }
.keyword-stack { position: relative; display: grid; gap: 12px; }
.keyword-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(7,17,38,.38); }
.keyword-card strong { font-size: clamp(1.08rem, 3vw, 1.46rem); letter-spacing: .02em; }
.keyword-card span { color: var(--gold-300); font-size: .75rem; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-card { display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(16, 36, 82, .48); }
.quick-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 12px; color: var(--gold-300); background: rgba(255, 155, 61, .12); font-weight: 900; }
.quick-card strong { display: block; font-size: .94rem; }
.quick-card span { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; }

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.category-card { position: relative; min-height: 180px; overflow: hidden; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(140deg, rgba(19, 49, 105, .9), rgba(11, 23, 53, .78)); }
.category-card::after { content: ""; position: absolute; right: -24px; bottom: -48px; width: 150px; height: 150px; border: 1px solid rgba(111,161,255,.22); border-radius: 50%; }
.category-card .index { color: var(--gold-300); font-size: .76rem; font-weight: 900; }
.category-card h3 { margin: 29px 0 4px; font-size: 1.3rem; }
.category-card p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: .83rem; }

.entry { background: linear-gradient(180deg, rgba(14, 31, 71, .35), transparent); }
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.info-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.info-card h3 { margin: 0 0 10px; font-size: 1.3rem; }
.info-card p { margin: 0; color: var(--muted); }
.step-list { display: grid; gap: 15px; margin: 20px 0 0; padding: 0; list-style: none; }
.step-list li { display: grid; grid-template-columns: 30px 1fr; gap: 11px; align-items: start; }
.step-num { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: #1c2030; background: var(--gold-300); font-weight: 900; font-size: .82rem; }
.step-list strong { display: block; font-size: .92rem; }
.step-list span { display: block; color: var(--muted); font-size: .8rem; }
.callout { margin-top: 20px; padding: 15px 17px; border-left: 3px solid var(--gold-500); border-radius: 0 12px 12px 0; color: var(--gold-300); background: rgba(255, 155, 61, .08); font-size: .83rem; }

.support-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: stretch; }
.support-card { padding: 30px; border-radius: var(--radius-lg); background: linear-gradient(145deg, #163c8c, #102452 60%, #0d1b3c); box-shadow: var(--shadow); }
.support-card h2 { max-width: 500px; margin: 12px 0; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.13; }
.support-card p { max-width: 560px; margin: 0; color: #c4d0ec; }
.support-card .btn { margin-top: 24px; }
.mini-list { display: grid; gap: 12px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.mini-list div { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mini-list div:last-child { padding-bottom: 0; border-bottom: 0; }
.mini-list strong { display: block; font-size: .93rem; }
.mini-list span { color: var(--muted); font-size: .8rem; }

.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
details { padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(16,36,82,.48); }
summary { cursor: pointer; font-weight: 800; }
details p { margin: 12px 0 0; color: var(--muted); font-size: .86rem; }

.site-footer { padding: 45px 0 92px; border-top: 1px solid var(--line); background: rgba(3, 9, 22, .42); }
.footer-grid { display: flex; align-items: start; justify-content: space-between; gap: 28px; }
.footer-copy { max-width: 500px; color: var(--muted); font-size: .78rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .8rem; }
.footer-links a:hover { color: var(--text); }
.mobile-bar { display: none; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .hero-grid, .support-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .hero-panel { max-width: 620px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .wrap { width: min(calc(100% - 28px), var(--content)); }
  .top-strip .wrap { min-height: 34px; }
  .top-strip span { display: none; }
  .header-inner { min-height: 66px; gap: 10px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-copy strong { font-size: .92rem; }
  .brand-copy span { font-size: .58rem; }
  .header-actions { margin-left: auto; gap: 6px; }
  .header-actions .btn { min-height: 38px; padding: 0 11px; font-size: .72rem; }
  .hero { padding: 52px 0 42px; }
  .hero h1 { font-size: clamp(2.42rem, 14vw, 4.2rem); }
  .hero-lead { font-size: .95rem; }
  .hero-panel { padding: 21px; border-radius: 22px; }
  .panel-top { margin-bottom: 30px; }
  .keyword-card { padding: 13px 14px; }
  .keyword-card span { font-size: .66rem; }
  .section { padding: 62px 0; }
  .quick-grid, .category-grid, .entry-grid, .faq-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 66px; }
  .category-card { min-height: 150px; }
  .info-card, .support-card { padding: 22px; border-radius: 21px; }
  .footer-grid { display: grid; }
  .footer-links { gap: 10px 14px; }
  .mobile-bar { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 7px; border: 1px solid rgba(174,187,215,.18); border-radius: 18px; background: rgba(7,17,38,.92); box-shadow: 0 12px 35px rgba(0,0,0,.42); backdrop-filter: blur(15px); }
  .mobile-bar a { display: grid; place-items: center; min-height: 40px; color: var(--muted); font-size: .67rem; }
  .mobile-bar a:first-child { color: var(--gold-300); }
}

/* Local prototype review refinements: Thai spacing, anchor offsets, touch targets. */
.hero h1 { line-height: 1.13; letter-spacing: -.025em; }
.hero-panel .live-dot { color: #c6d6fa; font-size: .70rem; }
.hero-panel .live-dot::before { background: #94b9ff; box-shadow: none; }
section[id], main[id] { scroll-margin-top: 90px; }
.callout { overflow-wrap: anywhere; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 5px; }
@media(max-width:620px) { .header-actions .btn, .mobile-bar a { min-height:44px; } .site-footer { padding-bottom:110px; } .panel-top { flex-wrap:wrap; gap:10px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *, *::before, *::after { transition:none !important; } }

/* Domain-led editorial homepage prototype, revision 3. */
.hero h1 { font-size:clamp(2.7rem,5.5vw,4.7rem); letter-spacing:-.045em; }
.hero-domain-sub { display:block; margin-top:12px; font-size:.56em; letter-spacing:0; line-height:1.35; }
.section-tint { background:rgba(16,36,82,.22); border-block:1px solid rgba(174,187,215,.06); }
.editorial-grid { display:grid; grid-template-columns:.85fr 1.15fr; gap:64px; align-items:start; }
.article-copy { color:var(--muted); font-size:.98rem; }
.article-copy p { margin:0 0 20px; }
.article-copy strong, .article-copy h3 { color:var(--text); }
.article-copy h3 { margin:0 0 12px; font-size:1.15rem; }
.article-copy h3:not(:first-child) { margin-top:28px; }
.identity-line { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; padding:18px 0; border-block:1px solid var(--line); }
.identity-line small, .identity-line strong { display:block; }
.identity-line small { color:var(--muted); font-size:.74rem; }
.identity-line strong { font-size:.95rem; margin-top:5px; }
.category-card { min-height:230px; }
.category-card h3 { margin-top:22px; }
.category-card p { line-height:1.85; }
.text-link { display:inline-flex; position:relative; z-index:1; color:var(--gold-300); margin-top:12px; font-size:.84rem; min-height:44px; align-items:center; }
.section-afterword { max-width:880px; color:var(--muted); font-size:.88rem; margin:24px 0 0; }
.reading-checklist { display:grid; gap:12px; padding:20px; margin:24px 0; border:1px solid var(--line); border-radius:18px; }
.reading-checklist div { display:grid; grid-template-columns:70px 1fr; gap:16px; }
.spaced-btn { margin-top:20px; }
.paragraph-gap { margin-top:16px !important; }
.process-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; border:1px solid var(--line); border-radius:20px; padding:24px; margin-top:22px; }
.process-strip strong { display:block; margin-top:12px; font-size:.95rem; }
.process-strip p { color:var(--muted); font-size:.84rem; margin:4px 0 0; }
.table-shell { margin-top:24px; border:1px solid var(--line); border-radius:18px; overflow:hidden; }
table { width:100%; border-collapse:collapse; font-size:.88rem; }
caption { padding:18px 22px; text-align:left; font-weight:800; color:var(--gold-300); background:rgba(16,36,82,.3); }
th, td { padding:15px 20px; text-align:left; border-top:1px solid var(--line); vertical-align:top; }
td { color:var(--muted); }
thead { background:rgba(16,36,82,.5); }
@media(max-width:900px) { .editorial-grid { grid-template-columns:1fr; gap:8px; } }
@media(max-width:620px) { .hero h1 { font-size:clamp(2.7rem,13vw,4.3rem); } .hero-domain-sub { font-size:.62em; } .identity-line { grid-template-columns:1fr; gap:12px; } .reading-checklist div { grid-template-columns:1fr; gap:4px; } .process-strip { grid-template-columns:1fr; } th,td { padding:12px 10px; font-size:.78rem; } .quick-grid { grid-template-columns:1fr 1fr; } .quick-card { display:block; padding:14px; } .quick-card .quick-icon { margin-bottom:10px; } }

.brand-source-note { margin:24px 0; padding:22px 24px; border-left:3px solid var(--gold-300); border-radius:0 16px 16px 0; background:rgba(16,36,82,.42); }
.brand-source-note p { margin-top:12px; }
.brand-source-note .source-caption { font-size:.78rem; color:var(--muted); }

/* Round 3: official visual layer and lightweight carousel. */
.abc-carousel { max-width: 1180px; margin: 22px auto 0; padding: 0 20px; }
.carousel-viewport { overflow: hidden; border: 1px solid rgba(255,210,143,.22); border-radius: 24px; background: #081225; box-shadow: 0 16px 42px rgba(0,0,0,.26); }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display:none; }
.carousel-slide { position:relative; flex:0 0 100%; margin:0; scroll-snap-align:start; }
.carousel-slide img { display:block; width:100%; height:auto; aspect-ratio:1000/342; object-fit:cover; }
.carousel-slide figcaption { position:absolute; left:18px; bottom:15px; padding:8px 12px; border-radius:999px; background:rgba(4,11,27,.78); color:#fff; font-size:.75rem; }
.carousel-controls { display:flex; align-items:center; justify-content:center; gap:12px; margin:12px auto 0; }
.carousel-controls button { border:1px solid rgba(255,210,143,.35); background:#10244b; color:#fff; border-radius:999px; min-width:34px; min-height:32px; cursor:pointer; }
.carousel-controls .carousel-pause { padding:0 12px; font-size:.72rem; }
.carousel-dots { display:flex; gap:7px; }
.carousel-dots button { width:10px; min-width:10px; height:10px; min-height:10px; padding:0; border:0; background:#65789d; }
.carousel-dots button.is-active { background:#ffd28f; transform:scale(1.2); }
.trust-list { display:grid; gap:14px; position:relative; z-index:1; }
.trust-list div { padding:14px 0; border-bottom:1px solid rgba(255,255,255,.12); }
.trust-list div:last-child { border-bottom:0; }
.trust-list strong,.trust-list span { display:block; }
.trust-list strong { color:#ffe0ae; margin-bottom:5px; }
.trust-list span { color:#c8d4ec; font-size:.82rem; line-height:1.65; }
.inline-visual { display:grid; grid-template-columns:1.15fr .85fr; gap:34px; align-items:center; margin-top:34px; }
.inline-visual.reverse { grid-template-columns:.85fr 1.15fr; }
.inline-visual figure { margin:0; }
.inline-visual img { display:block; width:100%; height:auto; border-radius:18px; border:1px solid rgba(111,161,255,.25); }
.inline-visual figcaption { margin-top:8px; color:#8091b4; font-size:.72rem; }
.inline-visual h3 { margin-top:10px; }
@media(max-width:760px){ .abc-carousel { padding:0 12px; } .carousel-viewport { border-radius:16px; } .inline-visual,.inline-visual.reverse { grid-template-columns:1fr; gap:18px; } .inline-visual.reverse figure { order:-1; } .carousel-slide figcaption { left:10px; bottom:10px; font-size:.68rem; } }
@media(prefers-reduced-motion:reduce){ .carousel-track { scroll-behavior:auto; } }

/* Round 4: local inner-page prototypes. */
.inner-page { min-height: 60vh; }
.inner-hero { padding: 76px 0 62px; background: linear-gradient(135deg, rgba(16,36,82,.92), rgba(7,17,38,.82)); border-bottom: 1px solid var(--line); }
.inner-hero-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr); gap:44px; align-items:center; }
.inner-hero h1 { margin:14px 0 20px; font-size:clamp(2.3rem,5vw,4.8rem); line-height:1.05; }
.inner-fact-card { padding:26px; border:1px solid rgba(255,210,143,.28); border-radius:var(--radius-lg); background:linear-gradient(160deg,rgba(43,111,255,.26),rgba(16,36,82,.62)); box-shadow:var(--shadow); }
.inner-fact-card strong { display:block; color:var(--gold-300); font-size:1.12rem; line-height:1.35; }
.inner-fact-card p { margin:12px 0 0; color:var(--muted); }
.narrow { max-width:920px; }
.section-alt { background:rgba(16,36,82,.24); }
.info-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.info-card { padding:24px; border:1px solid var(--line); border-radius:var(--radius-md); background:rgba(16,36,82,.42); }
.info-card h3 { margin:10px 0 8px; font-size:1.05rem; }
.info-card p { margin:0; color:var(--muted); }
.card-index, .step-no { display:inline-flex; width:34px; height:34px; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,155,61,.18); color:var(--gold-300); font-weight:800; }
.step-no { width:auto; height:auto; background:none; border-radius:0; font-size:.8rem; letter-spacing:.1em; }
.inner-category-grid { grid-template-columns:repeat(3,1fr); }
.inner-category-grid .category-card { min-height:210px; }
.inner-page code { color:var(--gold-300); overflow-wrap:anywhere; }
.inner-page .text-link { display:inline-flex; min-height:32px; margin-top:0; }
.figure-caption { margin:10px 0 0; color:var(--muted); font-size:.78rem; }
@media(max-width:900px){ .inner-hero-grid,.info-grid,.inner-category-grid { grid-template-columns:1fr 1fr; } .inner-hero-grid { grid-template-columns:1fr; } }
@media(max-width:620px){ .inner-hero { padding:52px 0 40px; } .info-grid,.inner-category-grid { grid-template-columns:1fr; } .inner-fact-card { padding:20px; } }

/* Round 10: header menu, persistent account bar and return-to-top control. */
.site-header { z-index: 40; }
.header-inner { position: relative; }
.menu-shell { position: relative; margin-left: auto; }
.menu-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(174,187,215,.28); border-radius: 13px; color: var(--text); background: rgba(255,255,255,.04); cursor: pointer; list-style: none; font-size: .84rem; font-weight: 800; }
.menu-toggle::-webkit-details-marker { display: none; }
.menu-toggle::marker { content: ''; }
.menu-icon { display: grid; gap: 4px; width: 19px; }
.menu-icon i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.menu-shell[open] .menu-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-shell[open] .menu-icon i:nth-child(2) { opacity: 0; }
.menu-shell[open] .menu-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-shell .main-nav { display: none; position: absolute; top: calc(100% + 12px); right: 0; min-width: 230px; margin: 0; padding: 10px; border: 1px solid rgba(174,187,215,.22); border-radius: 18px; background: rgba(7,17,38,.98); box-shadow: 0 18px 42px rgba(0,0,0,.34); }
.menu-shell[open] .main-nav { display: grid; gap: 3px; }
.menu-shell .main-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 13px; border-radius: 11px; color: var(--muted); }
.menu-shell .main-nav a:hover, .menu-shell .main-nav a:focus-visible { color: var(--text); background: rgba(111,161,255,.13); }
.account-bar { position: sticky; top: 76px; z-index: 35; border-bottom: 1px solid rgba(255,210,143,.17); background: rgba(10,22,49,.94); box-shadow: 0 8px 22px rgba(0,0,0,.12); backdrop-filter: blur(14px); }
.account-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 58px; }
.account-bar-label { color: var(--gold-300); font-size: .82rem; font-weight: 800; }
.account-actions { display: flex; align-items: center; gap: 10px; }
.account-actions .btn { min-height: 40px; padding-inline: 17px; }
.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255,210,143,.44); border-radius: 50%; color: #1c2030; background: linear-gradient(135deg, #ffd486, var(--gold-500)); box-shadow: 0 12px 28px rgba(0,0,0,.34); font-size: 1.35rem; font-weight: 900; line-height: 1; }
.back-to-top:hover, .back-to-top:focus-visible { transform: translateY(-3px); filter: brightness(1.08); }
.abc-carousel { width: 100%; }
.carousel-track { width: 100%; }
.carousel-slide { min-width: 100%; }
.carousel-controls { flex-wrap: wrap; min-height: 38px; }
section[id], main[id] { scroll-margin-top: 150px; }
@media (max-width: 900px) {
  .account-bar { top: 76px; }
}
@media (max-width: 620px) {
  .menu-label { display: none; }
  .menu-toggle { width: 44px; justify-content: center; padding: 0; }
  .menu-shell .main-nav { position: fixed; top: 108px; left: 14px; right: 14px; min-width: 0; }
  .account-bar { top: 66px; }
  .account-bar-inner { min-height: 58px; gap: 10px; }
  .account-bar-label { font-size: .72rem; white-space: nowrap; }
  .account-actions { gap: 6px; }
  .account-actions .btn { min-height: 42px; padding-inline: 11px; font-size: .72rem; }
  .back-to-top { right: 14px; bottom: 82px; width: 44px; height: 44px; }
  section[id], main[id] { scroll-margin-top: 136px; }
}

/* Round 18: visible homepage game-lobby hero revision for local review. */
.home-hero-stage {
  position: relative;
  overflow: hidden;
  padding: 64px 0 42px;
  background:
    radial-gradient(circle at 78% 18%, rgba(43,111,255,.22), transparent 28rem),
    linear-gradient(145deg, #08142f 0%, #102452 56%, #0b1735 100%);
  border-bottom: 1px solid rgba(111,161,255,.18);
}
.home-hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.home-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); gap: 48px; align-items: center; }
.home-hero-copy { min-width: 0; }
.home-hero-copy h1 { max-width: 640px; margin: 16px 0 20px; font-size: clamp(2.7rem, 6vw, 5.3rem); line-height: .98; letter-spacing: -.055em; }
.home-hero-copy h1 span { display: block; margin-top: 9px; color: var(--gold-300); font-size: .48em; letter-spacing: -.02em; }
.home-hero-copy .hero-lead { max-width: 610px; }
.hero-proof-row { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 24px; color: #cad5ed; font-size: .78rem; }
.hero-proof-row span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof-row b { color: var(--gold-300); font-size: .7rem; letter-spacing: .08em; }
.home-hero-visual { min-width: 0; padding: 14px; border: 1px solid rgba(255,210,143,.3); border-radius: 30px; background: linear-gradient(145deg, rgba(4,12,29,.74), rgba(16,36,82,.8)); box-shadow: 0 26px 65px rgba(0,0,0,.3); }
.hero-visual-label, .hero-visual-footer { display: flex; align-items: center; gap: 9px; padding: 5px 9px 13px; color: var(--gold-300); font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.hero-visual-label small { margin-left: auto; color: var(--muted); font-size: .63rem; letter-spacing: .08em; font-weight: 700; }
.hero-visual-footer { justify-content: space-between; padding: 13px 9px 3px; border-top: 1px solid rgba(174,187,215,.14); letter-spacing: 0; }
.hero-visual-footer span { color: var(--muted); font-size: .72rem; font-weight: 600; }
.home-hero-visual .abc-carousel { padding: 0; }
.home-hero-visual .carousel-viewport { border-radius: 19px; border-color: rgba(255,210,143,.22); }
.home-hero-visual .carousel-slide img { aspect-ratio: 1000 / 342; object-fit: cover; }
.home-hero-visual .carousel-controls { margin-top: 9px; }
.hero-trust-band { padding: 24px 0; border-bottom: 1px solid rgba(174,187,215,.14); background: rgba(16,36,82,.38); }
.hero-trust-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 12px; align-items: stretch; }
.hero-trust-intro, .hero-trust-item { min-height: 112px; padding: 18px; border: 1px solid rgba(174,187,215,.17); border-radius: 17px; background: rgba(7,17,38,.38); }
.hero-trust-intro { border-color: rgba(255,210,143,.24); }
.hero-trust-intro .eyebrow { font-size: .64rem; }
.hero-trust-intro h2 { margin: 8px 0 5px; font-size: 1.12rem; }
.hero-trust-intro p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.hero-trust-item { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.hero-trust-item strong { color: var(--gold-300); font-size: .88rem; }
.hero-trust-item span { color: var(--muted); font-size: .74rem; line-height: 1.45; }
@media (max-width: 1000px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .home-hero-copy { max-width: 760px; }
  .hero-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-trust-intro { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .home-hero-stage { padding: 40px 0 26px; }
  .home-hero-grid { gap: 24px; }
  .home-hero-copy h1 { font-size: clamp(2.45rem, 14vw, 4rem); }
  .home-hero-copy h1 span { font-size: .5em; }
  .hero-proof-row { gap: 8px 12px; }
  .home-hero-visual { padding: 9px; border-radius: 22px; }
  .hero-visual-label { flex-wrap: wrap; padding-bottom: 9px; font-size: .62rem; }
  .hero-visual-label small { width: 100%; margin-left: 0; padding-left: 17px; }
  .hero-visual-footer { display: block; line-height: 1.55; }
  .hero-visual-footer span { display: block; }
  .hero-trust-grid { grid-template-columns: 1fr; }
  .hero-trust-intro { grid-column: auto; }
  .hero-trust-intro, .hero-trust-item { min-height: 0; }
}

/* Round 22: keep expanded menu usable at short viewport heights. */
.menu-shell .main-nav { max-height: min(68vh, 580px); overflow-y: auto; overscroll-behavior: contain; }
@media(max-width:620px) { .menu-shell .main-nav { max-height: calc(100dvh - 145px); } }

/* Round 22: preserve legible labels in original editorial diagrams on narrow screens.
   Scrolling stays inside the figure, not the document. */
@media (max-width: 620px) {
  .inner-page figure:has(img[src*="/guide-"]) { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: #ffb45f #102452; }
  .inner-page figure:has(img[src*="/guide-"])::before { content: "เลื่อนภาพไปด้านข้างเพื่ออ่านรายละเอียด →"; display: block; padding: 0 0 8px; color: #ffcf94; font-size: .8rem; }
  .inner-page figure img.inline-figure[src*="/guide-"] { display: block; min-width: 760px; max-width: none; height: auto; }
}

/* Round 23: visible desktop navigation, centered account actions, carousel immediately below. */
@media (min-width: 901px) {
  .desktop-nav { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: clamp(10px, 1.15vw, 22px); min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
  .desktop-nav a { display: inline-flex; align-items: center; min-height: 44px; flex: none; color: var(--muted); font-size: .88rem; }
  .desktop-nav a:hover, .desktop-nav a:focus-visible { color: var(--gold-300); }
  .menu-shell { display: none; }
}
.account-bar-inner { justify-content: center; }
.account-bar-label { display: none; }
.account-actions { justify-content: center; gap: 16px; width: 100%; }
.account-actions .btn { min-width: 180px; min-height: 48px; padding-inline: 24px; font-size: .95rem; }
.home-hero-stage { padding-top: 20px; }
.home-hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 36px; }
.home-hero-visual { order: -1; width: 100%; }
.home-hero-copy { max-width: 900px; }
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-shell { display: block; }
  .menu-toggle { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .menu-toggle:hover, .menu-toggle:focus-visible { background: transparent; outline-offset: 3px; }
}
@media (max-width: 620px) {
  .top-strip { display: none; }
  .menu-shell { border: 0; border-radius: 0; background: none; box-shadow: none; }
  .menu-toggle { width: 48px; min-height: 48px; padding: 0; }
  .menu-icon { width: 24px; }
  .menu-shell .main-nav { top: 66px; }
  .account-bar-inner { justify-content: center; min-height: 62px; }
  .account-actions { gap: 10px; }
  .account-actions .btn { flex: 0 1 148px; min-width: 0; min-height: 46px; padding-inline: 16px; font-size: .87rem; }
  .home-hero-stage { padding-top: 14px; }
  .home-hero-grid { gap: 26px; }
  .home-hero-visual { padding: 7px; }
  .hero-visual-label, .hero-visual-footer { display: none; }
}
/* Round 23 mobile correction: remove legacy details padding and open menu below fixed account actions. */
@media (max-width: 620px) {
  .menu-shell { width: 48px; padding: 0; }
  .menu-shell .main-nav { top: 129px; z-index: 50; max-height: calc(100dvh - 155px); }
}
/* Round 23 final: desktop menu stays full-size, wrapping instead of shrinking or hiding links. */
@media (min-width: 901px) {
  .desktop-nav { flex-wrap: wrap; gap: 0 16px; overflow: visible; }
  .desktop-nav a { font-size: .94rem; }
}
/* Mobile menu is a body-level overlay so sticky/header painting never hides it on scroll. */
.mobile-overlay-nav { display: none; }
@media (max-width: 900px) {
  body:has(.menu-shell[open]) > .mobile-overlay-nav {
    display: grid; gap: 3px; position: fixed; z-index: 50;
    top: 134px; left: max(14px, calc((100vw - 1180px)/2)); right: max(14px, calc((100vw - 1180px)/2));
    max-height: calc(100dvh - 155px); overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 10px; border: 1px solid rgba(174,187,215,.22);
    border-radius: 18px; background: #071126; box-shadow: 0 18px 42px rgba(0,0,0,.45);
  }
  .mobile-overlay-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 13px; border-radius: 11px; color: var(--muted); font-size: .9rem; }
  .mobile-overlay-nav a:hover, .mobile-overlay-nav a:focus-visible { color: var(--text); background: rgba(111,161,255,.13); }
}
@media (max-width: 620px) {
  body:has(.menu-shell[open]) > .mobile-overlay-nav { top: 129px; left: 14px; right: 14px; }
}

/* Round 25: editorial images belong to their answer section; not hero/banner assets. */
.article-illustration{box-sizing:border-box;width:min(calc(100% - 32px),920px);margin:32px auto 12px;clear:both}
.article-illustration img{display:block;width:100%;height:auto;max-height:520px;object-fit:contain;border-radius:16px;border:1px solid rgba(111,161,255,.25);background:#101b35}
.article-illustration figcaption{margin-top:10px;color:var(--muted);font-size:.82rem;line-height:1.6}
.article-illustration.is-decorative img{max-height:420px;object-fit:cover}
@media(max-width:620px){.article-illustration{width:min(calc(100% - 24px),920px);margin:24px auto 6px}.article-illustration img{max-height:none;object-fit:contain}.article-illustration.is-decorative img{aspect-ratio:16/9;object-fit:cover}}
