/* Tavern duel tables: shared 1700s tavern look for Draughts and Morris. Code-drawn only. */
:root{--grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .35' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .18 0 0 0 0 .06 0 0 0 .32 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E")}
.duel h1{letter-spacing:.02em}
.duel .lede{font-style:italic}
/* the table: dark oak planks lit by a candle */
.duel .ck-wrap{padding:22px 14px 26px;border:0;border-radius:6px;
 background:radial-gradient(ellipse at 50% 18%,rgba(255,196,110,.38),rgba(255,170,80,.08) 45%,rgba(0,0,0,.55) 100%),var(--grain),repeating-linear-gradient(90deg,#3b2414 0 86px,#2a180c 86px 89px,#43291a 89px 172px,#2a180c 172px 175px);
 box-shadow:inset 0 0 60px rgba(0,0,0,.75),0 6px 18px rgba(0,0,0,.4)}
.duel .ck-wrap::before{content:'';position:absolute;right:16px;top:10px;width:14px;height:34px;border-radius:3px 3px 2px 2px;background:linear-gradient(90deg,#d9c79a,#f4ead0 45%,#cdb784);box-shadow:0 0 22px 10px rgba(255,190,90,.35),0 2px 0 #6b4a24;z-index:2;pointer-events:none}
.duel .ck-wrap::after{content:'';position:absolute;right:20px;top:-4px;width:6px;height:14px;border-radius:50% 50% 40% 40%;background:radial-gradient(ellipse at 50% 70%,#fff3c0,#ffb347 60%,rgba(255,120,30,0));animation:flick 2.4s infinite alternate;z-index:2;pointer-events:none}
@keyframes flick{0%{transform:scaleY(1) rotate(-2deg)}40%{transform:scaleY(1.15) rotate(2deg)}100%{transform:scaleY(.92) rotate(-1deg)}}
@media (max-width:420px){.duel .ck-wrap::before,.duel .ck-wrap::after{display:none}.duel .ck-wrap{padding:14px 6px 16px}}
/* controls: brass-bound tavern tags instead of modern chips */
.duel .ck-bar select,.duel .ck-bar button{background:linear-gradient(#f1e2bb,#dcc28a);border:2px solid #5a3a1d;border-radius:3px;box-shadow:inset 0 0 0 1px #c9a24a,0 2px 0 #3b2414;letter-spacing:.03em}
.duel .ck-bar button:active{transform:translateY(1px);box-shadow:inset 0 0 0 1px #c9a24a}
.duel .ck-bar button.on{background:linear-gradient(#a3322a,#7a1d14);color:#f4ead0}
.duel .ck-purse,.duel .mo-hands{font-style:italic}
.duel .ck-msg{font-size:21px;color:#2e1f10;text-shadow:0 1px 0 rgba(255,240,200,.6)}
/* result slip: a torn tally note pinned on the table */
.duel .ck-card{background:var(--grain),linear-gradient(#f3e6c4,#e2cc98);border:0;border-radius:2px;box-shadow:0 8px 24px rgba(0,0,0,.6),inset 0 0 30px rgba(120,80,30,.35);clip-path:polygon(0 3%,6% 0,14% 2%,22% 0,31% 2%,40% 0,50% 2%,60% 0,70% 2%,80% 0,90% 2%,100% 0,99% 50%,100% 97%,90% 100%,80% 98%,70% 100%,60% 98%,50% 100%,40% 98%,30% 100%,20% 98%,10% 100%,0 98%,1% 50%)}
.duel .ck-card h3{font-size:30px}
.duel .ck-card button{background:linear-gradient(#a3322a,#7a1d14);border-radius:3px;box-shadow:0 2px 0 #3b0d08}
/* ---- Draughts: boxwood and walnut squares in a carved oak frame ---- */
.duel .ck-board{border:14px solid #3b2414;border-radius:3px;background:#2a180c;
 border-image:none;box-shadow:inset 0 0 0 2px #c9a24a,0 0 0 2px #1a0e06,0 10px 22px rgba(0,0,0,.65),0 0 0 6px #5a3a1d inset}
.duel .ck-sq.l{background:var(--grain),linear-gradient(160deg,#e9d3a0,#d4b57a 60%,#c9a76a)}
.duel .ck-sq.d{background:var(--grain),repeating-linear-gradient(100deg,rgba(0,0,0,.12) 0 2px,transparent 2px 6px),linear-gradient(160deg,#6a3f1f,#47290f 70%,#3a2110)}
.duel .ck-sq.last{box-shadow:inset 0 0 0 3px rgba(255,200,110,.75)}
/* bone men for you, ebony men for the house: turned rings and a lathe dimple */
.duel .ck-p.me{background:radial-gradient(circle at 50% 50%,#d8c69c 0 9%,transparent 10%),repeating-radial-gradient(circle at 50% 50%,transparent 0 13%,rgba(120,90,40,.35) 14% 15%,transparent 16% 24%),radial-gradient(circle at 34% 28%,#fffbea,#efe2bf 45%,#c8b17f 85%,#9c8352);border:2px solid #6e5a34;box-shadow:0 3px 0 #5a4626,0 5px 6px rgba(0,0,0,.5)}
.duel .ck-p.cpu{background:radial-gradient(circle at 50% 50%,#0c0704 0 9%,transparent 10%),repeating-radial-gradient(circle at 50% 50%,transparent 0 13%,rgba(201,162,74,.22) 14% 15%,transparent 16% 24%),radial-gradient(circle at 34% 28%,#5e3b28,#2a160c 50%,#120a05 90%);border:2px solid #0a0503;box-shadow:0 3px 0 #050302,0 5px 6px rgba(0,0,0,.6)}
.duel .ck-p.can{box-shadow:0 0 0 3px rgba(255,205,120,.9),0 0 12px 3px rgba(255,180,80,.55),0 3px 0 #5a4626}
.duel .ck-p.sel{box-shadow:0 0 0 3px #a3322a,0 8px 10px rgba(0,0,0,.55)}
.duel .ck-p.k{border:3px solid #c9a24a}
.duel .ck-sq.tgt::after{background:radial-gradient(#fff3c0,rgba(255,200,110,.85));box-shadow:0 0 8px 2px rgba(255,190,90,.7)}
/* ---- Morris: the board is cut into a plank, lines inked, holes drilled ---- */
.duel .mo-bg{fill:url(#mo-plank);stroke:#2a180c;stroke-width:12}
.duel .mo-frame{fill:none;stroke:#c9a24a;stroke-width:1.5;opacity:.7}
.duel .mo-ln{stroke:#1d1108;stroke-width:5;opacity:.85;stroke-linecap:round}
.duel .mo-dot{fill:#1d1108;stroke:#7a5530;stroke-width:2}
.duel .mo-pc.me{fill:url(#mo-bone);stroke:#5a4626}
.duel .mo-pc.cpu{fill:url(#mo-ebony);stroke:#050302}
.duel .mo-in.me{stroke:#9c8352;opacity:.8}.duel .mo-in.cpu{stroke:#c9a24a;opacity:.35}
.duel .mo-pc{filter:drop-shadow(0 3px 2px rgba(0,0,0,.6))}
.duel .mo-pc.can{stroke:#ffd27a}
.duel .mo-tgt{fill:rgba(255,226,150,.9);stroke:#ffb347}
.duel .mo-mill.me{stroke:#e0b955}.duel .mo-mill.cpu{stroke:#a3322a}
@media (prefers-reduced-motion:reduce){.duel .ck-wrap::after{animation:none}}
/* ---- Difficulty picker ---- */
.duel #diff{min-width:9.5em}
.duel #stake:disabled{opacity:.55;cursor:not-allowed}
/* ---- Powder Keg Sweeper: same candlelit table, oak hatch planks, bone-paper opened cells ---- */
.duel .pk-wrap{padding:22px 14px 26px;border:0;border-radius:6px;
 background:radial-gradient(ellipse at 50% 18%,rgba(255,196,110,.38),rgba(255,170,80,.08) 45%,rgba(0,0,0,.55) 100%),var(--grain),repeating-linear-gradient(90deg,#3b2414 0 86px,#2a180c 86px 89px,#43291a 89px 172px,#2a180c 172px 175px);
 box-shadow:inset 0 0 60px rgba(0,0,0,.75),0 6px 18px rgba(0,0,0,.4)}
.duel .pk-grid{padding:10px;border-radius:3px;background:#2a180c;box-shadow:inset 0 0 0 2px #c9a24a,0 0 0 2px #1a0e06,0 10px 22px rgba(0,0,0,.65)}
.duel .pk-c{background:var(--grain),linear-gradient(160deg,#8a5a30,#6b4423 60%,#5a3a1d);border:1px solid #2a180c;border-radius:2px;color:#f1e2bb;box-shadow:inset 0 1px 0 rgba(255,220,160,.25),inset 0 -2px 0 rgba(0,0,0,.35)}
.duel .pk-c.open{background:var(--grain),linear-gradient(160deg,#efe2bf,#dcc79a);border-color:#9c8352;color:var(--ink);box-shadow:inset 0 0 6px rgba(120,80,30,.35)}
.duel .pk-c.boom{background:radial-gradient(circle,#ffd27a 0 20%,#e0541f 45%,#8e2418 75%)}
.duel .pk-bar select,.duel .pk-bar button{background:linear-gradient(#f1e2bb,#dcc28a);border:2px solid #5a3a1d;border-radius:3px;box-shadow:inset 0 0 0 1px #c9a24a,0 2px 0 #3b2414;letter-spacing:.03em}
.duel .pk-bar button.on{background:linear-gradient(#a3322a,#7a1d14);color:#f4ead0}
.duel .pk-card{background:var(--grain),linear-gradient(#f3e6c4,#e2cc98);border:0;border-radius:2px;box-shadow:0 8px 24px rgba(0,0,0,.6),inset 0 0 30px rgba(120,80,30,.35);clip-path:polygon(0 3%,6% 0,14% 2%,22% 0,31% 2%,40% 0,50% 2%,60% 0,70% 2%,80% 0,90% 2%,100% 0,99% 50%,100% 97%,90% 100%,80% 98%,70% 100%,60% 98%,50% 100%,40% 98%,30% 100%,20% 98%,10% 100%,0 98%,1% 50%)}
.duel .pk-card button{background:linear-gradient(#a3322a,#7a1d14);border-radius:3px;box-shadow:0 2px 0 #3b0d08}
.duel .pk-flash{border-radius:6px}
@media (max-width:420px){.duel .pk-wrap{padding:14px 6px 16px}.duel .pk-grid{padding:6px}}
/* ---- Tavern hub: each game is a plank on the oak table ---- */
.duel .tv-tables{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:18px;border-radius:6px;margin:12px 0 18px;
 background:radial-gradient(ellipse at 50% 10%,rgba(255,196,110,.32),rgba(0,0,0,.55) 100%),var(--grain),repeating-linear-gradient(90deg,#3b2414 0 86px,#2a180c 86px 89px,#43291a 89px 172px,#2a180c 172px 175px);box-shadow:inset 0 0 60px rgba(0,0,0,.75)}
.duel .tv-t{display:flex;flex-direction:column;gap:6px;padding:14px 16px;border-radius:2px;color:var(--ink);text-decoration:none;background:var(--grain),linear-gradient(#f3e6c4,#e2cc98);box-shadow:0 6px 14px rgba(0,0,0,.55),inset 0 0 24px rgba(120,80,30,.3);transition:transform .12s}
.duel .tv-t:hover,.duel .tv-t:focus-visible{transform:translateY(-3px) rotate(-.4deg)}
.duel .tv-t h2{margin:0;border:0;font-size:26px;color:var(--red)}
.duel .tv-t p{margin:0;font-size:16px}
.duel .tv-t .tv-go{margin-top:auto;align-self:flex-start;font-family:'IM Fell English SC',Georgia,serif;background:linear-gradient(#a3322a,#7a1d14);color:#f4ead0;padding:6px 14px;border-radius:3px;box-shadow:0 2px 0 #3b0d08}
.duel .tv-t .tv-who{font-style:italic;font-size:15px;color:#5a3a1d}
/* v91 tavern mute toggle */
.tavmute{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));z-index:50;width:44px;height:44px;border-radius:50%;padding:9px;cursor:pointer;
 border:2px solid #b8893a;background:radial-gradient(circle at 35% 30%,#3a2616,#1c120a);color:#e8c77a;box-shadow:0 2px 8px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,220,150,.25)}
.tavmute svg{width:100%;height:100%;display:block}
.tavmute:hover,.tavmute:focus-visible{color:#fff1c8;border-color:#e0b25a;outline:none}
.tavmute.on{color:#f4ead0;background:radial-gradient(circle at 35% 30%,#a3322a,#6a170f)}
@media (max-width:560px){.tavmute{width:38px;height:38px;padding:8px;right:8px;bottom:8px}}
.duel .tv-opp{text-align:center;font-style:italic;margin:.2em auto .6em;max-width:40em}
.duel .tv-opp a{color:#8a2a1c;font-weight:bold;font-style:normal}
.duel .tv-lvl{opacity:.75}
