/*
Theme Name: B4ALL Courtside
Description: A Thai editorial WordPress theme for b4all.lol, with a courtside guide rail, responsive original photography and member guides.
Version: 1.0.0
Author: B4ALL
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: b4all-courtside
License: GNU General Public License v2 or later
*/
:root {
    --page: #f6f2e9;
    --paper: #fffdf6;
    --ink: #261d20;
    --muted: #615757;
    --wine: #4a1624;
    --wine-dark: #2b0e18;
    --wine-lit: #783149;
    --champagne: #f5ddac;
    --border: #d9cec0;
    --copper: #946641;
    --body: "Fahkwang", "Noto Sans Thai", Tahoma, Arial, sans-serif;
    --display: "Barlow Condensed", "Arial Narrow", "Arial", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 1rem/1.75 var(--body); overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; }
button, select, summary { cursor: pointer; }
img, svg, picture { display: block; }
img { max-width: 100%; }
button, a, summary, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b76017; outline-offset: 3px; }
button:focus-visible, .cover a:focus-visible, .mast a:focus-visible { outline-color: #efa94d; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.4; text-wrap: pretty; }
[hidden] { display: none !important; }
.frame { width: min(calc(100% - clamp(32px, 6.5vw, 108px)), 1512px); margin-inline: auto; }
.skip { position: fixed; z-index: 30; left: 12px; top: 8px; padding: 7px 14px; background: white; color: var(--wine); transform: translateY(-160%); }
.skip:focus { transform: none; }
.ui-icon { width: 19px; height: 19px; flex: none; }
.mast { background: var(--wine-dark); color: #fff8e9; border-bottom: 3px solid #ab815a; }
.mast-inner, .mast-actions, .main-menu ul, .wordmark, .action, .text-link, .desk-login, .drawer-login { display: flex; align-items: center; }
.mast-inner { min-height: 76px; gap: clamp(16px, 3.2vw, 56px); }
.wordmark { flex: none; gap: 11px; }
.wordmark img { width: 37px; height: 37px; }
.wordmark span { color: #fff6e2; font: italic 900 2.17rem/1 var(--display); letter-spacing: -.095em; }
.main-menu { margin-left: auto; }
.main-menu ul, .closing ul { list-style: none; padding: 0; margin: 0; }
.main-menu ul { gap: 27px; flex-wrap: wrap; }
.main-menu a, .desk-login, .drawer-login { display: inline-flex; align-items: center; min-height: 44px; font-size: .88rem; font-weight: 600; }
.main-menu a:hover, .desk-login:hover { color: var(--champagne); }
.mast-actions { gap: 18px; padding-left: 25px; border-left: 1px solid #815762; }
.action { display: inline-flex; justify-content: center; gap: 9px; font-size: .92rem; line-height: 1.4; font-weight: 700; border: 1px solid transparent; border-radius: 5px; min-height: 44px; padding: 10px 17px; text-align: center; }
.action .ui-icon { width: 15px; height: 15px; }
.light-action, .clay-action { background: var(--champagne); color: #32131a; }
.light-action:hover, .clay-action:hover { background: #ffeac5; }
.ink-action { background: var(--wine); color: white; }
.ink-action:hover { background: var(--wine-lit); }
.outline-action { color: #fff7eb; background: #24131bb0; border-color: #c9b7a1; }
.outline-action:hover { background: #492e36; }
.nav-toggle, .main-menu .drawer-login { display: none; }
.venue { display: grid; grid-template-columns: minmax(145px, 177px) minmax(0, 1fr); column-gap: clamp(21px,2.8vw,46px); align-items: start; padding-block: 27px clamp(46px,6.4vw,100px); }
.venue-main { min-width: 0; }
.venue-main .frame { width: 100%; }
.guide-rail { position: sticky; top: 24px; padding: 10px clamp(11px,1.1vw,18px) 22px 0; border-right: 1px solid var(--border); }
.admin-bar .guide-rail { top: 52px; }
.rail-label { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; padding-inline: 11px; margin-bottom: 10px; }
.rail-nav a, .rail-member a { display: flex; align-items: center; gap: 11px; min-height: 43px; line-height: 1.45; padding: 9px 12px; border-radius: 4px; font-weight: 600; }
.rail-nav a + a { margin-top: 3px; }
.rail-nav a[aria-current], .rail-member a[aria-current] { background: var(--wine); color: var(--champagne); }
.rail-nav a:not([aria-current]):hover, .rail-member a:not([aria-current]):hover { background: #e9dfd2; color: var(--wine); }
.rail-nav .ui-icon { width: 18px; height: 18px; }
.rail-member { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 22px; }
.rail-member a { justify-content: space-between; font-size: .83rem; }
.rail-member .ui-icon { width: 13px; }
.cover { display: flex; position: relative; overflow: hidden; isolation: isolate; align-items: flex-end; border-radius: 9px; min-height: clamp(358px, 30.2vw, 495px); background: #301c22; color: #fff9ed; }
.cover-art, .cover-art img { position: absolute; width: 100%; height: 100%; inset: 0; }
.cover-art { z-index: -2; }
.cover-art img { object-fit: cover; object-position: right 22%; }
.cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #1b1118ed 0%, #24131cc4 28%, #30182263 50%, transparent 70%), linear-gradient(0deg, #210b165b, transparent 60%); }
.cover-copy { width: min(65%, 670px); padding: clamp(25px,3.35vw,57px); }
.cover h1 { font-size: clamp(1.5rem, 3vw, 3.35rem); }
.cover-brand { display: block; font: italic 900 clamp(5.3rem,8.3vw,9.8rem)/.82 var(--display); letter-spacing: -.105em; margin: 0 .1em .17em -.03em; color: #fff8e8; }
.cover-subjects { display: block; font-size: clamp(1.45rem,2.03vw,2.35rem); line-height: 1.49; }
.cover-copy p { font-size: clamp(.9rem,1.08vw,1.05rem); max-width: 34em; line-height: 1.7; color: #f4e8db; margin-top: .65rem; }
.cover-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.35rem; }
.home-section, .help-grid { margin-top: clamp(31px,3.45vw,57px); }
.section-heading { display: flex; align-items: center; gap: 15px; justify-content: space-between; margin-bottom: 17px; }
.section-heading h2 { font-size: clamp(1.32rem,2.05vw,2rem); line-height: 1.38; letter-spacing: -.05em; }
.topic-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(10px,1.2vw,21px); }
.topic-card, .read-card { min-width: 0; }
.topic-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--paper); }
.topic-photo { overflow: hidden; background: #584342; aspect-ratio: 1.93; }
.topic-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .27s ease; }
.topic-card:hover .topic-photo img { transform: scale(1.035); }
.topic-caption { padding: clamp(10px,1vw,17px); }
.topic-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--wine); }
.topic-heading h3 { font-size: clamp(1.06rem,1.5vw,1.5rem); line-height: 1.4; }
.topic-heading .ui-icon { width: 15px; height: 15px; }
.topic-caption span { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.text-link, .prose a, .feature-copy a, .faq a { color: var(--wine); font-weight: 700; }
.text-link { gap: 7px; min-height: 40px; font-size: .87rem; }
.text-link .ui-icon { width: 16px; height: 16px; }
.text-link:hover, .read-card h2 a:hover, .read-card h3 a:hover { text-decoration: underline; }
.home-feature { margin-top: clamp(24px,3.2vw,45px); padding: clamp(18px,2vw,31px); border-radius: 6px; background: #eadfd1; display: grid; grid-template-columns: auto minmax(0,1fr); gap: clamp(16px,2.1vw,34px); }
.feature-mark .ui-icon { width: clamp(27px,3.2vw,43px); height: auto; color: var(--wine); }
.feature-copy h2 { color: var(--wine); font-size: clamp(1.13rem,1.6vw,1.45rem); }
.feature-copy p { margin-top: .4em; }
.feature-copy a, .faq a, .prose a { text-decoration: underline; text-underline-offset: .18em; }
.journal-controls { display: flex; gap: 10px; align-items: center; margin: -2px 0 16px; color: var(--muted); font-size: .85rem; }
.journal-controls select { color: var(--ink); background: var(--paper); border: 1px solid #928473; border-radius: 4px; min-height: 39px; padding: 4px 16px 4px 9px; }
.read-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(14px,1.8vw,28px); }
.read-cover { display: block; aspect-ratio: 1.93; overflow: hidden; border-radius: 6px; background: #685652; }
.read-cover img { width: 100%; height: 100%; object-fit: cover; }
.read-meta, .article-byline, .crumb { color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.read-meta { margin-top: 12px; font-size: .77rem; }
.read-meta span { color: var(--wine); font-weight: bold; }
.read-meta time { border-left: 1px solid var(--border); padding-left: 10px; }
.read-body h2, .read-body h3 { font-size: clamp(1.04rem,1.45vw,1.42rem); line-height: 1.5; margin-top: 4px; }
.read-body p { margin-top: 5px; color: var(--muted); font-size: .91rem; line-height: 1.65; }
.help-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(22px,4vw,65px); border-top: 1px solid var(--border); padding-top: clamp(23px,2.9vw,45px); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--wine); font: 1.43rem/1 Arial,sans-serif; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-bottom: 14px; color: var(--muted); }
.account-panel { align-self: start; background: var(--paper); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.account-photo { aspect-ratio: 3.6; overflow: hidden; background: #54343b; }
.account-photo img { width: 100%; height: 100%; object-fit: cover; }
.account-panel h2 { font-size: 1.15rem; padding: 15px 17px 3px; }
.account-panel a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 17px; color: var(--wine); font-size: .93rem; }
.account-panel a:last-child { padding-bottom: 14px; }
.account-panel a:hover { text-decoration: underline; }
.account-panel .ui-icon { width: 14px; }
.inner-head { border-radius: 7px; padding: clamp(19px,3vw,50px); color: #fff6e9; background: linear-gradient(110deg,var(--wine-dark),#582132); }
.inner-head h1 { font-size: clamp(1.68rem,3vw,3.3rem); margin-top: .38em; max-width: 28em; }
.inner-head p { color: #edddcf; max-width: 58em; margin-top: .7em; }
.inner-head .crumb, .article-byline { color: #ecdbc5; font-size: .84rem; }
.crumb a, .article-byline a { text-decoration: underline; text-underline-offset: .15em; }
.article-byline { margin-top: 16px; }
.reading { margin-top: clamp(23px,3vw,46px); display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,25%); align-items: start; gap: clamp(22px,4vw,57px); }
.prose, .feature-copy { min-width: 0; }
.prose { font-size: 1.01rem; line-height: 1.9; }
.prose p + p, .prose p + ul, .prose li + li, .prose > figure { margin-top: .6em; }
.prose ul, .prose ol { margin: .65em 0; padding-inline-start: 1.5em; }
.prose h2 { font-size: clamp(1.25rem,1.7vw,1.75rem); line-height: 1.5; margin: 1.35em 0 .35em; }
.prose h3 { font-size: 1.12rem; margin: 1.1em 0 .35em; }
.prose > :first-child { margin-top: 0; }
.prose .action { color: white; text-decoration: none; }
.prose table, .feature-copy table { border-collapse: collapse; width: 100%; table-layout: fixed; margin: 14px 0; line-height: 1.65; }
.prose th, .prose td, .feature-copy th, .feature-copy td { text-align: start; border: 1px solid var(--border); padding: 7px 10px; vertical-align: top; overflow-wrap: anywhere; }
.prose th, .feature-copy th { background: #eadfd1; color: var(--wine); }
.prose figure { margin-inline: 0; }
.reading-side { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.reading-side img { width: 100%; height: auto; aspect-ratio: 1.45; object-fit: cover; margin-bottom: 7px; border-radius: 6px; }
.outbound { padding: 17px 19px; margin-bottom: 20px; border-radius: 5px; background: #e9ddcf; }
.outbound p { margin-top: 5px; font-size: .87rem; color: #564647; }
.archive-body { margin-top: 25px; }
.archive-intro { margin-bottom: 25px; }
.post-links, .pagination { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--border); }
.post-links { display: grid; gap: 10px; }
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.missing { padding: 35px 0; }
.missing .action { margin-top: 18px; }
.closing { background: var(--wine-dark); color: #fff4e1; }
.closing-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: clamp(22px,4vw,70px); padding-block: clamp(31px,4.4vw,68px); }
.closing-brand p { max-width: 19em; font-size: .9rem; color: #e0cdc5; margin-top: 15px; }
.closing h2 { font-size: 1rem; color: var(--champagne); margin-bottom: 8px; }
.closing li a { display: inline-block; font-size: .87rem; padding-block: 4px; color: #eddfd2; }
.closing li a:hover { text-decoration: underline; }
.colophon { padding-block: 16px; border-top: 1px solid #71525a; font-size: .77rem; color: #d8bfb5; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 1120px) and (min-width: 861px) {
    .venue { grid-template-columns: 141px minmax(0,1fr); gap: 20px; }
    .guide-rail { padding-right: 11px; }
    .rail-member a { padding-inline: 7px; }
    .topic-caption { padding: 9px; }
    .cover-copy { width: 67%; }
}
@media (max-width: 860px) {
    .frame { width: calc(100% - 36px); }
    .mast-inner { min-height: 64px; flex-wrap: wrap; gap: 0; }
    .mast-actions { margin-left: auto; border: 0; padding: 0; gap: 9px; }
    .main-menu { order: 3; width: 100%; margin: 0; padding-bottom: 6px; }
    .main-menu ul { display: flex; gap: 24px; }
    .main-menu .drawer-login { display: inline-flex; gap: 8px; }
    .main-menu .drawer-login .ui-icon { width: 13px; }
    .desk-login { display: none; }
    .nav-ready .main-menu { display: none; }
    .nav-ready .menu-open .main-menu { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 6px 0; border-top: 1px solid #7c4e5b; margin-top: 3px; }
    .nav-ready .nav-toggle { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; width: 42px; height: 42px; background: transparent; border: 1px solid #b19a8e; border-radius: 4px; }
    .nav-toggle span { width: 17px; height: 1.5px; background: #fff6e7; }
    .venue { display: block; padding-top: 0; }
    .guide-rail, .admin-bar .guide-rail { position: static; padding: 0; border: 0; margin-bottom: 17px; }
    .rail-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }
    .rail-label, .rail-member { display: none; }
    .rail-nav a, .rail-nav a + a { min-height: 47px; padding: 8px 2px; margin: 0; justify-content: center; border-radius: 0; border-bottom: 1px solid var(--border); font-size: .87rem; gap: 7px; }
    .rail-nav a[aria-current] { background: transparent; color: var(--wine); box-shadow: inset 0 -3px var(--wine); }
    .rail-nav .ui-icon { width: 16px; height: 16px; }
    .cover { min-height: clamp(327px,47vw,406px); }
    .topic-grid { gap: 11px; }
    .topic-caption { padding: 10px; }
    .reading { grid-template-columns: minmax(0,1fr) minmax(134px,24%); gap: 21px; }
}
@media (max-width: 680px) {
    .frame { width: calc(100% - 26px); }
    .mast-inner { min-height: 60px; }
    .wordmark { gap: 8px; }
    .wordmark img { width: 30px; height: 30px; }
    .wordmark span { font-size: 1.7rem; }
    .mast-actions .action { min-height: 40px; padding: 8px 11px; font-size: .81rem; }
    .mast-actions .action .ui-icon { width: 13px; height: 13px; }
    .rail-nav a, .rail-nav a + a { min-height: 54px; flex-direction: column; gap: 1px; font-size: .72rem; }
    .rail-nav .ui-icon { width: 16px; height: 16px; }
    .guide-rail { margin-bottom: 13px; }
    .cover { min-height: clamp(402px,111vw,536px); border-radius: 7px; }
    .cover-art img { object-position: center 27%; }
    .cover::before { background: linear-gradient(0deg, #210e18f8, #25121be6 30%, #2817208c 51%, transparent 76%); }
    .cover-copy { width: 100%; padding: clamp(161px,42vw,245px) clamp(15px,4.5vw,28px) clamp(21px,5.4vw,38px); }
    .cover-brand { font-size: clamp(4.25rem,15vw,6.6rem); margin-bottom: .18em; }
    .cover-subjects { font-size: clamp(1.15rem,4.7vw,1.7rem); }
    .cover-copy p { font-size: .87rem; margin-top: .53rem; }
    .cover-actions { gap: 7px; margin-top: 1.1rem; }
    .cover-actions .action { min-height: 41px; font-size: .84rem; padding: 8px 11px; }
    .home-section, .help-grid { margin-top: 29px; }
    .section-heading { margin-bottom: 12px; }
    .topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
    .topic-photo { aspect-ratio: 1.72; }
    .topic-heading h3 { font-size: 1.09rem; }
    .topic-caption span { font-size: .77rem; line-height: 1.5; }
    .home-feature { gap: 12px; padding: 15px; }
    .feature-mark .ui-icon { width: 23px; }
    .feature-copy p { font-size: .93rem; line-height: 1.7; }
    .read-grid { grid-template-columns: 1fr; gap: 0; }
    .read-card { display: grid; grid-template-columns: minmax(85px,28%) minmax(0,1fr); align-items: start; gap: 13px; border-top: 1px solid var(--border); padding-block: 14px; }
    .read-cover { aspect-ratio: 1.16; }
    .read-meta { margin-top: 0; gap: 7px; font-size: .72rem; }
    .read-meta time { padding-left: 7px; }
    .read-body h2, .read-body h3 { font-size: 1.01rem; }
    .read-body p { font-size: .85rem; line-height: 1.55; }
    .help-grid, .reading { grid-template-columns: 1fr; }
    .account-panel { display: grid; grid-template-columns: 28% minmax(0,1fr); }
    .account-photo { grid-row: 1 / 4; aspect-ratio: auto; }
    .account-panel h2 { padding: 12px 14px 2px; }
    .account-panel a { padding: 5px 14px; }
    .reading { gap: 22px; }
    .reading-side { display: grid; grid-template-columns: 35% minmax(0,1fr); align-items: center; gap: 15px; padding-bottom: 15px; }
    .reading-side img { margin: 0; }
    .inner-head h1 { font-size: clamp(1.42rem,6.1vw,2.15rem); }
    .inner-head p, .prose { font-size: .95rem; }
    .prose th, .prose td { padding: 5px 6px; font-size: .86rem; }
    .closing-grid { grid-template-columns: 1fr 1fr; }
    .closing-brand { grid-column: 1 / -1; }
    .closing-brand p { max-width: 100%; margin-top: 8px; }
    .colophon { flex-wrap: wrap; gap: 4px 18px; }
}
@media (max-width: 355px) {
    .frame { width: calc(100% - 20px); }
    .mast-actions { gap: 5px; }
    .cover-copy { padding-inline: 12px; }
    .cover-actions { gap: 5px; }
    .topic-grid { gap: 8px; }
    .topic-caption { padding: 8px; }
    .feature-mark { display: none; }
    .home-feature { display: block; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
