/* V10.25.13: TV switches from room setup to full-screen battlefield after first-player selection. */
body.kh-tv-route.kh-tv-playing { overflow:hidden; background:#071321; }
body.kh-tv-route.kh-tv-playing main { max-width:none!important; width:100%!important; height:100dvh!important; min-height:0!important; margin:0!important; padding:0!important; display:block!important; }
body.kh-tv-route.kh-tv-playing main>header,
body.kh-tv-route.kh-tv-playing #entry,
body.kh-tv-route.kh-tv-playing #room>.top,
body.kh-tv-route.kh-tv-playing #khQrBlock,
body.kh-tv-route.kh-tv-playing #room>.hint,
body.kh-tv-route.kh-tv-playing #room>.grid,
body.kh-tv-route.kh-tv-playing #room>.faction-panel,
body.kh-tv-route.kh-tv-playing #room>.setup-coin,
body.kh-tv-route.kh-tv-playing #room>.opening-banner,
body.kh-tv-route.kh-tv-playing #room>.viewtools,
body.kh-tv-route.kh-tv-playing #room>#role,
body.kh-tv-route.kh-tv-playing #room>#role~p,
body.kh-tv-route.kh-tv-playing #room>.buttons,
body.kh-tv-route.kh-tv-playing #room>.hand-panel,
body.kh-tv-route.kh-tv-playing #room>h3,
body.kh-tv-route.kh-tv-playing #room>#events,
body.kh-tv-route.kh-tv-playing #room>#events~* { display:none!important; }
body.kh-tv-route.kh-tv-playing #room { display:block!important; width:100%!important; max-width:none!important; height:100dvh!important; min-height:0!important; margin:0!important; padding:0!important; border:0!important; border-radius:0!important; background:#071321!important; box-shadow:none!important; overflow:hidden!important; }
body.kh-tv-route.kh-tv-playing #room>.battlefield { display:flex!important; width:100%!important; height:100dvh!important; min-height:0!important; max-height:100dvh!important; margin:0!important; border-radius:0!important; box-sizing:border-box!important; }
/* Existing card zones and gameplay rendering remain intact. */


/* V10.25.14 — immersive 16:9 tabletop. TV presentation only; live zones and card rendering unchanged. */
body.kh-tv-route.kh-tv-playing {
  background:#081727;
}
body.kh-tv-route.kh-tv-playing #room>.battlefield {
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr) 0px minmax(0,1fr)!important;
  gap:0!important;
  padding:clamp(6px,1.2vh,15px) clamp(8px,2vw,35px)!important;
  overflow:hidden!important;
  isolation:isolate;
  background:
    radial-gradient(ellipse at 50% 48%,#f7d18d2a 0%,#a67b3b18 28%,transparent 60%),
    linear-gradient(90deg,#031321bd,transparent 13%,transparent 87%,#031321bd),
    linear-gradient(#06172d55,#06172d55),
    url('/playmat.jpg') center / cover no-repeat!important;
  border:0!important;
}
body.kh-tv-route.kh-tv-playing #room>.battlefield::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse at center,transparent 35%,#03101bd9 100%);
}
body.kh-tv-route.kh-tv-playing #upperSide,
body.kh-tv-route.kh-tv-playing #lowerSide{
  display:flex;min-height:0;min-width:0;align-items:stretch;justify-content:center;
}
body.kh-tv-route.kh-tv-playing #upperSide{grid-row:1}
body.kh-tv-route.kh-tv-playing #lowerSide{grid-row:3}
body.kh-tv-route.kh-tv-playing .playmat-side{
  display:grid;min-height:0;width:min(100%,1500px);
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:clamp(3px,.6vh,8px);
}
body.kh-tv-route.kh-tv-playing .opponent-side{
  grid-template-rows:auto auto minmax(0,1fr);
}
body.kh-tv-route.kh-tv-playing .mat-player-bar{
  display:flex;justify-content:space-between;align-items:center;
  min-height:clamp(26px,4vh,45px);
  padding:3px clamp(8px,1.4vw,20px);
  border:1px solid #d6b76b91;border-radius:9px;
  background:linear-gradient(90deg,#06192de8,#112d46db,#06192de8);
  font:600 clamp(12px,1.3vw,22px) Georgia,serif;
  box-shadow:0 3px 12px #0008;
}
body.kh-tv-route.kh-tv-playing .mat-player-bar strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.kh-tv-route.kh-tv-playing .mat-score{
  flex:none;font:600 clamp(10px,1.1vw,18px) Georgia,serif;
  background:#071a2b;padding:5px 12px;
}
body.kh-tv-route.kh-tv-playing .physical-mat{
  width:100%;height:100%!important;min-height:0;
  background-size:100% 100%;
  border:2px solid #c6a364;
  border-radius:13px;
  box-shadow:0 8px 22px #000b,inset 0 0 25px #0006;
}
body.kh-tv-route.kh-tv-playing .opponent-side .physical-mat{
  transform:rotate(180deg);
}
body.kh-tv-route.kh-tv-playing .opponent-side .physical-mat .mat-zone,
body.kh-tv-route.kh-tv-playing .opponent-side .physical-mat .mat-treasure-marker{
  transform:rotate(180deg);
}
body.kh-tv-route.kh-tv-playing .opponent-side .mission-field{top:14%}
body.kh-tv-route.kh-tv-playing .opponent-side .faith-pool{top:65%}
body.kh-tv-route.kh-tv-playing .opponent-side .upper-room{top:65%}
body.kh-tv-route.kh-tv-playing .opponent-side .grave-spot{top:15%}
body.kh-tv-route.kh-tv-playing .opponent-side .deck-spot{top:61%}
body.kh-tv-route.kh-tv-playing .opponent-side .mat-treasure-marker{top:4%;bottom:auto}
body.kh-tv-route.kh-tv-playing .mat-zone{
  background:#04162b70;border-color:#f1d4978a;
}
body.kh-tv-route.kh-tv-playing .mat-zone-tag{
  font-size:clamp(9px,.85vw,15px);background:#071a2bd9;
}
body.kh-tv-route.kh-tv-playing .battle-card{
  width:clamp(22px,3.4vw,72px);
}
body.kh-tv-route.kh-tv-playing .tv-hand-row{
  min-height:0!important;height:clamp(52px,10vh,115px);
  gap:0;padding:0;justify-content:center;
}
body.kh-tv-route.kh-tv-playing .tv-card-fan{
  height:calc(100% - 17px);max-width:100%;padding:0 10px;
}
body.kh-tv-route.kh-tv-playing .tv-hand-back{
  width:clamp(32px,4.1vw,70px);
  height:clamp(43px,7.1vh,88px);
  margin-left:clamp(-25px,-1.5vw,-9px);
  border:1px solid #e5c67d;
  box-shadow:0 2px 7px #000b;
}
body.kh-tv-route.kh-tv-playing .tv-hand-count{
  font-size:clamp(10px,1vw,14px);text-shadow:0 2px 5px #000;
}
body.kh-tv-route.kh-tv-playing .centreline{
  position:absolute;left:50%;top:50%;z-index:20;
  transform:translate(-50%,-50%);
  width:max-content;max-width:80vw;
  display:flex;justify-content:center;gap:12px;
  padding:7px 22px;
  border:1px solid #f0cb7a;border-radius:30px;
  background:linear-gradient(90deg,#0a2339f2,#254a60f2,#0a2339f2);
  box-shadow:0 0 0 5px #091a2a9c,0 0 26px #e8bd6a80;
  color:#ffe2a0;
  font:700 clamp(11px,1.3vw,21px) Georgia,serif;
  letter-spacing:.08em;text-align:center;
  pointer-events:none;
}
@media(max-aspect-ratio:4/3){
 body.kh-tv-route.kh-tv-playing #room>.battlefield{padding:5px!important}
 body.kh-tv-route.kh-tv-playing .centreline{padding:5px 9px;gap:5px;font-size:10px}
 body.kh-tv-route.kh-tv-playing .mat-player-bar{font-size:11px}
}
@media(prefers-reduced-motion:no-preference){
 body.kh-tv-route.kh-tv-playing .centreline{
   animation:kh-turn-shine 3.2s ease-in-out infinite alternate;
 }
 @keyframes kh-turn-shine{
   from{box-shadow:0 0 0 5px #091a2a9c,0 0 14px #e8bd6a45}
   to{box-shadow:0 0 0 5px #091a2a9c,0 0 35px #f9d991ae}
 }
}


/* V10.25.15 — Heavenly Arena: single scenic battlefield, with live HTML zones. */
body.kh-tv-route.kh-tv-playing #room>.battlefield{
  background:linear-gradient(90deg,#0513263b,transparent 18%,transparent 82%,#0513263b),url('/assets/heavenly-arena.png') center center / 100% 100% no-repeat!important;
}
body.kh-tv-route.kh-tv-playing #room>.battlefield::before{
  background:radial-gradient(ellipse at center,transparent 42%,#06152565 100%);
}
body.kh-tv-route.kh-tv-playing .physical-mat,
body.kh-tv-route.kh-tv-playing .opponent-side .physical-mat{
  background:transparent!important;
  border:0!important;border-radius:0!important;
  box-shadow:none!important;
}
/* The scenic arena is one continuous image; only the card-zone layers rotate. */
body.kh-tv-route.kh-tv-playing .opponent-side .physical-mat{transform:none!important}
body.kh-tv-route.kh-tv-playing .opponent-side .physical-mat .mat-zone,
body.kh-tv-route.kh-tv-playing .opponent-side .physical-mat .mat-treasure-marker{transform:none!important}
body.kh-tv-route.kh-tv-playing .mat-zone{
  background:linear-gradient(180deg,#071b3075,#06152a48)!important;
  border:1px solid #e5c88782!important;
  border-radius:11px!important;
  box-shadow:inset 0 0 16px #06152a50,0 0 9px #f5c46c22;
}
body.kh-tv-route.kh-tv-playing .mat-zone-tag{
  background:#07182edc!important;
  border:1px solid #d8b56a66;
  color:#ffdfa1;
}
/* Keep both Mission Fields against the shared middle boundary. */
body.kh-tv-route.kh-tv-playing .own-side .mission-field{top:4%;height:48%;left:24%;width:54%}
body.kh-tv-route.kh-tv-playing .opponent-side .mission-field{top:48%;height:48%;left:24%;width:54%}
/* Other live zones remain visible around the mission-field pair. */
body.kh-tv-route.kh-tv-playing .opponent-side .faith-pool{top:4%}
body.kh-tv-route.kh-tv-playing .opponent-side .upper-room{top:4%}
body.kh-tv-route.kh-tv-playing .opponent-side .grave-spot{top:44%}
body.kh-tv-route.kh-tv-playing .opponent-side .deck-spot{top:4%}
body.kh-tv-route.kh-tv-playing .opponent-side .mat-treasure-marker{top:auto;bottom:4%}
body.kh-tv-route.kh-tv-playing .mat-player-bar{
  background:linear-gradient(90deg,#061a2bde,#163b56d6,#061a2bde)!important;
  border-color:#e2c17b!important;
}
body.kh-tv-route.kh-tv-playing .centreline{
  background:linear-gradient(90deg,#07192aef,#244b63f2,#07192aef)!important;
}
