/* Special Force landing - MyArena design system (tokens copied verbatim from
   myarenaonline/docs/DESIGN-SYSTEM.md / id.myarenaonline.com/public/css/myarenaid.css).
   MyArena is the parent brand (white header on top); Special Force is a sub-brand
   shown as the dark game band underneath it. Mobile first: 375px, 16px gutters. */

:root {
    --color-dark: #16181D;          --color-dark-rgb: 22 24 29;
    --color-accent: #E30613;        --color-accent-rgb: 227 6 19;
    --color-accent-light: #FF4A54;
    --color-accent-dark: #C10011;
    --color-accent-2: #FF2D3F;
    --color-bg: #EDEFF2;
    --color-surface: #ffffff;
    --color-surface-2: #f1f2f4;
    --color-text: #16181D;
    --color-neutral: #666A72;
    --color-dim-2: #A6AAB2;
    --color-input-border: #d1d9df;
    --color-border: rgb(var(--color-dark-rgb) / .12);
    --color-border-hi: rgb(var(--color-accent-rgb) / .45);
    --color-good: #16a34a;
    --grad-btn: linear-gradient(180deg, var(--color-accent-light) 0%, var(--color-accent) 50%, var(--color-accent-dark) 100%);
    --grad-soft: linear-gradient(135deg, rgb(var(--color-accent-rgb) / .10), rgb(var(--color-accent-rgb) / .04));
    --shadow-card: 0 4px 20px -8px rgb(var(--color-accent-rgb) / .14);
    --radius-card: 14px;
    --radius-control: 11px;

    --page-max: 1120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: 'Prompt', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid rgb(var(--color-accent-rgb) / .35); outline-offset: 2px; }
svg { flex-shrink: 0; }

.container { max-width: var(--page-max); margin: 0 auto; padding: 0 16px; }

/* ---------- 1. MyArena header (parent brand) ---------- */
.site-header { background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); position: relative; z-index: 3; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.site-header-logo { flex-shrink: 0; }
.site-header-logo img { height: 40px; width: auto; max-width: none; }
.site-header-nav { display: flex; align-items: center; gap: 4px; }
.site-header-nav a {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
    color: var(--color-text); font-size: 13px; font-weight: 600;
}
.site-header-nav a:hover { background: var(--color-surface-2); color: var(--color-accent); }
.site-header-nav svg { width: 18px; height: 18px; color: var(--color-accent); }
@media (max-width: 560px) { .site-header-nav .nav-label { display: none; } .site-header-nav a { padding: 8px; } }
.site-header-inner .site-header-nav { margin-left: auto; }

/* account: guest = outline pill "เข้าสู่ระบบ"; signed in = name pill + dropdown (same look as MyArenaID's header) */
.site-account { position: relative; display: flex; align-items: center; padding-left: 8px; margin-left: 4px; border-left: 1px solid var(--color-border); }
.site-account .btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.account-toggle {
    display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 0; background: none;
    font-family: inherit; font-size: 13px; font-weight: 600; color: var(--color-text); cursor: pointer; min-height: 36px;
}
.account-toggle:hover, .account-toggle[aria-expanded="true"] { background: var(--color-surface-2); color: var(--color-accent); }
.account-toggle svg { width: 20px; height: 20px; color: var(--color-accent); }
.account-toggle .account-chevron { width: 16px; height: 16px; color: var(--color-dim-2); transition: transform .15s; }
.account-toggle[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; z-index: 10;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card);
    box-shadow: 0 12px 32px -12px rgb(0 0 0 / .25);
}
.account-menu a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: var(--color-text);
}
.account-menu a:hover { background: var(--grad-soft); color: var(--color-accent); }
.account-menu a svg { width: 18px; height: 18px; color: var(--color-accent); }
.account-menu-sep { height: 1px; background: var(--color-border); margin: 6px 4px; }
.account-menu .account-signout, .account-menu .account-signout svg { color: var(--color-neutral); }
.site-account .btn { white-space: nowrap; }
@media (max-width: 420px) {
    .account-name { max-width: 90px; }
    .site-account { padding-left: 4px; }
    .site-header-inner { gap: 6px; }
    .site-header-nav { gap: 0; }
    .site-header-nav a { padding: 7px; }
    .site-account .btn-sm { padding: 6px 12px; }
}

/* ---------- 2. Special Force sub-brand band ---------- */
.game-band { background: var(--color-dark); color: #fff; }
.game-bar { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.game-bar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.game-bar-brand img { height: 34px; width: auto; }
.game-nav { display: flex; gap: 4px; margin-left: auto; }
.game-nav a {
    color: rgb(255 255 255 / .85); font-size: 14px; font-weight: 600; padding: 7px 14px;
    border-radius: 999px; white-space: nowrap;
}
.game-nav a:hover { background: rgb(255 255 255 / .08); color: #fff; }
/* ข่าวสาร dropdown (desktop: hover / keyboard focus; phones: the link goes to the news page, which has the category tabs) */
.game-nav-drop { position: relative; display: flex; }
.game-nav-drop > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .7; }
.game-nav-menu { position: absolute; z-index: 40; top: 100%; left: 0; min-width: 170px; padding: 8px; margin-top: 6px; display: none; gap: 2px; flex-direction: column;
    background: #1b1e25; border: 1px solid rgb(255 255 255 / .1); border-radius: 14px; box-shadow: 0 14px 30px rgb(0 0 0 / .35); }
.game-nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.game-nav-drop:hover .game-nav-menu, .game-nav-drop:focus-within .game-nav-menu { display: flex; }
.game-nav-menu a { border-radius: 10px; }
.game-social { display: flex; gap: 4px; }
.game-social a {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: rgb(255 255 255 / .75); background: rgb(255 255 255 / .06);
}
.game-social a:hover { color: #fff; background: var(--color-accent); }
.game-social svg { width: 18px; height: 18px; }
/* official brand colours only - never themed (DESIGN-SYSTEM.md, social buttons) */
.game-social a.social-fb { background: #1877F2; color: #fff; }
.game-social a.social-fb:hover { background: #145DBF; }
.game-social a.social-yt { background: #FF0000; color: #fff; }
.game-social a.social-yt:hover { background: #CC0000; }

/* on phones the game nav becomes a swipeable pill row under the logo */
@media (max-width: 900px) {
    .game-bar { flex-wrap: wrap; padding: 10px 0; row-gap: 8px; }
    .game-social { margin-left: auto; }
    .game-nav {
        order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 16px 2px; overflow-x: auto;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .game-nav::-webkit-scrollbar { display: none; }
    .game-nav a { background: rgb(255 255 255 / .06); font-size: 13px; padding: 6px 14px; }
    .game-nav-menu, .game-nav-drop:hover .game-nav-menu, .game-nav-drop:focus-within .game-nav-menu { display: none; }
    .game-nav-drop > a::after { display: none; }
}
@media (max-width: 400px) { .game-social a { width: 34px; height: 34px; } }

/* TV Banner slider: full screen width at the banner's own 1888x429 ratio, like sf-web - never cropped or letterboxed */
.hero { padding: 0; }
.hero-slider {
    /* always edge to edge: capping at 1888px left odd-coloured strips beside the art on wider screens */
    position: relative; overflow: hidden; background: #000; width: 100%; aspect-ratio: 1888 / 429;
}
.hero-track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.4, 0, .2, 1); touch-action: pan-y; }
.hero-slide { position: relative; flex: 0 0 100%; height: 100%; display: block; overflow: hidden; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .hero-dots { bottom: 6px; } .hero-dots button { width: 6px; height: 6px; } .hero-dots button.active { width: 16px; } }
.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); cursor: pointer;
    background: rgb(0 0 0 / .45); color: #fff; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s, background .2s;
}
.hero-arrow svg { width: 22px; height: 22px; }
.hero-prev { left: 14px; } .hero-next { right: 14px; }
.hero-slider:hover .hero-arrow, .hero-arrow:focus-visible { opacity: 1; }
.hero-arrow:hover { background: var(--color-accent); border-color: var(--color-accent); }
@media (hover: none) { .hero-arrow { display: none; } }
.hero-slider.single .hero-arrow { display: none; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.hero-dots button {
    width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
    background: rgb(255 255 255 / .5); transition: width .2s;
}
.hero-dots button.active { width: 22px; background: #fff; }
.hero-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-dim-2); }
.hero-note svg { width: 16px; height: 16px; }

/* ---------- play bar: always pinned to the bottom of the screen (Point Blank-style) ---------- */
.play-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgb(var(--color-dark-rgb) / .92); color: #fff;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid rgb(255 255 255 / .08);
    box-shadow: 0 -10px 30px -12px rgb(0 0 0 / .6);
    padding-bottom: env(safe-area-inset-bottom);
}
.play-bar-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.play-bar-side { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.play-bar-right { justify-content: flex-end; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
.play-bar-mobile { flex: 1; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 0; }
.play-bar-mobile .btn { width: 100%; }
.play-bar-mobile .hero-note { justify-content: center; }
/* keep the footer clear of the pinned bar */
/* keep the footer clear of the pinned bar AND the GAME START emblem that rises ~160px above the screen bottom */
.site-footer { padding-bottom: calc(24px + 165px + env(safe-area-inset-bottom)) !important; }

/* GAME START emblem - SF's own artwork (layers from the old landing), centred on the
   play bar and rising out of it. Game identity lives in the SF zone on purpose. */
.start-emblem {
    position: absolute; left: 50%; bottom: 4px; width: 217px; height: 153px; display: block; z-index: 2;
    transform: translateX(-50%);
    filter: drop-shadow(0 10px 18px rgb(0 0 0 / .55));
}
.start-emblem span { position: absolute; background-repeat: no-repeat; pointer-events: none; }
.start-emblem-anim { width: 133px; height: 133px; top: 10px; right: 43px; background-image: url(../img/enter_site_l2.gif); }
.start-emblem-ring { inset: 0; background-image: url(../img/enter_site_l1.png); }
.start-emblem-text {
    inset: 0; background-image: url(../img/enter_site_l2.png);
    transform: scale(.8); transition: transform .2s ease;
}
.start-emblem:hover .start-emblem-text, .start-emblem:focus-visible .start-emblem-text {
    background-image: url(../img/enter_site_l2-hover.png); transform: scale(1);
}
.start-emblem:focus-visible { outline: none; }
.start-emblem:focus-visible .start-emblem-ring { outline: 3px solid rgb(255 255 255 / .6); outline-offset: -20px; border-radius: 50%; }
/* the two side groups must never slide under the centred emblem */
.play-bar-side:first-child { padding-right: 120px; }
.play-bar-right { padding-left: 120px; }
@media (max-width: 900px) {
    .start-emblem { transform: translateX(-50%) scale(.8); transform-origin: bottom center; }
}

.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 16px; }

/* SF runs on Windows only: phones get "sign up" as the primary action instead */
.only-mobile { display: none !important; }
@media (max-width: 767px), (hover: none) and (pointer: coarse) {
    .only-desktop { display: none !important; }
    .only-mobile { display: inline-flex !important; }
    .site-footer { padding-bottom: calc(20px + 110px + env(safe-area-inset-bottom)) !important; }
}

/* ---------- buttons (pill, per design system) ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 1px solid transparent;
    font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer;
    text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-brand {
    background: var(--grad-btn); color: #fff;
    box-shadow: 0 8px 18px -8px rgb(var(--color-accent-rgb) / .7);
}
.btn-brand:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgb(var(--color-accent-rgb) / .8); }
.btn-outline-secondary { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-border); }
.btn-outline-secondary:hover { background: var(--grad-soft); color: var(--color-accent); border-color: var(--color-border-hi); }
/* secondary on the dark band */
.btn-ghost-light { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .22); }
.btn-ghost-light:hover { background: rgb(255 255 255 / .16); color: #fff; }
/* solid white on the dark bar: as loud as the red button, but clearly a different action */
.btn-light { background: #fff; color: var(--color-dark); box-shadow: 0 8px 18px -8px rgb(0 0 0 / .6); }
.btn-light:hover { color: var(--color-accent); transform: translateY(-1px); }
.btn-light svg { color: var(--color-accent); }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }

/* ---------- 3. content sections (light MyArena surface) ---------- */
main { flex: 1; }
.section { padding: 32px 0 0; }
.section:last-child { padding-bottom: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-title {
    color: var(--color-accent); font-weight: 800; font-size: 1.5rem; line-height: 1.3;
    position: relative; display: inline-block; padding-bottom: .4rem; margin: 0;
}
.page-title::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px;
    background: var(--color-accent); border-radius: 2px;
}
.page-subtitle { font-size: 14px; color: var(--color-neutral); margin: 6px 0 0; }

.card-panel {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}
.card-panel-body { padding: 24px 22px; }
@media (max-width: 380px) { .card-panel-body { padding: 20px 16px; } }

/* download cards */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.download-card { display: flex; align-items: center; gap: 16px; }
.icon-chip {
    width: 48px; height: 48px; border-radius: 12px; background: var(--color-surface-2); color: var(--color-accent);
    display: inline-flex; align-items: center; justify-content: center;
}
.icon-chip svg { width: 24px; height: 24px; }
.download-info { flex: 1; min-width: 0; }
.download-title { font-size: 16px; font-weight: 700; margin: 0; }
.download-meta { font-size: 13px; color: var(--color-neutral); margin: 2px 0 0; }
@media (max-width: 480px) {
    .download-card { flex-wrap: wrap; }
    .download-card .btn { flex-basis: 100%; }
}

/* event banners: a swipeable rail - 3 visible on desktop, 2 on tablet, 1.2 on phones (a peek says "swipe me") */
.rail-nav { display: flex; gap: 6px; }
.rail-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-surface);
    color: var(--color-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.rail-btn:hover { background: var(--grad-soft); color: var(--color-accent); border-color: var(--color-border-hi); }
.rail-btn svg { width: 18px; height: 18px; }
@media (hover: none) { .rail-nav { display: none; } }
.event-rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px;
    overflow-x: auto; scrollbar-width: none;   /* no scroll-snap: it would fight the continuous auto-drift */
    padding: 4px 2px 12px; margin: -4px -2px 0;
}
.event-rail::-webkit-scrollbar { display: none; }
@media (max-width: 820px) { .event-rail { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 520px) { .event-rail { grid-auto-columns: 82%; } }
.event-card { display: block; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -10px rgb(var(--color-accent-rgb) / .3); }
.event-card img { width: 100%; aspect-ratio: 355 / 200; object-fit: cover; }
.event-card-label {
    display: block; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--color-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.event-card:hover .event-card-label { color: var(--color-accent); }

/* news feed: tabs + list rows (settings-row style, not a table) */
.choice-row-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.choice-row-scroll::-webkit-scrollbar { display: none; }
.choice-row-scroll .choice { white-space: nowrap; }
.news-panel { overflow: hidden; }
.news-row {
    display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}
.news-row::after {
    content: ""; width: 8px; height: 8px; margin-left: auto; flex-shrink: 0;
    border-right: 2px solid var(--color-dim-2); border-top: 2px solid var(--color-dim-2); transform: rotate(45deg);
}
.news-row:hover { background: var(--grad-soft); color: var(--color-accent); }
.news-row:hover::after { border-color: var(--color-accent); }
.news-tag {
    flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
    background: rgb(var(--color-accent-rgb) / .08); color: var(--color-accent);
}
.news-title { font-size: 15px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-more { display: block; text-align: center; padding: 14px; font-size: 14px; font-weight: 600; }
@media (max-width: 520px) {
    .news-row { padding: 12px 16px; align-items: flex-start; }
    .news-tag { display: none; }
    .news-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* ranking: tab choice + the generated ranking artwork on a dark stage */
.choice-row { display: inline-flex; gap: 6px; padding: 4px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; }
.choice {
    border: 0; background: none; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--color-neutral);
    padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 38px;
}
.choice.active { background: rgb(var(--color-accent-rgb) / .08); color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-border-hi); }
.rank-panel { overflow: hidden; }
.rank-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 18px 22px; border-bottom: 1px solid var(--color-border); }
.status-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
    padding: 4px 10px; border-radius: 999px; background: rgb(var(--color-accent-rgb) / .08); color: var(--color-accent);
}
.status-badge svg { width: 14px; height: 14px; }
.rank-desc { font-size: 14px; color: var(--color-neutral); margin: 0; }
.rank-stage { background: var(--color-dark); padding: 24px 16px; display: flex; justify-content: center; }
.rank-stage img { width: auto; max-width: 100%; height: auto; }
.rank-pane[hidden] { display: none; }

/* ads: keep the fixed 728x90 unit from pushing the page sideways on phones */
.ad-slot { margin: 32px auto 0; max-width: 100%; overflow: hidden; display: flex; justify-content: center; }

/* ---------- 4. footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--color-border); padding: 20px 16px; text-align: center; margin-top: 40px; }
.site-footer-partners { display: flex; justify-content: center; align-items: center; gap: 24px; margin-bottom: 12px; }
.site-footer-partners img { width: auto; }
.partner-thana { height: 44px; }
/* Dragonfly's logo is white-on-black artwork: render it as a dark monochrome mark on the white footer */
.partner-dragonfly { height: 28px; filter: brightness(0); opacity: .6; }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 8px; }
.site-footer-links a { color: var(--color-text); font-size: 13px; font-weight: 600; }
.site-footer-links a:hover { color: var(--color-accent); }
.site-footer-copy { font-size: 12px; color: var(--color-neutral); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* very small phones (320px): sign-in collapses to its icon so the header never overflows */
@media (max-width: 359px) {
    .signin-label { display: none; }
    .site-account .btn-sm { padding: 6px 10px; }
}

/* ---------- Laravel pages (news list/detail, flash, popup) ---------- */
.game-nav a.active { background: rgb(255 255 255 / .12); color: #fff; }
.flash { margin: 20px 0 0; padding: 12px 16px; border-radius: 12px; font-size: 14px; }
.flash-ok { background: #e7f6ec; color: #15803d; }
.flash-error { background: #fdecee; color: #b4121c; }
.news-empty { padding: 20px; margin: 0; text-align: center; color: var(--color-neutral); font-size: 14px; }
a.choice { display: inline-flex; align-items: center; text-decoration: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pager-label { font-size: 14px; color: var(--color-neutral); }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--color-text); }
.back-link:hover { color: var(--color-accent); }
/* News post: centred like the old site's .update_detail_content (staff write posts assuming that).
   Kept to a readable width on big screens; images never wider than 800px, as before. */
.news-page { max-width: 900px; margin: 0 auto; }
.news-article { text-align: center; }
.news-article .page-title { font-size: 1.35rem; }
.news-article .page-title::after { left: 50%; transform: translateX(-50%); }
.news-content { margin-top: 16px; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; text-align: center; }
.news-content img, .news-content iframe, .news-content video {
    display: inline-block; max-width: min(100%, 800px) !important; height: auto; vertical-align: middle;
}
.news-content table { max-width: 100%; margin: 0 auto; display: block; overflow-x: auto; }
.news-content p { margin: 0 0 .6em; }
.account-menu form { margin: 0; }
.account-menu button.account-signout {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
    background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--color-neutral); cursor: pointer; text-align: left;
}
.account-menu button.account-signout:hover { background: var(--grad-soft); color: var(--color-accent); }
.account-menu button.account-signout svg { width: 18px; height: 18px; }
.w-100 { width: 100%; }
.mt-2 { margin-top: 8px; }

/* GAME START popup */
.popup-body { background: var(--color-dark); }
.popup-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.popup-card { width: 100%; max-width: 440px; text-align: center; }
.popup-card .page-title::after { left: 50%; transform: translateX(-50%); }
.popup-logo { margin: 0 auto 16px; height: 34px; width: auto; filter: brightness(0) saturate(0) opacity(.8); }
.sf-state { display: none; }
.sf-state.active { display: block; }
.popup-card form { margin: 0; }

/* news search (list pages + /content/search) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.news-search { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.news-search-field { position: relative; flex: 1 1 260px; }
.news-search-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--color-dim-2); }
.news-search input, .news-search select {
    font-family: inherit; font-size: 15px; color: var(--color-text); background: #fff;
    border: 1px solid var(--color-input-border); border-radius: var(--radius-control); min-height: 42px;
}
.news-search input { width: 100%; padding: .6rem 1rem .6rem 40px; }
.news-search select { padding: .5rem .8rem; }
.news-search input:focus, .news-search select:focus { outline: none; border-color: var(--color-border-hi); box-shadow: 0 0 0 3px rgb(var(--color-accent-rgb) / .12); }
.news-search .btn { min-height: 42px; }
@media (max-width: 520px) { .news-search select, .news-search .btn { flex: 1 1 40%; } }

/* ---------- Member pages (legacy member.sf.in.th rewritten, 2026-10-10) ----------
   Shared building blocks for every module: nav, flash, grid of tiles, tables, item lists,
   status pills, progress. Module pages reuse these instead of their own CSS. */
.member-page { display: grid; gap: 18px; }
.member-flash { border-radius: var(--radius-control); padding: 12px 16px; font-weight: 600; }
.member-flash-ok { background: rgb(22 163 74 / .1); color: var(--color-good); }
.member-flash-error { background: rgb(var(--color-accent-rgb) / .1); color: var(--color-accent-dark); }
.member-card { display: grid; gap: 8px; }
.member-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.member-tile { font-weight: 600; color: var(--color-text); text-decoration: none; transition: transform .15s; }
.member-tile:hover { transform: translateY(-2px); border-color: var(--color-border-hi); }
.member-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.member-table th, .member-table td { padding: 10px 12px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.member-table th { color: var(--color-neutral); font-weight: 600; font-size: .85rem; }
.member-table-wrap { overflow-x: auto; }
.member-items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.member-item { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface); }
.member-item img { max-width: 100%; height: auto; max-height: 96px; object-fit: contain; }
.member-item input[type=checkbox], .member-item input[type=radio] { accent-color: var(--color-accent); }
.member-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--color-surface-2); color: var(--color-neutral); }
.member-pill-ok { background: rgb(22 163 74 / .12); color: var(--color-good); }
.member-pill-wait { background: rgb(var(--color-accent-rgb) / .1); color: var(--color-accent-dark); }
.member-progress { height: 10px; border-radius: 999px; background: var(--color-surface-2); overflow: hidden; }
.member-progress > span { display: block; height: 100%; background: var(--grad-btn); }
.member-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.member-muted { color: var(--color-neutral); font-size: .9rem; }
/* member icons: white hexagons from the old site (orange on hover) on the dark SF band - resources/views/member/_icon */
.member-hex { position: relative; display: block; width: 100%; height: 100%; }
.member-hex img { display: block; width: 100%; height: 100%; }
.member-hex .member-hex-hover { position: absolute; inset: 0; opacity: 0; transition: opacity .15s; }
a:hover .member-hex .member-hex-hover, a.active .member-hex .member-hex-hover, .member-bar-current .member-hex-hover { opacity: 1; }
.member-tile { display: flex; align-items: center; gap: 14px; }
.member-tile-icon { display: block; width: 72px; height: 72px; flex: none; padding: 3px; border-radius: 12px; background: #1b1e25; }
/* the bar at the top of a member page (layout.blade.php) */
.member-bar { position: relative; display: flex; align-items: center; gap: 8px 16px; padding: 8px 10px; }
.member-bar-back, .member-bar-current, .member-bar-more summary, .member-bar-menu a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.member-bar-back { color: var(--color-neutral); padding-right: 16px; border-right: 1px solid var(--color-border); }
.member-bar-back:hover { color: var(--color-accent); }
.member-bar-current { color: var(--color-text); flex: 1 1 auto; min-width: 0; }
.member-bar-icon { display: block; width: 34px; height: 34px; flex: none; padding: 3px; border-radius: 8px; background: #1b1e25; }
.member-bar-more { flex: none; }
.member-bar-more summary { cursor: pointer; list-style: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text); background: var(--color-surface); white-space: nowrap; }
.member-bar-more summary::-webkit-details-marker { display: none; }
.member-bar-more summary::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.member-bar-more[open] summary { border-color: var(--color-accent); color: var(--color-accent); }
.member-bar-more[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.member-bar-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding: 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: 0 12px 32px rgb(0 0 0 / .14); }
.member-bar-menu a { padding: 6px 8px; border-radius: 10px; color: var(--color-text); }
.member-bar-menu a:hover, .member-bar-menu a.active { background: rgb(var(--color-accent-rgb) / .08); color: var(--color-accent); }
@media (max-width: 560px) {
    .member-bar { gap: 8px; }
    .member-bar-back { padding-right: 8px; }
    .member-bar-back-text { display: none; }   /* icon only on phones */
    .member-bar-more summary { padding: 8px 12px; }
    .member-bar-menu { grid-template-columns: 1fr 1fr; padding: 8px; }
    .member-bar-menu a { font-size: .85rem; gap: 6px; padding: 6px 4px; }
    .member-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .member-tile { flex-direction: column; text-align: center; gap: 8px; padding: 14px 8px; font-size: .9rem; }
    .member-tile-icon { width: 68px; height: 68px; }
}
/* Mini Games list */
.member-games { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.member-game { display: flex; align-items: center; gap: 16px; padding: 14px; color: var(--color-text); text-decoration: none; transition: transform .15s; }
a.member-game:hover { transform: translateY(-2px); border-color: var(--color-border-hi); }
.member-game img, .member-game-placeholder { width: 112px; height: 112px; flex: none; border-radius: 18px; object-fit: cover; }
.member-game-placeholder { display: grid; place-items: center; background: var(--color-surface-2); color: var(--color-neutral); font-size: 2.6rem; font-weight: 800; }
.member-game-body { display: grid; gap: 6px; justify-items: start; }
.member-game-body b { font-size: 1.1rem; }
.member-game-soon { opacity: .75; }
/* office test mode bar (member/layout) */
.member-testbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 12px; border: 1px dashed #d97706; background: #fffbeb; color: #78350f; font-size: .85rem; }
.member-testbar-tag { padding: 3px 10px; border-radius: 999px; background: #d97706; color: #fff; font-weight: 700; }
/* member pages: red = can press now; received / not available = solid grey everywhere (owner 2026-10-16) */
.member-page .btn.is-disabled, .member-page .btn:disabled, .member-page .btn[aria-disabled="true"] {
    background: #e5e7eb; border-color: #e5e7eb; color: #6b7280; box-shadow: none; opacity: 1; cursor: default; }
.member-modal { width: min(420px, calc(100% - 32px)); padding: 26px 22px 20px; border: 0; border-radius: 18px; text-align: center; box-shadow: 0 24px 60px rgb(0 0 0 / .3); }
.member-modal::backdrop { background: rgb(15 17 22 / .55); }
.member-modal-icon { width: 56px; height: 56px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; background: rgb(var(--color-accent-rgb) / .1); color: var(--color-accent); }
.member-modal-icon svg { width: 30px; height: 30px; }
.member-modal h2 { margin: 0 0 6px; font-size: 1.15rem; }
.member-modal p { margin: 0 0 18px; color: var(--color-text); line-height: 1.55; white-space: pre-line; }
.member-modal .btn { min-width: 140px; }
.member-modal-ok { width: min(560px, calc(100% - 32px)); }
.member-modal-ok .member-modal-icon { background: rgb(22 163 74 / .12); color: var(--color-good); }
.member-modal-result { max-height: 55vh; overflow: auto; margin: 0 0 16px; text-align: left; }
.member-modal-result > * { padding: 0; border: 0; box-shadow: none; background: none; }
.member-modal-result:empty { display: none; }
/* member pages: tab rows wrap onto more lines instead of a sideways scroll that hid the last tabs (owner 2026-10-16) */
.member-page .choice-row-scroll { display: flex; flex-wrap: wrap; overflow: visible; max-width: 100%; border-radius: 18px; row-gap: 4px; }
.member-page .choice-row-scroll .choice { white-space: nowrap; }
.member-line-target { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; vertical-align: middle; }
.member-line-target.is-game { background: #e0f2fe; color: #075985; }
.member-line-target.is-inventory { background: #ede9fe; color: #5b21b6; }
/* SF Shop: 5 cards per row on a computer, the picture smaller than the card (owner 2026-10-16) */
.shop-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 14px !important; }
@media (max-width: 1100px) { .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 860px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 639px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; } }
.shop-grid .pc-media { aspect-ratio: 4 / 3; padding: 14px 18%; }
.shop-grid .pc-media > img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.shop-grid .pc-body { padding: 10px 12px 12px; gap: 3px; }
.shop-grid .pc-name { font-size: .85rem; }
.shop-grid .pc-desc { font-size: .74rem; }
.shop-grid .pc-price { font-size: .82rem; }
.shop-grid .pc-price strong { font-size: 1rem; }
.shop-grid .btn-sm { padding: 6px 12px; font-size: .8rem; }
.shop-search { display: flex; gap: 6px; align-items: center; }
.shop-search input { width: 190px; max-width: 100%; padding: 7px 10px; border: 1px solid var(--color-border); border-radius: 999px; font: inherit; font-size: .85rem; }
.shop-cart-float { position: fixed; right: 18px; bottom: 96px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
    background: var(--grad-btn); color: #fff; text-decoration: none; font-weight: 700; box-shadow: 0 10px 24px rgb(var(--color-accent-rgb) / .4); }
.shop-cart-float:hover { color: #fff; transform: translateY(-1px); }
.shop-cart-float svg { width: 20px; height: 20px; }
.shop-cart-float b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #fff; color: var(--color-accent); text-align: center; }
/* result modal: one compact row per item - name | where it went | status - no cards, hairline dividers (owner 2026-10-16: "แสดงผลไม่กระชับ") */
dialog.member-modal-ok .member-modal-result h2 { display: none; }
dialog.member-modal-ok .member-modal-result ul { list-style: none; margin: 0; padding: 0; display: block; }
dialog.member-modal-ok .member-modal-result li, dialog.member-modal-ok .member-modal-result .member-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; padding: 8px 2px; border-radius: 0; background: none; border-bottom: 1px solid var(--color-border); font-size: .88rem; font-weight: 600; }
dialog.member-modal-ok .member-modal-result li:last-child, dialog.member-modal-ok .member-modal-result .member-actions:last-child { border-bottom: 0; }
dialog.member-modal-ok .member-modal-result li > :first-child, dialog.member-modal-ok .member-modal-result .member-actions > :first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: .88rem; }
dialog.member-modal-ok .member-modal-result .member-line-target { flex: none; margin: 0; font-size: .7rem; }
dialog.member-modal-ok .member-modal-result .member-pill { flex: 0 1 auto; max-width: 45%; padding: 1px 8px; font-size: .7rem; text-align: center; }
@media (max-width: 480px) { dialog.member-modal-ok .member-modal-result li, dialog.member-modal-ok .member-modal-result .member-actions { flex-wrap: wrap; } dialog.member-modal-ok .member-modal-result li > :first-child, dialog.member-modal-ok .member-modal-result .member-actions > :first-child { flex-basis: 100%; } }
/* a message with several results: one per line (owner 2026-10-16, Recycle reset) */
.member-modal-msg { margin: 0 0 18px; color: var(--color-text); line-height: 1.55; white-space: pre-line; }
.member-msg-lines { list-style: none; margin: 0; padding: 0; text-align: left; white-space: normal; }
.member-msg-lines li { padding: 6px 2px; border-bottom: 1px solid var(--color-border); }
.member-msg-lines li:last-child { border-bottom: 0; }
.member-flash .member-msg-lines li { padding: 2px 0; border: 0; }
