/*
Theme Name: Goldlion Palm Court
Version: 1.0.0
Author: goldlion
Description: คู่มือคาสิโน แบดมินตัน และสลากไทยของ goldlion
Text Domain: goldlion-palmcourt
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
*/
:root {
    color-scheme: light;
    --paper: #f9f6ef;
    --cream: #fffdf8;
    --ink: #182f29;
    --teal: #174638;
    --forest: #10362d;
    --body-muted: #545e52;
    --gold: #e4c995;
    --brass: #806538;
    --rule: #cfc8b7;
    --body: "Fahkwang", "Leelawadee UI", "Noto Sans Thai", Tahoma, sans-serif;
    --display: "Cormorant Garamond", "Baskervville", "Georgia", serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--body); overflow-wrap: break-word; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.34; }
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; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #326fd2; outline-offset: 4px; }
.frame { width: min(1460px, calc(100% - clamp(40px, 8.3vw, 144px))); margin-inline: auto; }
.skip { position: absolute; z-index: 100; left: 10px; top: 5px; padding: 8px 15px; color: #fff; background: var(--teal); transform: translateY(-150%); }
.skip:focus { transform: none; }
.mast { position: relative; z-index: 10; background: var(--cream); border-top: 4px solid var(--teal); border-bottom: 1px solid var(--rule); }
.mast-inner { display: flex; align-items: center; gap: clamp(24px, 5vw, 90px); min-height: 67px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.wordmark img { width: 34px; height: 34px; }
.wordmark span { font: 600 1.92rem/.95 var(--display); letter-spacing: -.065em; }
.wordmark b { font-weight: inherit; }
.main-menu ul, .closing ul { list-style: none; padding: 0; margin: 0; }
.main-menu ul { display: flex; align-items: center; gap: clamp(14px, 1.65vw, 34px); }
.main-menu a, .desk-login { display: inline-flex; align-items: center; min-height: 44px; font-size: .91rem; font-weight: 600; }
.main-menu [aria-current=page], .main-menu a:hover, .desk-login:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--brass); }
.mast-actions { display: flex; align-items: center; gap: 17px; margin-left: auto; }
.nav-toggle, .main-menu .drawer-login { display: none; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 9px 20px; font-size: .92rem; font-weight: 700; line-height: 1.35; border-radius: 24px; border: 1px solid transparent; transition: background .18s, border-color .18s; }
.primary-action, .ink-action { background: var(--teal); color: #fffaf0; }
.primary-action:hover, .ink-action:hover { background: #285d4c; }
.outline-action { border-color: #c3c6b9; background: transparent; color: #faf7ef; }
.outline-action:hover { background: #234d41; }
.mast-actions .action { min-height: 38px; padding: 7px 17px; }
.ui-icon { width: 16px; height: 16px; flex: none; }
.hero { display: grid; position: relative; isolation: isolate; overflow: hidden; background: var(--forest); color: #fffaf0; }
.cover-art { position: absolute; z-index: -1; inset: 0 0 0 41%; overflow: hidden; border-radius: clamp(85px, 10vw, 170px) 0 0 0; }
.cover-art img { width: 100%; height: 100%; object-fit: cover; object-position: 87% 49%; }
.hero-inner { display: flex; align-items: center; min-height: clamp(425px, 33.5vw, 550px); padding-block: clamp(35px, 5vw, 84px); }
.hero-copy { width: 40%; max-width: 590px; padding-right: clamp(10px, 2.2vw, 42px); }
.hero-copy h1 { font-size: clamp(1.65rem, 2.6vw, 3.05rem); }
.hero-brand { display: block; font: normal 500 clamp(4rem, 7.8vw, 9rem)/.97 var(--display); letter-spacing: -.085em; color: #fff9ea; margin: -.03em 0 .12em -.055em; }
.hero-brand b { color: var(--gold); font-weight: inherit; font-style: italic; }
.hero-heading { display: block; margin-bottom: 12px; font-weight: 600; }
.hero-intro { color: #e5e9df; font-size: clamp(.96rem, 1.08vw, 1.1rem); line-height: 1.65; max-width: 30em; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.hero .primary-action { color: #21372c; background: var(--gold); }
.hero .primary-action:hover { background: #fae3b9; }
.directory, .journal { padding-block: clamp(26px, 2.7vw, 49px); }
.section-head, .journal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px 25px; margin-bottom: 16px; }
.section-head::after { content: ""; order: 1; height: 1px; flex: 1; background: var(--rule); }
.section-head .text-link { order: 2; }
.section-head h2, .journal-heading h2, .lesson-copy h2 { font-size: clamp(1.45rem, 2.03vw, 2.35rem); font-weight: 650; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: .9rem; font-weight: 650; color: var(--teal); }
.text-link:hover, .member-panel a:hover { text-decoration: underline; text-underline-offset: 5px; }
.topic-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 28px); }
.topic { display: block; min-width: 0; position: relative; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.topic-photo { overflow: hidden; aspect-ratio: 1.64; background: #d9d6c7; border-radius: 2px 2px 0 0; }
.topic-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .32s; }
.topic:hover .topic-photo img { transform: scale(1.035); }
.topic-caption { padding: 11px 29px 0 0; }
.topic-caption h3 { color: var(--ink); font-size: clamp(1.15rem, 1.5vw, 1.7rem); }
.topic-caption p { margin-top: 2px; color: var(--body-muted); font-size: .84rem; }
.topic-arrow { display: grid; place-items: center; position: absolute; right: 0; bottom: 20px; width: 24px; height: 24px; border: 1px solid #b4ae92; border-radius: 50%; color: var(--teal); }
.topic-arrow .ui-icon { width: 12px; height: 12px; }
.serve-band { background: #e7eadd; border-block: 1px solid #ccd0bd; }
.serve-section { display: grid; align-items: center; grid-template-columns: 1.08fr .92fr; gap: clamp(22px, 7vw, 115px); padding-block: clamp(23px, 3.6vw, 66px); }
.lesson-copy p { color: #414d40; max-width: 42em; margin: 10px 0; }
.serve-board { margin: 0; min-width: 0; padding: 0; border: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.serve-board legend { margin-bottom: 8px; padding: 0; font-size: .9rem; font-weight: 600; }
.serve-board input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.serve-board label { display: grid; place-items: center; min-height: 38px; border: 1px solid #9da68f; border-radius: 5px; font-weight: 600; color: var(--teal); background: #f5f6ef; }
.serve-board input:checked + label { background: var(--teal); color: #fffaf1; border-color: var(--teal); }
.serve-board input:focus-visible + label { outline: 3px solid #326fd2; outline-offset: 2px; }
.serve-result { display: none; grid-column: 1/-1; align-items: center; grid-template-columns: 64px 1fr; gap: 14px; min-height: 92px; background: var(--cream); border: 1px solid #c1c7b6; padding: 13px 16px; border-radius: 5px; }
.serve-result strong { font-size: 1.22rem; color: var(--teal); }
.serve-result p { color: var(--body-muted); font-size: .86rem; margin-top: 2px; }
.court-diagram { display: grid; grid-template-columns: repeat(2,1fr); align-items: stretch; position: relative; height: 48px; background: var(--teal); border: 2px solid #365c4a; }
.court-diagram i { display: block; border: 1px solid #dfe7cb; margin-top: 8px; }
#result-1 .court-diagram i:last-child, #result-2 .court-diagram i:first-child, #result-3 .court-diagram i:last-child { background: var(--gold); }
#serve-1:checked ~ #result-1, #serve-2:checked ~ #result-2, #serve-3:checked ~ #result-3 { display: grid; }
.journal-controls { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.journal-controls select { color: var(--teal); background: var(--cream); border: 1px solid #a5a992; padding: 5px 12px; min-height: 38px; border-radius: 6px; }
.journal-list, .read-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 32px); }
.read-card { min-width: 0; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.read-cover { display: block; overflow: hidden; aspect-ratio: 1.8; background: #dbd6c7; }
.read-cover img { width: 100%; height: 100%; object-fit: cover; }
.read-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--body-muted); font-size: .82rem; margin-top: 12px; }
.read-meta span { color: #735827; }
.read-body h2, .read-body h3 { margin: 5px 0; font-size: clamp(1.1rem, 1.35vw, 1.47rem); }
.read-body h2 a:hover, .read-body h3 a:hover { color: #496554; }
.read-body p { color: var(--body-muted); font-size: .9rem; line-height: 1.62; }
.member-guides { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(255px,.7fr); align-items: start; gap: clamp(25px, 7vw, 108px); padding-block: clamp(22px, 3vw, 50px); border-top: 1px solid var(--rule); }
.feature-copy h2, .member-panel h2 { margin-bottom: 6px; font-size: clamp(1.25rem, 1.75vw, 1.8rem); }
.feature-copy p { color: var(--body-muted); margin: .6em 0; }
.feature-copy a, .prose a:not(.action) { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.member-panel a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--rule); }
.closing { color: #faf5e7; background: #12352d; }
.closing-grid { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: clamp(20px, 6vw, 105px); padding-block: 31px; }
.closing-brand p { font-size: .9rem; color: #d5ded1; margin-top: 12px; max-width: 30em; }
.closing h2 { font-size: 1.03rem; color: var(--gold); margin-bottom: 6px; }
.closing li a { display: inline-flex; align-items: center; min-height: 32px; font-size: .9rem; }
.closing li a:hover { color: var(--gold); }
.colophon { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; color: #c6d5c7; font-size: .8rem; padding-block: 13px; border-top: 1px solid #54695a; }
.inner-head { border-bottom: 1px solid var(--rule); background: #ecebdc; padding-block: clamp(24px, 4.3vw, 72px); }
.crumb, .article-byline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; font-size: .87rem; color: #3d5344; margin-bottom: 12px; }
.inner-head h1 { max-width: 31em; font-size: clamp(1.8rem, 3.3vw, 3.6rem); }
.inner-head p { margin-top: 12px; color: var(--body-muted); max-width: 56em; }
.reading { padding-block: clamp(24px, 3.8vw, 60px); display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,29%); align-items: start; gap: clamp(25px, 5vw, 74px); }
.prose { min-width: 0; overflow-wrap: anywhere; line-height: 1.8; }
.prose h2, .prose h3 { margin: 1.1em 0 .45em; }
.prose h2 { font-size: clamp(1.3rem, 1.9vw, 2.1rem); }
.prose h3 { font-size: 1.2rem; }
.prose p, .prose ol, .prose ul { margin: 0 0 .95em; }
.prose ul, .prose ol { padding-inline-start: 1.45em; }
.prose > :first-child { margin-top: 0; }
.prose table { width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse; margin: 16px 0; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 7px 9px; text-align: start; }
.prose th { background: #e8ece0; }
.reading-side { border: 1px solid var(--rule); background: var(--cream); }
.reading-side img { width: 100%; height: auto; }
.reading-side .text-link { margin: 6px 14px; }
.post-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.archive-body, .missing { padding-block: clamp(24px, 3.5vw, 56px); }
.archive-intro { margin-bottom: 22px; }
.outbound { border-left: 3px solid var(--brass); padding-left: 15px; margin-bottom: 22px; }
.outbound p { font-size: .9rem; color: var(--body-muted); margin: 7px 0 0; }
.pagination, .missing .action { margin-top: 18px; }
@media (max-width: 960px) {
    .mast-inner { min-height: 57px; gap: 9px; flex-wrap: wrap; }
    .mast-actions { gap: 8px; }
    .desk-login { display: none; }
    .main-menu { order: 3; width: 100%; }
    .main-menu ul { flex-wrap: wrap; gap: 4px 16px; }
    .main-menu .drawer-login { display: inline-flex; gap: 6px; }
    .nav-ready .main-menu { display: none; position: absolute; inset: 100% 0 auto; padding: 5px 4% 12px; background: var(--cream); border-bottom: 1px solid var(--rule); }
    .nav-ready .menu-open .main-menu { display: block; }
    .nav-ready .nav-toggle { display: grid; place-content: center; gap: 4px; width: 40px; height: 40px; color: var(--teal); background: transparent; border: 1px solid var(--rule); border-radius: 50%; }
    .nav-toggle span { width: 16px; height: 2px; background: currentColor; }
    .hero-inner { min-height: 357px; }
    .hero-copy { width: 46%; padding-right: 5px; }
    .cover-art { left: 48%; }
    .hero-brand { font-size: clamp(3.6rem, 7.6vw, 5.1rem); }
    .hero-intro { font-size: .9rem; }
    .topic-grid { gap: 10px; }
    .topic-caption { padding-right: 0; }
    .topic-arrow { display: none; }
    .journal-list, .read-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
    .frame { width: calc(100% - 32px); }
    .wordmark img { width: 30px; height: 30px; }
    .wordmark span { font-size: 1.62rem; }
    .mast-actions .action { padding: 7px 12px; font-size: .82rem; }
    .hero { display: flex; flex-direction: column; }
    .cover-art { position: relative; inset: auto; height: clamp(243px, 98vw, 420px); border-radius: 0; }
    .cover-art img { object-position: 50% 42%; }
    .hero-inner { min-height: 0; padding: 15px 0 20px; }
    .hero-copy { width: 100%; max-width: none; padding: 0; }
    .hero-copy h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 13px; font-size: clamp(1.2rem, 4.7vw, 1.75rem); }
    .hero-brand { font-size: clamp(2.9rem, 12.7vw, 4.6rem); margin: 0; }
    .hero-heading { margin: 0; }
    .hero-intro { max-width: 40em; font-size: .9rem; margin-top: 9px; line-height: 1.55; }
    .hero-actions { gap: 6px; margin-top: 13px; }
    .hero-actions .action { min-height: 40px; padding: 7px 13px; font-size: .83rem; }
    .directory, .journal { padding-block: 20px 24px; }
    .section-head, .journal-heading { gap: 9px; margin-bottom: 12px; }
    .section-head h2, .journal-heading h2, .lesson-copy h2 { font-size: 1.42rem; }
    .section-head .text-link { font-size: .79rem; }
    .topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 11px; }
    .topic-caption { padding: 6px 0 0; }
    .topic-caption h3 { font-size: 1.11rem; }
    .topic-caption p { margin: 0; font-size: .76rem; }
    .topic { padding-bottom: 5px; }
    .topic:last-child { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; align-items: center; border: 0; }
    .topic:last-child .topic-photo { width: 100%; }
    .topic:last-child .topic-caption { padding: 0 4px; }
    .serve-section, .member-guides, .reading { grid-template-columns: minmax(0,1fr); gap: 16px; }
    .lesson-copy p { margin: 7px 0; }
    .serve-result { grid-template-columns: 50px 1fr; gap: 10px; padding: 12px; }
    .court-diagram { height: 40px; }
    .journal-heading { flex-wrap: wrap; }
    .journal-controls { gap: 5px; font-size: .8rem; }
    .journal-list, .read-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
    .read-card { display: grid; grid-template-columns: 31% minmax(0,1fr); align-items: start; gap: 11px; }
    .read-cover { aspect-ratio: 1.2; }
    .read-meta { margin: 0; font-size: .76rem; }
    .read-body h2, .read-body h3 { font-size: 1.04rem; }
    .read-body p { font-size: .83rem; }
    .closing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
    .closing-brand { grid-column: 1/-1; }
    .closing li a { font-size: .85rem; }
    .prose table { font-size: .85rem; }
    .prose th, .prose td { padding: 5px; }
}
@media (max-width: 360px) {
    .frame { width: calc(100% - 24px); }
    .mast-actions .action .ui-icon { display: none; }
    .hero-actions .action { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
