/*
Theme Name: Maqiplus Riviera
Version: 1.0.0
Author: maqiplus
Description: ธีมภาษาไทยของ maqiplus สำหรับคู่มือคาสิโน กีฬา และสลาก
Text Domain: maqiplus-riviera
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
*/
:root {
    --paper: #f6f5ef;
    --white: #fffefa;
    --ink: #101d37;
    --muted: #4c5970;
    --blue: #1849d4;
    --blue-dark: #1239b0;
    --blue-light: #c8d9ff;
    --line: #c7cdd3;
    --body: "Fahkwang","Leelawadee UI","Noto Sans Thai",Tahoma,Arial,sans-serif;
    --title: "Fahkwang","Leelawadee UI","Noto Sans Thai",Tahoma,sans-serif;
    --display: "Instrument Serif",Georgia,"Times New Roman",serif;
    --latin: "Instrument Sans",Arial,Helvetica,sans-serif;
}
*,*::before,*::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 var(--body); overflow-wrap: break-word; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { line-height: 1.3; font-family: var(--title); }
a { color: inherit; text-decoration: none; }
img,picture,svg { display: block; }
img { max-width: 100%; }
button,select { font: inherit; }
button,select,label[for] { cursor: pointer; }
a,button,select,label[for] { touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #e28114; outline-offset: 3px; }
.frame,.hero { width: min(1392px,calc(100% - clamp(38px,7.4vw,132px))); margin-inline: auto; }
.skip { position: fixed; top: 7px; left: 7px; z-index: 10; transform: translateY(-175%); background: white; padding: 8px 14px; color: var(--ink); }
.skip:focus { transform: none; }
.ui-icon { width: 17px; height: 17px; flex: none; }
.mast { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 4; }
.mast-inner,.mast-actions,.wordmark,.main-menu ul,.action,.text-link { display: flex; align-items: center; }
.mast-inner { min-height: 76px; gap: clamp(18px,3vw,48px); }
.wordmark { width: fit-content; gap: 8px; white-space: nowrap; }
.wordmark img { width: 34px; height: 34px; }
.wordmark span { font: 790 clamp(1.14rem,1.4vw,1.58rem)/1.15 var(--latin); color: var(--ink); letter-spacing: -.055em; }
.wordmark b { color: var(--blue); font-weight: inherit; }
.main-menu ul,.closing ul { list-style: none; padding: 0; margin: 0; }
.main-menu ul { gap: clamp(15px,1.7vw,31px); }
.main-menu a,.desk-login { min-height: 44px; display: inline-flex; align-items: center; font-weight: 650; font-size: .94rem; }
.main-menu a:hover,.main-menu a[aria-current],.desk-login:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 5px; }
.main-menu .drawer-login,.nav-toggle { display: none; }
.mast-actions { gap: 20px; margin-left: auto; }
.action,.text-link { display: inline-flex; width: fit-content; gap: .58em; }
.action { align-items: center; justify-content: center; min-height: 45px; padding: 9px 17px; font-weight: 700; font-size: .95rem; border-radius: 4px; border: 1px solid transparent; }
.primary-action,.ink-action { background: var(--blue); color: #fff; }
.primary-action:hover,.ink-action:hover { background: var(--blue-dark); }
.outline-action { color: #fff; border-color: #c2c8d5b3; background: #111e31d4; }
.outline-action:hover { background: #293c59; }
.text-link { align-items: center; min-height: 40px; color: var(--blue-dark); font-size: .91rem; font-weight: 700; }
.text-link:hover,.read-body a:hover,.closing a:hover,.member-panel a:hover,.crumb a:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(14px,1.6vw,27px); border-radius: 7px; color: #fff; background: #09192e; }
.cover-art { position: absolute; inset: 0; z-index: -2; }
.cover-art img { width: 100%; height: 100%; object-fit: cover; object-position: 69% center; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#071428ee 0%,#0a182ddc 23%,#0e1b3085 43%,#0a1a2b13 59%,transparent 77%); }
.hero-inner { min-height: clamp(355px,32.1vw,501px); display: flex; align-items: center; padding: clamp(24px,3.45vw,56px); }
.hero-copy { width: 48%; max-width: 610px; }
.hero-copy h1 { color: var(--white); font-size: clamp(1.55rem,2.35vw,2.75rem); font-weight: 650; letter-spacing: -.03em; }
.hero-brand { display: block; width: fit-content; margin: 0 0 6px -.055em; padding-right: .12em; font: italic 500 clamp(4.8rem,7.9vw,8.4rem)/.91 var(--display); letter-spacing: -.072em; }
.hero-heading { display: block; margin-top: 12px; }
.hero-intro { max-width: 37em; margin: 12px 0 22px; font-size: clamp(.97rem,1.06vw,1.12rem); color: #edf1fb; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.directory { padding-block: clamp(20px,2.3vw,38px) clamp(26px,3.15vw,49px); }
.section-head,.journal-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-head h2,.journal-heading h2,.lesson-copy h2 { font-size: clamp(1.45rem,2.13vw,2.38rem); font-weight: 700; letter-spacing: -.04em; }
.topic-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: clamp(9px,1.3vw,21px); }
.topic { min-width: 0; position: relative; display: block; overflow: hidden; border-bottom: 1px solid #aab2bc; padding-bottom: 10px; }
.topic-photo { aspect-ratio: 1.55; position: relative; overflow: hidden; background: #243954; border-radius: 4px; }
.topic-photo img,.read-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease; }
.topic:hover .topic-photo img,.read-cover:hover img { transform: scale(1.045); }
.topic:hover,.topic:focus-visible { border-color: var(--blue); }
.topic-caption { padding: 10px 25px 0 0; }
.topic-caption h3 { font-size: clamp(1.12rem,1.55vw,1.75rem); }
.topic-caption p { margin-top: 2px; color: var(--muted); font-size: clamp(.79rem,.85vw,.94rem); line-height: 1.55; }
.topic-arrow { position: absolute; display: grid; align-items: center; right: 0; bottom: 20px; color: var(--blue); }
.topic-arrow .ui-icon { width: 19px; height: 19px; }

.practice,.clubhouse { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.92fr); align-items: center; gap: clamp(20px,6vw,96px); }
.practice { padding: clamp(18px,3vw,50px); color: white; background: #10294b; border-radius: 5px; }
.lesson-copy p { max-width: 34em; margin-top: 7px; color: #dfe7f5; }
.lesson-copy .text-link { color: var(--blue-light); margin-top: 5px; }
.pocket-panel { min-width: 0; margin: 0; padding: 9px 15px 14px; border: 1px solid #667f9b; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; border-radius: 3px; }
.pocket-panel legend { padding: 0 6px; color: #dde7f8; font-size: .88rem; }
.pocket-panel input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pocket-panel label { display: grid; place-items: center; min-height: 39px; border: 1px solid #7b90aa; background: #162231; border-radius: 3px; color: white; font: 650 1.26rem/1 var(--latin); }
.pocket-panel label[for="pocket-0"] { background: #0c5849; }
.pocket-panel input:checked + label { box-shadow: inset 0 0 0 2px #fff; border-color: #fff; }
.pocket-panel input:focus-visible + label { outline: 3px solid #f2a849; outline-offset: 2px; }
.pocket-result { grid-column: 1/-1; display: none; padding-top: 3px; }
#pocket-0:checked ~ #result-0,#pocket-8:checked ~ #result-8,#pocket-28:checked ~ #result-28 { display: block; }
.pocket-result strong { font-size: 1.11rem; }
.pocket-result p { color: #e0e8f3; font-size: .9rem; }

.journal,.archive-body,.missing { padding-block: clamp(25px,3.3vw,58px); }
.journal-controls { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .87rem; }
.journal-controls select { min-height: 39px; padding: 5px 12px; border-radius: 3px; border: 1px solid #9aa8b7; color: var(--ink); background: var(--white); }
.journal-list,.read-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(12px,1.7vw,27px); }
.read-card { min-width: 0; }
.read-cover { display: block; overflow: hidden; aspect-ratio: 1.88; background: #243954; border-radius: 3px; }
.read-body { padding: 10px 0 15px; border-bottom: 1px solid var(--line); }
.read-meta,.article-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: .83rem; }
.read-meta span { color: var(--blue-dark); font-weight: 650; }
.read-body h2,.read-body h3 { font-size: clamp(1.07rem,1.28vw,1.45rem); margin: 5px 0 7px; }
.read-body p { color: var(--muted); font-size: .91rem; }
.clubhouse { align-items: start; border-top: 1px solid var(--line); padding-block: clamp(26px,3vw,51px); }
.feature-copy h2,.member-panel h2 { margin-bottom: 7px; font-size: clamp(1.24rem,1.63vw,1.86rem); }
.feature-copy p { color: var(--muted); }
.feature-copy a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.feature-copy p+p { margin-top: .82em; }
.member-panel { padding: clamp(14px,1.5vw,23px); background: #e5eafb; border-top: 3px solid var(--blue); }
.member-panel a { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 8px; color: var(--blue-dark); border-top: 1px solid #b1bfdc; font-weight: 600; }

.inner-head { padding-block: clamp(26px,3.5vw,61px); background: #132845; color: var(--white); border-bottom: 4px solid #627eaf; }
.inner-head h1 { font-size: clamp(1.78rem,3.05vw,3.55rem); max-width: 32em; overflow-wrap: anywhere; }
.inner-head p { margin-top: 10px; max-width: 57em; color: #dee6f4; }
.crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 12px; color: #d6e4fd; font-size: .85rem; }
.article-byline { color: var(--blue-light); margin-bottom: 8px; }
.reading { display: grid; grid-template-columns: minmax(0,1fr) minmax(160px,27%); align-items: start; gap: clamp(16px,3.3vw,60px); padding-block: clamp(22px,3.3vw,54px); }
.prose { min-width: 0; padding: clamp(16px,2.75vw,45px); overflow-wrap: anywhere; line-height: 1.85; background: var(--white); border: 1px solid #d5d8da; border-radius: 3px; }
.prose a:not(.action) { color: #143daf; text-decoration: underline; text-underline-offset: 3px; }
.prose h2,.prose h3 { margin: 1.05em 0 .43em; }
.prose h2 { font-size: clamp(1.25rem,1.82vw,1.93rem); }
.prose h3 { font-size: 1.16rem; }
.prose p,.prose ul,.prose ol { margin: 0 0 .95em; }
.prose ul,.prose ol { padding-inline-start: 1.45em; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 16px 0 19px; }
.prose td,.prose th { border: 1px solid #bbc6d5; padding: 6px 8px; text-align: start; }
.prose th { background: #e4eaf4; }
.outbound { padding: 5px 0 5px 14px; border-left: 3px solid var(--blue); margin-bottom: 20px; }
.outbound p { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.reading-side { min-width: 0; overflow: hidden; background: var(--white); border-bottom: 1px solid var(--line); }
.reading-side img { width: 100%; height: auto; }
.reading-side .text-link { margin: 6px 12px; }
.post-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-size: .9rem; }
.archive-intro { margin-bottom: 25px; }
.navigation.pagination,.missing .action { margin-top: 14px; }

.closing { color: #fff; background: #0b1a31; border-top: 4px solid #294a92; }
.closing .wordmark span { color: white; }
.closing .wordmark b { color: #b4ccff; }
.closing-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: clamp(20px,5vw,78px); padding-block: 32px; }
.closing h2 { font-size: 1.05rem; color: #e2eaff; margin-bottom: 7px; }
.closing p { margin-top: 10px; color: #c3cfe1; max-width: 31em; font-size: .93rem; }
.closing li a { display: inline-flex; align-items: center; min-height: 34px; font-size: .92rem; }
.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 12px; border-top: 1px solid #435066; font-size: .8rem; color: #c3cfe1; }

@media (max-width:900px) {
    .mast-inner { min-height: 61px; flex-wrap: wrap; gap: 7px; }
    .mast-actions { gap: 8px; }
    .desk-login { display: none; }
    .main-menu { order: 3; width: 100%; }
    .main-menu ul { flex-wrap: wrap; gap: 3px 18px; }
    .main-menu .drawer-login { display: inline-flex; gap: 6px; color: var(--blue-dark); }
    .nav-ready .main-menu { display: none; position: absolute; inset: 100% 0 auto; padding: 8px 4% 13px; background: var(--white); border-block: 1px solid var(--line); box-shadow: 0 8px 15px #15233912; }
    .nav-ready .menu-open .main-menu { display: block; }
    .nav-ready .nav-toggle { display: grid; place-content: center; gap: 4px; width: 41px; height: 41px; border: 1px solid #aab6c4; border-radius: 4px; color: var(--ink); background: transparent; }
    .nav-toggle span { width: 17px; height: 2px; background: currentColor; }
    .hero-copy { width: 54%; }
    .hero-actions .action { padding-inline: 11px; font-size: .88rem; }
    .topic-grid { gap: 10px; }
    .topic-caption { padding: 8px 0 0; }
    .topic-arrow { display: none; }
    .journal-list,.read-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:680px) {
    .frame,.hero { width: calc(100% - 30px); }
    .mast-inner { min-height: 56px; }
    .wordmark { gap: 6px; }
    .wordmark img { width: 29px; height: 29px; }
    .wordmark span { font-size: 1.06rem; }
    .mast-actions .action { min-height: 39px; font-size: .81rem; padding: 6px 9px; }
    .hero { margin-top: 12px; }
    .hero::before { display: none; }
    .cover-art { z-index: 0; position: relative; height: clamp(210px,66vw,340px); }
    .cover-art img { object-position: 50% 39%; }
    .cover-art::after { content: ""; position: absolute; inset: auto 0 0; height: 28%; background: linear-gradient(transparent,#09192e); }
    .hero-inner { min-height: 0; position: relative; padding: 0 16px 20px; }
    .hero-copy { width: 100%; }
    .hero-copy h1 { font-size: clamp(1.24rem,4.65vw,1.65rem); }
    .hero-brand { font-size: clamp(3.45rem,13.9vw,4.7rem); margin: -.16em 0 0 -.04em; }
    .hero-heading { margin-top: 5px; }
    .hero-intro { margin: 7px 0 13px; line-height: 1.51; font-size: .92rem; }
    .hero-actions { gap: 6px; }
    .hero-actions .action { min-height: 40px; padding: 7px 10px; font-size: .84rem; }
    .directory { padding-block: 17px 24px; }
    .section-head,.journal-heading { gap: 9px; margin-bottom: 9px; }
    .section-head h2,.journal-heading h2,.lesson-copy h2 { font-size: 1.38rem; }
    .section-head .text-link { font-size: .8rem; }
    .topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 10px; }
    .topic { padding-bottom: 7px; }
    .topic-photo { aspect-ratio: 1.62; }
    .topic-caption { padding: 6px 0 0; }
    .topic-caption h3 { font-size: 1.13rem; }
    .topic-caption p { font-size: .78rem; }
    .topic-lottery { grid-column: 1/-1; display: grid; grid-template-columns: calc(50% - 5px) minmax(0,1fr); gap: 10px; align-items: center; }
    .topic-lottery .topic-photo { aspect-ratio: 2.35; }
    .practice,.clubhouse,.reading { grid-template-columns: minmax(0,1fr); gap: 15px; }
    .pocket-panel { padding: 7px 10px 11px; }
    .journal-heading { flex-wrap: wrap; }
    .journal-controls { gap: 5px; font-size: .79rem; }
    .journal-list,.read-grid { grid-template-columns: minmax(0,1fr); }
    .read-card { display: grid; grid-template-columns: 32% minmax(0,1fr); gap: 11px; align-items: center; }
    .read-cover { aspect-ratio: 1.18; }
    .read-body { padding: 0 0 7px; }
    .read-body h2,.read-body h3 { font-size: 1.04rem; margin: 3px 0; }
    .read-body p,.read-meta,.post-links { font-size: .82rem; }
    .read-meta { gap: 2px 6px; }
    .prose { padding: 15px 12px; }
    .reading-side img { max-height: 225px; object-fit: cover; }
    .closing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding-block: 24px; }
    .closing-brand { grid-column: 1/-1; }
    .closing li a,.closing p { font-size: .85rem; }
}
@media (max-width:365px) {
    .frame,.hero { width: calc(100% - 22px); }
    .mast-inner,.mast-actions { gap: 5px; }
    .mast-actions .action .ui-icon { display: none; }
    .hero-inner { padding-inline: 12px; }
    .hero-actions .action { font-size: .8rem; padding-inline: 8px; }
}
@media (prefers-reduced-motion:reduce) {
    *,*::before,*::after { transition-duration: 0s !important; scroll-behavior: auto !important; }
}