/* Alak Dolak: midnight arcade visual system */
:root{--paper:#100a1e;--ink:#f6f1ff;--muted:#b4a8c7;--line:#ffffff17;--gold:#ffcf4a;--dark:#211232;--purple:#9b65ff;--mint:#64f0cc}html{scroll-behavior:smooth;scroll-padding-top:30px}body{background:#100a1e;background-image:radial-gradient(ellipse at 95% 12%,#461a682c,transparent 45%),radial-gradient(ellipse at 0 70%,#36166c30,transparent 45%);color:var(--ink)}::selection{background:#ffcf4a;color:#190e2a}.announcement{background:#b7f55a;color:#18230d;text-align:center;padding:7px 16px;font-size:11px;font-weight:800;display:flex;justify-content:center;gap:26px;letter-spacing:.02em}.topbar{height:96px;border-bottom:1px solid var(--line);gap:24px}.main-nav{gap:27px;color:#b5a7c9;font-size:13px}.main-nav a:first-child{color:#c7f879}.main-nav a:hover{color:#fff}.top-actions{gap:14px;color:#ded0f3}.top-actions .btn{font-size:12px;padding:10px 17px}.menu-button{color:#fff}.btn{border-radius:9px;transition:transform .2s,box-shadow .2s}.btn:hover{transform:translateY(-3px)}.btn-gold{background:#ffcf4a;color:#261336;box-shadow:0 4px 0 #a76f20,0 10px 28px #ffc63722}.btn-gold:hover{box-shadow:0 5px 0 #a76f20,0 14px 36px #ffc63740}.btn-outline{background:#ffffff08}.text-link{color:#d6c8ee}.eyebrow,.kicker{color:#c6f77b;font-size:10px;letter-spacing:2px;font-weight:800}.section{padding:68px 0}.section-head h2{font-size:30px;font-weight:900}.section-head h2 em,.arcade-heading h1 em{color:#c7a5ff;font-style:normal}.hero{margin-top:28px;min-height:640px;background:#24103f;border:1px solid #66458c63;border-radius:24px}.hero-art{background:linear-gradient(270deg,#211034 0%,#211034eb 34%,#21103465 60%,#13071f22),url('/assets/hero.png?v=2') 15% 48%/cover;filter:none}.hero-copy{width:70%;padding:85px 65px}.hero h1{font-size:78px;line-height:1.3;letter-spacing:-3px}.hero h1 em{color:#ffcf4a;text-shadow:0 5px 0 #965526}.hero p{font-size:16px;color:#c5b5d7;max-width:470px}.hero-proof{margin-top:34px}.hero-stat{background:#21163299;backdrop-filter:blur(12px);padding:15px 24px;border:1px solid #bd94f344;border-radius:14px;transform:rotate(-5deg)}.hero-stat strong{color:#bdf66f}.arena-ticker{margin-top:50px;transform:rotate(-2deg);background:#a780f3;color:#1c0e31;border-top:2px solid #ceb8ff;border-bottom:2px solid #ceb8ff;overflow:hidden;padding:15px 0;font-size:21px;font-weight:900;white-space:nowrap}.arena-ticker span{display:block;word-spacing:26px;animation:marquee 28s linear infinite}.competition-grid{gap:20px}.competition-card{background:linear-gradient(160deg,color-mix(in srgb,var(--accent) 14%,#1d142a),#171024);border:1px solid color-mix(in srgb,var(--accent) 35%,transparent);border-radius:18px;padding:25px;overflow:hidden;min-height:330px}.competition-card:before{content:'';position:absolute;top:-50px;left:-50px;width:180px;height:180px;border-radius:50%;border:24px solid color-mix(in srgb,var(--accent) 8%,transparent);pointer-events:none}.competition-card:hover{border-color:var(--accent);box-shadow:0 14px 40px color-mix(in srgb,var(--accent) 13%,transparent)}.card-icon{width:80px;height:80px;font-size:43px;background:color-mix(in srgb,var(--accent) 20%,#221531);border:1px solid color-mix(in srgb,var(--accent) 40%,transparent);box-shadow:6px 6px 0 #0003;transform:rotate(-8deg);color:color-mix(in srgb,var(--accent) 60%,white);margin-bottom:28px}.tag{background:#b18aff17;color:#d7c0ff;border:1px solid #b18aff30}.competition-card h3{font-size:20px}.competition-card p{color:#bfb0ce}.card-meta,.competition-card small{color:#b6a5c5}.progress{background:#ffffff10;height:6px}.card-arrow{color:#d5c1f2}.dark-section{background:linear-gradient(120deg,#25133b,#171025);border-block:1px solid #af74f329}.match-list{border-color:var(--line)}.match-row{padding:24px 0}.match-label{color:#b9a6cf}.match-time span{color:#b9a6cf}.feed-card{background:#1b1229;border-color:#6a498844;min-height:220px}.feed-image{min-height:220px}.feed-body p{color:#bbadcb}.feed-body{padding:28px}.feed-body h3{font-size:20px}.story-stamp{position:absolute;z-index:1;bottom:15px;right:12px;color:#21132d;background:#c6f77b;font-size:9px;font-weight:900;padding:5px 10px;transform:rotate(-7deg)}.cta-banner{border:1px solid #8c5fc7;background:radial-gradient(ellipse at 25% 100%,#6834a7,transparent 65%),#26163b;position:relative}.cta-banner:after{content:'✦';font-size:160px;color:#ffffff0b;position:absolute;left:26%;top:-30px;pointer-events:none}.footer{background:#0b0713;border-top:1px solid #ffffff14;color:#ab9bbd;gap:24px}.sponsor strong{color:#dbc7f4}.sponsor span{color:#c6f77b}.filter-tabs a,.prediction-tabs button{color:#bdaeCC;background:#211631;border-color:#ffffff1a}.filter-tabs a.active,.prediction-tabs button.active{background:#b6ee67;color:#1a2710;border-color:#b6ee67}.page-head h1{font-size:58px}.page-head p{color:#b6a6c8}.dash-card,.admin-card,.side-card,.stat-card,.prediction-card,.rank-card{background:#1b1328;border-color:#ffffff18;color:#f0e5ff}.dash-card h2,.admin-card h2{color:#f5eaff}.btn-dark{background:#9364df;color:#fff}.prediction-form button{background:#2c1d40;color:#e6d2ff;border-color:#8550bf66}.prediction-form button:hover{background:#ffcf4a;color:#20132d}.prediction-card h3{font-size:24px}.prediction-card small{color:#b6a4c6}input,select,textarea{background:#120c1e;color:#efe4ff;border-color:#63457b;border-radius:8px}input:focus,textarea:focus,select:focus{outline:2px solid #bf94ff;outline-offset:2px}label{color:#cabcda}input::placeholder{color:#907da3}.side-card>strong,.points-card strong{color:#ffcf4a}.rank-card strong{color:#c6f77b}.event-arena{position:relative;overflow:hidden;margin-top:30px;padding:64px 62px;min-height:470px;border:1px solid #9956cd50;background:linear-gradient(100deg,#361656,#25113e 55%,#1b102c);grid-template-columns:1.2fr 1fr;gap:20px}.event-arena:before{content:'';position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(#a16dc522 1px,transparent 1px);background-size:18px 18px}.event-copy{z-index:1}.event-copy h1{font-size:58px;font-weight:900;line-height:1.4;text-shadow:0 4px #0003}.arena-label{font-size:10px;color:#d0b4ee;letter-spacing:3px;font-family:Arial,sans-serif}.event-copy .detail-pills{margin:18px 0 4px}.event-copy .back-link{color:#b6a1cb;margin-bottom:26px}.event-sponsor{font-size:12px;color:#b5a0c8;margin-top:35px;display:flex;gap:10px;align-items:center}.event-sponsor b{color:#fff}.event-sponsor span{color:#ffcf4a}.event-art{position:relative;display:grid;place-items:center;min-height:310px}.event-medallion{width:220px;height:220px;border-radius:50%;background:radial-gradient(circle at 40% 30%,#ffe296,#ffcc45 40%,#dc8d18);border:9px double #ffe9a4;box-shadow:0 12px 0 #925417,0 20px 0 #422446,0 30px 80px #cf6b3540;transform:rotate(-13deg);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#46244d;z-index:2;animation:float-medal 7s ease-in-out infinite}.event-medallion>span{font-size:95px;line-height:1.2;text-shadow:3px 3px #ffeaaa}.event-medallion small{font-family:Arial,sans-serif;font-weight:900;letter-spacing:4px;font-size:10px}.orbit{position:absolute;width:330px;height:330px;border-radius:50%;border:1px solid #b98af137;transform:rotate(-20deg)}.orbit-two{width:390px;height:210px;border:1px dashed #c29ee959;transform:rotate(40deg)}.floating-star{position:absolute;color:#c3f887;font-size:62px;z-index:3}.star-one{top:0;right:15px;transform:rotate(20deg)}.star-two{bottom:26px;left:12px;color:#c39cff;font-size:80px}.arena-ticket{position:absolute;bottom:4px;right:30px;background:#b18aed;color:#251138;padding:12px 24px;transform:rotate(9deg);border:2px dashed #e9d8ff;z-index:3;box-shadow:0 7px 0 #38184f}.arena-ticket b{font-size:25px;display:block}.arena-ticket span{font-size:8px;font-family:Arial,sans-serif;letter-spacing:1px}.event-art-number{position:absolute;top:0;left:15px;color:#ffffff0a;font-size:170px;font-weight:900;line-height:1}.event-facts{display:grid;grid-template-columns:repeat(4,1fr);background:#21152f;border:1px solid #ffffff16;border-radius:0 0 18px 18px;padding:26px 30px;width:min(1100px,calc(100% - 70px))}.event-facts>div{padding:0 18px;border-left:1px solid #ffffff15}.event-facts>div:last-child{border:0}.event-facts span{display:block;color:#b4a3c8;font-size:11px;margin-bottom:7px}.event-facts b{font-size:14px}.event-facts small{color:#ab91bd}.two-col{grid-template-columns:1fr 300px;gap:28px}.versus-list{display:grid;gap:16px}.versus-card{background:#1c1429;border:1px solid #ffffff15;border-radius:16px;overflow:hidden}.versus-card header,.versus-card footer{display:flex;justify-content:space-between;padding:14px 22px;color:#b4a1c9;font-size:11px}.versus-card header{background:#241831;border-bottom:1px solid #ffffff09}.versus-card footer{border-top:1px solid #ffffff0d}.versus-card footer a{color:#c9f790;font-weight:700}.versus-players{display:flex;justify-content:space-evenly;align-items:center;padding:30px 15px}.versus-players>div{display:flex;flex-direction:column;align-items:center;gap:12px;flex:1}.versus-players b{font-size:14px}.versus-players>strong{font:italic 900 32px Arial;color:#9774bd}.contender-avatar{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;background:#3b2656;border:1px solid #9a65de;box-shadow:0 5px 0 #29173e;color:#cfabff;font-size:25px;font-weight:900;transform:rotate(-5deg)}.contender-avatar.away{background:#294136;border-color:#83b35c;color:#bcf28c;transform:rotate(5deg)}.registration-ticket{background:radial-gradient(ellipse at 50% 0,#462166,#241432 70%);border:1px solid #bf8bed55;padding:28px;position:sticky;top:24px}.registration-ticket h3{font-size:26px;margin:5px 0 20px}.registration-ticket>strong{font-size:70px;color:#ffcf4a;font-weight:900}.registration-ticket .btn{width:100%}.registration-closed{color:#e6cdff;background:#ffffff09;border:1px dashed #a17ebd70;padding:13px;margin:20px 0;font-size:12px;text-align:center;border-radius:8px}.ticket-perks{border-top:1px dashed #805a9c;margin-top:25px;padding-top:18px;display:grid;gap:10px;color:#bea7d2;font-size:11px}.standings-section{padding-top:12px}.standings-wrap{overflow:auto;border:1px solid #ffffff19;border-radius:16px;background:#1b1327}.standings-wrap table{width:100%;border-collapse:collapse;text-align:right;font-size:13px}.standings-wrap th{font-size:11px;color:#c7b5d9;background:#281a38;padding:19px 24px}.standings-wrap td{padding:20px 24px;border-top:1px solid #ffffff0c}.standings-wrap td b{color:#c6f77b}.rank-badge{border:1px solid #72508f;border-radius:7px;display:inline-grid;place-items:center;min-width:28px;height:28px;color:#e2cafa}.arcade-heading{padding-top:66px}.arcade-heading h1{font-size:62px;line-height:1.4;font-weight:900}.arcade-heading p{font-size:16px;line-height:2}.arcade-heading .detail-pills{color:#c9b7da}.arcade-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.arcade-card{--neon:#b493ff;background:radial-gradient(ellipse at 50% 30%,#59318d77,transparent 70%),#211430;border:1px solid #9263b64d;border-radius:20px;overflow:hidden;position:relative;transition:transform .25s,border-color .25s}.arcade-card:hover{transform:translateY(-7px);border-color:var(--neon)}.arcade-card.cyan{--neon:#75efce;background:radial-gradient(ellipse at 50% 30%,#247a7755,transparent 70%),#12272b;border-color:#488b7c55}.arcade-card.amber{--neon:#ffcf4a;background:radial-gradient(ellipse at 50% 30%,#775b2555,transparent 70%),#2b211c;border-color:#b7944955}.arcade-meta{display:flex;justify-content:space-between;padding:20px 24px;font-size:10px;color:var(--neon)}.arcade-meta>span:first-child{font:900 22px Arial;opacity:.6}.game-art{display:grid;width:210px;height:170px;margin:20px auto 30px;transform:perspective(600px) rotateX(20deg) rotateZ(-12deg);gap:6px;grid-template-columns:repeat(7,1fr);padding:14px;background:#ffffff09;border:1px solid #ffffff29;border-radius:12px;box-shadow:7px 10px 0 #0003,0 20px 40px #0003}.game-art i{display:grid;place-items:center;font-style:normal;background:#100a1e88;border-radius:50%;box-shadow:inset 0 2px 4px #0004}.game-art .piece-a{background:#ffcf4a;box-shadow:inset -2px -3px 0 #b88230}.game-art .piece-b{background:var(--neon);box-shadow:inset -2px -3px 0 #534a72}.game-art.tic-tac-toe{grid-template-columns:repeat(3,1fr);width:180px;height:180px;background:transparent;border:0;box-shadow:none;padding:0;gap:8px}.tic-tac-toe i{border-radius:10px;background:#aa83e522;border:1px solid #ad88db55;color:#e7c9ff;font:700 34px Arial;box-shadow:0 5px 0 #301942}.tic-tac-toe i.piece-a{color:#ffcf4a;background:#674476}.gomoku{background:#a2835422;border-color:#b79c6766;gap:5px}.gomoku i{background:#ad956233;border-radius:2px}.gomoku .piece-a,.gomoku .piece-b{border-radius:50%}.arcade-copy{padding:22px 26px 26px;border-top:1px solid #ffffff0c}.arcade-copy small{float:left;font:700 11px Arial;color:var(--neon);border:1px solid #ffffff26;padding:6px 9px;border-radius:5px}.arcade-copy h3{font-size:27px;margin:0 0 7px}.arcade-copy p{color:#c0afca;font-size:12px;margin-bottom:22px}.arcade-play{background:var(--neon);color:#21122e;width:100%;justify-content:space-between;font-weight:900}.room-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.room-card{display:flex;align-items:center;gap:18px;background:#20142f;border:1px solid #ffffff18;padding:22px;border-radius:13px}.room-symbol{color:#c6f77b;font-size:28px}.room-card div{flex:1}.room-card small{display:block;color:#ad97c2;font-size:10px;margin-top:5px}.empty-arena{grid-column:1/-1;text-align:center;padding:40px 20px;border:1px dashed #8b66aa66;border-radius:16px;background:#2a173d44}.empty-arena>span{font-size:40px;color:#b996e8}.empty-arena h3{font-size:20px;color:#e4d2fa}.empty-arena p{font-size:12px;color:#b8a3c9}.live-dot{color:#c6f77b}.side-card a{display:inline-block;margin-top:14px}main>.section>h1{font-size:38px}.toast{background:#b7f55a;color:#18230d;font-weight:700}form .btn{cursor:pointer}a:focus-visible,button:focus-visible{outline:3px solid #c6f77b;outline-offset:5px}.main-nav.open{background:#28193c}.top-actions form button{background:#362446;color:#e8d7ff}@keyframes float-medal{0%,100%{transform:translateY(0) rotate(-13deg)}50%{transform:translateY(-10px) rotate(-9deg)}}@keyframes marquee{to{transform:translateX(15%)}}
@media(max-width:1000px){.main-nav{gap:12px;font-size:11px}.hero h1{font-size:62px}.hero-copy{width:76%;padding:65px 40px}.event-copy h1{font-size:44px}.event-arena{padding:40px 35px}.event-medallion{width:170px;height:170px}.orbit{width:250px;height:250px}.orbit-two{width:290px;height:160px}.game-art{width:175px}.arcade-copy{padding:20px}.arcade-copy h3{font-size:23px}.top-actions{flex-wrap:wrap}.event-facts{padding:22px 12px}}
@media(max-width:760px){.topbar{height:80px}.main-nav{display:none}.menu-button{display:block}.hero-copy{width:100%;padding:50px 28px}.hero h1{font-size:53px}.hero{min-height:620px}.hero-art{background:linear-gradient(270deg,#211034ed,#21103488),url('/assets/hero.png?v=2') center/cover}.hero-stat{right:auto;left:20px;bottom:20px;transform:rotate(-4deg);padding:8px 18px}.hero-stat strong{font-size:30px}.hero-proof{max-width:65%}.arcade-grid{grid-template-columns:1fr}.arcade-card{display:grid;grid-template-columns:40% 60%}.arcade-meta{position:absolute;top:0;width:100%;font-size:8px;padding:12px}.arcade-copy{padding:50px 18px 20px;border:0}.arcade-copy small{float:none;display:inline-block;margin-bottom:10px}.game-art,.game-art.tic-tac-toe{align-self:center;width:125px;height:125px;margin:40px auto}.game-art{gap:3px;padding:6px}.tic-tac-toe i{font-size:25px}.section-head h2{font-size:24px}.section-head{gap:15px}.event-arena{grid-template-columns:1fr;min-height:auto;padding:30px 26px;gap:0}.event-copy h1{font-size:40px}.event-art{min-height:280px;margin-top:25px}.event-medallion{width:185px;height:185px}.event-art-number{left:14%}.arena-ticket{right:15%;bottom:0}.star-one{right:14%}.star-two{left:10%}.event-facts{grid-template-columns:repeat(2,1fr);width:calc(100% - 50px);gap:24px;padding:24px 10px}.event-facts b{font-size:12px}.event-facts>div:nth-child(2){border:0}.two-col{grid-template-columns:1fr}.registration-ticket{position:static}.section{padding:44px 0}.room-grid{grid-template-columns:1fr}.arcade-heading h1{font-size:42px}.arcade-heading p{font-size:14px}.announcement{font-size:9px;gap:12px}.standings-wrap th,.standings-wrap td{padding:14px 12px}.feed-card{min-height:190px}.feed-image{min-height:190px}.feed-body{padding:20px}.feed-body h3{font-size:17px}.hero-actions{gap:12px}.hero-actions .btn{padding:12px 16px;font-size:12px}.main-nav.open{display:flex;left:15px;right:15px;top:115px;border:1px solid #8762a9;border-radius:12px;justify-content:space-around}.top-actions{font-size:10px;gap:7px}.top-actions .btn{padding:8px 12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.game-room{background:linear-gradient(135deg,#211232,#130a20);border:1px solid #9c66d855;border-radius:20px;margin-top:28px;padding:38px}.game-board{display:grid;max-width:650px;gap:6px;margin:24px auto;direction:ltr}.game-board button{aspect-ratio:1;background:#eadff2;color:#391651;border:0;border-radius:8px;font-size:clamp(12px,3vw,26px);box-shadow:inset 0 -4px 0 #bba5ca;cursor:pointer}.game-board button:disabled{cursor:not-allowed;opacity:.72}.game-board button:not(:disabled):hover{background:#c6f77b;transform:translateY(-2px)}.game-columns{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;max-width:650px;margin:24px auto 0}.game-columns button{background:#b493ff;color:#1c0e31}.game-columns button:disabled{opacity:.35;cursor:not-allowed}.game-room h1{font-size:42px}.game-status{color:#c6f77b;font-weight:700}.game-room .btn{margin-top:12px}.game-board.tic-tac-toe button{border-radius:14px}.game-board.gomoku button{border-radius:3px;background:#b9a575}.game-board.gomoku button:disabled{opacity:.9}
.game-board button[data-piece="1"]{color:#6a2bb5;background:#f5c94d;opacity:1}.game-board button[data-piece="2"]{color:#fff;background:#7345ad;opacity:1}.game-board{overflow:auto}.game-status{min-height:2em}
.waiting-options{padding:22px;background:#39234c;border:1px dashed #aa85ca;border-radius:16px;margin:22px 0}.waiting-options input{font-size:12px}.game-art.backgammon{background:repeating-linear-gradient(90deg,#ae6e39 0 12px,#e5c48c 12px 24px);border:8px solid #684125;transform:rotate(-8deg)}.arcade-grid{grid-template-columns:repeat(4,1fr)}@media(max-width:1100px){.arcade-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.arcade-grid{grid-template-columns:1fr}}

/* Backgammon: a folding wooden board with four six-point quadrants. */
.backgammon-room {
    max-width: 1180px;
    padding: clamp(12px, 3vw, 36px);
}
.backgammon-room > h1 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 36px); }
.backgammon-room > p { margin: 6px 0; font-size: 13px; }
.backgammon-room > .game-status { margin: 12px 0; }
.bg-game-shell { max-width: 940px; margin: 0 auto; min-width: 0; }
.bg-scorebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #ffffff20;
    border-radius: 12px;
    background: #1b1427;
}
.bg-player { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bg-player:last-child { flex-direction: row-reverse; text-align: left; }
.bg-player strong, .bg-player small { display: block; }
.bg-player strong { font-size: 14px; color: #f0e5f4; }
.bg-player small { font-size: 10px; color: #b6a8c6; }
.bg-player[data-turn-active="yes"] strong { color: #c6f77b; }
.bg-mini-checker { width: 30px; aspect-ratio: 1; flex: 0 0 30px; border-radius: 50%; }
.bg-turn-copy { text-align: center; min-width: 0; }
.bg-turn-copy strong { display: block; color: #f1cf94; font-size: 12px; }
.bg-turn-copy small { display: block; color: #b6a8c6; font-size: 10px; margin-top: 3px; }
.bg-board {
    --walnut: #593923;
    --rim: #936339;
    --maple: #d7b783;
    position: relative;
    box-sizing: border-box;
    container-type: inline-size;
    width: 100%;
    max-width: 940px;
    min-width: 0;
    margin: 0 auto;
    padding: clamp(7px, 1.45vw, 15px);
    border: 2px solid #442919;
    border-radius: 7px;
    background: repeating-linear-gradient(3deg, #ffffff00 0 3px, #2d160b12 4px 5px, #ffffff00 6px 12px), linear-gradient(90deg, #754728, #9e6d42 40%, #80502e 70%, #674029);
    box-shadow: 0 4px 0 #392217, 0 10px 24px #08040c65, inset 0 0 0 2px #c2945f80;
}
.bg-board-inner {
    --point-label: clamp(8px, 1.85cqi, 17px);
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 1.04fr) minmax(0, 6fr) minmax(0, 1.05fr);
    grid-template-rows: minmax(0, 1fr) 16% minmax(0, 1fr);
    grid-template-areas: "tl bar tr tray" "ml bar mr tray" "bl bar br tray";
    aspect-ratio: 1.34;
    min-width: 0;
    overflow: hidden;
    direction: ltr;
    border: 1px solid #3e2719;
    background: repeating-linear-gradient(2deg, transparent 0 5px, #8151290a 6px 7px, transparent 8px 14px), linear-gradient(105deg, #dcbf91, #d3ae7a 65%, #e0c498);
    box-shadow: inset 0 0 12px #50331c40;
}
.bg-quadrant { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); min-width: 0; min-height: 0; }
.bg-top-left { grid-area: tl; }
.bg-top-right { grid-area: tr; }
.bg-bottom-left { grid-area: bl; }
.bg-bottom-right { grid-area: br; }
.bg-point, .bg-bar-slot, .bg-tray-slot {
    position: relative;
    display: block;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #422817;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.bg-point:disabled, .bg-bar-slot:disabled, .bg-tray-slot:disabled { opacity: 1; cursor: default; }
.bg-point::before {
    content: "";
    position: absolute;
    top: var(--point-label);
    bottom: 0;
    inset-inline: 0;
    background: linear-gradient(95deg, #75382b, #9b513b 65%, #793d2b);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    pointer-events: none;
}
.bg-point:nth-child(even)::before { background: linear-gradient(95deg, #3e3029, #594337 65%, #40302a); }
.bg-bottom-left .bg-point::before, .bg-bottom-right .bg-point::before {
    top: 0;
    bottom: var(--point-label);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    background: linear-gradient(95deg, #3e3029, #594337 65%, #40302a);
}
.bg-bottom-left .bg-point:nth-child(even)::before, .bg-bottom-right .bg-point:nth-child(even)::before { background: linear-gradient(95deg, #75382b, #9b513b 65%, #793d2b); }
.bg-point b {
    position: absolute;
    inset: 0 0 auto;
    height: var(--point-label);
    display: grid;
    place-items: center;
    color: #51341e;
    font: 600 clamp(7px, 1.25cqi, 11px)/1 Arial, sans-serif;
    background: #c6a575a0;
    pointer-events: none;
}
.bg-bottom-left .bg-point b, .bg-bottom-right .bg-point b { inset: auto 0 0; }
.bg-checkers {
    position: absolute;
    z-index: 1;
    top: var(--point-label);
    inset-inline: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-block-start: 2%;
    pointer-events: none;
}
.bg-bottom-left .bg-checkers, .bg-bottom-right .bg-checkers, .bg-bottom-slot .bg-checkers {
    top: auto;
    bottom: var(--point-label);
    flex-direction: column-reverse;
    padding-block: 0 2%;
}
.bg-checkers i, .bg-mini-checker {
    position: relative;
    display: block;
    box-sizing: border-box;
    border-radius: 50%;
    box-shadow: 0 1px 2px #1f120d80, inset 0 0 0 1px #00000022;
}
.bg-checkers i { width: 89%; aspect-ratio: 1; flex: 0 0 auto; }
.bg-checkers i + i { margin-block-start: -10%; }
.bg-bottom-left .bg-checkers i + i, .bg-bottom-right .bg-checkers i + i, .bg-bottom-slot .bg-checkers i + i { margin-block-start: 0; margin-block-end: -10%; }
.bg-white { border: 1px solid #a68d65; background: radial-gradient(circle, #f8efd9 0 59%, #ddc9a2 60% 66%, #f6e8cd 67% 84%, #ba9d75 85%); }
.bg-black { border: 1px solid #1e1916; background: radial-gradient(circle, #3d3530 0 59%, #211d1a 60% 66%, #50453c 67% 84%, #211b17 85%); }
.bg-checkers small {
    position: relative;
    z-index: 2;
    margin: -20% 0 0;
    padding: 1px 3px;
    border-radius: 3px;
    background: #251b15;
    color: #fff4dc;
    font: 700 clamp(7px, 1.4cqi, 12px)/1.2 Arial, sans-serif;
}
.bg-bottom-left .bg-checkers small, .bg-bottom-right .bg-checkers small, .bg-bottom-slot .bg-checkers small { margin: 0 0 -20%; }
.bg-center-bar {
    grid-area: bar;
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 16% minmax(0, 1fr);
    min-width: 0;
    background: repeating-linear-gradient(89deg, transparent 0 3px, #1d100b12 4px 6px, transparent 7px 10px), linear-gradient(90deg, #54341f, #a27243 13%, #83542f 48%, #9a6b40 87%, #4b2e1d);
    box-shadow: inset 2px 0 #362216, inset -2px 0 #392517;
}
.bg-bar-slot, .bg-tray-slot { color: #f1d7ad; overflow: hidden; }
.bg-bar-slot b, .bg-tray-slot b {
    position: absolute;
    bottom: 4%;
    inset-inline: 0;
    z-index: 2;
    font: 700 clamp(8px, 1.5cqi, 13px)/1 Arial, sans-serif;
    text-align: center;
}
.bg-bottom-slot b { bottom: auto; top: 4%; }
.bg-bar-slot .bg-checkers { top: 5%; }
.bg-bar-slot.bg-bottom-slot .bg-checkers { top: auto; bottom: 5%; }
.bg-bar-slot .bg-checkers i { width: 84%; }
.bg-hinge { align-self: center; justify-self: center; width: 48%; height: 24%; border: 1px solid #604521; border-radius: 2px; background: linear-gradient(90deg, #8b6a39, #c8a772, #8a6939); }
.bg-tray {
    grid-area: tray;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 3%;
    padding: 10% 7%;
    border-left: 2px solid #50321e;
    background: linear-gradient(90deg, #73492c, #9d6d42);
    min-width: 0;
}
.bg-tray-slot { border: 1px solid #493021; border-radius: 3px; background: #36261e; box-shadow: inset 0 2px 4px #180f0b80; }
.bg-tray-slot .bg-checkers { top: 4%; bottom: auto; gap: 1px; }
.bg-tray-slot.bg-bottom-slot .bg-checkers { top: auto; bottom: 4%; }
.bg-tray-slot .bg-checkers i { width: 88%; aspect-ratio: 6; border-radius: 35% 35% 25% 25%; margin: 0; }
.bg-dice {
    grid-area: mr;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1.2cqi, 12px);
    direction: ltr;
    pointer-events: none;
}
.bg-board-inner[data-turn="2"] .bg-dice { grid-area: ml; }
.bg-die {
    display: grid;
    grid-template: repeat(3, 1fr) / repeat(3, 1fr);
    box-sizing: border-box;
    width: clamp(18px, 5cqi, 44px);
    aspect-ratio: 1;
    padding: 9%;
    padding: clamp(2px, .7cqi, 6px);
    border: 1px solid #9a825d;
    border-radius: 13%;
    background: linear-gradient(145deg, #fffdf5, #e6d7b8);
    box-shadow: 0 2px 3px #41291b70, inset 0 -2px #ac967536;
}
.bg-die[data-value=""], .bg-die:not([data-value]) { visibility: hidden; }
.bg-die i { width: 66%; aspect-ratio: 1; align-self: center; justify-self: center; border-radius: 50%; background: #392c25; }
.bg-point[data-active="yes"] .bg-checkers i:last-of-type, .bg-bar-slot[data-active="yes"] .bg-checkers i:last-of-type { outline: 2px solid #a7e260; outline-offset: -1px; }
.bg-point[data-selected="yes"], .bg-bar-slot[data-selected="yes"] { box-shadow: inset 0 0 0 2px #d1f58a; z-index: 3; }
.bg-point[data-target="yes"]::after, .bg-tray-slot[data-target="yes"]::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: 46%;
    left: 50%;
    width: 32%;
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #c6f77b;
    border: 1px solid #365316;
    box-shadow: 0 0 0 2px #1e2c1970;
    pointer-events: none;
}
.bg-point:focus-visible, .bg-bar-slot:focus-visible, .bg-tray-slot:focus-visible { outline: 2px solid #f8eab9; outline-offset: -2px; z-index: 3; }
.bg-move-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-top: 18px; }
.bg-move-heading h3 { margin: 0; font-size: 16px; }
.bg-move-heading span { font-size: 12px; color: #c9b8d7; }
.bg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.bg-actions .btn { margin: 0; font-size: 12px; padding: 8px 12px; }
.bg-actions .btn.btn-gold { background: #f1cf94; color: #39271e; }
.bg-actions p { color: #b6a8c6; font-size: 12px; }
.bg-rules { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; border-top: 1px solid #ffffff18; padding-top: 12px; }
.bg-rules p { margin: 0; color: #c9b8d7; font-size: 12px; }
.bg-rules a { font-size: 12px; color: #c6f77b; }
@media (max-width: 600px) {
    .backgammon-room { width: calc(100% - 16px); padding: 10px; }
    .bg-scorebar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
    .bg-turn-copy { grid-column: 1 / -1; grid-row: 2; }
    .bg-player:last-child { grid-column: 2; grid-row: 1; }
    .bg-mini-checker { width: 22px; flex-basis: 22px; }
    .bg-board { padding: 5px; border-width: 1px; }
    .bg-move-heading span, .bg-actions .btn { font-size: 11px; }
}

@media (max-width: 360px) {
    .bg-quadrant .bg-checkers i { width: 86%; }
}

/* Interactive backgammon dice and direct checker movement. */
.bg-dice {
    flex-direction: column;
    gap: 3px;
    justify-self: center;
    align-self: center;
    min-width: 0;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #4a2d1e;
    pointer-events: auto;
    touch-action: manipulation;
}
.bg-dice:disabled { cursor: default; }
.bg-dice[data-ready="yes"] { cursor: pointer; border-color: #785129; background: #f3dfb999; box-shadow: 0 2px 4px #5b361f40; }
.bg-dice[data-ready="yes"]:hover { background: #fff0cf; }
.bg-dice-faces { display: flex; gap: clamp(4px, 1.2cqi, 12px); align-items: center; }
.bg-roll-label { font: 700 clamp(8px, 1.35cqi, 12px)/1.15 Vazirmatn, sans-serif; white-space: nowrap; direction: rtl; }
.bg-die[data-value=""], .bg-die:not([data-value]) { visibility: visible; opacity: .8; }
.bg-die[data-value=""]::after, .bg-die:not([data-value])::after { content: "?"; grid-area: 1 / 1 / 4 / 4; place-self: center; font: bold clamp(10px, 2.8cqi, 24px)/1 Arial, sans-serif; color: #765a35; }
.bg-die[data-used="yes"]:not([data-value=""]) { opacity: .5; }
.bg-dice[data-rolling="yes"] .bg-die { opacity: 1; animation: bg-throw .43s ease-in-out infinite; }
.bg-dice[data-rolling="yes"] .bg-die:nth-child(2) { animation-direction: reverse; animation-delay: -.13s; }
@keyframes bg-throw { 0%,100% { transform: translate(0,0) rotate(0deg); } 25% { transform: translate(-5px,-9px) rotate(35deg); } 60% { transform: translate(6px,3px) rotate(-35deg); } }
.bg-point[data-active="yes"], .bg-bar-slot[data-active="yes"] { cursor: grab; touch-action: none; user-select: none; }
.bg-point[data-dragging="yes"] .bg-checkers i:last-of-type, .bg-bar-slot[data-dragging="yes"] .bg-checkers i:last-of-type { visibility: hidden; }
.bg-point[data-selected="yes"] .bg-checkers i:last-of-type, .bg-bar-slot[data-selected="yes"] .bg-checkers i:last-of-type { outline: 3px solid #e6ed8e; }
.bg-point[data-target="yes"]::after, .bg-tray-slot[data-target="yes"]::after {
    content: attr(data-target-dice);
    display: grid;
    place-items: center;
    width: 58%;
    min-width: 13px;
    max-width: 36px;
    font: 800 clamp(8px, 1.8cqi, 15px)/1 Vazirmatn, sans-serif;
    color: #20310d;
    background: #d7ed9f;
    border: 1px solid #466021;
    box-shadow: 0 0 0 2px #20310d55;
}
.bg-point[data-target="yes"], .bg-tray-slot[data-target="yes"] { box-shadow: inset 0 0 0 2px #b5d46b; cursor: pointer; }
.bg-point[data-drop-hover="yes"], .bg-tray-slot[data-drop-hover="yes"] { background: #d9ef9c88; box-shadow: inset 0 0 0 3px #8dbd43; }
.bg-drag-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%); border-radius: 50%; box-sizing: border-box; box-shadow: 0 8px 14px #20150e80; }
.bg-actions [hidden] { display: none !important; }
@media (max-width: 600px) {
    .bg-dice { padding: 2px 4px; gap: 1px; }
    .bg-roll-label { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { .bg-dice[data-rolling="yes"] .bg-die { animation: none; } }

/* Replay committed computer moves and celebrate a finished match. */
.bg-stage { position: relative; }
.bg-board[data-replaying="yes"] { cursor: wait; }
.bg-flight { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%); border-radius: 50%; box-sizing: border-box; box-shadow: 0 6px 12px #160e0a80; }
.bg-point[data-bot-arrival="yes"], .bg-tray-slot[data-bot-arrival="yes"] { box-shadow: inset 0 0 0 2px #fff0b7; background-color: #e5b97540; }
.bg-result-overlay[hidden], .bg-result-reopen[hidden] { display: none !important; }
.bg-result-overlay {
    position: absolute; inset: 0; z-index: 8; display: grid; place-items: center;
    padding: clamp(8px, 2vw, 20px); overflow: hidden; border-radius: 7px;
    background: #130b1cc2; backdrop-filter: blur(2px); isolation: isolate;
    animation: bg-result-reveal .28s ease-out both;
}
.bg-result-card {
    position: relative; z-index: 1; width: min(100%, 440px); max-height: 100%; overflow: auto;
    box-sizing: border-box; padding: clamp(12px, 3.2vw, 32px); text-align: center;
    border: 1px solid #b2946a; border-radius: 16px;
    background: linear-gradient(155deg, #332544, #191225 76%);
    box-shadow: 0 12px 40px #100a18a0, inset 0 1px #fff0b51a; color: #fff2df;
    animation: bg-result-pop .5s cubic-bezier(.16,1,.3,1) both;
}
.bg-result-medal {
    width: clamp(40px, 8vw, 80px); aspect-ratio: 1; margin: 0 auto 10px;
    display: grid; place-items: center; border-radius: 50%; color: #ffe4a0;
    background: radial-gradient(circle at 35% 20%, #7e633b, #4a3022);
    box-shadow: 0 0 0 5px #d9b46920, 0 6px 24px #d8b15c38; border: 1px solid #d5b170;
}
.bg-result-medal svg { width: 68%; height: 68%; }
.bg-result-kicker { color: #e4cba3; font-size: 11px; }
.bg-result-card h2 { margin: 6px 0; font-size: clamp(17px, 3vw, 30px); color: #ffe4a0; line-height: 1.4; }
.bg-result-card p { margin: 0 0 16px; font-size: 12px; color: #ded0e5; }
.bg-result-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; background: #ffffff0a; border-radius: 9px; padding: 10px 4px; }
.bg-result-stats > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bg-result-stats small { color: #bfafcb; font-size: 10px; }
.bg-result-stats strong { color: #fff0d6; font-size: clamp(10px, 1.8vw, 15px); }
.bg-result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 15px; }
.bg-result-actions .btn { margin: 0; padding: 9px 16px; font-size: 12px; }
.bg-result-actions .btn-gold { background: #f3d195; color: #38251b; }
.bg-result-overlay[data-outcome="win"] .bg-result-medal { animation: bg-medal-in .8s cubic-bezier(.16,1,.3,1) both; }
.bg-result-overlay[data-outcome="loss"] .bg-result-medal { color: #ccc2dc; border-color: #887b9a; background: #393044; box-shadow: none; }
.bg-result-overlay[data-outcome="loss"] h2 { color: #eee3f9; }
.bg-confetti { position: absolute; inset: 0; z-index: 0; pointer-events: none; display: none; overflow: hidden; }
.bg-result-overlay[data-outcome="win"] .bg-confetti { display: block; }
.bg-confetti i {
    position: absolute; top: -20px; left: var(--confetti-x); width: 8px; height: 12px; border-radius: 2px;
    background: #f6d58b; opacity: 0; animation: bg-confetti-fall 2.5s var(--confetti-delay) cubic-bezier(.18,.58,.7,1) both;
}
.bg-confetti i:nth-child(3n) { background: #b7ed87; width: 6px; height: 9px; }
.bg-confetti i:nth-child(3n+1) { background: #b6a1e5; }
.bg-confetti i:nth-child(4n) { background: #f7efe0; border-radius: 50%; width: 7px; height: 7px; }
@keyframes bg-result-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes bg-result-pop { from { transform: translateY(14px) scale(.93); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes bg-medal-in { 0% { transform: scale(.5) rotate(-18deg); opacity: 0; } 65% { transform: scale(1.09) rotate(5deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes bg-confetti-fall { 0% { top: -20px; transform: translateX(0) rotate(0); opacity: 0; } 12% { opacity: 1; } 90% { opacity: .9; } 100% { top: 105%; transform: translateX(30px) rotate(var(--confetti-tilt)); opacity: 0; } }
@media (max-width: 500px) {
    .bg-result-card { border-radius: 10px; padding: 8px 10px; }
    .bg-result-medal { width: 32px; margin-bottom: 4px; }
    .bg-result-kicker { font-size: 9px; }
    .bg-result-card h2 { margin: 2px 0; }
    .bg-result-card p { font-size: 10px; margin-bottom: 6px; }
    .bg-result-stats { padding: 5px 3px; }
    .bg-result-stats small { font-size: 8px; }
    .bg-result-actions { margin-top: 6px; gap: 4px; }
    .bg-result-actions .btn { font-size: 10px; padding: 5px 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .bg-result-overlay, .bg-result-card, .bg-result-medal { animation: none !important; }
    .bg-confetti { display: none !important; }
}

/* Explicit color/count pairs avoid reversing the borne-off values in RTL. */
.bg-result-off-counts { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bg-result-off-counts span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: #fff0d6; font-size: 11px; }
.bg-result-off-counts i { display: inline-block; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; }
.bg-result-off-counts b { font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 500px) { .bg-result-off-counts span { font-size: 9px; gap: 3px; } .bg-result-off-counts b { font-size: 11px; } }

/* Persian backgammon guide: reuse the playing-board geometry for the setup illustration. */
.bg-rule-guide { max-width: 1040px; color: #f0e5f4; padding-block: clamp(24px, 5vw, 66px); }
.bg-guide-heading { padding: clamp(20px, 4vw, 40px); border: 1px solid #8e6eac66; border-radius: 16px; background: linear-gradient(135deg, #332145, #1b1427 80%); }
.bg-guide-back { display: block; color: #c9b8d7; font-size: 13px; margin-bottom: 20px; }
.bg-guide-kicker { color: #edcc91; font-size: 13px; font-weight: 700; }
.bg-guide-heading h1 { margin: 8px 0 12px; font-size: clamp(25px, 4.5vw, 42px); line-height: 1.4; }
.bg-guide-heading p, .bg-guide-section p, .bg-guide-list { font-size: 15px; line-height: 2; color: #ddd0e7; }
.bg-guide-heading p { max-width: 700px; margin: 0 0 20px; }
.bg-guide-facts, .bg-guide-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-guide-facts span { border: 1px solid #c8a57245; border-radius: 6px; background: #d3b17c13; padding: 5px 12px; font-size: 12px; color: #f1cf94; }
.bg-guide-nav { margin: 20px 0; gap: 6px; }
.bg-guide-nav a { padding: 7px 12px; border: 1px solid #a68dc34a; border-radius: 7px; color: #e6d9f0; font-size: 12px; background: #21182e; }
.bg-guide-nav a:hover { border-color: #e2bd82; color: #ffdfa9; }
.bg-guide-section { margin: 0 0 18px; padding: clamp(16px, 3vw, 30px); border: 1px solid #8e6eac40; border-radius: 14px; background: #1b1427; scroll-margin-top: 20px; }
.bg-guide-section h2 { display: flex; align-items: baseline; gap: 10px; font-size: clamp(19px, 2.7vw, 25px); margin: 0 0 12px; line-height: 1.6; }
.bg-guide-section h2 > span { color: #edcc91; font: 700 13px Vazirmatn, sans-serif; }
.bg-guide-section p { margin: 0 0 12px; }
.bg-guide-section h3 { font-size: 15px; color: #f5dfb7; margin: 0 0 7px; }
.bg-guide-setup { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 20px; }
.bg-guide-figure { margin: 0; min-width: 0; }
.bg-rule-board .bg-board-inner { grid-template-columns: minmax(0, 6fr) minmax(0, 1.04fr) minmax(0, 6fr); grid-template-areas: "tl bar tr" "ml bar mr" "bl bar br"; aspect-ratio: 1.3; }
.bg-guide-figure figcaption { margin-top: 10px; color: #c7b5d4; font-size: 11px; line-height: 1.8; }
.bg-guide-directions { display: grid; gap: 12px; }
.bg-guide-directions > div, .bg-guide-examples > div, .bg-guide-scores > div { background: #ffffff06; border: 1px solid #ffffff13; border-radius: 9px; padding: 14px; min-width: 0; }
.bg-guide-directions h3 { display: flex; align-items: center; gap: 8px; }
.bg-guide-directions .bg-mini-checker, .bg-guide-point-example .bg-mini-checker { width: 22px; flex-basis: 22px; }
.bg-guide-directions p, .bg-guide-examples p, .bg-guide-scores p { font-size: 13px; margin: 0; }
.bg-guide-directions small { display: block; color: #c7b5d4; font-size: 11px; margin-top: 6px; line-height: 1.9; }
.bg-guide-examples, .bg-guide-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.bg-guide-three, .bg-guide-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bg-guide-dice { display: block; font-size: 32px; color: #ffdfaa; line-height: 1.25; margin-bottom: 10px; }
.bg-guide-point-example { position: relative; display: flex; align-items: center; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 5px; width: 46px; height: 72px; background: #d7b783; border-radius: 3px; margin-bottom: 12px; }
.bg-guide-point-example::before { content: ""; position: absolute; inset: 3px; background: #92513a; clip-path: polygon(0 0,100% 0,50% 100%); }
.bg-guide-point-example i { z-index: 1; position: relative; }
.bg-guide-section .bg-guide-note { padding: 11px 14px; border-inline-start: 3px solid #cdb078; background: #cdb07810; color: #efdbb9; border-radius: 5px; margin: 14px 0 0; font-size: 13px; }
.bg-guide-list { padding-inline-start: 22px; margin: 0; }
.bg-guide-list li { margin: 0 0 8px; }
.bg-guide-scores strong { display: block; font-size: 32px; color: #f4d293; margin-bottom: 6px; }
.bg-guide-section > .btn { margin-top: 4px; }
.bg-guide-section .bg-guide-return-note { color: #c7b5d4; font-size: 12px; margin: 12px 0 0; }
@media (max-width: 760px) {
    .bg-guide-setup { grid-template-columns: 1fr; }
    .bg-guide-section p, .bg-guide-list { font-size: 14px; }
    .bg-guide-directions { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
    .bg-guide-directions, .bg-guide-examples, .bg-guide-scores { grid-template-columns: 1fr; }
    .bg-guide-section, .bg-guide-heading { padding: 14px; }
    .bg-guide-nav a { font-size: 11px; padding: 6px 9px; }
}

/* Keep creating a new match distinct from refreshing the existing room. */
.game-room-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.game-room-actions form { margin: 0; }
.game-room-actions .btn { margin: 0; gap: 8px; }
@media (max-width: 500px) { .game-room-actions .btn { padding: 9px 13px; font-size: 11px; } }

/* Grid game piece placement and turn replay. */
.game-board.connect-four { padding: clamp(5px, 1.4vw, 14px); gap: clamp(3px, .7vw, 8px); background: #4a3268; border: 1px solid #9473bf; border-radius: 12px; box-shadow: inset 0 2px 6px #ffffff18, 0 5px 0 #302044; }
.game-board.connect-four button { min-width: 0; border-radius: 50%; font-size: 0; background: #1c132d; box-shadow: inset 0 3px 6px #09061180; }
.game-board.connect-four button:disabled { opacity: 1; }
.game-board.connect-four button[data-piece="1"], .grid-move-drop[data-piece="1"] { background: radial-gradient(circle at 34% 24%, #ffe6a5, #e1aa46 65%, #b67a23); box-shadow: inset 0 0 0 2px #f9d27f80, inset 0 -3px 3px #935c2755; }
.game-board.connect-four button[data-piece="2"], .grid-move-drop[data-piece="2"] { background: radial-gradient(circle at 34% 24%, #c3a5ff, #8357c5 65%, #503289); box-shadow: inset 0 0 0 2px #d4b8ff65, inset 0 -3px 3px #37205780; }
.grid-move-flight { position: fixed; box-sizing: border-box; z-index: 9999; pointer-events: none; }
.grid-move-drop { border-radius: 50%; }
.grid-move-mark { display: grid; place-items: center; border-radius: 14px; font-size: clamp(12px,3vw,26px); font-weight: inherit; box-shadow: inset 0 -4px 0 #bba5ca; }
.grid-move-mark[data-piece="1"] { background: #f5c94d; color: #6a2bb5; }
.grid-move-mark[data-piece="2"] { background: #7345ad; color: #fff; }
.game-board.gomoku button, .grid-move-mark[data-game="gomoku"] { border-radius: 3px; font-size: clamp(8px,2vw,20px); }
.game-board.gomoku button { min-width: 0; padding: 0; }
@media (max-width: 600px) { .game-board.gomoku { gap: 2px; } }
.game-board[data-bot-playing="yes"] { cursor: wait; }
.game-board button[data-bot-landing="yes"] { outline: 2px solid #d5b9ff; outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .grid-move-flight { display: none; } }

.quick-games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-games-grid .arcade-card {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: minmax(0, 1fr);
}

.quick-games-grid .arcade-copy {
    display: flex;
    flex-direction: column;
}

.quick-games-grid .arcade-play {
    margin-top: auto;
}

.quick-game-mode {
    color: var(--neon);
    font-size: 11px;
    font-weight: 700;
}

.game-art.quick-game-art {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    width: min(60%, 184px);
    height: auto;
    aspect-ratio: 1;
    margin: 32px auto;
}

.quick-game-art i {
    border: 1px solid #ffffff25;
    border-radius: 6px;
    color: var(--neon);
    background: #100a1e80;
    font-size: clamp(13px, 2.5vw, 23px);
    font-weight: 900;
}

.quick-game-art-spy {
    align-items: center;
}

.quick-game-art-spy i {
    aspect-ratio: 3 / 4;
    border-radius: 22px 22px 8px 8px;
}

.quick-game-art-spy i:last-child,
.quick-game-art-memory i:nth-child(3n + 1),
.quick-game-art-tiles i:nth-child(8) {
    background: var(--neon);
    color: #20132d;
}

.quick-game-art-tiles i:empty {
    border-style: dashed;
    background: transparent;
}

@media (max-width: 760px) {
    .quick-games-grid {
        grid-template-columns: 1fr;
    }

    .quick-games-grid .arcade-card {
        grid-template: auto / minmax(0, 38%) minmax(0, 1fr);
    }

    .quick-games-grid .arcade-copy {
        padding: 18px 14px;
    }

    .game-art.quick-game-art {
        width: 77%;
        max-width: 145px;
        margin: 20px auto;
    }
}

.member-panel {
    padding-block: clamp(24px, 5vw, 64px);
}

.member-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr);
    gap: 24px;
    align-items: end;
    padding: clamp(22px, 4vw, 44px);
    border: 1px solid #aa7ce252;
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 92% 0%, #4e2c70 0%, transparent 58%),
        linear-gradient(110deg, #171021, #211431 75%);
}

.member-label {
    color: #d7bcf8;
    font-weight: 700;
    margin: 0;
}

.member-hero h1 {
    margin: 4px 0 20px;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.member-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.member-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.member-stats div {
    padding: 14px 10px;
    border: 1px solid #ffffff20;
    border-radius: 14px;
    background: #100a1e73;
    text-align: center;
}

.member-stats dt {
    font-size: 11px;
    color: #d6c6e7;
}

.member-stats dd {
    margin: 4px 0 0;
    color: var(--gold);
    font-size: clamp(21px, 3vw, 34px);
    font-weight: 900;
    line-height: 1.2;
}

.member-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin-top: 16px;
}

.member-card {
    min-width: 0;
    padding: clamp(16px, 3vw, 25px);
    border: 1px solid #ffffff18;
    border-radius: 18px;
    background: #1b1328;
}

.member-next {
    border-color: #b893f153;
    background: linear-gradient(125deg, #1b1328, #2c1a42);
}

.member-card h2 {
    margin: 0;
    font-size: 19px;
}

.member-card h3 {
    margin: 14px 0 0;
    font-size: 20px;
}

.member-card p,
.member-row small {
    color: var(--muted);
}

.member-card p {
    margin: 12px 0 0;
    font-size: 13px;
}

.member-next .text-link,
#member-registrations ~ .text-link {
    display: inline-block;
    margin-top: 12px;
}

.member-card .text-link {
    color: #d6b7ff;
    font-size: 12px;
}

.member-card-head,
.member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.member-row {
    padding: 12px 0;
    margin-top: 4px;
    border-bottom: 1px solid #ffffff13;
}

.member-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.member-row strong {
    font-size: 14px;
}

.member-row small {
    display: block;
    font-size: 11px;
}

.member-row .btn {
    flex-shrink: 0;
}

.member-schedule {
    grid-column: 1 / -1;
}

.member-prediction {
    flex-wrap: wrap;
}

.member-outcome {
    color: #e6d4ff;
    background: #8751bb35;
    border-radius: 30px;
    padding: 4px 10px;
    font-size: 11px;
}

.member-outcome[data-outcome="correct"] {
    color: #c8f49e;
    background: #54873736;
}

.member-prize {
    flex-basis: 100%;
    color: var(--gold);
}

.member-prize small {
    white-space: pre-line;
}

@media (max-width: 760px) {
    .member-hero,
    .member-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-actions .btn {
        padding-inline: 12px;
    }
}

.site-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.site-shell > main {
    flex-grow: 1;
    min-width: 0;
}

.member-rooms {
    grid-column: 1 / -1;
    border-color: #aa7ce236;
    background: linear-gradient(165deg, #21162f, #171020 62%);
}

.member-rooms h2 {
    font-size: clamp(20px, 3vw, 27px);
}

.member-room-tabs {
    display: flex;
    gap: 6px;
    width: fit-content;
    margin: 18px 0 16px;
    padding: 4px;
    border: 1px solid #ffffff1a;
    border-radius: 12px;
    background: #100a1a;
}

.member-room-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    color: #c4b2d8;
    font-size: 13px;
    font-weight: 700;
}

.member-room-tabs a[aria-current] {
    background: #432b60;
    color: #fff;
}

.member-room-tabs span {
    font-size: 11px;
    color: #dcc3ff;
}

.member-room-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.member-room-tile {
    --room-accent: #d7b6ff;
    --room-color: #432c63;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #ffffff1c;
    border-radius: 14px;
    background: #171021;
}

.member-room-tile[data-game="backgammon"] {
    --room-accent: #ffda7c;
    --room-color: #513928;
}

.member-room-tile[data-game="connect-four"] {
    --room-accent: #83edda;
    --room-color: #214441;
}

.member-room-tile[data-game="gomoku"] {
    --room-accent: #f7a8a2;
    --room-color: #58313d;
}

.member-room-art {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 1px solid #ffffff20;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--room-color), #ffffff09);
    color: var(--room-accent);
    direction: ltr;
    font-size: 19px;
    font-weight: 900;
}

.member-room-info small {
    color: #beafd0;
    font-size: 11px;
}

.member-room-info h3 {
    margin: 1px 0 4px;
    font-size: 15px;
}

.member-room-open {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: var(--room-accent);
    font-size: 12px;
    font-weight: 800;
}

.member-room-open:hover {
    text-decoration: underline;
}

.member-card .member-room-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 16px;
    border: 1px dashed #ffffff24;
    border-radius: 12px;
}

.member-room-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    color: #c4b2d8;
    font-size: 12px;
}

.member-room-pages a,
.member-room-more {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #aa7ce243;
    border-radius: 8px;
}

.member-room-more {
    margin-top: 14px;
}

@media (max-width: 900px) {
    .member-room-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .member-room-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.picks-page {
    max-width: 1080px;
    padding-block: clamp(32px, 6vw, 76px);
}

.picks-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding: clamp(20px, 4vw, 42px);
    border: 1px solid #aa7ce243;
    border-radius: 22px;
    background: radial-gradient(ellipse at top right, #4a2d68, transparent 70%), #21152f;
}

.picks-header h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.25;
}

.picks-header p {
    margin: 10px 0 0;
    color: #e0d1ef;
}

.picks-points {
    display: grid;
    gap: 3px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #100a1e80;
    border: 1px solid #ffffff20;
}

.picks-points strong { color: #ffda7c; }
.picks-points span { color: #d7c7e7; font-size: 12px; }

.picks-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block: 22px 30px;
}

.picks-filters a {
    padding: 7px 14px;
    border: 1px solid #ffffff24;
    border-radius: 10px;
    color: #dfccef;
    background: #211631;
    font-size: 13px;
}

.picks-filters a[aria-current="page"] {
    background: #c6f77b;
    border-color: #c6f77b;
    color: #172310;
    font-weight: 800;
}

.picks-day + .picks-day { margin-top: 28px; }

.picks-day-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ffffff23;
    margin-bottom: 12px;
}

.picks-day-heading h3 { margin: 0; font-size: 18px; }
.picks-day-heading span { color: #cdbcdf; font-size: 12px; }

.picks-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pick-match {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: clamp(14px, 2.5vw, 24px);
    border: 1px solid #ffffff24;
    border-radius: 16px;
    background: linear-gradient(160deg, #261936, #1a1227);
    scroll-margin-top: 16px;
}

.pick-match:target { border-color: #c6f77b; }

.pick-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 12px;
    color: #dbc5f6;
}

.pick-meta h4 { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.pick-meta time { color: #c7b5d8; font-size: 12px; white-space: nowrap; }

.pick-versus {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 18px 0;
    padding-block: 12px;
    background: #110b1b62;
    border-radius: 12px;
}

.pick-team {
    display: grid;
    justify-items: center;
    align-self: start;
    gap: 3px;
    padding-inline: 5px;
    text-align: center;
}

.pick-team strong { font-size: clamp(13px, 1.5vw, 17px); overflow-wrap: anywhere; }
.pick-team small { color: #c7b5d8; font-size: 11px; }

.pick-crest {
    display: grid;
    place-items: center;
    width: clamp(56px, 8vw, 82px);
    height: clamp(56px, 8vw, 82px);
    margin-bottom: 7px;
    border: 1px solid #aa7ce27a;
    border-radius: 13px;
    background: #4a2e66;
    color: #eddcff;
    font-size: 20px;
    font-weight: 900;
}

.pick-crest-away { background: #25423d; color: #b6f5de; border-color: #74d5b570; }
.pick-crest:has(img) {
    background: linear-gradient(145deg, #fffdfa, #e1ddea);
    border-color: #fff9;
    box-shadow: 0 3px 9px #0e071b52;
}

.pick-crest img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    padding: 5px;
}
.pick-divider { color: #ab8bc5; font-size: 24px; }

.pick-prize {
    margin-bottom: 14px;
    padding: 8px 11px;
    border: 1px solid #ffda7c38;
    border-radius: 9px;
    background: #ffda7c0e;
    color: #ffe2a0;
    font-size: 12px;
}

.pick-prize summary { cursor: pointer; font-weight: 800; }
.pick-prize p { margin: 7px 0 0; white-space: pre-line; }

.pick-form,
.pick-sign-in { margin-top: auto; }

.pick-form-note { margin: 0 0 8px; color: #d1beda; font-size: 12px; }

.pick-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) minmax(0, 1fr);
    gap: 6px;
}

.pick-options button {
    min-height: 44px;
    padding: 6px;
    border: 1px solid #a173ce5c;
    border-radius: 8px;
    background: #342346;
    color: #f7ecff;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.pick-options button:hover { border-color: #c6f77b; }
.pick-options button[aria-pressed="true"] { background: #c6f77b; border-color: #c6f77b; color: #172310; font-weight: 800; }

.picks-empty h2 { margin-top: 0; }

@media (min-width: 701px) {
    .pick-match:only-child {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
        align-items: center;
        gap: 12px 22px;
    }

    .pick-match:only-child .pick-meta {
        grid-column: 1 / -1;
    }

    .pick-match:only-child .pick-versus {
        margin: 0;
        grid-row: span 2;
    }

    .pick-match:only-child .pick-prize {
        margin: 0;
        grid-column: 2;
        grid-row: 3;
    }
}

@media (max-width: 700px) {
    .picks-grid { grid-template-columns: minmax(0, 1fr); }
}

.competition-crests {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 80px;
    margin-bottom: 28px;
}

.competition-crests .pick-crest {
    width: clamp(42px, 12vw, 66px);
    height: clamp(42px, 12vw, 66px);
    margin: 0;
}

.hero.hero-full {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: clamp(440px, 68svh, 520px);
    margin: 0;
    border: 0;
    border-radius: 0;
}

.hero-full .hero-copy {
    padding-inline: max(clamp(24px, 5vw, 72px), calc((100% - 1180px) / 2));
    padding-block: clamp(24px, 4vw, 44px);
}

.hero-full h1 {
    font-size: clamp(48px, 5.3vw, 68px);
    line-height: 1.18;
}

.hero-full .hero-actions,
.hero-full .hero-proof {
    margin-top: 20px;
}

.hero-full .hero-stat {
    left: max(24px, calc((100% - 1180px) / 2));
}

.brand-logo {
    display: block;
    width: clamp(150px, 14vw, 190px);
    height: auto;
}

.hero-brand {
    display: none;
}

@media (min-width: 960px) {
    .hero-brand {
        position: absolute;
        top: 50%;
        left: 44%;
        display: block;
        transform: translate(-50%, -50%);
    }

    .hero-brand .brand-logo {
        width: clamp(204px, 22vw, 316px);
    }
}

@media (max-width: 760px) {
    .brand-logo {
        width: clamp(110px, 36vw, 146px);
    }

    .hero.hero-full {
        min-height: 0;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        padding-block: 28px;
    }

    .hero-full .hero-copy {
        padding-block: 0;
    }

    .hero-full h1 {
        font-size: clamp(36px, 9vw, 53px);
    }

    .hero-full .hero-proof {
        max-width: none;
    }

    .hero-full .hero-stat {
        position: relative;
        inset: auto;
        align-self: flex-end;
        margin: 18px 24px 0;
        transform: none;
    }
}

.picks-section + .picks-section {
    margin-top: 40px;
}

.picks-section-heading {
    margin: 0 0 20px;
    font-size: clamp(22px, 3vw, 29px);
}

.pick-results {
    margin-top: auto;
}

.pick-result-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 5px 12px;
    margin: 0 0 10px;
    font-size: 13px;
}

.pick-result-heading span,
.pick-score small {
    color: #c7b5d8;
    font-size: 11px;
}

.pick-vote {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(40px, 32%) auto;
    align-items: center;
    gap: 8px;
    margin-block: 4px;
    font-size: 12px;
}

.pick-vote meter {
    width: 100%;
    height: 12px;
}

.pick-vote meter::-webkit-meter-optimum-value {
    background: #ad8ee0;
}

.pick-vote meter::-moz-meter-bar {
    background: #ad8ee0;
}

.pick-personal {
    margin: 10px 0 0;
    padding: 6px 9px;
    border-radius: 8px;
    background: #ffffff10;
    color: #e6d5f8;
    font-size: 12px;
}

.pick-personal[data-outcome="correct"] {
    background: #c6f77b22;
    color: #d7f89a;
}

.pick-personal[data-outcome="incorrect"] {
    background: #ff829821;
    color: #ffc2ce;
}

.pick-score {
    display: grid;
    justify-items: center;
    color: #f9eaff;
    font-weight: 800;
}

.pick-score bdi {
    font-size: clamp(16px, 2.5vw, 24px);
}

.picks-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
