/*
Theme Name: Faraways Regatta
Version: 1.0.0
Author: faraways
Description: คู่มือไทยเรื่องคาสิโน ไพ่ กีฬาเรือใบ และสลาก ในสีกรมท่าของสโมสรริมน้ำ
Text Domain: faraways-regatta
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
*/
:root {
    --ocean: #081c29;
    --panel: #102c3a;
    --water: #86ead7;
    --silver: #c7d6db;
    --paper: #f3f6f4;
    --ink: #102833;
    --muted: #465e66;
    --rule: #c8d4d3;
    --teal: #165e58;
    --body: "Leelawadee UI", "Noto Sans Thai", Tahoma, Arial, sans-serif;
    --grotesk: "Barlow", "Arial Narrow", Arial, sans-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.3; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
a, button, select, label[for] { touch-action: manipulation; }
button, select, label[for] { cursor: pointer; }
img, picture, svg { display: block; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #e07b29; outline-offset: 3px; }
.frame { width: min(1340px, calc(100% - clamp(40px, 8vw, 144px))); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: 6px; left: 6px; transform: translateY(-170%); padding: 8px 15px; background: white; color: var(--ink); }
.skip:focus { transform: none; }
.ui-icon { width: 17px; height: 17px; flex: none; }
.mast { position: relative; z-index: 4; color: #ecf4f6; background: var(--ocean); border-bottom: 1px solid #29434e; }
.mast-inner, .wordmark, .main-menu ul, .mast-actions { display: flex; align-items: center; }
.mast-inner { min-height: 72px; gap: clamp(22px, 4.5vw, 80px); }
.wordmark { flex: none; width: fit-content; gap: 7px; }
.wordmark img { width: 34px; height: 34px; }
.wordmark span { font: italic 800 clamp(1.28rem, 1.68vw, 1.8rem)/1 var(--grotesk); letter-spacing: .015em; }
.main-menu ul, .closing ul { list-style: none; margin: 0; padding: 0; }
.main-menu ul { gap: clamp(15px, 2vw, 30px); }
.main-menu a, .desk-login { display: inline-flex; align-items: center; min-height: 44px; font-size: .94rem; font-weight: 600; }
.main-menu a:hover, .desk-login:hover, .main-menu a[aria-current] { color: var(--water); }
.mast-actions { margin-left: auto; gap: 17px; }
.main-menu .drawer-login, .nav-toggle { display: none; }
.action { min-height: 44px; padding: 9px 19px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; font-size: .94rem; font-weight: 700; line-height: 1.45; }
.primary-action { background: var(--water); color: #0a282b; }
.primary-action:hover { background: #adf8e9; }
.outline-action { color: #edf8f6; background: transparent; border-color: #719198; }
.outline-action:hover { background: #203e47; }
.ink-action { background: var(--teal); color: white; }
.ink-action:hover { background: #0c4e4b; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 650; color: var(--teal); font-size: .92rem; }
.text-link:hover, .closing a:hover, .desk-links a:hover, .read-body a:hover, .article-byline a:hover, .crumb a:hover { text-decoration: underline; text-underline-offset: 4px; }

.regatta-deck { background: var(--ocean); color: #f3f8f8; padding: clamp(17px, 2.1vw, 32px) 0 clamp(24px, 2.6vw, 42px); }
.hero { display: grid; grid-template-columns: minmax(0, .91fr) minmax(0, 1.24fr); overflow: hidden; border: 1px solid #31505f; border-radius: 15px; background: var(--panel); }
.hero-copy { align-self: center; min-width: 0; padding: clamp(27px, 3.5vw, 58px); }
.hero h1 { font-size: clamp(2rem, 3.6vw, 3.7rem); letter-spacing: -.045em; font-weight: 650; }
.hero h1 span { display: block; }
.hero-brand { font: italic 900 clamp(3rem, 5.7vw, 6.8rem)/1.06 var(--grotesk); letter-spacing: -.065em; color: #f1faf9; text-transform: uppercase; }
.hero-brand + span { margin-top: 5px; font-size: .73em; letter-spacing: -.03em; color: var(--water); }
.hero-intro { max-width: 32em; margin-top: 13px; color: #d4e4e8; line-height: 1.62; font-size: clamp(.94rem, 1.1vw, 1.17rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.hero-visual { min-height: clamp(310px, 26vw, 420px); position: relative; display: block; isolation: isolate; }
.cover-art, .cover-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-art img { object-fit: cover; object-position: 76% 50%; }
.hero-visual::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #04131cab); pointer-events: none; }
.photo-link { position: absolute; z-index: 1; right: 16px; bottom: 13px; display: flex; gap: 8px; align-items: center; color: white; background: #071f29d9; border: 1px solid #8ea6a5; border-radius: 40px; padding: 6px 12px; font-weight: 600; font-size: .78rem; }
.hero-visual:hover .photo-link { background: #0a3544; }
.directory { padding-top: clamp(21px, 2.2vw, 38px); }
.section-head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.section-head::after { content: ""; flex: 1; height: 1px; background: #36515e; }
.directory h2 { font-size: clamp(1.35rem, 1.66vw, 1.8rem); letter-spacing: -.025em; }
.topic-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(8px, 1.15vw, 18px); }
.topic { min-width: 0; position: relative; overflow: hidden; display: block; background: #142f3c; border: 1px solid #35505c; border-radius: 9px; transition: border-color .2s; }
.topic:hover { border-color: var(--water); }
.topic-photo { aspect-ratio: 2.18; overflow: hidden; background: #20434a; }
.topic-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease; }
.topic:hover .topic-photo img { transform: scale(1.035); }
.topic-caption { min-width: 0; padding: 11px 13px 13px; }
.topic-caption h3 { font-size: clamp(1.08rem, 1.34vw, 1.44rem); }
.topic-caption p { margin-top: 3px; font-size: clamp(.76rem, .87vw, .92rem); line-height: 1.45; color: #cedee1; }
.topic-arrow { display: grid; place-content: center; position: absolute; top: 7px; right: 7px; width: 23px; height: 23px; border-radius: 50%; background: #071c28cc; color: white; }
.topic-arrow .ui-icon { width: 13px; height: 13px; }

.signal-lesson { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(25px, 5vw, 85px); padding-block: clamp(29px, 3.6vw, 60px); }
.lesson-copy h2, .journal h2 { font-size: clamp(1.5rem, 2.2vw, 2.5rem); letter-spacing: -.035em; }
.lesson-copy p { max-width: 38em; margin-top: 8px; color: var(--muted); }
.lesson-copy .text-link { margin-top: 3px; }
.signal-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; margin: 0; padding: 12px 16px 15px; border-radius: 10px; border: 1px solid #9bb5b2; background: #e6efeb; }
.signal-panel legend { color: var(--teal); padding-inline: 6px; font-size: .89rem; font-weight: 650; }
.signal-panel input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.signal-panel label { display: grid; place-content: center; text-align: center; background: white; border-block: 1px solid #8ca8a6; border-right: 1px solid #8ca8a6; min-height: 43px; font-weight: 600; }
.signal-panel label:first-of-type { border-left: 1px solid #8ca8a6; border-radius: 5px 0 0 5px; }
.signal-panel label:last-of-type { border-radius: 0 5px 5px 0; }
.signal-panel input:checked + label { background: #163a40; color: #a8f3de; }
.signal-panel input:focus-visible + label { outline: 3px solid #bd5c11; outline-offset: -3px; }
.signal-result { display: none; grid-column: 1/-1; padding: 13px 0 0; }
#signal-5:checked ~ #result-5, #signal-4:checked ~ #result-4, #signal-1:checked ~ #result-1, #signal-0:checked ~ #result-0 { display: block; }
.signal-result strong { font-size: 1.15rem; }
.signal-result p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.journal { background: #e6edeb; border-block: 1px solid var(--rule); padding-block: clamp(24px, 3vw, 46px); }
.journal-heading { display: flex; flex-wrap: wrap; gap: 12px 21px; align-items: center; margin-bottom: 19px; }
.journal-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: .88rem; }
.journal-controls select { min-height: 39px; border: 1px solid #829d9e; border-radius: 5px; padding: 5px 9px; background: white; color: var(--ink); }
.journal-heading > .text-link { margin-left: auto; }
.journal-controls:not([hidden]) + .text-link { margin-left: 0; }
.journal-list, .read-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(11px, 1.5vw, 25px); }
.read-card { min-width: 0; background: white; border: 1px solid var(--rule); border-radius: 9px; overflow: hidden; }
.read-cover { display: block; aspect-ratio: 1.9; background: #90a9ac; }
.read-cover img, .desk-photo img { width: 100%; height: 100%; object-fit: cover; }
.read-body { padding: 13px 15px 16px; }
.read-meta, .article-byline { display: flex; gap: 4px 12px; flex-wrap: wrap; align-items: center; font-size: .78rem; color: var(--muted); }
.read-meta span { color: var(--teal); font-weight: 700; }
.read-body h2, .read-body h3 { font-size: clamp(1.05rem, 1.33vw, 1.45rem); margin: 6px 0; }
.read-body p { font-size: .9rem; color: var(--muted); line-height: 1.53; }
.clubhouse { display: grid; align-items: center; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(20px, 6vw, 87px); padding-block: clamp(27px, 3.8vw, 60px); }
.feature-copy h2, .desk-links h2 { font-size: clamp(1.25rem, 1.65vw, 1.9rem); margin-bottom: 8px; }
.feature-copy a, .prose a:not(.action) { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.feature-copy p + p { margin-top: .6em; }
.member-panel { display: grid; grid-template-columns: 34% minmax(0, 1fr); overflow: hidden; background: white; border: 1px solid var(--rule); border-radius: 9px; }
.desk-photo { min-height: 136px; }
.desk-links { padding: 15px; }
.desk-links a { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 41px; border-bottom: 1px solid var(--rule); }
.inner-head { background: var(--panel); color: white; padding-block: clamp(27px, 3.5vw, 56px); border-bottom: 3px solid #7bd1c5; }
.inner-head h1 { max-width: 31em; font-size: clamp(1.8rem, 3.2vw, 3.7rem); overflow-wrap: anywhere; letter-spacing: -.035em; }
.inner-head p { margin-top: 10px; color: #d2e4e7; max-width: 53em; }
.crumb { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; color: #d4e8e8; font-size: .82rem; }
.article-byline { color: var(--water); margin-bottom: 8px; }
.reading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 26%); gap: clamp(18px, 3.6vw, 58px); align-items: start; padding-block: clamp(22px, 3vw, 48px); }
.prose { min-width: 0; overflow-wrap: anywhere; background: white; border-radius: 10px; border: 1px solid var(--rule); padding: clamp(18px, 3.3vw, 52px); line-height: 1.85; }
.prose h2, .prose h3 { margin: 1em 0 .42em; }
.prose h2 { font-size: clamp(1.23rem, 1.78vw, 1.9rem); }
.prose h3 { font-size: 1.13rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 .9em; }
.prose ul, .prose ol { padding-inline-start: 1.5em; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 13px 0 18px; }
.prose td, .prose th { padding: 7px 9px; border: 1px solid var(--rule); text-align: start; }
.prose th { background: #e5efec; }
.outbound { margin-bottom: 21px; padding: 4px 0 5px 15px; border-left: 3px solid #4a9f94; }
.outbound p { font-size: .87rem; margin: 7px 0 0; color: var(--muted); }
.reading-side { min-width: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: 9px; background: white; }
.reading-side img { width: 100%; height: auto; }
.reading-side .text-link { margin: 6px 11px; }
.post-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 17px; border-top: 1px solid var(--rule); padding-top: 10px; font-size: .9rem; }
.archive-body, .missing { padding-block: clamp(23px, 3vw, 52px); }
.archive-intro { margin-bottom: 22px; }
.navigation.pagination, .missing .action { margin-top: 17px; }
.closing { background: var(--ocean); color: #e7f3f4; border-top: 3px solid #6ac4af; }
.closing-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: clamp(18px, 6vw, 85px); padding-block: 30px; }
.closing h2 { color: var(--water); font-size: 1.06rem; margin-bottom: 7px; }
.closing p { max-width: 31em; margin-top: 10px; color: var(--silver); font-size: .92rem; }
.closing li a { display: inline-flex; align-items: center; min-height: 32px; font-size: .89rem; }
.colophon { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 11px; border-top: 1px solid #42565f; color: var(--silver); font-size: .79rem; }

@media (max-width: 900px) {
    .mast-inner { flex-wrap: wrap; min-height: 58px; gap: 10px; }
    .mast-actions { gap: 8px; }
    .desk-login { display: none; }
    .main-menu { order: 3; width: 100%; }
    .main-menu ul { flex-wrap: wrap; gap: 2px 18px; }
    .main-menu .drawer-login { display: inline-flex; gap: 7px; color: var(--water); }
    .nav-ready .main-menu { display: none; position: absolute; inset: 100% 0 auto; padding: 8px 5% 12px; background: var(--ocean); border-block: 1px solid #41616b; box-shadow: 0 8px 14px #081d2933; }
    .nav-ready .menu-open .main-menu { display: block; }
    .nav-ready .nav-toggle { display: grid; align-content: center; justify-content: center; gap: 4px; width: 42px; height: 42px; border: 1px solid #6f8991; border-radius: 7px; background: transparent; color: white; }
    .nav-toggle span { width: 17px; height: 2px; background: currentColor; }
    .hero-copy { padding: 23px; }
    .hero-actions .action { padding-inline: 12px; font-size: .87rem; }
    .hero-visual { min-height: 295px; }
    .topic-caption { padding: 8px 9px 10px; }
    .journal-list, .read-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .frame { width: calc(100% - 30px); }
    .mast-inner { min-height: 55px; gap: 7px; }
    .wordmark img { width: 29px; height: 29px; }
    .wordmark { gap: 4px; }
    .wordmark span { font-size: 1.18rem; }
    .mast-actions > .action { min-height: 39px; padding: 6px 10px; font-size: .83rem; }
    .regatta-deck { padding: 13px 0 22px; }
    .hero { display: flex; flex-direction: column; border-radius: 11px; }
    .hero-copy { order: 2; align-self: stretch; padding: 17px 16px 19px; }
    .hero h1 { font-size: clamp(1.48rem, 5vw, 2.2rem); }
    .hero-brand { font-size: clamp(2.6rem, 10vw, 4rem); }
    .hero-brand + span { font-size: .99em; margin-top: 1px; }
    .hero-intro { margin-top: 7px; font-size: .93rem; line-height: 1.51; }
    .hero-actions { gap: 6px; margin-top: 12px; }
    .hero-actions .action { min-height: 40px; padding: 6px 10px; font-size: .85rem; }
    .hero-visual { min-height: 0; aspect-ratio: 2.05; }
    .cover-art img { object-position: 50% 19%; }
    .photo-link { right: 8px; bottom: 8px; font-size: .7rem; padding: 4px 8px; }
    .directory { padding-top: 19px; }
    .section-head { margin-bottom: 10px; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .topic { border-radius: 6px; }
    .topic-photo { aspect-ratio: 2.2; }
    .topic-caption p { font-size: .74rem; }
    .topic-lottery { display: grid; grid-template-columns: 38% minmax(0, 1fr); align-items: center; grid-column: 1/-1; }
    .topic-lottery .topic-photo { width: 100%; min-height: 57px; height: 100%; }
    .topic-lottery .topic-arrow { display: none; }
    .signal-lesson, .reading, .clubhouse { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .signal-lesson { padding-block: 22px; }
    .lesson-copy p, .signal-result p { font-size: .9rem; }
    .signal-panel { padding: 8px 10px 11px; }
    .journal-heading { gap: 7px 12px; }
    .journal-controls { order: 3; margin: 0; width: 100%; }
    .journal-controls:not([hidden]) + .text-link { margin-left: auto; }
    .journal-list, .read-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .read-card { display: grid; grid-template-columns: 30% minmax(0, 1fr); align-items: stretch; }
    .read-cover { position: relative; aspect-ratio: auto; min-height: 100%; }
    .read-cover img { position: absolute; inset: 0; }
    .read-body { padding: 9px 10px; }
    .read-body p { font-size: .84rem; }
    .read-meta { gap: 3px 9px; }
    .clubhouse { padding-block: 22px; }
    .desk-photo { min-height: 120px; }
    .desk-links { padding: 10px; }
    .prose { padding: 15px; font-size: .97rem; }
    .prose td, .prose th { padding: 4px; font-size: .82rem; }
    .reading-side { display: grid; grid-template-columns: 36% minmax(0, 1fr); align-items: center; }
    .closing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
    .closing-brand { grid-column: 1/-1; }
}
@media (max-width: 360px) {
    .frame { width: calc(100% - 22px); }
    .mast-actions .ui-icon { display: none; }
    .hero-copy { padding-inline: 13px; }
    .hero-actions .action { padding-inline: 8px; }
    .topic-caption { padding: 7px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
