:root{--black:#080315;--base:#12051e;--deep:#170523;--panel:#20062f;--violet:#7a218f;--line:#9a3f8b;--gold:#ffd671;--gold2:#efa82e;--magenta:#e252bb;--text:#fff4fa;--muted:#dfcbe6}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:64px}body{margin:0;color:var(--text);background:#10051f;font-family:Kanit,system-ui,-apple-system,'Segoe UI',sans-serif;font-weight:400;overflow-x:hidden}body:before{content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;background:radial-gradient(circle at 50% 5%,#4a0c62 0,transparent 45%),radial-gradient(circle at 0 90%,#79104e55,transparent 38%),#0e0418}a{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #fff0a9;outline-offset:3px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:absolute;top:-100px;left:16px;background:var(--gold);color:#190b18;padding:8px 16px;z-index:20}.skip-link:focus{top:12px}.top-confetti{height:9px;background:repeating-linear-gradient(90deg,#fa9c1a 0 10px,#ffdc74 10px 20px,#dd3186 20px 30px,#7f22cf 30px 40px,#fb8b2b 40px 50px);box-shadow:0 3px 18px #f74cdb85;position:relative;z-index:4}.masthead{position:relative;background:#13061f;isolation:isolate}.header-scene{position:absolute;inset:0 0 61px;z-index:-1;background:linear-gradient(90deg,#24033070,#14042157 46%,#20032675),url('assets/fair-header.webp') center center/cover no-repeat}.masthead:before{content:"";position:absolute;inset:0 0 60px;background:linear-gradient(100deg,#19042d3d,transparent 30%,#10031655);pointer-events:none}.header-inner{width:min(100%,1530px);height:185px;padding:8px 34px 10px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 auto;position:relative;z-index:1}.brand{width:365px;max-width:39%;height:166px;display:flex;align-items:center;justify-content:flex-start;filter:drop-shadow(0 0 9px #f53c76cc)}.brand img{display:block;width:100%;height:100%;object-fit:contain;object-position:left center}.header-tagline{font-size:clamp(17px,1.6vw,23px);font-style:italic;color:#ffe49a;text-align:center;font-weight:500;line-height:1.2;text-shadow:0 0 16px #db6d24,1px 1px 3px #1e0017;transform:rotate(-4deg);margin-left:auto;margin-right:auto;white-space:nowrap}.header-tagline span{display:block}.top-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.action{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:45px;padding:9px 16px;border-radius:10px;font-weight:600;font-size:15px;border:1px solid #ddb55f;transition:transform .15s ease,filter .15s ease;white-space:nowrap}.action:hover{transform:translateY(-2px);filter:brightness(1.08)}.action-outline{color:#fff0cc;background:#110922e8}.action-gold{color:#38151f;background:linear-gradient(120deg,#ffedac,#ffcb60 55%,#e5a339);border-color:#ffd673;box-shadow:inset 0 1px #fff5cb80,0 5px 19px #eea63830}.garland-header{height:0;position:relative;z-index:3}.garland-header:before{content:"";position:absolute;left:0;right:0;top:-8px;height:12px;background:radial-gradient(circle,#ffdd79 0 2px,transparent 3px) 0 0/36px 12px;filter:drop-shadow(0 0 6px #ffa543)}.main-nav{position:relative;z-index:3;min-height:55px;display:flex;align-items:stretch;justify-content:center;gap:0;background:linear-gradient(180deg,#100929,#09021a);border-top:1px solid #e89e39;border-bottom:3px solid #f3a142;box-shadow:0 8px 32px #0008}.main-nav a{display:flex;align-items:center;padding:13px clamp(12px,2.0vw,24px);font-weight:600;font-size:15px;white-space:nowrap;transition:color .15s,background .15s}.main-nav a:hover,.main-nav a.current{color:#ffe198;background:linear-gradient(180deg,#531564,#1c082e)}.main-nav a.current{box-shadow:inset 0 -3px #ffcd6c}.fair-glow{position:fixed;left:0;right:0;bottom:0;height:220px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 50% 100%,#63236840,transparent 65%)}
.hero{height:255px;min-height:255px;position:relative;overflow:hidden;border-bottom:2px solid #e9a03e;background:#220a32}.hero-scene{position:absolute;inset:0;background:linear-gradient(90deg,#180427e8 0%,#1c0734c4 27%,#1d052533 68%,#1b031b87 100%),url('assets/fair-hero.webp') center 50%/cover no-repeat;filter:saturate(1.12)}.hero-scene:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#19041f99,transparent 22%,transparent 80%,#13072088)}.hero-sparkles{position:absolute;left:49%;top:12px;font-size:21px;letter-spacing:16px;color:#ffb85d7d;transform:rotate(-3deg);pointer-events:none}.hero-inner{position:relative;z-index:1;max-width:1450px;padding:25px 30px;min-height:100%;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:28px}.hero-copy{min-width:0;max-width:930px;text-shadow:0 2px 6px #000}.hero-kicker{font-size:13px;font-weight:600;letter-spacing:2.7px;color:#fbc4e8}.hero h1{font-size:clamp(48px,5.9vw,90px);font-weight:800;color:#ffdf8c;line-height:1.14;letter-spacing:-2px;margin:0 0 5px;text-shadow:0 4px #7a3814,0 8px 18px #f2a41f88,2px 1px #fff5d1}.hero-lead{font-size:clamp(16px,1.9vw,24px);font-weight:500;line-height:1.4;margin:0 0 18px}.separator{color:var(--gold)}.hero-status{margin:0;display:inline-flex;align-items:center;gap:8px;padding:8px 13px;border:1px solid #d3a05f8f;border-radius:9px;background:#170c27db;color:#ffe3ab;font-size:12px;font-weight:500}.status-dot{display:inline-block;background:#ffe0a1;width:6px;height:6px;border-radius:50%;box-shadow:0 0 9px #f5c15e}.date-picker-panel{background:#100b21ed;border:1px solid #eac171;border-radius:15px;box-shadow:0 10px 22px #0006;min-width:219px;max-width:240px;padding:14px 16px;display:grid;gap:6px}.date-picker-panel label{color:var(--gold);font-weight:600;font-size:17px}.date-picker-panel input{min-width:0;width:100%;background:#08071a;color:#fff;padding:9px;border:1px solid #a666ad;border-radius:9px;color-scheme:dark;font-size:16px;min-height:43px}.date-hint{margin:0;font-size:11px;line-height:1.4;color:#ddc4e7}
.results-section{position:relative;padding:0 0 5px;background:linear-gradient(180deg,#10031f,#130420 60%,#10031e)}.results-section:before,.results-section:after{content:"";position:absolute;top:64px;width:65px;bottom:2px;background:linear-gradient(90deg,#23042577,#13051e00),url('assets/festival-side.webp') center top/100px auto repeat-y;opacity:.34;pointer-events:none}.results-section:before{left:0}.results-section:after{right:0;transform:scaleX(-1)}.content-wrap{width:min(100% - 54px,1470px);margin:0 auto;position:relative;z-index:1}.filter-wrapper{margin:-2px 0 11px;padding:9px;background:linear-gradient(180deg,#18082c,#10041e);border:2px solid #e7ad4d;border-radius:16px;box-shadow:0 6px 24px #0009,inset 0 1px #eb679a40}.filter-scroll{display:flex;gap:3px;justify-content:space-between;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#9760a4 transparent}.filter-btn{color:#fff;background:transparent;border:0;border-radius:11px;padding:11px 10px;display:flex;align-items:center;gap:7px;justify-content:center;white-space:nowrap;font-size:13px;font-weight:600;min-height:41px;transition:background .15s,color .15s}.filter-symbol{font-size:21px;line-height:1}.filter-btn:hover{background:#58236b}.filter-btn.is-active{color:#291229;background:linear-gradient(135deg,#ffe599,#f4ae36);box-shadow:inset 0 1px #fff8d8,0 2px 12px #f9af3359}.section-title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:0 2px;margin:15px 0 14px}.section-title-row h2{font-size:clamp(23px,2.25vw,31px);margin:2px 0 0;line-height:1.25;color:#ffe08b;text-shadow:0 1px 13px #9d5c2b44}.section-kicker{color:#eeb3ef;font-size:12px;letter-spacing:2.4px;font-weight:600}.information-chip{border:1px solid #b87e40;border-radius:99px;padding:6px 13px;color:#ffdca3;font-size:12px;white-space:nowrap}.results-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.lotto-card{background:linear-gradient(145deg,#260939,#100622);border:1px solid #bc438f;border-radius:12px;overflow:hidden;box-shadow:0 6px 15px #0007,0 0 0 1px #22051e;min-width:0}.lotto-card-head{position:relative;min-height:76px;display:flex;align-items:center;gap:13px;padding:10px 14px;border-bottom:1px solid #ab438c;isolation:isolate;overflow:hidden}.lotto-card-head:before{content:"";position:absolute;inset:0;z-index:-2;background-position:right center;background-size:cover;filter:saturate(1.3)}.lotto-card-head:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#260d41f5 0%,#270b41d8 30%,#200c372c 68%,#1b073314)}.category-icon{font-size:30px;line-height:1;width:47px;height:47px;flex:none;display:grid;place-items:center;background:#160626;border:1px solid #ffd26c;border-radius:100%;text-shadow:0 2px 5px #000}.category-text{min-width:0}.category-text h3{font-size:clamp(17px,1.55vw,22px);color:#fff;line-height:1.25;margin:0 0 3px;font-weight:700;text-shadow:0 2px 5px #000}.category-text p{margin:0;font-size:12px;color:#e9cee6;text-shadow:0 1px 3px #000}.lotto-card-links{padding:10px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.lotto-link{padding:9px 7px;min-height:36px;display:flex;align-items:center;justify-content:space-between;gap:5px;border:1px solid #a34bc3;border-radius:6px;background:linear-gradient(180deg,#2a0b48,#16062a);color:#f9f4ff;font-size:12px;font-weight:500;text-align:left;line-height:1.3;transition:background .15s,box-shadow .15s}.lotto-link:hover{background:linear-gradient(180deg,#63237d,#311048);box-shadow:0 0 12px #a64be64d}.link-chevron{color:#ffd36f;font-size:22px;line-height:.65;flex:none}
.features-section{padding:8px 0 12px;background:#11041f}.feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.feature-card{position:relative;isolation:isolate;display:flex;align-items:center;min-height:124px;overflow:hidden;border:1px solid #ba4786;border-radius:11px;background:linear-gradient(118deg,#270740 0%,#23073a 60%,#591850 100%);padding:15px;gap:12px}.feature-card:before{content:"";position:absolute;inset:0;z-index:-1;opacity:.55;background:radial-gradient(circle at 85% 50%,#db218e,transparent 40%),repeating-linear-gradient(120deg,transparent 0 26px,#ffd66a08 28px 29px,transparent 31px 72px)}.feature-card.analysis:before{background:radial-gradient(circle at 75% 35%,#ffad2155,transparent 60%),repeating-linear-gradient(90deg,transparent 0 19px,#ffcc7a10 20px 23px,transparent 25px 55px)}.feature-card.alerts:before{background:radial-gradient(circle at 85% 50%,#ee599160,transparent 55%)}.feature-symbol{font-size:clamp(45px,5vw,75px);filter:drop-shadow(0 0 14px #ffab2a99);flex:0 0 34%;text-align:center}.feature-body{min-width:0;flex:1}.feature-body h3{margin:0 0 2px;color:#ffe084;font-size:clamp(14px,1.48vw,20px);line-height:1.16;font-weight:700}.feature-body p{margin:0 0 7px;font-size:10px;color:#ecd6e6;line-height:1.3}.feature-body button,.feature-body a[data-link-key]{min-width:120px;border:0;border-radius:9px;background:linear-gradient(180deg,#ffe292,#eba433);padding:5px 10px;color:#35112c;font-size:11px;font-weight:700;box-shadow:0 3px 10px #0004}.feature-body button span,.feature-body a[data-link-key] span{font-size:17px;vertical-align:-1px}
.announcement-section{padding:8px 0 19px;background:linear-gradient(180deg,#160625,#11041e)}.section-title-row.compact{margin:5px 0 12px}.section-title-row.compact h2{font-size:23px}.announcement-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.announcement-slot{min-height:123px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:1px dashed #b88870;border-radius:11px;background:linear-gradient(135deg,#2d0e43,#190828);position:relative;overflow:hidden}.announcement-slot:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 0,#f8b24d14,transparent 60%);pointer-events:none}.ann-illustration{font-size:22px;color:#ffe3a3}.announcement-slot h3{font-size:17px;color:#ffe49d;margin:0}.announcement-slot p{font-size:12px;color:#d8bbdc;margin:2px 0}
.help-section{border-top:1px solid #bc5c96;background:#09051b}.help-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0}.help-grid article{padding:14px 16px 16px;display:grid;grid-template-columns:40px 1fr;column-gap:11px;align-content:start}.help-grid article:not(:last-child){border-right:1px solid #603455}.help-grid article>span{grid-row:1/3;width:36px;height:36px;background:#ebe4ff;color:#200722;border-radius:50%;display:grid;place-items:center;font-size:20px}.help-grid h3{font-size:13px;margin:0;color:#fff9df}.help-grid p{font-size:10px;margin:0;color:#c6b4d8;line-height:1.4}.footer{background:#090418;border-top:1px solid #593455;min-height:80px}.footer-wrap{width:min(100% - 54px,1470px);margin:0 auto;min-height:79px;display:flex;align-items:center;justify-content:space-between;gap:18px}.footer-logo{display:flex;align-items:center;gap:8px;white-space:nowrap}.footer-crown{font-size:34px;color:var(--gold)}.footer-logo strong{font-size:20px;font-weight:700;color:#ffe483;font-style:italic}.footer-logo small{display:block;font-size:10px;letter-spacing:1.7px;color:#f8d35a}.footer nav{display:flex;flex-wrap:wrap;align-items:center;gap:15px}.footer nav a{font-size:11px;color:#efdaef}.footer nav a:hover{color:var(--gold)}.footer-copy{color:#b8a0cc;font-size:10px;text-align:right}.dot-sep{color:#c87bbf}
dialog{width:min(95vw,525px);max-height:min(85vh,650px);padding:26px;border:1px solid #dbab6c;border-radius:18px;background:linear-gradient(150deg,#3b1154,#160823);color:#fff;text-align:center;box-shadow:0 25px 100px #000e}dialog::backdrop{background:#090217e0;backdrop-filter:blur(3px)}.dialog-x{border:0;background:transparent;font-size:26px;color:#fff;position:absolute;right:17px;top:9px}.dialog-art{font-size:35px;color:#ffcf77;margin:4px 0 10px}dialog h2{font-size:25px;color:#ffe29b;margin:0 0 8px}.dialog-context{font-size:13px;color:#dec3e4;margin:0 0 15px}.empty-result{padding:20px 14px;background:#1b0a2e;border:1px dashed #b67999;border-radius:12px;margin:12px 0 18px}.empty-icon{font-size:35px}.empty-result strong{font-size:19px;color:#ffe0ac}.empty-result p{color:#cfc0d7;font-size:13px;margin:6px 0}.dialog-close{border:0;min-width:130px}
@media (max-width:1200px){.header-inner{padding:8px 20px}.brand{width:300px;height:157px;max-width:35%}.header-tagline{font-size:18px}.top-actions .action{font-size:13px;padding:9px 11px}.main-nav a{padding:13px 14px}.filter-btn{padding:9px 10px}.results-grid{gap:9px}.lotto-card-links{padding:8px;gap:5px}.lotto-link{font-size:11px}.content-wrap{width:min(100% - 34px,1470px)}}
@media (max-width:950px){.header-inner{height:auto;min-height:165px;flex-wrap:wrap;justify-content:center}.brand{min-width:230px;max-width:50%;flex:1 1 270px}.header-tagline{display:none}.top-actions{flex:1;justify-content:flex-end}.main-nav{overflow-x:auto;justify-content:flex-start;scrollbar-width:thin}.hero{height:auto;min-height:265px}.hero-inner{padding:28px 22px}.results-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.feature-grid>:last-child{grid-column:span 2}.filter-scroll{justify-content:flex-start}.filter-btn{padding:10px 14px}.footer-wrap{flex-wrap:wrap;justify-content:center;padding:18px 0}.footer-copy{text-align:center}.feature-body h3{font-size:17px}}
@media (max-width:620px){.top-confetti{height:7px}.header-inner{padding:10px 10px 12px;display:flex;flex-direction:column;gap:4px}.brand{width:290px;height:126px;max-width:100%;flex:none;justify-content:center}.brand img{object-position:center}.top-actions{justify-content:center;width:100%;flex:none;gap:6px}.top-actions .action{padding:7px 9px;min-height:37px;font-size:12px}.main-nav{min-height:44px}.main-nav a{padding:11px 12px;font-size:12px}.hero{min-height:0}.hero-inner{padding:26px 16px;display:block}.hero-scene{background:linear-gradient(90deg,#160328d6 0%,#1a043db5 49%,#14051b66),url('assets/fair-hero.webp') 66% 50%/cover no-repeat}.hero h1{font-size:57px}.hero-lead{font-size:16px}.hero-status{font-size:10px;padding:7px 8px}.date-picker-panel{margin-top:20px;width:100%;max-width:100%;padding:10px 12px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;min-width:0}.date-picker-panel label{font-size:14px}.date-hint{grid-column:1/-1}.content-wrap{width:calc(100% - 22px)}.filter-wrapper{border-radius:12px;padding:5px;margin:0}.filter-btn{font-size:12px;min-height:38px;padding:8px 12px}.filter-symbol{font-size:17px}.section-title-row{margin:16px 0 12px}.section-title-row h2{font-size:24px}.information-chip{font-size:10px;padding:5px 8px;white-space:normal;max-width:125px;text-align:center}.section-kicker{font-size:10px}.results-grid,.feature-grid,.announcement-grid{grid-template-columns:1fr;gap:9px}.feature-grid>:last-child{grid-column:auto}.lotto-card-head{min-height:78px}.lotto-card-links{padding:10px;gap:7px}.lotto-link{font-size:12px;min-height:41px}.feature-card{min-height:115px}.help-grid{grid-template-columns:1fr}.help-grid article:not(:last-child){border-right:0;border-bottom:1px solid #603455}.help-grid article{padding:12px}.footer nav{justify-content:center;gap:11px}.footer-logo strong{font-size:17px}.footer-copy{width:100%}.results-section:before,.results-section:after{opacity:.12}}
@media(max-width:380px){.hero h1{font-size:46px}.top-actions .action{font-size:11px;padding:7px}.lotto-card-links{grid-template-columns:repeat(2,minmax(0,1fr))}.information-chip{display:none}.category-text h3{font-size:18px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* V3.1: server-rendered category cards and CMS content */
[hidden]{display:none!important}
.cms-content-sections{padding:12px 0 24px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.cms-feed{min-width:0;background:linear-gradient(145deg,#230b36,#120722);border:1px solid #945c8d;border-radius:14px;padding:17px}
.cms-feed h2{margin:0 0 9px;color:#ffe08b;font-size:20px}
.cms-feed-status{color:#d5b8d7;font-size:13px;margin:4px 0 10px}
.cms-feed-status:empty{display:none}
.cms-feed-grid{display:grid;gap:10px}
.cms-article{background:#180925;border:1px solid #673e78;border-radius:10px;padding:12px 14px;min-width:0}
.cms-article h3{font-size:16px;line-height:1.4;margin:0 0 5px;color:#ffdf8c}
.cms-article a:hover{text-decoration:underline}
.cms-date{color:#d7accb;font-size:11px;display:block;margin-bottom:4px}
.cms-excerpt{font-size:13px;line-height:1.5;color:#eadbea;margin:0;overflow-wrap:anywhere}
.cms-source-note{grid-column:1/-1;color:#c0a8cc;font-size:11px;margin:2px 0 0}
@media(max-width:620px){.cms-content-sections{grid-template-columns:1fr;padding:14px 0 20px}.cms-feed{padding:13px}}

/* V3.2: Managed links remain visually identical to their former buttons. */
.feature-body a[data-link-key]{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;cursor:pointer;text-decoration:none}
a.filter-btn,a.lotto-link{cursor:pointer;text-decoration:none}

/* R8.18: preserve card artwork while deferring offscreen image transfers. */
.lotto-card-head .card-art{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:right center;filter:saturate(1.3)}
.fair-browse{display:flex;align-items:center;min-height:44px;margin:0 12px 10px;padding:9px 12px;border:1px solid #a34bc3;border-radius:8px;color:#ffe39b;font-size:14px;font-weight:500;background:#210c32}
.fair-browse:hover{background:#361246}
@media(max-width:620px){.filter-btn,.lotto-link{min-height:44px}}


/* Homepage result-section decoration and directory alignment. */
#categories.results-section::before,
#categories.results-section::after {
  content: none;
}

#market-directory.fair-all-markets {
  box-sizing: border-box;
  width: calc(100% - 54px);
  max-width: 1470px;
  margin-inline: auto;
}

@media (max-width: 1200px) {
  #market-directory.fair-all-markets {
    width: calc(100% - 34px);
  }
}

@media (max-width: 620px) {
  #market-directory.fair-all-markets {
    width: calc(100% - 22px);
  }
}
