/* Tavern Brawl Snap: the tall tavern-table column.
   Layout only, loaded after the painted skin so it sets the composition. */

:root{
  --font-logo:'Grenze Gotisch',serif;
  --font-mono:'Bitter',monospace;
  --cardW:clamp(78px,15vmin,150px);
  --gilt:#C9932B;
  --giltLight:#F6D98C;
}

html,body{overflow:hidden}

#board{
  background:#090604 url('assets/new/tavern_room.webp') center 34%/cover no-repeat!important;
}
#board::after{
  background:
    radial-gradient(ellipse at 50% 6%,rgba(255,186,90,.2),transparent 42%),
    radial-gradient(ellipse at 14% 34%,rgba(255,160,60,.12),transparent 38%),
    radial-gradient(ellipse at 86% 62%,rgba(255,140,50,.1),transparent 36%),
    radial-gradient(ellipse at 50% 52%,transparent 30%,rgba(3,2,1,.62) 100%)!important;
}
#board::before{display:none!important}
.grain,.frame{display:none!important}

/* ---------- the column ---------- */
#board .stage{
  position:relative;
  z-index:2;
  width:min(94vw,600px);
  height:100dvh;
  margin:0 auto;
  padding:clamp(5px,1.1vh,12px) 0 max(5px,env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:clamp(4px,.9vh,10px);
  box-sizing:border-box;
}

/* ---------- the carved sign with the crew peeking over ---------- */
#brand{
  position:relative!important;
  left:auto!important;top:auto!important;
  width:100%!important;
  aspect-ratio:auto!important;
  background:none!important;
  filter:none!important;
  flex:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  z-index:9;
}
.heroCrew{
  position:relative;
  width:100%;
  height:clamp(104px,18vh,180px);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  z-index:2;
  margin-bottom:-10px;
}
.heroCrew img{
  height:100%;
  width:auto;
  max-width:100%;
  object-fit:contain;
  object-position:bottom center;
  filter:drop-shadow(0 16px 14px rgba(0,0,0,.55)) drop-shadow(0 0 34px rgba(255,170,70,.16));
}
.signBoard{
  position:relative!important;
  inset:auto!important;
  width:min(96%,620px);
  height:clamp(54px,8.6vh,84px);
  padding:5px clamp(14px,4vw,26px) 7px!important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,rgba(74,42,24,.55),rgba(20,11,6,.72)),url('assets/tavern_wood.webp') center/cover!important;
  border:2px solid #17140F!important;
  border-radius:7px!important;
  box-shadow:0 0 0 2px #C9932B,0 0 0 4px #2A1708,0 0 26px rgba(255,170,70,.18),0 12px 18px rgba(0,0,0,.6)!important;
  overflow:hidden;
  z-index:3;
}
.signBoard::before{
  content:""!important;
  position:absolute!important;
  inset:5px!important;
  border:1px solid rgba(246,217,140,.34)!important;
  border-radius:4px!important;
  background:none!important;
  box-shadow:inset 0 0 18px rgba(0,0,0,.5)!important;
  pointer-events:none;
}
.signBoard::after{
  content:""!important;
  position:absolute!important;
  left:50%!important;bottom:3px!important;
  width:6px!important;height:6px!important;
  background:radial-gradient(circle at 35% 30%,#FBE7A5,#C9932B 62%,#6E4A0E)!important;
  transform:translateX(-50%) rotate(45deg)!important;
  box-shadow:0 0 8px rgba(246,217,140,.6)!important;
}
#gameTitle{
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;
  margin:0!important;
  width:100%;
  text-align:center;
  font-family:var(--font-logo);
  font-weight:900;
  font-size:clamp(20px,min(4.6vh,6.6vw),42px)!important;
  line-height:.98;
  letter-spacing:0;
  white-space:nowrap;
  transform:none!important;
}
.title-snap{
  background:linear-gradient(180deg,#FFF9E4 0,#F6D98C 34%,#D4A03A 66%,#8A611A 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  -webkit-text-stroke:1px #2A1708;
  text-shadow:none;
  filter:drop-shadow(0 2px 0 #1B0E05) drop-shadow(0 0 12px rgba(255,185,85,.35));
}
#tagline{
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;
  margin:2px 0 0!important;
  width:100%;
  text-align:center;
  font-family:'Alegreya Sans',sans-serif;
  font-weight:700;
  font-size:clamp(6.5px,1.5vh,10px)!important;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:#EAD9B4;
  opacity:.82;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.brassSound{
  position:absolute!important;
  right:1%!important;
  top:2px!important;
  width:clamp(26px,4.6vh,42px)!important;
  height:auto!important;
  z-index:12!important;
}

/* ---------- the seat row ---------- */
#scoreRail{
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;
  width:100%!important;
  height:clamp(50px,8.2vh,76px)!important;
  display:flex!important;
  gap:clamp(4px,1vw,10px)!important;
  z-index:8;
  flex:none;
}
#board:has(#pods .pod) #scoreRail{display:none!important}
#pods:empty{display:none!important}
.scorePanel{
  flex:1 1 0!important;
  min-width:0!important;
  padding:clamp(4px,1.2vh,9px) 4px 4px!important;
}
.spCrest{height:clamp(20px,3.4vh,34px)!important;max-height:none!important;width:auto!important;max-width:52%!important;object-fit:contain!important;object-position:center!important;margin:0 0 1px!important}
.spScore{font-family:var(--font-mono)!important;font-size:clamp(11px,2.1vh,20px)!important;line-height:1!important}
.spName{font-size:clamp(5px,1.25vh,8px)!important;margin-top:1px!important}

#pods{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:clamp(92px,14vh,132px)!important;
  display:flex!important;
  align-items:stretch;
  justify-content:center;
  gap:clamp(4px,1vw,10px);
  padding:0 clamp(1px,.7vw,6px);
  z-index:8;
  flex:none;
  pointer-events:none;
}
#pods .pod{
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  flex:1 1 0;
  width:auto!important;
  max-width:172px;
  min-width:0;
  padding:5px 5px 4px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  background:
    linear-gradient(180deg,rgba(78,46,26,.36),rgba(10,6,3,.5)),
    url('assets/tavern_wood.webp') center/cover;
  border:1px solid #C9932B!important;
  border-radius:8px!important;
  box-shadow:inset 0 0 0 1.5px rgba(30,18,8,.9),inset 0 1px 0 rgba(255,225,170,.22),0 6px 11px rgba(0,0,0,.6)!important;
  pointer-events:none;
  z-index:7;
  overflow:hidden;
}
#pods .pod::before{
  content:"";position:absolute;left:8%;right:8%;top:0;height:2px;
  background:linear-gradient(90deg,transparent,#F6D98C 20%,#C9932B 50%,#F6D98C 80%,transparent);
  opacity:.75;pointer-events:none;
}
#pods .pod.turn{
  border-color:#F6D98C!important;
  box-shadow:inset 0 0 0 1.5px rgba(30,18,8,.9),0 0 0 2px rgba(246,217,140,.8),0 0 24px rgba(246,217,140,.4),0 6px 11px rgba(0,0,0,.6)!important;
}
#pods .pod.dealTurn{
  border-color:#F6D98C!important;
  box-shadow:inset 0 0 0 1.5px rgba(30,18,8,.9),0 0 22px rgba(246,217,140,.5),0 6px 11px rgba(0,0,0,.6)!important;
}
#pods .pod.win{
  border-color:#F6D98C!important;
  box-shadow:inset 0 0 0 1.5px rgba(30,18,8,.9),0 0 0 2px #F6D98C,0 0 26px rgba(246,217,140,.55),0 6px 11px rgba(0,0,0,.6)!important;
}
.podTop{
  position:relative!important;
  width:100%!important;
  height:clamp(38px,6.2vh,58px)!important;
  flex:none;
}
.podCrest{
  position:absolute!important;
  left:5%!important;top:0!important;
  width:auto!important;
  height:100%!important;
  max-width:66%;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  filter:drop-shadow(0 0 10px rgba(246,217,140,.32)) drop-shadow(2px 3px 0 rgba(0,0,0,.5))!important;
}
.podPile{position:absolute!important;right:3%!important;bottom:0!important;width:42%!important;height:82%!important}
.podName{
  width:100%!important;
  margin-top:2px!important;
  padding:.2em .25em!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:800!important;
  font-size:clamp(5.5px,1.35vh,9px)!important;
  letter-spacing:.04em!important;
  line-height:1.05!important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  background:linear-gradient(#FFF8E6,#EEDFBE)!important;
  color:#3A2410!important;
  border:1px solid #3E2415!important;
  border-radius:2px!important;
  box-shadow:0 0 0 1px rgba(201,147,43,.45),1px 2px 0 rgba(0,0,0,.45)!important;
}
.podKey{
  margin-top:1px!important;
  font-size:clamp(4.5px,1.05vh,7px)!important;
  padding:.05em .3em!important;
  line-height:1.25!important;
}
.podMeta{
  margin-top:1px!important;
  font-size:clamp(5.5px,1.25vh,9px)!important;
  padding:.02em .25em!important;
  line-height:1.15!important;
}
.podBoons{
  margin-top:1px!important;
  gap:1px!important;
  max-height:clamp(12px,2.4vh,24px);
  overflow:hidden;
}
.boonTitle{font-size:clamp(4.5px,1.02vh,7px)!important;padding:.06em .28em!important;line-height:1.15!important}
.boonToken{width:clamp(7px,1.5vh,12px)!important;height:auto!important}
.shameTag{font-size:clamp(4.5px,1vh,7px)!important}
.snapHome{
  width:46%!important;
  right:-2%!important;
  top:-14%!important;
  transform:rotate(-14deg)!important;
}
.snapHome::after{font-size:clamp(4px,.95vh,6.5px)!important;padding:.1em .3em!important}
.pod.homeHover .snapHome,.pod.homeFlash .snapHome,.pod.dealTurn .snapHome{transform:rotate(-14deg) scale(1.1)!important}

/* ---------- the baize inset in carved walnut ---------- */
#board #playArea{
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;
  width:100%!important;
  height:auto!important;
  flex:1 1 auto;
  min-height:clamp(150px,20vh,340px);
  margin:0;
  border:2px solid rgba(246,217,140,.5)!important;
  border-radius:10px!important;
  background-image:
    radial-gradient(circle at 11px 11px,#FFE0A0 0 2.4px,#8A611A 3px 4.6px,rgba(20,12,5,.85) 5px 6.4px,transparent 7.4px),
    radial-gradient(circle at calc(100% - 11px) 11px,#FFE0A0 0 2.4px,#8A611A 3px 4.6px,rgba(20,12,5,.85) 5px 6.4px,transparent 7.4px),
    radial-gradient(circle at 11px calc(100% - 11px),#FFE0A0 0 2.4px,#8A611A 3px 4.6px,rgba(20,12,5,.85) 5px 6.4px,transparent 7.4px),
    radial-gradient(circle at calc(100% - 11px) calc(100% - 11px),#FFE0A0 0 2.4px,#8A611A 3px 4.6px,rgba(20,12,5,.85) 5px 6.4px,transparent 7.4px),
    radial-gradient(ellipse at 42% 18%,rgba(255,206,128,.2),transparent 52%),
    radial-gradient(ellipse at 70% 82%,rgba(255,150,60,.1),transparent 46%),
    linear-gradient(180deg,rgba(8,20,14,.1),rgba(4,12,8,.35)),
    url('assets/new/baize_ornate.webp')!important;
  background-position:left top,right top,left bottom,right bottom,center,center,center,center!important;
  background-size:30px 30px,30px 30px,30px 30px,30px 30px,auto,auto,auto,cover!important;
  background-repeat:no-repeat!important;
  box-shadow:
    0 0 0 3px #6B4423,
    0 0 0 7px #2E1B10,
    0 0 0 9px #C9932B,
    0 0 0 16px #24150C,
    0 18px 30px rgba(0,0,0,.65),
    inset 0 0 72px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(255,220,150,.16)!important;
}
#board #playArea::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  inset:0!important;
  border-radius:8px!important;
  background:
    radial-gradient(ellipse at 50% 4%,rgba(255,214,140,.22),transparent 50%),
    radial-gradient(ellipse at 12% 88%,rgba(0,0,0,.25),transparent 55%)!important;
  box-shadow:inset 0 0 0 1px rgba(255,230,180,.08)!important;
  pointer-events:none!important;
  z-index:1!important;
}
#board #playArea::after{display:none!important}
#playRow{position:absolute!important;inset:0!important;z-index:2}

#board #playArea #fuse{
  position:absolute!important;
  left:50%!important;
  top:7px!important;
  transform:translateX(-50%)!important;
  width:min(62%,380px)!important;
  z-index:20;
}
#board #playArea #fuse .fuseLabel{transform:rotate(-1deg)}
.pileTag{
  left:9px!important;
  bottom:9px!important;
  z-index:22!important;
  font-size:clamp(6.5px,1.4vh,10px)!important;
}

.card{
  width:var(--cardW)!important;
  filter:drop-shadow(0 12px 9px rgba(0,0,0,.6)) drop-shadow(0 0 16px rgba(255,190,90,.18))!important;
}
.card::before{
  content:""!important;
  position:absolute!important;
  inset:7.5%!important;
  border:2px solid var(--typeInk,#C9932B)!important;
  border-radius:6px!important;
  box-shadow:inset 0 0 12px rgba(0,0,0,.22),0 0 8px rgba(255,220,150,.12)!important;
  opacity:.5;
  pointer-events:none!important;
  z-index:2!important;
}
.card::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  border:0!important;
  border-radius:5px!important;
  background:
    radial-gradient(circle at 8.5% 7%,#FFF6D0 0 1.2px,var(--typeInk,#C9932B) 1.9px 3.2px,rgba(20,10,4,.9) 3.6px 4.6px,transparent 5px),
    radial-gradient(circle at 91.5% 7%,#FFF6D0 0 1.2px,var(--typeInk,#C9932B) 1.9px 3.2px,rgba(20,10,4,.9) 3.6px 4.6px,transparent 5px),
    radial-gradient(circle at 8.5% 93%,#FFF6D0 0 1.2px,var(--typeInk,#C9932B) 1.9px 3.2px,rgba(20,10,4,.9) 3.6px 4.6px,transparent 5px),
    radial-gradient(circle at 91.5% 93%,#FFF6D0 0 1.2px,var(--typeInk,#C9932B) 1.9px 3.2px,rgba(20,10,4,.9) 3.6px 4.6px,transparent 5px)!important;
  box-shadow:none!important;
  pointer-events:none!important;
  z-index:3!important;
}
.card.cheer,.card.matched{
  filter:drop-shadow(0 12px 9px rgba(0,0,0,.55)) drop-shadow(0 0 22px rgba(255,206,120,.7))!important;
}
.snapWord{font-size:clamp(40px,11vh,120px)!important}
#statusTag{z-index:35}

/* ---------- the big plates ---------- */
#controls{
  position:relative!important;
  left:auto!important;right:auto!important;bottom:auto!important;
  transform:none!important;
  width:100%!important;
  height:clamp(56px,9vh,84px)!important;
  display:flex!important;
  align-items:flex-end;
  justify-content:center;
  gap:clamp(6px,1.4vw,14px)!important;
  z-index:12;
  flex:none;
}
#board .stage #controls .artBtn{
  border:0!important;border-radius:0!important;box-shadow:none!important;
  background-color:transparent!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  aspect-ratio:auto!important;
  width:auto!important;
  height:clamp(50px,8.2vh,70px)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  filter:drop-shadow(0 7px 6px rgba(0,0,0,.55));
  transition:transform .1s ease-out,filter .12s;
}
#board .stage #controls .artBtn.play{width:clamp(84px,12.5vw,132px)!important}
#board .stage #controls .artBtn.deal{width:clamp(74px,11vw,118px)!important}
#board .stage #controls .artBtn.snap{width:clamp(104px,16vw,166px)!important;height:clamp(58px,9.4vh,82px)!important}
#board .stage #controls .artBtn::before,#board .stage #controls .artBtn::after{display:none!important}
#board .stage #controls .artBtn .btnLabel{
  font-family:var(--font-mono)!important;
  font-weight:700!important;
  font-size:clamp(9px,1.9vh,17px)!important;
  letter-spacing:.02em!important;
  text-transform:uppercase;
  color:#FFF1CC!important;
  text-shadow:0 2px 0 rgba(20,10,4,.9),0 0 8px rgba(0,0,0,.4)!important;
  line-height:1!important;
}
#board .stage #controls .artBtn.snap .btnLabel{
  font-family:var(--font-logo)!important;
  font-weight:900!important;
  font-size:clamp(15px,2.5vh,26px)!important;
  color:#F8D98C!important;
  margin-top:2%!important;
}
#board .stage #controls .artBtn .btnSub{
  font-size:clamp(4px,.95vh,6.5px)!important;
  letter-spacing:.05em!important;
  color:#F6E1B4!important;
  margin-top:0!important;
}

/* ---------- the house noticeboard strip ---------- */
#narrator{
  position:relative;
  width:100%;
  height:clamp(40px,6.4vh,60px);
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:11;
}
#narrator .bottomPanel{
  position:absolute!important;
  inset:0!important;
  left:0!important;right:0!important;bottom:0!important;
  height:100%!important;
  filter:drop-shadow(0 7px 10px rgba(0,0,0,.5));
  pointer-events:none;
  z-index:0;
}
#narrator .bottomPanel img{width:100%;height:100%;object-fit:fill}
#board #hint{
  position:relative!important;
  left:auto!important;right:auto!important;bottom:auto!important;
  transform:none!important;
  margin:0!important;
  width:min(92%,560px)!important;
  z-index:1;
  text-align:center;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:700!important;
  font-size:clamp(6.5px,1.35vh,10px)!important;
  line-height:1.28!important;
  color:#F3E1B8!important;
  text-shadow:0 1px 3px rgba(0,0,0,.9)!important;
}
#board #quip{
  position:absolute!important;
  left:6px!important;right:6px!important;bottom:1px!important;
  width:auto!important;
  transform:none!important;
  z-index:3!important;
  display:none;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:3px 24px 3px 8px!important;
  background:linear-gradient(#FFF8E6,#EDDDBB)!important;
  border:1.5px solid #3E2415!important;
  border-radius:4px!important;
  box-shadow:0 0 0 1px #17140F,0 0 0 2.5px rgba(201,147,43,.5),0 5px 10px rgba(0,0,0,.5)!important;
}
#board #quip.on{display:flex!important;animation:quipIn .2s cubic-bezier(.2,.9,.2,1) forwards}
#board #quip .qWho{
  font-size:clamp(5px,1.05vh,7.5px)!important;
  letter-spacing:.12em!important;
  color:#A32A1C!important;
  background:none!important;
  padding:0!important;
  white-space:nowrap;
  flex:none;
}
#board #quip .qLine{
  font-size:clamp(7px,1.4vh,10.5px)!important;
  line-height:1.22!important;
  color:#2E1B12!important;
  min-width:0;
}
#board #quip::before{
  width:16px!important;height:16px!important;
  right:5px!important;top:-5px!important;
}
body:has(#quip.on) #hint{opacity:0}

/* ---------- ledger and noticeboard under the play area ---------- */
#rail{
  position:relative!important;
  inset:auto!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  width:100%!important;
  height:clamp(112px,18vh,166px)!important;
  flex:none;
  display:flex!important;
  flex-direction:row!important;
  gap:clamp(4px,1vw,10px)!important;
  padding:0!important;
  background:none!important;
  filter:none!important;
  box-shadow:none!important;
  border:0!important;
  overflow:visible!important;
  z-index:8;
}
#rail .railcard{
  position:relative;
  flex:1 1 0;
  min-width:0;
  min-height:0;
  width:auto!important;
  padding:clamp(4px,1.1vh,9px) clamp(6px,1.1vw,10px)!important;
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg,#FCF3DC 0,#EEDDB8 74%,#E2C99A 100%)!important;
  border:2px solid #3E2415!important;
  border-radius:6px!important;
  box-shadow:0 0 0 1.5px #17140F,0 0 0 3px rgba(201,147,43,.42),0 7px 12px rgba(0,0,0,.5),inset 0 1px 0 #FFF9E8!important;
  overflow:hidden;
}
#profileCard{flex:1.18 1 0!important}
#hallCard{flex:1 1 0!important}
#rail .railcard::after{opacity:.1!important}
#rail .railhead{
  flex:none;
  margin:0 0 2px!important;
  padding:2px 2px!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:800!important;
  font-size:clamp(5.5px,1.15vh,8px)!important;
  letter-spacing:.1em!important;
  text-align:center;
  color:#F6D98C!important;
  background:linear-gradient(#4A2A18,#2A170C)!important;
  border-bottom:1px solid #C9932B!important;
  box-shadow:0 0 0 1px rgba(23,20,15,.65)!important;
  border-radius:2px;
  text-shadow:0 1px 0 #000;
}
#rail .pcTop{gap:5px!important;margin-bottom:2px!important;flex:none}
#rail .pcCrest{width:auto!important;height:clamp(22px,4vh,34px)!important;aspect-ratio:auto!important;flex:none}
#rail .pcRank{font-size:clamp(10px,1.9vh,17px)!important;line-height:1!important}
#rail .pcLevel{font-size:clamp(5px,1vh,7.5px)!important;margin-top:1px!important}
#rail .pcXp{height:5px!important;margin:2px 0 1px!important;flex:none}
#rail .pcSmall{font-size:clamp(5px,1vh,7.5px)!important;line-height:1.15!important}
#rail .pcStats{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:1px 4px!important;
  margin:2px 0 0!important;
  flex:none;
}
#rail .pcStats dt{font-size:clamp(4px,.85vh,6px)!important;letter-spacing:.02em!important;line-height:1.1}
#rail .pcStats dd{font-size:clamp(6.5px,1.3vh,10px)!important;line-height:1.1}
#rail .railBtns{margin-top:auto!important}
#rail .linkbtn{
  font-size:clamp(5px,1.05vh,7.5px)!important;
  padding:2px 2px!important;
  margin-top:2px!important;
  line-height:1.15!important;
}
#rail #hallCard .hall{
  display:flex!important;
  flex-direction:column;
  gap:1px;
  overflow:hidden;
  min-height:0;
  flex:1;
}
#rail .hall li{font-size:clamp(5px,1.05vh,7.5px)!important;line-height:1.15!important}
#rail .hallNote{font-size:clamp(5.5px,1.1vh,8px)!important;line-height:1.3!important;margin:auto 0!important;text-align:center}
#rail #hallCard .hallNote{flex:1;display:flex;align-items:center;justify-content:center}

#deckArea{
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  width:auto!important;
  height:auto!important;
  flex:1.12 1 0!important;
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  grid-template-rows:auto 1fr!important;
  grid-template-areas:"head head" "stack plate";
  align-items:center!important;
  gap:0 6px!important;
  z-index:6;
}
#deckArea .railhead{grid-area:head}
#deckImg{
  grid-area:stack!important;
  position:relative!important;
  left:auto!important;top:auto!important;
  width:clamp(24px,4.4vh,44px)!important;
  height:auto!important;
  object-fit:contain;
  filter:drop-shadow(0 4px 5px rgba(0,0,0,.45));
}
#deckCounterImg{display:none!important}
#deckArea #deckPlate{
  grid-area:plate!important;
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  width:auto!important;height:auto!important;
  padding:0!important;
  transform:none!important;
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:flex-start;
  gap:0 3px;
  color:#3A2410!important;
  text-align:left;
}
#deckPlate .plateBig{
  font-family:var(--font-mono)!important;
  font-weight:700!important;
  font-size:clamp(12px,2.4vh,23px)!important;
  line-height:1!important;
  color:#2E1B12!important;
}
#deckPlate .plateLabel{
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:800!important;
  font-size:clamp(4px,.85vh,6px)!important;
  letter-spacing:.08em!important;
  margin:0 2px 0 0!important;
  text-transform:uppercase;
  color:#6B4423!important;
}
#deckPlate .plateSmall{
  font-family:var(--font-mono)!important;
  font-size:clamp(4.5px,.95vh,7px)!important;
  color:#4A2A18!important;
  line-height:1.2!important;
  flex-basis:100%;
}
#deckLine{display:none!important}

/* ---------- SNAP moment: a real plaque, paper burst, weight ---------- */
#bannerWrap{
  position:absolute!important;
  left:50%!important;top:47%!important;
  width:min(560px,86vw)!important;
  height:auto!important;
  aspect-ratio:900/584;
  margin:0!important;
  background:none!important;
  filter:none!important;
  opacity:0;
  transform:translate(-50%,-50%) scale(.62) rotate(-2deg)!important;
  transform-origin:50% 50%!important;
  z-index:18!important;
  pointer-events:none;
}
#bannerWrap.on{
  opacity:1;
  transform:translate(-50%,-50%) scale(1) rotate(-1deg)!important;
  transition:transform .3s cubic-bezier(.2,.95,.2,1),opacity .1s!important;
  animation:plaqueSlam .34s cubic-bezier(.2,.95,.2,1);
}
#bannerWrap.off{
  opacity:0;
  transform:translate(-50%,-50%) scale(.82) rotate(-2deg)!important;
  transition:transform .2s ease-in,opacity .18s!important;
}
@keyframes plaqueSlam{
  0%{opacity:0;transform:translate(-50%,-50%) scale(1.35) rotate(-7deg)}
  60%{opacity:1;transform:translate(-50%,-50%) scale(.97) rotate(-.5deg)}
  100%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(-1deg)}
}
#bannerWrap .bannerPlaque{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  display:block!important;
  filter:drop-shadow(0 16px 20px rgba(0,0,0,.7)) drop-shadow(0 0 30px rgba(255,180,80,.25));
  z-index:2;
}
#bannerWrap .bannerBurst{
  position:absolute!important;
  left:50%!important;top:50%!important;
  width:142%!important;
  height:auto!important;
  max-width:none!important;
  object-fit:contain!important;
  display:block!important;
  transform:translate(-50%,-50%) scale(.9) rotate(6deg);
  mix-blend-mode:screen;
  opacity:.9;
  z-index:1;
  animation:burstSpin 4s linear infinite;
}
@keyframes burstSpin{to{transform:translate(-50%,-50%) scale(.9) rotate(366deg)}}
#bannerWrap .bannerText{
  position:absolute!important;
  left:17%!important;right:17%!important;
  top:30%!important;bottom:24%!important;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  text-align:center;
  z-index:3;
}
#bannerName{
  font-family:var(--font-logo)!important;
  font-weight:900!important;
  font-size:clamp(18px,4.2vh,38px)!important;
  line-height:.96!important;
  letter-spacing:.01em;
  text-transform:uppercase!important;
  color:#4A2410!important;
  text-shadow:0 1px 0 #F6D98C,0 2px 0 rgba(74,36,16,.25)!important;
}
#bannerSub{
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:800!important;
  font-size:clamp(6px,1.35vh,10px)!important;
  letter-spacing:.11em!important;
  text-transform:uppercase;
  color:#7A3A1A!important;
  opacity:.9;
}

/* ---------- set the table: a small wax-pinned note ---------- */
.modal{background:radial-gradient(ellipse at 50% 44%,rgba(18,10,5,.6),rgba(2,4,3,.94))!important}
.setupSheet{
  position:relative!important;
  width:min(400px,90vw)!important;
  max-height:min(88dvh,580px)!important;
  padding:clamp(28px,4.2vh,38px) clamp(22px,5vw,36px) clamp(24px,4.4vh,36px)!important;
  display:flex!important;
  flex-direction:column;
  background:url('assets/new/note_setup.webp') center/100% 100% no-repeat!important;
  border:0!important;
  border-radius:4px!important;
  box-shadow:0 20px 38px rgba(0,0,0,.7),0 0 0 1px rgba(20,10,4,.6)!important;
  overflow:visible!important;
}
.setupSheet::before{display:none!important}
.setupSheet .waxSeal{
  position:absolute!important;
  left:-14px!important;top:-20px!important;
  width:clamp(46px,9vw,62px)!important;
  transform:rotate(-14deg)!important;
  height:auto!important;
  filter:drop-shadow(0 7px 7px rgba(0,0,0,.55));
  z-index:5;
  pointer-events:none;
}
.setupSheet .kicker{
  display:block!important;
  margin:0 0 1px!important;
  padding:0!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:800!important;
  font-size:clamp(6.5px,1.35vh,9.5px)!important;
  letter-spacing:.16em!important;
  text-align:center;
  text-transform:uppercase;
  color:#8A2A1C!important;
}
.setupSheet h2{
  margin:0 0 clamp(6px,1.4vh,10px)!important;
  font-family:var(--font-logo)!important;
  font-weight:900!important;
  font-size:clamp(25px,4.4vh,38px)!important;
  line-height:1!important;
  text-align:center;
  color:#4A2410!important;
  text-shadow:0 1px 0 #F6D98C!important;
}
.setupSheet .field{margin:0 0 clamp(5px,1.2vh,9px)!important}
.setupSheet .field h3{
  margin:0 0 3px!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:800!important;
  font-size:clamp(6.5px,1.3vh,9px)!important;
  letter-spacing:.13em!important;
  text-transform:uppercase;
  color:#5A3A1A!important;
}
.setupSheet .choices{display:flex!important;gap:clamp(5px,1.4vw,10px)!important;margin:0!important}
.setupSheet .choice{
  position:relative;
  flex:1 1 0!important;
  min-width:0!important;
  height:clamp(50px,8.2vh,68px)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  border:0!important;
  border-radius:5px!important;
  background:url('assets/new/oak_tile.webp') center/100% 100% no-repeat!important;
  box-shadow:0 4px 7px rgba(0,0,0,.45)!important;
  color:#F6E7C8!important;
  text-shadow:0 2px 0 #2A0B06;
  overflow:hidden;
}
.setupSheet .choice span{
  font-family:var(--font-mono)!important;
  font-weight:700!important;
  font-size:clamp(18px,3.5vh,30px)!important;
  line-height:.92!important;
  color:#F6D98C!important;
  text-shadow:0 2px 0 #2A0B06,0 0 10px rgba(246,217,140,.3);
}
.setupSheet .choice small{
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:800!important;
  font-size:clamp(5px,1.1vh,7.5px)!important;
  letter-spacing:.12em!important;
  text-transform:uppercase;
  color:#EBD9AE!important;
  opacity:.92!important;
  margin-top:1px!important;
}
.setupSheet .choice.sel{
  background-image:url('assets/new/oak_tile.webp')!important;
  box-shadow:inset 0 0 0 3px #F6D98C,0 0 22px rgba(246,217,140,.58),0 4px 7px rgba(0,0,0,.45)!important;
  filter:brightness(1.1);
}
.setupSheet .choice.sel::after{
  content:""!important;
  position:absolute!important;
  inset:5px!important;
  border:1px solid rgba(246,217,140,.9)!important;
  border-radius:3px!important;
  box-shadow:inset 0 0 14px rgba(246,217,140,.3)!important;
  pointer-events:none!important;
}
.setupSheet .choice.sel span{color:#FFF6D0!important}
.setupSheet .choice:active{transform:translateY(2px)}
.setupSheet #keyHint{
  margin:3px 0 0!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:700!important;
  font-size:clamp(5.5px,1.15vh,8px)!important;
  line-height:1.25!important;
  text-align:center;
  color:#5A3A1A!important;
}
.setupSheet .deckMath{
  display:block!important;
  width:100%!important;
  min-height:0!important;
  margin:1px 0 clamp(6px,1.4vh,10px)!important;
  padding:clamp(5px,1.2vh,8px) 8px!important;
  background:linear-gradient(180deg,#2A1A10,#140D07)!important;
  border:1.5px solid #C9932B!important;
  border-radius:4px!important;
  box-shadow:inset 0 0 0 1px #000,inset 0 1px 0 rgba(255,220,150,.16),0 2px 4px rgba(0,0,0,.4)!important;
  color:#F6E7C8!important;
  font-family:var(--font-mono)!important;
  font-weight:700!important;
  font-size:clamp(7.5px,1.45vh,10.5px)!important;
  line-height:1.3!important;
  letter-spacing:.01em;
  text-align:center;
  text-shadow:0 1px 2px rgba(0,0,0,.8);
}
#mathLine .num{
  font-size:1.5em;
  color:#F6D98C;
  text-shadow:0 2px 0 #2A0704,0 0 8px rgba(246,217,140,.25);
  margin:0 .08em;
  line-height:1;
}
.setupSheet .bigBtn{
  width:100%!important;
  min-height:0!important;
  height:clamp(46px,7.2vh,62px)!important;
  padding:0 12px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:url('assets/new/btn_snap.webp') center/100% 100% no-repeat!important;
  border:0!important;
  box-shadow:none!important;
  font-family:var(--font-logo)!important;
  font-weight:900!important;
  font-size:clamp(14px,2.4vh,22px)!important;
  color:#F8D98C!important;
  text-shadow:0 2px 0 #2A1708!important;
}
.setupSheet .bigBtnLabel{transform:none!important}
.setupSheet .bigBtn:hover{filter:brightness(1.07)}
.setupSheet .bigBtn:active{transform:translateY(2px);filter:brightness(.95)}
.setupSheet .setupSound{
  align-self:center;
  margin:4px 0 0!important;
  padding:3px 10px!important;
  background:none!important;
  border:1px solid rgba(90,58,26,.45)!important;
  border-radius:3px!important;
  box-shadow:none!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:700!important;
  font-size:clamp(5.5px,1.1vh,7.5px)!important;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#5A3A1A!important;
}
.setupSheet .rulesLine{
  margin:clamp(5px,1.2vh,9px) 0 0!important;
  padding:0!important;
  max-width:100%!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:600!important;
  font-size:clamp(6px,1.2vh,8.5px)!important;
  line-height:1.35!important;
  text-align:center!important;
  color:#5A3A1A!important;
  opacity:.92!important;
}
.setupNotice{
  margin:0 0 6px!important;
  padding:4px 6px!important;
  border-radius:3px!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:700!important;
  font-size:clamp(6.5px,1.2vh,8.5px)!important;
  line-height:1.3!important;
  text-align:center;
}

/* ---------- the winner sheet keeps its plaque ---------- */
.winSheet{
  width:min(560px,92vw)!important;
  max-height:94dvh!important;
}
.winBannerWrap img{height:clamp(78px,14vh,150px)!important}
#winBannerName{
  font-family:var(--font-logo)!important;
  font-weight:900!important;
  font-size:clamp(16px,2.6vh,28px)!important;
  color:#F6D98C!important;
  text-shadow:0 2px 0 #2A1708,0 0 12px rgba(255,190,90,.35)!important;
}

/* =================== narrow portrait =================== */
@media (max-aspect-ratio:19/20){
  #board .stage{
    width:100vw;
    padding:clamp(4px,1vh,10px) clamp(5px,2.2vw,12px) max(4px,env(safe-area-inset-bottom));
    gap:clamp(3px,.8vh,8px);
  }
  .heroCrew{height:clamp(96px,16.5vh,150px)}
  .signBoard{width:96%;height:clamp(52px,8vh,72px)}
  #gameTitle{font-size:clamp(18px,min(4.2vh,6.2vw),34px)!important}
  #tagline{font-size:clamp(5.5px,1.3vh,8px)!important}
  #scoreRail{height:clamp(48px,7.8vh,68px)!important}
  #pods{height:clamp(86px,12.5vh,112px)!important}
  #pods .pod{max-width:135px;padding:4px 4px 3px}
  .podTop{height:clamp(34px,5.6vh,48px)!important}
  #controls{height:clamp(52px,8vh,68px)!important}
  #board .stage #controls .artBtn.play{width:clamp(78px,20vw,104px)!important}
  #board .stage #controls .artBtn.deal{width:clamp(68px,17vw,90px)!important}
  #board .stage #controls .artBtn.snap{width:clamp(100px,26vw,136px)!important;height:clamp(54px,8.4vh,72px)!important}
  #narrator{height:clamp(40px,6.2vh,54px)}
  #rail{
    height:clamp(148px,19.5vh,190px)!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-rows:1fr .9fr!important;
    grid-template-areas:"profile hall" "ledger ledger"!important;
    gap:clamp(4px,1.4vw,8px)!important;
  }
  #rail #profileCard{grid-area:profile}
  #rail #hallCard{grid-area:hall}
  #rail #deckArea{grid-area:ledger;flex-direction:row!important}
  #deckArea{
    grid-template-columns:auto 1fr!important;
    grid-template-rows:auto 1fr!important;
    gap:0 8px!important;
  }
  #rail .railhead{font-size:clamp(5.5px,1.5vw,8px)!important}
  #rail .pcStats{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  #rail .pcStats dt{font-size:clamp(4.5px,1.15vw,6px)!important}
  #rail .pcStats dd{font-size:clamp(7px,1.9vw,10px)!important}
  #rail .pcCrest{height:clamp(22px,5.4vw,34px)!important}
  #rail .pcRank{font-size:clamp(11px,3.2vw,17px)!important}
  #rail .pcLevel{font-size:clamp(5.5px,1.6vw,8px)!important}
  #rail .pcSmall{font-size:clamp(5.5px,1.6vw,8px)!important}
  #rail .linkbtn{font-size:clamp(5.5px,1.55vw,8px)!important}
  #rail .hall li{font-size:clamp(5.5px,1.6vw,8px)!important}
  #rail .hallNote{font-size:clamp(6px,1.75vw,8.5px)!important}
  #deckImg{width:clamp(26px,7vw,40px)!important}
  #deckPlate .plateBig{font-size:clamp(13px,4vw,22px)!important}
  #deckPlate .plateLabel{font-size:clamp(4.5px,1.3vw,6.5px)!important}
  #deckPlate .plateSmall{font-size:clamp(5px,1.5vw,7.5px)!important}
  #bannerWrap{width:92vw!important;top:45%!important}
  #bannerName{font-size:clamp(16px,4.6vh,30px)!important}
  #bannerSub{font-size:clamp(5.5px,1.4vh,9px)!important}
  .setupSheet{
    width:min(384px,92vw)!important;
    max-height:88dvh!important;
    padding:clamp(18px,3.2vh,26px) clamp(20px,5.4vw,32px) clamp(22px,4.2vh,32px)!important;
  }
  .setupSheet h2{font-size:clamp(24px,4.2vh,34px)!important}
  .setupSheet .choice{height:clamp(48px,7.6vh,62px)!important}
  .setupSheet .choice span{font-size:clamp(17px,3.2vh,27px)!important}
  .setupSheet .deckMath{font-size:clamp(7px,1.4vh,9.5px)!important}
  .setupSheet .rulesLine{font-size:clamp(5.5px,1.15vh,8px)!important}
  .winSheet{width:min(400px,94vw)!important}
  .winSheet .winBody{padding:8px 22px 16px!important}
}

/* short landscape screens: keep the column tall and the type small */
@media (min-aspect-ratio:19/20) and (max-height:620px){
  #board .stage{gap:4px;padding:4px 0}
  .heroCrew{height:clamp(84px,16vh,120px)}
  .signBoard{height:clamp(48px,8vh,64px)}
  #pods{height:clamp(82px,13.5vh,104px)}
  #rail{height:clamp(92px,17vh,120px)}
  #narrator{height:40px}
  #controls{height:52px}
  #board .stage #controls .artBtn{height:48px!important}
  #board .stage #controls .artBtn.snap{height:56px!important}
}

@media (max-aspect-ratio:19/20) and (max-height:720px){
  .heroCrew{height:clamp(88px,14vh,120px)}
  #rail{height:clamp(138px,19vh,168px)!important}
}

/* ---------- carved oak seat tiles on the note ---------- */
.setupSheet .choice{
  background:
    radial-gradient(circle at 7px 7px,#FFE0A0 0 1.4px,#8A611A 2px 3.2px,rgba(20,12,5,.9) 3.6px 4.4px,transparent 5px),
    radial-gradient(circle at calc(100% - 7px) 7px,#FFE0A0 0 1.4px,#8A611A 2px 3.2px,rgba(20,12,5,.9) 3.6px 4.4px,transparent 5px),
    radial-gradient(circle at 7px calc(100% - 7px),#FFE0A0 0 1.4px,#8A611A 2px 3.2px,rgba(20,12,5,.9) 3.6px 4.4px,transparent 5px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px),#FFE0A0 0 1.4px,#8A611A 2px 3.2px,rgba(20,12,5,.9) 3.6px 4.4px,transparent 5px),
    linear-gradient(180deg,rgba(96,58,32,.3),rgba(20,11,6,.45)),
    url('assets/tavern_wood.webp') center/cover!important;
  border:1.5px solid #2A1708!important;
  border-radius:5px!important;
  box-shadow:inset 0 0 0 2px rgba(201,147,43,.5),inset 0 0 0 7px rgba(20,12,6,.42),0 4px 7px rgba(0,0,0,.5)!important;
  filter:none!important;
}
.setupSheet .choice::before{
  content:""!important;
  position:absolute!important;
  inset:6px!important;
  border-radius:3px;
  background:linear-gradient(180deg,#71281B,#40120C 58%,#2A0906)!important;
  border:1px solid rgba(246,217,140,.45)!important;
  box-shadow:inset 0 0 15px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,220,160,.18)!important;
  z-index:1;
  pointer-events:none;
}
.setupSheet .choice span,.setupSheet .choice small{position:relative;z-index:2}
.setupSheet .choice span{color:#F6D98C!important;text-shadow:0 2px 0 #2A0704,0 0 10px rgba(0,0,0,.6)!important}
.setupSheet .choice small{color:#EAD9B4!important}
.setupSheet .choice.sel{
  box-shadow:inset 0 0 0 2.5px #F6D98C,inset 0 0 0 7px rgba(20,12,6,.3),0 0 22px rgba(246,217,140,.55),0 4px 7px rgba(0,0,0,.5)!important;
}
.setupSheet .choice.sel::before{
  background:linear-gradient(180deg,#8A5A12,#4A2A08 58%,#2A1505)!important;
  border-color:#F6D98C!important;
  box-shadow:inset 0 0 18px rgba(246,217,140,.24),inset 0 1px 0 rgba(255,240,190,.32)!important;
}
.setupSheet .choice.sel::after{
  content:""!important;
  position:absolute!important;
  inset:8px!important;
  border:1px solid rgba(255,240,190,.8)!important;
  border-radius:2px!important;
  box-shadow:inset 0 0 12px rgba(246,217,140,.22)!important;
  z-index:2;
  pointer-events:none!important;
}
.setupSheet .choice.sel span{color:#FFF6D0!important}

/* ---------- seat pods: clear names, deck hand only when it matters ---------- */
#pods{height:clamp(98px,15.2vh,142px)!important}
.snapHome{
  width:34%!important;
  right:-3%!important;
  top:-6%!important;
  opacity:0!important;
  transition:opacity .15s!important;
}
.snapHome::after{font-size:clamp(4px,.9vh,6px)!important}
#pods .pod.homeHover .snapHome,
#pods .pod.homeFlash .snapHome,
#pods .pod.dealTurn .snapHome{opacity:1!important;transform:rotate(-12deg) scale(1.06)!important}
#pods .pod.homeHover,
#pods .pod.homeFlash{box-shadow:inset 0 0 0 1.5px rgba(30,18,8,.9),0 0 0 2px rgba(246,217,140,.7),0 0 22px rgba(246,217,140,.4),0 6px 11px rgba(0,0,0,.6)!important}
.boonTitle.boonEmpty{display:none!important}
.podBoons:not(:has(.boonTitle:not(.boonEmpty))):not(:has(.shameTag:not([hidden]))){display:none!important}
.podName{font-size:clamp(6px,1.45vh,9.5px)!important}
.podKey{font-size:clamp(4.5px,1.1vh,7.5px)!important}
.podMeta{font-size:clamp(6px,1.4vh,9.5px)!important}

/* ---------- below the table: legible parchment cards ---------- */
#rail .railhead{font-size:clamp(6px,1.3vh,8.5px)!important;padding:2.5px 2px!important}
#rail .pcRank{font-size:clamp(12px,2.2vh,19px)!important}
#rail .pcLevel{font-size:clamp(5.5px,1.15vh,8px)!important}
#rail .pcSmall{font-size:clamp(5.5px,1.15vh,8px)!important}
#rail .pcStats dt{font-size:clamp(4.5px,1vh,6.5px)!important}
#rail .pcStats dd{font-size:clamp(7px,1.5vh,11px)!important}
#rail .linkbtn{font-size:clamp(5.5px,1.15vh,8px)!important;padding:3px 2px!important}
#rail .hall li{font-size:clamp(5.5px,1.2vh,8.5px)!important}
#rail .hallNote{font-size:clamp(6px,1.3vh,9px)!important}
#rail .pcCrest{height:clamp(24px,4.4vh,38px)!important}
#deckImg{width:clamp(26px,5vh,48px)!important}
#deckPlate .plateBig{font-size:clamp(13px,2.7vh,25px)!important}
#deckPlate .plateLabel{font-size:clamp(4.5px,1vh,6.5px)!important}
#deckPlate .plateSmall{font-size:clamp(5px,1.1vh,8px)!important}

/* the dealing hand is a hand, not a banner */
:root{--handW:clamp(88px,16vmin,168px)}
.card{--cardW:clamp(78px,15vmin,150px)}
.snapHome{width:30%!important;right:-4%!important;top:-12%!important}
#board #quip .qLine{font-size:clamp(7.5px,1.5vh,11px)!important}
#board #hint{font-size:clamp(7px,1.45vh,10.5px)!important}

/* the note's own wax seal stays clear of the fine rules */
.setupSheet .rulesLine{width:88%!important;margin-left:auto!important;margin-right:auto!important;padding-bottom:2px!important}

/* phone: keep the plate lettering inside the plate */
@media (max-aspect-ratio:19/20){
  #board .stage #controls .artBtn .btnLabel{
    font-size:min(3.4vw,1.9vh)!important;
  }
  #board .stage #controls .artBtn.snap .btnLabel{
    font-size:min(5.4vw,2.6vh)!important;
  }
}

/* short landscape: the room is too short for a full column, so the
   ledger and honours move to a side shelf beside the game */
@media (min-aspect-ratio:19/20) and (max-height:620px){
  #board .stage{
    width:min(96vw,1000px);
    display:grid;
    grid-template-columns:minmax(0,1fr) clamp(188px,23vw,280px);
    grid-template-rows:auto auto minmax(0,1fr) auto auto;
    grid-template-areas:
      "brand rail"
      "pods rail"
      "play rail"
      "controls rail"
      "narrator rail";
    column-gap:10px;
    row-gap:4px;
    padding:4px 0;
    align-items:stretch;
  }
  #board .stage #brand{grid-area:brand}
  #board .stage #scoreRail{grid-area:pods;height:auto!important;min-height:0}
  #board .stage #pods{grid-area:pods}
  #board .stage #playArea{grid-area:play;min-height:0!important}
  #board .stage #controls{grid-area:controls}
  #board .stage #narrator{grid-area:narrator}
  #board .stage #rail{
    grid-area:rail;
    height:auto!important;
    min-height:0;
    display:flex!important;
    flex-direction:column!important;
    gap:4px!important;
  }
  #board .stage #rail .railcard{flex:1 1 0!important;min-height:0}
  .heroCrew{height:clamp(80px,15vh,120px)}
  .signBoard{height:clamp(42px,8vh,62px);width:100%}
  #gameTitle{font-size:clamp(18px,min(4.6vh,3.2vw),34px)!important}
  #tagline{font-size:clamp(5px,1.3vh,8px)!important}
  #pods{height:clamp(74px,13.5vh,104px)!important}
  #controls{height:clamp(44px,8.6vh,58px)!important}
  #board .stage #controls .artBtn{height:clamp(42px,8vh,56px)!important}
  #board .stage #controls .artBtn.snap{height:clamp(48px,9vh,64px)!important}
  #board .stage #controls .artBtn .btnLabel{font-size:clamp(8px,2.1vh,15px)!important}
  #board .stage #controls .artBtn.snap .btnLabel{font-size:clamp(13px,2.9vh,24px)!important}
  #narrator{height:clamp(34px,7.4vh,48px)}
  #board #hint{font-size:clamp(5.5px,1.35vh,9px)!important}
  #board #quip .qLine{font-size:clamp(6px,1.45vh,10px)!important}
  #board #quip .qWho{display:none!important}
  :root{--cardW:clamp(56px,11.4vh,86px)}
  #playArea #fuse{width:min(70%,340px)!important;top:5px!important}
  #rail .railhead{font-size:clamp(5px,1.5vh,8px)!important}
  #rail .pcRank{font-size:clamp(10px,2.4vh,17px)!important}
  #rail .pcStats dd{font-size:clamp(6.5px,1.6vh,10px)!important}
  #rail .pcStats dt{font-size:clamp(4px,1vh,6px)!important}
  #rail .hall li{font-size:clamp(5px,1.35vh,8px)!important}
  #rail .hallNote{font-size:clamp(5.5px,1.45vh,8.5px)!important}
  #rail .linkbtn{font-size:clamp(5px,1.25vh,7.5px)!important;padding:2px 2px!important}
  #deckImg{width:clamp(24px,6vh,42px)!important}
  #deckPlate .plateBig{font-size:clamp(11px,2.8vh,22px)!important}
}

/* phone: the card under the table needs room for the full ledger, and the
   negative crown must sit below the sign, not behind it */
@media (max-aspect-ratio:19/20){
  #rail{
    height:clamp(184px,22vh,208px)!important;
    grid-template-rows:1.42fr .78fr!important;
  }
  #rail .railcard{padding:3px 7px!important}
  #rail .pcTop{margin-bottom:1px!important}
  #rail .pcXp{margin:1px 0!important}
  #rail .pcStats{margin:1px 0 0!important}
  #rail .railBtns{margin-top:1px!important}
}

/* ---------- painted seat plaques and parchment ledgers ---------- */
#pods .pod{
  background:url('assets/new/oak_seat.webp') center/100% 100% no-repeat!important;
  border:0!important;
  border-radius:6px!important;
  box-shadow:0 7px 14px rgba(0,0,0,.6)!important;
  padding:7px 8px 5px!important;
}
#pods .pod::before{display:none!important}
#pods .pod.turn{
  box-shadow:0 0 0 2px rgba(246,217,140,.85),0 0 26px rgba(246,217,140,.45),0 7px 14px rgba(0,0,0,.6)!important;
}
#pods .pod.dealTurn{
  box-shadow:0 0 0 2px rgba(246,217,140,.9),0 0 24px rgba(246,217,140,.5),0 7px 14px rgba(0,0,0,.6)!important;
}
#pods .pod.win{
  box-shadow:0 0 0 2px #F6D98C,0 0 28px rgba(246,217,140,.6),0 7px 14px rgba(0,0,0,.6)!important;
}
#rail .railcard{
  background:url('assets/new/parchment_panel.webp') center/100% 100% no-repeat!important;
  border:0!important;
  border-radius:3px!important;
  box-shadow:0 8px 16px rgba(0,0,0,.55)!important;
}
#rail .railcard::after{display:none!important}
#rail .railhead{
  box-shadow:0 1px 0 rgba(255,245,215,.55),0 0 0 1px rgba(23,20,15,.5)!important;
}

/* the house ledger reads on one line in the phone card */
@media (max-aspect-ratio:19/20){
  #deckPlate{flex-wrap:nowrap!important;gap:0 3px!important;align-items:baseline!important}
  #deckPlate .plateSmall{flex-basis:auto!important}
  #deckArea{gap:0 5px!important}
}

/* ---------- wide landscape: the tavern table spreads out ---------- */
@media (min-aspect-ratio:19/20) and (min-height:621px){
  #board .stage{
    width:min(96vw,1240px);
    display:grid;
    grid-template-columns:minmax(0,1fr) clamp(240px,24vw,330px);
    grid-template-rows:auto auto minmax(0,1fr) auto auto;
    grid-template-areas:
      "brand rail"
      "pods rail"
      "play rail"
      "controls rail"
      "narrator rail";
    column-gap:clamp(10px,1.5vw,22px);
    row-gap:clamp(5px,1vh,10px);
    padding:clamp(6px,1.2vh,14px) 0 max(6px,env(safe-area-inset-bottom));
    align-items:stretch;
  }
  #board .stage #brand{grid-area:brand}
  #board .stage #scoreRail{grid-area:pods;height:auto!important;min-height:0}
  #board .stage #pods{grid-area:pods}
  #board .stage #playArea{grid-area:play;min-height:0!important}
  #board .stage #controls{grid-area:controls}
  #board .stage #narrator{grid-area:narrator}
  #board .stage #rail{
    grid-area:rail;
    height:auto!important;
    min-height:0;
    display:flex!important;
    flex-direction:column!important;
    gap:clamp(6px,1.2vh,11px)!important;
  }
  #board .stage #rail .railcard{flex:1 1 0!important;min-height:0}
  .heroCrew{height:clamp(112px,18vh,200px)}
  .signBoard{width:min(96%,780px);height:clamp(54px,8.6vh,90px)}
  #gameTitle{font-size:clamp(24px,min(4.8vh,4.6vw),50px)!important}
  #tagline{font-size:clamp(6.5px,1.45vh,11px)!important}
  #pods{height:clamp(110px,16.2vh,152px)!important}
  #pods .pod{max-width:230px}
  #controls{height:clamp(60px,9vh,92px)!important}
  #board .stage #controls .artBtn{height:clamp(54px,8.4vh,76px)!important}
  #board .stage #controls .artBtn.snap{height:clamp(62px,9.6vh,88px)!important}
  #board .stage #controls .artBtn .btnLabel{font-size:clamp(10px,2vh,19px)!important}
  #board .stage #controls .artBtn.snap .btnLabel{font-size:clamp(16px,2.8vh,28px)!important}
  #narrator{height:clamp(44px,6.6vh,64px)}
  #board #hint{font-size:clamp(7px,1.4vh,11px)!important}
  #board #quip .qLine{font-size:clamp(7.5px,1.5vh,11.5px)!important}
  #rail .railhead{font-size:clamp(6px,1.35vh,9px)!important;padding:3px 2px!important}
  #rail .pcRank{font-size:clamp(13px,2.2vh,20px)!important}
  #rail .pcLevel{font-size:clamp(6px,1.2vh,8.5px)!important}
  #rail .pcSmall{font-size:clamp(6px,1.2vh,8.5px)!important}
  #rail .pcStats dt{font-size:clamp(5px,1.05vh,7px)!important}
  #rail .pcStats dd{font-size:clamp(8px,1.55vh,12px)!important}
  #rail .linkbtn{font-size:clamp(6px,1.2vh,8.5px)!important;padding:3px 2px!important}
  #rail .hall li{font-size:clamp(6px,1.25vh,9px)!important}
  #rail .hallNote{font-size:clamp(6.5px,1.35vh,9.5px)!important}
  #rail .pcCrest{height:clamp(28px,5vh,44px)!important}
  #deckImg{width:clamp(30px,5.4vh,52px)!important}
  #deckPlate .plateBig{font-size:clamp(15px,3vh,28px)!important}
  #deckPlate .plateLabel{font-size:clamp(5px,1.05vh,7.5px)!important}
  #deckPlate .plateSmall{font-size:clamp(6px,1.15vh,8.5px)!important}
}

/* breathing room at the top, and painted panels that stay inside their cards */
.heroCrew{padding-top:clamp(4px,1.1vh,12px);box-sizing:border-box}
#rail .railcard{overflow:hidden!important}
#rail #hallCard .hall:empty{display:none!important}
#rail #hallCard .hallNote{flex:1!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important}
#deckArea{grid-template-rows:auto minmax(0,1fr)!important}
#deckImg,#deckPlate{align-self:center!important}
#rail #profileCard::before{
  content:"";position:absolute;right:6%;bottom:12%;width:42%;aspect-ratio:1;
  background:url('assets/new/crest_shield.webp') center/contain no-repeat;
  opacity:.08;pointer-events:none;z-index:0;
}
#rail #profileCard>*{position:relative;z-index:1}
#rail #hallCard::before{
  content:"";position:absolute;left:50%;top:52%;width:38%;aspect-ratio:1;
  transform:translate(-50%,-50%);
  background:url('assets/new/crest_leaf.webp') center/contain no-repeat;
  opacity:.09;pointer-events:none;z-index:0;
}
#rail #hallCard>*{position:relative;z-index:1}
body:has(#setup.on) #scoreRail{display:none!important}

@media (max-aspect-ratio:19/20){
  .heroCrew{padding-top:7px}
  #rail{
    height:clamp(190px,24vh,214px)!important;
    grid-template-rows:1.5fr .7fr!important;
  }
  #board .stage #controls .artBtn.deal{width:clamp(76px,20vw,96px)!important}
  #board .stage #controls .artBtn.play{width:clamp(78px,20vw,100px)!important}
  #board .stage #controls .artBtn.snap{width:clamp(100px,25vw,132px)!important}
  #board .stage #controls .artBtn .btnLabel{font-size:min(3.25vw,1.8vh)!important}
  #board .stage #controls .artBtn.snap .btnLabel{font-size:min(5.2vw,2.5vh)!important}
  .setupSheet .rulesLine{
    width:auto!important;
    max-width:calc(100% - 96px)!important;
    margin-left:8px!important;margin-right:auto!important;
    text-align:left!important;
    font-size:clamp(7px,1.35vh,9.5px)!important;
    line-height:1.35!important;
  }
  .setupSheet .setupSound{font-size:clamp(6px,1.15vh,8px)!important;padding:3px 12px!important}
}

/* fit the phone ledger fully */
@media (max-aspect-ratio:19/20){
  #rail{height:clamp(184px,22.5vh,206px)!important;grid-template-rows:1.55fr .65fr!important}
  #board .stage #controls .artBtn.deal{width:clamp(76px,20vw,98px)!important}
}
@media (min-aspect-ratio:19/20) and (min-height:621px){
  :root{--cardW:clamp(108px,18vmin,188px)}
}

/* the empty baize still reads as the snapping table */
#board #playArea::after{
  display:block!important;
  content:""!important;
  position:absolute!important;
  left:50%!important;top:54%!important;
  width:min(34%,270px)!important;aspect-ratio:1!important;
  transform:translate(-50%,-50%)!important;
  background:url('assets/new/crest_shield.webp') center/contain no-repeat!important;
  opacity:.11!important;
  border:0!important;box-shadow:none!important;border-radius:0!important;
  pointer-events:none!important;
  z-index:1!important;
}
.feltMotto{
  position:absolute;left:50%;bottom:7%;transform:translateX(-50%);
  margin:0;white-space:nowrap;pointer-events:none;z-index:1;
  font-family:var(--font-logo);font-size:clamp(8px,1.55vh,16px);
  letter-spacing:.16em;text-transform:uppercase;
  color:rgba(246,217,140,.17);
  text-shadow:0 1px 0 rgba(0,0,0,.35);
}
@media (min-aspect-ratio:19/20) and (min-height:621px){
  #rail .railhead{font-size:clamp(7px,1.45vh,10px)!important;padding:4px 2px!important}
  #rail .pcRank{font-size:clamp(17px,2.7vh,26px)!important}
  #rail .pcLevel{font-size:clamp(7px,1.35vh,10px)!important}
  #rail .pcSmall{font-size:clamp(7px,1.35vh,10px)!important}
  #rail .pcStats dt{font-size:clamp(6px,1.2vh,8px)!important}
  #rail .pcStats dd{font-size:clamp(9px,1.75vh,14px)!important}
  #rail .linkbtn{font-size:clamp(7px,1.35vh,10px)!important;padding:4px 2px!important}
  #rail .hall li{font-size:clamp(7px,1.4vh,10px)!important}
  #rail .hallNote{font-size:clamp(8px,1.6vh,11px)!important}
  #rail .pcCrest{height:clamp(34px,6vh,58px)!important}
  #deckImg{width:clamp(36px,6.4vh,64px)!important}
  #deckPlate .plateBig{font-size:clamp(18px,3.6vh,36px)!important}
  #deckPlate .plateLabel{font-size:clamp(5.5px,1.2vh,8px)!important}
  #deckPlate .plateSmall{font-size:clamp(6.5px,1.3vh,9px)!important}
}
@media (max-aspect-ratio:19/20){
  #board .stage{gap:clamp(3px,.6vh,6px)}
  #rail{height:clamp(182px,22.2vh,202px)!important}
  #board .stage #controls .artBtn.deal{width:clamp(76px,20vw,98px)!important}
}

/* the note's fine print is readable, and the seal stays clear of it */
@media (max-aspect-ratio:19/20){
  .setupSheet{max-height:92dvh!important}
  .setupSheet .rulesLine{
    font-size:clamp(8px,1.5vh,10px)!important;
    max-width:calc(100% - 92px)!important;
    line-height:1.4!important;
  }
  .setupSheet .setupSound{font-size:clamp(6.5px,1.25vh,8.5px)!important;padding:4px 14px!important}
  #rail{height:clamp(178px,22vh,198px)!important}
  #board .stage{gap:clamp(3px,.55vh,5.5px)}
  #deckPlate .plateBig{font-size:clamp(12px,2.4vh,20px)!important}
  #deckPlate .plateLabel{font-size:clamp(4.5px,.95vh,6.5px)!important}
  #deckPlate .plateSmall{font-size:clamp(5px,1.05vh,7px)!important}
}
@media (min-aspect-ratio:19/20) and (min-height:621px){
  .setupSheet .rulesLine{
    font-size:clamp(8px,1.35vh,10px)!important;
    max-width:calc(100% - 100px)!important;
    line-height:1.4!important;
  }
  .setupSheet .setupSound{font-size:clamp(7px,1.2vh,9px)!important;padding:4px 14px!important}
}
.feltMotto{color:rgba(246,217,140,.21)}
@media (max-aspect-ratio:19/20){
  #rail{height:clamp(176px,21.5vh,198px)!important}
  #board .stage{gap:clamp(3px,.5vh,5px)}
}
#pods .pod[data-seat="0"]{
  outline:2px solid rgba(246,217,140,.55);
  outline-offset:1px;
}
#pods .pod[data-seat="0"]::after{
  content:"YOU";
  position:absolute;left:5px;top:-9px;
  padding:2px 5px;
  background:linear-gradient(#F6D98C,#C9932B);
  color:#2A1708;border:1px solid #231710;border-radius:2px;
  font-family:'Alegreya Sans',sans-serif;font-weight:800;
  font-size:clamp(5px,1.15vh,8px);line-height:1;letter-spacing:.08em;
  box-shadow:0 2px 3px rgba(0,0,0,.5);
  z-index:9;pointer-events:none;
}

/* the YOU chip sits inside the seat so it survives every crop */
#pods .pod[data-seat="0"]::after{
  left:auto!important;right:5px!important;top:3px!important;
  z-index:12!important;
}

/* short landscape: a real carved sign, larger seat cards, a gilded row on the felt */
@media (min-aspect-ratio:19/20) and (max-height:620px){
  #board .stage{
    width:min(98vw,1040px);
    grid-template-rows:auto auto minmax(0,1fr) auto;
    grid-template-areas:
      "brand rail"
      "pods rail"
      "play rail"
      "controls rail";
  }
  #board .stage #narrator{
    position:absolute!important;
    left:0!important;
    right:calc(clamp(188px,23vw,280px) + clamp(10px,1.5vw,22px))!important;
    bottom:calc(clamp(42px,9vh,58px) + 7px)!important;
    height:34px!important;
    z-index:14!important;
    pointer-events:none!important;
  }
  #narrator .bottomPanel{display:none!important}
  #board #hint{display:none!important}
  #board #quip{bottom:-1px!important;left:4px!important;right:4px!important}
  .heroCrew{height:clamp(84px,20vh,112px)!important;padding-top:2px!important}
  .signBoard{height:clamp(48px,11vh,64px)!important}
  #gameTitle{font-size:clamp(22px,min(4.8vh,4.8vw),40px)!important}
  #tagline{font-size:clamp(5.5px,1.35vh,8.5px)!important}
  #pods{height:clamp(88px,21vh,112px)!important}
  #pods .pod{max-width:220px;padding:6px 7px 4px!important}
  .podTop{height:clamp(34px,9vh,46px)!important}
  .podKey{display:none!important}
  .podName{font-size:clamp(6px,1.7vh,9px)!important}
  .podMeta{font-size:clamp(6px,1.6vh,9px)!important}
  #pods .boonTitle{font-size:clamp(6px,1.65vh,9px)!important}
  #playArea{min-height:0!important}
  :root{--cardW:clamp(70px,18vh,96px)}
  #board #playArea #fuse{width:min(58%,360px)!important;top:4px!important}
  #controls{height:clamp(42px,9vh,58px)!important}
  #board .stage #controls .artBtn{height:clamp(40px,8.4vh,54px)!important}
  #board .stage #controls .artBtn.snap{height:clamp(46px,9.4vh,62px)!important}
  #board .stage #controls .artBtn .btnLabel{font-size:clamp(8px,2.2vh,15px)!important}
  #board .stage #controls .artBtn.snap .btnLabel{font-size:clamp(13px,3vh,24px)!important}
  #board #playArea::after{opacity:.17!important;top:52%!important;width:min(30%,230px)!important}
  .feltMotto{opacity:1!important;color:rgba(246,217,140,.28)!important;font-size:clamp(7px,1.7vh,13px)!important;bottom:6%!important}
  #rail .railhead{font-size:clamp(5px,1.5vh,8px)!important}
  #rail .pcRank{font-size:clamp(10px,2.6vh,17px)!important}
  #rail .pcStats dd{font-size:clamp(7px,1.8vh,11px)!important}
  #rail .pcStats dt{font-size:clamp(4.5px,1.1vh,6.5px)!important}
  #rail .hall li{font-size:clamp(5.5px,1.5vh,8.5px)!important}
  #rail .hallNote{font-size:clamp(6px,1.6vh,9px)!important}
  #rail .linkbtn{font-size:clamp(5.5px,1.4vh,8px)!important}
  #deckImg{width:clamp(26px,6.5vh,44px)!important}
  #deckPlate .plateBig{font-size:clamp(12px,3vh,24px)!important}
  #deckPlate .plateLabel{font-size:clamp(4.5px,1.1vh,7px)!important}
  #deckPlate .plateSmall{font-size:clamp(5.5px,1.25vh,8px)!important}
}

/* the sign gets its carved brass corner caps back */
@media (min-aspect-ratio:19/20){
  .signBoard{
    background-image:
      radial-gradient(circle at 10px 10px,#FFE0A0 0 2.2px,#8A611A 2.8px 4.8px,rgba(20,12,5,.9) 5.4px 6.4px,transparent 7.5px),
      radial-gradient(circle at calc(100% - 10px) 10px,#FFE0A0 0 2.2px,#8A611A 2.8px 4.8px,rgba(20,12,5,.9) 5.4px 6.4px,transparent 7.5px),
      radial-gradient(circle at 10px calc(100% - 10px),#FFE0A0 0 2.2px,#8A611A 2.8px 4.8px,rgba(20,12,5,.9) 5.4px 6.4px,transparent 7.5px),
      radial-gradient(circle at calc(100% - 10px) calc(100% - 10px),#FFE0A0 0 2.2px,#8A611A 2.8px 4.8px,rgba(20,12,5,.9) 5.4px 6.4px,transparent 7.5px),
      linear-gradient(180deg,rgba(74,42,24,.5),rgba(20,11,6,.7)),
      url('assets/tavern_wood.webp')!important;
    background-position:left top,right top,left bottom,right bottom,center,center!important;
    background-size:26px 26px,26px 26px,26px 26px,26px 26px,auto,cover!important;
    background-repeat:no-repeat!important;
  }
}
@media (min-aspect-ratio:19/20) and (max-height:620px){
  :root{--cardW:clamp(76px,20vh,104px)}
}
@media (min-aspect-ratio:19/20) and (max-height:620px){
  .setupSheet{width:min(420px,86vw)!important;max-height:94dvh!important}
  .setupSheet .rulesLine{
    font-size:clamp(6.5px,1.55vh,8.5px)!important;
    max-width:calc(100% - 82px)!important;
    line-height:1.32!important;
    margin-left:4px!important;margin-right:auto!important;
    text-align:left!important;
  }
  .setupSheet .setupSound{font-size:clamp(5.5px,1.3vh,7.5px)!important;padding:3px 12px!important}
}
@media (max-aspect-ratio:19/20){
  .heroCrew{padding-top:12px}
  #deckPlate .plateSmall{font-size:clamp(4.5px,.95vh,6.2px)!important;line-height:1.12!important}
  #deckPlate .plateLabel{font-size:clamp(4.5px,.9vh,6.2px)!important}
}
@media (min-aspect-ratio:19/20) and (max-height:620px){
  .heroCrew{padding-top:10px!important}
}
@media (max-aspect-ratio:19/20){
  #deckArea #deckPlate{transform:translateY(-3px)!important}
}
#pods .pod[data-seat="0"]::after{
  font-size:clamp(6.5px,1.5vh,9px)!important;
  padding:2px 6px!important;
}

/* the crew sits lower, clear of the top edge, with a carved beam behind */
.heroCrew img{transform:translateY(clamp(8px,2.2vh,22px))}
#brand::before{
  content:"";position:absolute;left:-1%;right:-1%;top:-6px;
  height:clamp(14px,2.4vh,24px);
  background:linear-gradient(180deg,rgba(58,36,22,.98),rgba(20,11,6,.98) 72%,rgba(42,23,8,.98)),url('assets/tavern_wood.webp') center/cover;
  border-bottom:2px solid #C9932B;
  border-radius:0 0 5px 5px;
  box-shadow:0 5px 9px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,220,150,.22);
  z-index:1;pointer-events:none;
}
.signBoard{
  background-image:
    radial-gradient(circle at 10px 10px,#FFE0A0 0 2.2px,#8A611A 2.8px 4.8px,rgba(20,12,5,.9) 5.4px 6.4px,transparent 7.5px),
    radial-gradient(circle at calc(100% - 10px) 10px,#FFE0A0 0 2.2px,#8A611A 2.8px 4.8px,rgba(20,12,5,.9) 5.4px 6.4px,transparent 7.5px),
    radial-gradient(circle at 10px calc(100% - 10px),#FFE0A0 0 2.2px,#8A611A 2.8px 4.8px,rgba(20,12,5,.9) 5.4px 6.4px,transparent 7.5px),
    radial-gradient(circle at calc(100% - 10px) calc(100% - 10px),#FFE0A0 0 2.2px,#8A611A 2.8px 4.8px,rgba(20,12,5,.9) 5.4px 6.4px,transparent 7.5px),
    linear-gradient(180deg,rgba(74,42,24,.5),rgba(20,11,6,.7)),
    url('assets/tavern_wood.webp')!important;
  background-position:left top,right top,left bottom,right bottom,center,center!important;
  background-size:26px 26px,26px 26px,26px 26px,26px 26px,auto,cover!important;
  background-repeat:no-repeat!important;
}
#rail .railcard{
  background-image:
    radial-gradient(circle at 50% 9px,#FFE0A0 0 2px,#8A611A 2.7px 4.1px,rgba(20,12,5,.85) 4.7px 5.6px,transparent 6.4px),
    url('assets/new/parchment_panel.webp')!important;
  background-position:center top,center!important;
  background-size:24px 24px,100% 100%!important;
  background-repeat:no-repeat!important;
}

/* a thin carved cabinet edge around the live tavern */
#board::before{
  display:block!important;
  content:""!important;
  position:fixed!important;inset:0!important;
  z-index:55!important;
  pointer-events:none!important;
  border:5px solid transparent!important;
  border-image:url('assets/tavern_wood.webp') 40 round!important;
  box-shadow:inset 0 0 0 1px rgba(246,217,140,.7),inset 0 0 0 3px rgba(23,20,15,.8),inset 0 0 18px rgba(0,0,0,.5)!important;
}
@media (max-aspect-ratio:19/20){
  #board .stage{padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .brassSound{right:clamp(12px,4vw,24px)!important;top:clamp(10px,1.6vh,18px)!important}
}
@media (max-aspect-ratio:19/20){
  #rail{grid-template-rows:1.45fr .75fr!important}
}

/* painted table centre and painted leather control plates */
#board #playArea::after{display:none!important}
#board .stage #controls .artBtn.play{background-image:url('assets/new/btn_deal.webp')!important}
#board .stage #controls .artBtn.play .btnLabel{color:#FFF1CC!important}

/* portrait: the full painted carved sign, with the title on its board */
@media (max-aspect-ratio:19/20){
  #brand{
    width:96%!important;
    height:auto!important;
    aspect-ratio:1024/650!important;
    margin:6px auto 0!important;
    background:url('assets/new/sign_heroes_detail.webp') center/100% 100% no-repeat!important;
    filter:drop-shadow(0 14px 18px rgba(0,0,0,.65))!important;
    display:block!important;
  }
  #brand::before{display:none!important}
  #brand .heroCrew{display:none!important}
  #brand .signBoard{
    position:absolute!important;
    left:7%!important;right:7%!important;
    top:42%!important;bottom:16%!important;
    width:auto!important;height:auto!important;
    padding:0!important;
    background:none!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    display:flex!important;
    flex-direction:column;
    align-items:center;
    justify-content:center;
  }
  #brand .signBoard::before,#brand .signBoard::after{display:none!important}
  #gameTitle{font-size:clamp(22px,min(4.4vh,6.6vw),34px)!important}
  #tagline{font-size:clamp(5.5px,1.35vh,8.5px)!important}
}
@media (max-aspect-ratio:19/20){
  #brand{width:94%!important}
  #board #playArea{min-height:130px!important}
}

/* compact portrait for shorter phones */
@media (max-aspect-ratio:19/20) and (max-height:820px){
  #brand{width:82%!important}
  #pods{height:clamp(84px,12vh,112px)!important}
  #rail{height:clamp(158px,22vh,190px)!important;grid-template-rows:1.45fr .75fr!important}
  #board #playArea{min-height:110px!important}
  #controls{height:clamp(52px,8vh,64px)!important}
  #board .stage #controls .artBtn{height:clamp(46px,7.6vh,58px)!important}
  #board .stage #controls .artBtn.snap{height:clamp(52px,8.4vh,64px)!important}
  #narrator{height:clamp(42px,6vh,50px)!important}
  #board .stage{gap:clamp(3px,.55vh,5px)}
}
@media (max-aspect-ratio:19/20) and (max-height:820px){
  #deckArea #deckPlate{transform:translateY(-7px)!important}
}
@media (max-aspect-ratio:19/20) and (max-height:820px){
  #deckPlate .plateSmall{display:none!important}
}
.boonTitle.boonShame{
  background:linear-gradient(180deg,#9A3325,#5A1810)!important;
  color:#FFF3D6!important;
  border-color:#231710!important;
  box-shadow:0 0 0 1px #231710,0 0 0 2px rgba(226,75,51,.45),1px 2px 0 rgba(0,0,0,.4)!important;
  text-shadow:0 1px 0 #2A0704;
}

/* portrait: the unified brass and oak frame around the tavern */
.tavernFrame{display:none}
@media (max-aspect-ratio:19/20){
  .tavernFrame{
    display:block;
    position:fixed;
    inset:0;
    z-index:56;
    pointer-events:none;
    border:7px solid transparent;
    border-image:url('assets/tavern_wood.webp') 44 round;
    box-shadow:
      inset 0 0 0 1px rgba(10,6,3,.95),
      inset 0 0 0 2.5px #C9932B,
      inset 0 0 0 3.5px #F6D98C,
      inset 0 0 0 4.5px #7A5410,
      inset 0 0 0 5.5px rgba(16,9,4,.92),
      inset 0 0 20px rgba(0,0,0,.55);
  }
  .tavernFrame::before{
    content:"";
    position:absolute;
    inset:0;
    background:
      linear-gradient(#D8A438,#8A611A) left top/26px 4px no-repeat,
      linear-gradient(#D8A438,#8A611A) left top/4px 26px no-repeat,
      linear-gradient(#D8A438,#8A611A) right top/26px 4px no-repeat,
      linear-gradient(#D8A438,#8A611A) right top/4px 26px no-repeat,
      linear-gradient(#D8A438,#8A611A) left bottom/26px 4px no-repeat,
      linear-gradient(#D8A438,#8A611A) left bottom/4px 26px no-repeat,
      linear-gradient(#D8A438,#8A611A) right bottom/26px 4px no-repeat,
      linear-gradient(#D8A438,#8A611A) right bottom/4px 26px no-repeat;
    filter:drop-shadow(0 1px 1px rgba(0,0,0,.85));
  }
  .tavernFrame::after{
    content:"";
    position:absolute;
    inset:0;
    background:
      radial-gradient(circle at 8px 8px,#FFEFB8 0 1.6px,#E8C46A 2.1px 3.6px,#7A5410 4px 5.4px,rgba(20,12,5,.95) 5.8px 6.4px,transparent 7px),
      radial-gradient(circle at calc(100% - 8px) 8px,#FFEFB8 0 1.6px,#E8C46A 2.1px 3.6px,#7A5410 4px 5.4px,rgba(20,12,5,.95) 5.8px 6.4px,transparent 7px),
      radial-gradient(circle at 8px calc(100% - 8px),#FFEFB8 0 1.6px,#E8C46A 2.1px 3.6px,#7A5410 4px 5.4px,rgba(20,12,5,.95) 5.8px 6.4px,transparent 7px),
      radial-gradient(circle at calc(100% - 8px) calc(100% - 8px),#FFEFB8 0 1.6px,#E8C46A 2.1px 3.6px,#7A5410 4px 5.4px,rgba(20,12,5,.95) 5.8px 6.4px,transparent 7px);
  }
}

/* every seat is human: say so plainly on the set-the-table note */
.setupSheet .allHuman{
  margin:3px 0 2px;
  font-family:'Alegreya Sans',sans-serif;
  font-weight:700;
  font-size:clamp(9px,1.55vh,12px);
  line-height:1.25;
  color:#5A3A1A;
}

/* the local seat's place at the table, in the same gold as the YOU badge */
#pods .podKey.youSeat{
  color:#2A1708!important;
  background:linear-gradient(180deg,#F6D98C,#C9932B)!important;
  border:1px solid #231710!important;
  font-family:'Alegreya Sans',sans-serif!important;
  font-weight:800!important;
  font-size:clamp(6.5px,1.3vh,9.5px)!important;
  letter-spacing:.04em!important;
  padding:.13em .4em!important;
  box-shadow:0 1px 0 rgba(0,0,0,.55),inset 0 1px 0 rgba(255,245,210,.65)!important;
}
@media (min-aspect-ratio:19/20) and (max-height:620px){
  #pods .podKey.youSeat{
    display:block!important;
    font-size:clamp(5.5px,1.35vh,8.5px)!important;
    padding:.08em .3em!important;
  }
}

/* the snap plaque lands on the baize, never across the seats */
#playArea #bannerWrap{
  left:50%!important;
  top:50%!important;
  width:var(--bannerW,min(560px,86vw))!important;
  height:var(--bannerH,auto)!important;
  aspect-ratio:auto!important;
  z-index:22!important;
  container-type:inline-size;
}
#playArea #bannerName{
  font-size:clamp(9px,10cqw,38px)!important;
  line-height:1!important;
}
#playArea #bannerSub{
  font-size:clamp(4.5px,3.3cqw,10px)!important;
}
#playArea #bannerWrap .bannerBurst{
  width:124%!important;
  opacity:.72!important;
}

/* painted collectible cards: gilded frame over the creature art */
.card{
  aspect-ratio:2/3!important;
  border-radius:5.5%!important;
  overflow:hidden!important;
  background-color:#1A0F07!important;
}
.card::before,.card::after{display:none!important}

/* the baize is inset in a carved oak board, not a flat green rectangle */
#board #playArea::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  inset:-20px!important;
  border:12px solid transparent!important;
  border-image:url('assets/tavern_wood.webp') 66 round!important;
  border-radius:14px!important;
  box-shadow:
    0 0 0 1px #160D05,
    inset 0 0 0 1px rgba(255,220,150,.28),
    0 16px 26px rgba(0,0,0,.6)!important;
  pointer-events:none!important;
  z-index:-1!important;
}

/* two gem pips in the top-left of every collectible card */
.card::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  inset:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  opacity:1!important;
  background:
    radial-gradient(circle,#FFF6D0 0 12%,var(--typeInk,#C9932B) 16% 42%,#7A5410 46% 56%,rgba(20,10,4,.92) 60% 68%,transparent 72%) no-repeat calc(var(--cardW)*.175) calc(var(--cardW)*.145)/calc(var(--cardW)*.095) calc(var(--cardW)*.095),
    radial-gradient(circle,#FFF6D0 0 12%,var(--typeInk,#C9932B) 16% 42%,#7A5410 46% 56%,rgba(20,10,4,.92) 60% 68%,transparent 72%) no-repeat calc(var(--cardW)*.295) calc(var(--cardW)*.155)/calc(var(--cardW)*.074) calc(var(--cardW)*.074)!important;
  pointer-events:none!important;
  z-index:2!important;
}

/* the local seat is the loudest plaque on the rail */
#pods .pod[data-seat="0"]{
  outline:2.5px solid #F6D98C!important;
  outline-offset:2px!important;
  box-shadow:
    0 0 0 4px rgba(201,147,43,.35),
    0 0 28px rgba(246,217,140,.55),
    0 8px 16px rgba(0,0,0,.65)!important;
}
#pods .pod[data-seat="0"]::after{
  font-size:clamp(7px,1.3vh,10px)!important;
  padding:2px 7px!important;
}
#pods .podKey.youSeat{
  font-size:clamp(7px,1.35vh,10px)!important;
  padding:.16em .45em!important;
}
#pods .podYouPointer{
  position:absolute;
  left:50%;
  bottom:-10px;
  width:20px;
  height:10px;
  transform:translateX(-50%);
  background:linear-gradient(180deg,#FFEFB8,#E8C46A 55%,#B87A1E);
  clip-path:polygon(0 0,100% 0,50% 100%);
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.55));
  z-index:13;
  pointer-events:none;
}
@media (max-aspect-ratio:19/20){
  #pods .pod[data-seat="0"]{max-width:186px}
}

/* the local name must never be squeezed out of a short portrait seat */
#pods .podName{flex:0 0 auto!important}
@media (max-aspect-ratio:19/20) and (max-height:820px){
  #pods .podTop{height:clamp(28px,5.2vh,38px)!important}
  #pods .podName{
    font-size:clamp(7.5px,1.55vh,10px)!important;
    padding:.08em .2em!important;
    line-height:1.05!important;
  }
  #pods .podKey.youSeat{
    font-size:clamp(6px,1.1vh,8px)!important;
    padding:.05em .28em!important;
    line-height:1.1!important;
  }
  #pods .pod[data-seat="0"]::after{
    font-size:clamp(6px,1.15vh,8.5px)!important;
    padding:1.5px 5px!important;
  }
}

/* painted gilded seat plaques, richer than a flat leather pad */
#pods .pod{
  background:url('assets/new/seat_plaque.webp') center/100% 100% no-repeat!important;
  background-color:#2C120B!important;
  border:0!important;
  border-radius:6px!important;
  box-shadow:0 7px 14px rgba(0,0,0,.6)!important;
  padding:8px 9px 6px!important;
}
#pods .pod[data-seat="0"] .podName{
  background:linear-gradient(#FFF6DA,#EBD5A6)!important;
  border:1.5px solid #C9932B!important;
  box-shadow:0 0 0 1px #231710,0 1px 0 rgba(255,255,255,.6),0 2px 3px rgba(0,0,0,.5)!important;
  color:#2A1708!important;
}
@media (max-aspect-ratio:19/20){
  #pods .pod[data-seat="0"] .podName{font-size:clamp(7.5px,1.5vh,11px)!important}
}
#pods .pod[data-seat="0"]::after{
  content:"YOU"!important;
  padding-left:13px!important;
  background:
    radial-gradient(circle at 8px 50%,#FFD9D0 0 1.2px,#C0392B 2px 4px,#6E1408 4.6px 5.6px,transparent 6.2px),
    linear-gradient(180deg,#FFF6D2,#F6D98C 34%,#C9932B 68%,#8A611A)!important;
  border:1px solid #231710!important;
  box-shadow:0 0 0 1px #F6D98C,0 2px 4px rgba(0,0,0,.65),inset 0 1px 0 #FFFBE8!important;
  color:#2A1708!important;
  text-shadow:0 1px 0 rgba(255,255,255,.45)!important;
  letter-spacing:.1em!important;
}
@media (max-aspect-ratio:19/20) and (max-height:820px){
  #pods .pod[data-seat="0"]::after{
    padding:1.5px 5px 1.5px 11px!important;
    font-size:clamp(6px,1.15vh,8.5px)!important;
  }
}

/* the seat rail is a painted oak board, not empty dark air */
#pods{
  background:
    linear-gradient(180deg,rgba(34,18,9,.28),rgba(8,5,2,.5)),
    url('assets/tavern_wood.webp') center/cover!important;
  border-radius:9px!important;
  box-shadow:
    inset 0 0 0 1px rgba(246,217,140,.28),
    inset 0 0 18px rgba(0,0,0,.35),
    0 5px 12px rgba(0,0,0,.45)!important;
}
@media (max-aspect-ratio:19/20) and (max-height:820px){
  #pods .pod[data-seat="0"] .podName{font-size:clamp(8px,1.65vh,11px)!important}
}

/* portrait phone: the table message stays on the noticeboard strip, and the
   dealing hand reaches over the seat's edge instead of covering its face */
@media (max-aspect-ratio:19/20){
  #narrator .statusTag{
    font-size:clamp(11px,3.2vw,15px)!important;
    padding:.3em .55em!important;
    max-width:94%!important;
    white-space:normal!important;
    text-align:center;
  }
  #pods .snapHome{
    width:24%!important;
    right:-22%!important;
    top:-22%!important;
  }
}

/* short landscape: the noticeboard strip sits over the felt, so the table
   message rides the top beam instead of the cards */
@media (min-aspect-ratio:19/20) and (max-height:620px){
  #statusTag{
    position:fixed!important;
    left:50%!important;
    top:max(8px,env(safe-area-inset-top))!important;
    bottom:auto!important;
    transform:translateX(-50%) rotate(-1deg)!important;
    z-index:60!important;
    font-size:clamp(11px,2.6vh,15px)!important;
    padding:.3em .6em!important;
    max-width:76vw!important;
    white-space:normal!important;
    text-align:center;
  }
  #statusTag.on{animation:stampTop .2s cubic-bezier(.2,.9,.2,1)!important}
}
@keyframes stampTop{
  0%{opacity:0;transform:translateX(-50%) translateY(-8px) rotate(-7deg) scale(1.3)}
  100%{opacity:1;transform:translateX(-50%) rotate(-1deg) scale(1)}
}
