/* tfH8/tfH9 (owner t8374/t8451; Nov 9 2026): Fold/Call/Raise are one THIN horizontal strip under the felt in BOTH
   orientations — never a tall column or a big block (owner rule). Landscape: left rail | felt; the strip is the bottom
   row of the felt column. Portrait: same thin strip (More | acts | Chat), ~44px; raise adds one extra thin row only.
   Maximize table and card size. Loaded after table-fit.css and shared/table-fit-h7.css. */
@media (orientation:landscape) and (max-height:520px),(orientation:landscape) and (pointer:coarse) and (min-height:521px) and (max-height:1100px) and (max-width:1400px){
  #table{grid-template-columns:calc(48px + env(safe-area-inset-left)) minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr) auto auto!important;
    grid-template-areas:"tb pn" "tb st" "tb ab" "tb nt"!important}
  #turnDock{right:env(safe-area-inset-right)!important}
  #table #actionBar{grid-area:ab!important;display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;justify-content:flex-start!important;align-items:center!important;
    gap:4px 6px!important;padding:2px calc(6px + env(safe-area-inset-right)) calc(2px + env(safe-area-inset-bottom)) 6px!important;min-height:0!important;max-height:none!important;height:auto!important;
    overflow:visible!important;width:auto!important;box-sizing:border-box!important}
  #table #actionBar > #toolsMore{order:0!important;align-self:center!important;flex:0 0 36px!important;width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important}
  #table #actionBar > #levelInfo{order:1!important;flex:0 1 118px!important;min-width:0!important;margin:0!important;max-height:36px!important;font-size:10px!important;line-height:12px!important;
    overflow:hidden!important;white-space:normal!important}
  #table #actionBar > #actsMain,#table #actionBar > #preActs{order:2!important;flex:1 1 0!important;min-width:0!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important;margin:0!important;height:auto!important}
  #table #actionBar > #preActs[hidden],#table #actionBar > #actsMain[hidden]{display:none!important}
  #table #actionBar .acts .act{flex:1 1 0!important;width:auto!important;min-width:0!important;height:40px!important;min-height:40px!important;max-height:40px!important;padding:0 6px!important;font-size:15px!important}
  #table #actionBar #preActs .chk{flex:1 1 0!important;min-width:0!important;min-height:40px!important;height:40px!important;max-height:40px!important;padding:0 6px!important;display:flex!important;align-items:center;justify-content:center}
  #table #actionBar > #talkHandle{order:3!important;flex:0 0 auto!important;align-self:center!important;margin:0!important}
  #table #actionBar > #barTools{order:4!important;flex:0 1 auto!important}
  #table #actionBar > #barTools:empty{display:none!important}
  /* the legal line stays readable, but beside the buttons, not a row of its own */
  html body #table #actionBar p#barNotice{order:5!important;flex:0 1 170px!important;min-width:0!important;margin:0!important;font-size:9.5px!important;line-height:11px!important;max-height:34px!important;overflow:hidden!important;text-align:left!important;white-space:normal!important}
  /* raising: presets + slider become one more thin row above the buttons; the felt shrinks for that moment, cards stay clear */
  #table #actionBar > #raiseRow:not([hidden]){order:-1!important;flex:1 0 100%!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;margin:0!important}
  #table #actionBar > #raiseRow .presets6{display:flex!important;flex-wrap:nowrap!important;gap:4px!important;flex:0 0 auto!important;margin:0!important}
  #table #actionBar > #raiseRow .presets6 .btn{min-height:36px!important;height:36px!important;padding:0 8px!important;font-size:13px!important}
  #table #actionBar > #raiseRow .slider{flex:1 1 auto!important;display:flex!important;align-items:center!important;gap:4px!important;min-width:0!important;margin:0!important}
  #table #actionBar > #raiseRow .slider input[type=range]{flex:1 1 auto!important;min-width:60px!important}
  #table #actionBar > #raiseRow .slider .btn{min-height:36px!important;height:36px!important}
  #table #actionBar > #raiseRow .amt input{width:76px!important;height:36px!important}
  /* sitting out / paused / ring "back" bars: a slim row over the idle strip (not over the felt), clear of the legal line */
  #table #sitInBar,#table #pausedOv,#ringBackBar{position:fixed!important;top:auto!important;bottom:calc(var(--h8-strip-b,14px) + env(safe-area-inset-bottom))!important;
    left:calc(52px + env(safe-area-inset-left))!important;right:calc(4px + env(safe-area-inset-right))!important;width:auto!important;max-width:none!important;background:#12241f!important;border:1px solid #2e5a4a!important;box-shadow:0 -2px 8px rgba(0,0,0,.35)!important;
    max-height:44px!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;
    gap:6px!important;padding:2px 6px!important;margin:0!important;z-index:30!important;transform:none!important;border-radius:10px;box-sizing:border-box!important}
  #table #sitInBar[hidden],#table #pausedOv[hidden],#ringBackBar[hidden]{display:none!important}
  #table #sitInBar p,#table #pausedOv p,#table #pausedOv .paused-t{display:block!important;flex:1 1 auto;min-width:0;margin:0!important;font-size:11px!important;line-height:1.2!important;max-height:28px;overflow:hidden;text-align:left}
  #table #pausedH,#ringBackBar #ringBackMsg{display:none!important}
  #table #sitInBar .btn,#table #pausedOv .btn,#ringBackBar .btn{flex:0 0 auto!important;width:auto!important;min-height:38px!important;height:38px!important;padding:0 12px!important;font-size:13px!important;white-space:nowrap!important}
  #ringBackBar .rb-btns{display:flex!important;gap:6px}
  html body #table #actionBar.raising > #raiseRow,html body #table #actionBar > #raiseRow:not([hidden]){flex-direction:row!important;flex-wrap:nowrap!important;max-width:none!important;width:100%!important;margin:0!important;gap:6px!important}
  html body #table #actionBar.raising .slider,html body #table #actionBar #raiseRow .slider{display:flex!important;flex:1 1 auto!important;flex-wrap:nowrap!important;gap:4px!important;min-width:0!important}
  html body #table #actionBar.raising #raiseRange,html body #table #actionBar #raiseRow #raiseRange{order:0!important;flex:1 1 auto!important;width:auto!important;min-width:50px!important;height:36px!important}
  html body #table #actionBar.raising .presets6 .btn,html body #table #actionBar.raising .slider .btn{height:36px!important;min-height:36px!important;min-width:36px!important;padding:0 7px!important}
  html body #table #actionBar #raiseRow .amt,html body #table #actionBar #raiseRow .amt input{height:36px!important;min-height:36px!important;width:72px!important;flex:0 0 72px!important;font-size:14px!important}
}

/* Portrait (tfH9 / t8451): same thin strip as landscape. Override poker.css/.act 56px and the stacked raise column. */
@media (orientation:portrait) and (max-width:900px){
  #table #actionBar{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;justify-content:flex-start!important;align-items:center!important;
    gap:4px 6px!important;padding:2px 8px calc(2px + env(safe-area-inset-bottom))!important;margin:0!important;min-height:0!important;max-height:none!important;height:auto!important;
    overflow:visible!important;width:auto!important;box-sizing:border-box!important;grid-template-columns:none!important;grid-template-rows:none!important}
  #table #actionBar > #toolsMore{order:0!important;align-self:center!important;flex:0 0 36px!important;width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;grid-column:auto!important;grid-row:auto!important}
  #table #actionBar > #actsMain,#table #actionBar > #preActs{order:2!important;flex:1 1 0!important;min-width:0!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important;margin:0!important;height:auto!important;grid-column:auto!important;grid-row:auto!important}
  #table #actionBar > #preActs[hidden],#table #actionBar > #actsMain[hidden]{display:none!important}
  #table #actionBar .acts .act{flex:1 1 0!important;width:auto!important;min-width:0!important;height:40px!important;min-height:40px!important;max-height:40px!important;padding:0 6px!important;font-size:15px!important}
  #table #actionBar #preActs .chk{flex:1 1 0!important;min-width:0!important;min-height:40px!important;height:40px!important;max-height:40px!important;padding:0 6px!important;display:flex!important;align-items:center;justify-content:center}
  #table #actionBar > #talkHandle{order:3!important;flex:0 0 auto!important;align-self:center!important;margin:0!important;grid-column:auto!important;grid-row:auto!important}
  #table #actionBar > #barTools{order:4!important;flex:0 1 auto!important;grid-column:auto!important}
  #table #actionBar > #barTools:empty{display:none!important}
  /* legal line sits above the strip (absolute), so it never wraps onto a second flex row and fattens Fold/Call/Raise */
  #table #actionBar{position:relative!important}
  #table #actionBar:not(.raising){max-height:44px!important;overflow:hidden!important}
  html body #table #actionBar p#barNotice{position:absolute!important;left:6px!important;right:6px!important;bottom:100%!important;order:0!important;flex:none!important;width:auto!important;margin:0!important;padding:0 2px!important;font-size:9px!important;line-height:11px!important;max-height:12px!important;overflow:hidden!important;text-align:center!important;white-space:nowrap!important;text-overflow:ellipsis!important;grid-column:auto!important;pointer-events:none!important;background:#0d1a17!important;z-index:2!important}
  /* raising: presets + slider one thin row above the buttons (not three stacked rows) */
  #table #actionBar > #raiseRow:not([hidden]){order:-1!important;flex:1 0 100%!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:4px!important;margin:0!important;grid-column:auto!important}
  #table #actionBar > #raiseRow .presets6{display:flex!important;flex-wrap:nowrap!important;gap:3px!important;flex:0 1 auto!important;margin:0!important;grid-template-columns:none!important}
  #table #actionBar > #raiseRow .presets6 .btn{min-height:36px!important;height:36px!important;min-width:0!important;padding:0 6px!important;font-size:12px!important}
  #table #actionBar > #raiseRow .slider{flex:1 1 auto!important;display:flex!important;align-items:center!important;gap:3px!important;min-width:0!important;margin:0!important;flex-wrap:nowrap!important}
  #table #actionBar > #raiseRow .slider input[type=range]{flex:1 1 auto!important;min-width:40px!important;height:36px!important}
  #table #actionBar > #raiseRow .slider .btn{min-height:36px!important;height:36px!important;min-width:32px!important;padding:0 4px!important}
  #table #actionBar > #raiseRow .amt{flex:0 0 64px!important;min-width:56px!important;max-width:72px!important}
  #table #actionBar > #raiseRow .amt input{width:64px!important;height:36px!important;min-height:36px!important;font-size:13px!important}
  html body #table #actionBar.raising > #raiseRow,html body #table #actionBar > #raiseRow:not([hidden]){flex-direction:row!important;flex-wrap:nowrap!important;max-width:none!important;width:100%!important;margin:0!important;gap:4px!important}
  html body #table #actionBar.raising .slider,html body #table #actionBar #raiseRow .slider{display:flex!important;flex:1 1 auto!important;flex-wrap:nowrap!important;gap:3px!important;min-width:0!important}
  html body #table #actionBar.raising #raiseRange,html body #table #actionBar #raiseRow #raiseRange{order:0!important;flex:1 1 auto!important;width:auto!important;min-width:40px!important;height:36px!important}
  html body #table #actionBar.raising .presets6 .btn,html body #table #actionBar.raising .slider .btn{height:36px!important;min-height:36px!important;min-width:32px!important;padding:0 5px!important}
  html body #table #actionBar #raiseRow .amt,html body #table #actionBar #raiseRow .amt input{height:36px!important;min-height:36px!important;width:64px!important;flex:0 0 64px!important;font-size:13px!important}
  /* sitting out / paused: slim row over the idle strip, clear of cards (FX-06 kept, height capped) */
  #table #sitInBar,#table #pausedOv,#ringBackBar{position:fixed!important;top:auto!important;bottom:calc(var(--h8-strip-b,14px) + env(safe-area-inset-bottom))!important;
    left:8px!important;right:8px!important;width:auto!important;max-width:560px!important;margin:0 auto!important;background:#12241f!important;border:1px solid #2e5a4a!important;box-shadow:0 -2px 8px rgba(0,0,0,.35)!important;
    max-height:44px!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;
    gap:6px!important;padding:2px 6px!important;z-index:30!important;transform:none!important;border-radius:10px;box-sizing:border-box!important}
  #table #sitInBar[hidden],#table #pausedOv[hidden],#ringBackBar[hidden]{display:none!important}
  #table #sitInBar p,#table #pausedOv p,#table #pausedOv .paused-t{display:block!important;flex:1 1 auto;min-width:0;margin:0!important;font-size:11px!important;line-height:1.2!important;max-height:28px;overflow:hidden;text-align:left}
  #table #sitInBar .btn,#table #pausedOv .btn,#ringBackBar .btn{flex:0 0 auto!important;width:auto!important;min-height:38px!important;height:38px!important;padding:0 12px!important;font-size:13px!important;white-space:nowrap!important}
}
