/* Kout uses the actual TV stage, never the narrow-phone stacked breakpoint.
   Names/card counts live once in the shared cast; the playfield owns the trick. */
html .host-page[data-game=tarneeb] #stage{display:flex;flex-direction:column;gap:clamp(6px,1cqh,14px);min-height:0;}
html .host-page[data-game=tarneeb] #stage>.stage-head{flex:0 0 auto;margin:0;}
html .host-page[data-game=tarneeb] #stage>.kout-show{height:auto;flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:stretch;gap:clamp(8px,2cqw,32px);}
html .host-page[data-game=tarneeb] #stage .kout-table{height:100%;max-height:none;min-height:0;padding:clamp(6px,1cqw,20px);display:flex;flex-direction:column;gap:clamp(3px,.6cqh,10px);background:var(--dw-ink);border-color:var(--dw-line);}
html .host-page[data-game=tarneeb].has-cast #stage .kout-seats{display:none;}
html .host-page[data-game=tarneeb] #stage .kout-contract{flex:0 0 auto;gap:6px;}
html .host-page[data-game=tarneeb] #stage .kout-contract span{font-size:clamp(9px,1.1cqw,22px);padding:clamp(3px,.5cqh,9px) clamp(5px,.8cqw,16px);}
html .host-page[data-game=tarneeb] #stage .kout-contract b{font-size:clamp(12px,1.7cqw,32px);}
html .host-page[data-game=tarneeb] #stage .kout-table>.mini-label{flex:0 0 auto;margin:0;text-align:center;font-size:clamp(9px,.9cqw,18px);color:var(--dw-sand);}
html .host-page[data-game=tarneeb] #stage .kout-trick{container-type:size;flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(var(--kout-rows,2),minmax(0,1fr));gap:4px;align-items:center;}
html .host-page[data-game=tarneeb] #stage .kout-play{min-height:0;max-height:100%;gap:2px;}
html .host-page[data-game=tarneeb] #stage .kout-play .tv-playing-card{width:auto;height:min(200px,calc(100cqh / var(--kout-rows,2) - 24px));max-width:100%;aspect-ratio:.7;flex-shrink:0;}
html .host-page[data-game=tarneeb] #stage .tv-playing-card .playroom-card-face{width:100%;height:100%;}
html .host-page[data-game=tarneeb] #stage .tv-playing-card .playroom-card-face>rect{fill:var(--dw-sand);stroke:var(--dw-line);}
html .host-page[data-game=tarneeb] #stage .kout-play small{max-width:100%;font-size:clamp(10px,1.2cqw,24px);white-space:normal;overflow:visible;text-overflow:clip;text-align:center;line-height:1.25;overflow-wrap:anywhere;}
html .host-page[data-game=tarneeb] #stage .kout-wait,html .host-page[data-game=tarneeb] #stage .kout-celebration{grid-column:1/-1;grid-row:1/-1;min-height:0;text-align:center;}
html .host-page[data-game=tarneeb] #stage .kout-wait b{font-size:clamp(24px,15cqh,90px);}
html .host-page[data-game=tarneeb] #stage .kout-wait span{font-size:clamp(10px,1.2cqw,24px);}
html .host-page[data-game=tarneeb] #stage .kout-copy{min-width:0;min-height:0;display:flex;flex-direction:column;justify-content:center;text-align:start;gap:clamp(4px,.8cqh,14px);}
html .host-page[data-game=tarneeb] #stage .kout-copy :is(h1,p){margin:0;max-width:none;overflow-wrap:anywhere;}
html .host-page[data-game=tarneeb] #stage .kout-copy .eyebrow{font-size:clamp(9px,1.15cqw,24px);}
html .host-page[data-game=tarneeb] #stage .kout-copy h1{font-size:clamp(22px,4cqw,80px);line-height:1.2;}
html .host-page[data-game=tarneeb] #stage .kout-copy .stage-copy{font-size:clamp(12px,1.7cqw,34px);line-height:1.2;}
html .host-page[data-game=tarneeb] #stage .kout-copy .dama-rule-chips{display:none;}
html .host-page[data-game=tarneeb] #stage .kout-scoreboard{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
html .host-page[data-game=tarneeb] #stage .kout-team{min-width:0;padding:clamp(5px,.9cqw,18px);display:flex;flex-direction:column;gap:2px;}
html .host-page[data-game=tarneeb] #stage .kout-team span{font-size:clamp(10px,1.3cqw,26px);}
html .host-page[data-game=tarneeb] #stage .kout-team b{font-size:clamp(22px,3cqw,60px);line-height:1.2;}
html .host-page[data-game=tarneeb] #stage .kout-team small{font-size:clamp(9px,1cqw,20px);}
html .host-page[data-game=tarneeb] #stage .kout-celebration b{font-size:clamp(28px,10cqh,100px);}
html .host-page[data-game=tarneeb] #stage .kout-celebration span{font-size:clamp(16px,2.1cqw,42px);}
html .host-page[data-game=tarneeb] #stage .kout-celebration small{font-size:clamp(10px,1.2cqw,24px);}
html .host-page[data-game=tarneeb] #stage .kout-auction{grid-column:1/-1;grid-row:1/-1;display:flex;flex-direction:column;gap:clamp(8px,2cqh,26px);align-items:center;justify-content:center;min-width:0;min-height:0;}
html .host-page[data-game=tarneeb] #stage .kout-bid-track{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(3px,1cqw,12px);width:100%;}
html .host-page[data-game=tarneeb] #stage .kout-bid-track.suits{grid-template-columns:repeat(4,minmax(0,1fr));}
html .host-page[data-game=tarneeb] #stage .kout-bid-tile{display:grid;place-items:center;aspect-ratio:.7;background:var(--dw-sand);color:var(--dw-ink);border:2px solid var(--dw-line);border-radius:clamp(6px,1cqw,16px);font-size:clamp(18px,8cqw,72px);font-weight:800;line-height:1.2;}
html .host-page[data-game=tarneeb] #stage .kout-bid-tile.current{background:var(--dw-coral);color:#fff;border-color:#fff;}
html .host-page[data-game=tarneeb] #stage .kout-bid-tile.red{color:#C9343D;}
html .host-page[data-game=tarneeb] #stage .kout-auction small{font-size:clamp(10px,1.5cqw,28px);line-height:1.25;text-align:center;color:var(--dw-sand);}
/* The complete four rules are the teaching surface, never clipped teaser cards. */
html .host-page:has(.tarneeb-rules) .diwaniya-cast{display:none!important;}
html .host-page #stage .tarneeb-rules{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:clamp(6px,1cqh,16px);min-height:0;height:100%;}
html .host-page #stage .tarneeb-rules>.eyebrow,html .host-page #stage .tarneeb-rules>.stage-copy{display:none;}
html .host-page #stage .tarneeb-rules>h1{font-size:clamp(28px,4cqw,72px);margin:0;line-height:1.2;}
html .host-page #stage .tarneeb-rules .stage-head{margin:0;}
html .host-page #stage .tarneeb-rules .tv-rule-list{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,minmax(0,1fr));gap:clamp(6px,1cqh,14px);min-height:0;}
html .host-page #stage .tarneeb-rules:has(.tv-rule:nth-child(3):last-child) .tv-rule-list{grid-template-rows:repeat(3,minmax(0,1fr));}
html .host-page #stage .tarneeb-rules .tv-rule{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:12px;padding:10px 12px;min-height:0;max-height:none;overflow:visible;}
html .host-page #stage .tarneeb-rules .tv-rule b{width:34px;height:34px;font-size:20px;}
html .host-page #stage .tarneeb-rules .tv-rule span{display:block;-webkit-line-clamp:unset;line-clamp:unset;max-height:none;overflow:visible;white-space:normal;text-overflow:clip;font-size:clamp(16px,1.5cqw,32px);line-height:1.25;}
@media(max-height:500px){
 html .host-page[data-game=tarneeb]{padding:8px;}
 html .host-page[data-game=tarneeb] .host-shell{gap:6px;}
 html .host-page[data-game=tarneeb] .host-topbar{min-height:44px;gap:6px;}
 html .host-page[data-game=tarneeb] .tv-narrator{min-height:24px;padding:3px 8px;}
 html .host-page[data-game=tarneeb] .tv-narrator-text{font-size:11px;line-height:1.1;}
 html .host-page[data-game=tarneeb] .diwaniya-cast{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));min-height:42px;max-height:54px;gap:4px;overflow:visible;}
 html .host-page[data-game=tarneeb] .diwaniya-cast:has(>.diwaniya-seat:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr));}
 html .host-page[data-game=tarneeb] .diwaniya-seat{min-width:0;max-width:none;padding:3px;grid-template-columns:24px minmax(0,1fr);column-gap:3px;border-radius:10px;}
 html .host-page[data-game=tarneeb] .diwaniya-avatar{width:24px;height:24px;}
 html .host-page[data-game=tarneeb] .diwaniya-seat strong{font-size:10px;line-height:1.05;white-space:normal;overflow:visible;overflow-wrap:anywhere;}
 html .host-page[data-game=tarneeb] .diwaniya-seat>b{font-size:9px;line-height:1.05;}
 html .host-page[data-game=tarneeb] #stage{padding:10px 12px;border-radius:20px;}
 html .host-page[data-game=tarneeb] #stage .phase-pill{font-size:10px;padding:4px 6px;}
 html .host-page[data-game=tarneeb] #stage .domna-target{font-size:10px;}
 html .host-page[data-game=tarneeb] #stage .kout-copy .eyebrow{display:none;}
 html .host-page:has(.tarneeb-rules){padding:8px;}
 html .host-page:has(.tarneeb-rules) .host-shell{gap:6px;}
 html .host-page:has(.tarneeb-rules) .host-topbar{min-height:44px;gap:6px;}
 html .host-page:has(.tarneeb-rules) .tv-narrator{min-height:24px;padding:3px 8px;}
 html .host-page:has(.tarneeb-rules) .diwaniya-cast{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));min-height:42px;max-height:54px;gap:4px;overflow:visible;}
 html .host-page:has(.tarneeb-rules) .diwaniya-cast:has(>.diwaniya-seat:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr));}
 html .host-page:has(.tarneeb-rules) .diwaniya-seat{min-width:0;max-width:none;padding:3px;grid-template-columns:24px minmax(0,1fr);column-gap:3px;border-radius:10px;}
 html .host-page:has(.tarneeb-rules) .diwaniya-avatar{width:24px;height:24px;}
 html .host-page:has(.tarneeb-rules) .diwaniya-seat strong{font-size:10px;line-height:1.05;white-space:normal;overflow:visible;overflow-wrap:anywhere;}
 html .host-page:has(.tarneeb-rules) .diwaniya-seat>b{font-size:9px;line-height:1.05;}
 html .host-page:has(.tarneeb-rules) #stage{padding:10px 12px;border-radius:20px;}
 html .host-page:has(.tarneeb-rules) #stage .tarneeb-rules{min-height:0;gap:4px;grid-template-rows:auto auto minmax(0,1fr);}
 html .host-page:has(.tarneeb-rules) .tarneeb-rules>.eyebrow,html .host-page:has(.tarneeb-rules) .tarneeb-rules>.stage-copy,html .host-page:has(.tarneeb-rules) .tarneeb-rules>.response-meter{display:none;}
 html .host-page:has(.tarneeb-rules) #stage .tarneeb-rules>h1{font-size:24px;line-height:1.2;}
 html .host-page:has(.tarneeb-rules) .tarneeb-rules .stage-head{margin:0;}
 html .host-page:has(.tarneeb-rules) .tarneeb-rules .phase-pill,html .host-page:has(.tarneeb-rules) .tarneeb-rules .domna-target{font-size:10px;}
 html .host-page:has(.tarneeb-rules) #stage .tarneeb-rules .tv-rule-list{min-height:0;gap:4px;}
 html .host-page:has(.tarneeb-rules) #stage .tarneeb-rules .tv-rule{padding:5px;gap:6px;grid-template-columns:22px minmax(0,1fr);}
 html .host-page:has(.tarneeb-rules) #stage .tarneeb-rules .tv-rule b{width:22px;height:22px;flex-basis:22px;font-size:12px;}
 html .host-page:has(.tarneeb-rules) #stage .tarneeb-rules .tv-rule span{font-size:13px;line-height:1.3;}
}

/* Four-seat landscape table, with seven calls plus pass in a bounded 4×2 track. */
html .host-page[data-game=tarneeb] #stage .kout-trick{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr);}
html .host-page[data-game=tarneeb] #stage .kout-play .tv-playing-card{width:100%;height:auto;aspect-ratio:.7;max-height:calc(100cqh - 30px);}
html .host-page[data-game=tarneeb] #stage .kout-bid-track{grid-template-columns:repeat(4,minmax(0,1fr));}
html .host-page[data-game=tarneeb] #stage .kout-bid-tile{aspect-ratio:auto;height:clamp(36px,23cqh,110px);font-size:clamp(18px,6cqw,54px);}
html .host-page[data-game=tarneeb] #stage .kout-copy>h1{font-size:clamp(24px,4cqw,72px);}
@media(min-width:900px) and (min-height:600px){
 html .host-page #stage .tarneeb-rules .tv-rule span{font-size:clamp(24px,2cqw,48px);line-height:1.2;}
}
