:root{--bg:#08130f;--panel:#10231b;--card:#152b22;--line:#294438;--text:#f4f4ed;--muted:#a5b1aa;--gold:#e6c15f;--danger:#a84c45}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}a{text-decoration:none;color:inherit}button,input{font:inherit}.wrap{max-width:1180px;margin:auto;padding:18px}.top,.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.top{justify-content:space-between}.card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:18px;margin:14px 0}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:var(--card);color:var(--text);padding:12px 16px;border-radius:12px;min-height:46px;cursor:pointer}.primary{background:var(--gold);color:#171711;font-weight:800}.muted{color:var(--muted)}.label{text-transform:uppercase;letter-spacing:.16em;color:var(--muted);font-size:12px}.games{display:grid;gap:10px}.game{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px;background:var(--card);border:1px solid var(--line);border-radius:13px}.login{max-width:520px;margin:8vh auto}.form{display:grid;gap:12px}.form.inline{grid-template-columns:repeat(3,1fr) auto;align-items:end}.form label{display:grid;gap:5px;color:var(--muted);font-size:13px}.form input{width:100%;background:#0b1913;border:1px solid var(--line);color:var(--text);padding:12px;border-radius:10px;font-size:16px}.error{padding:12px;border-radius:10px;background:#3a1717;margin:10px 0}.live{max-width:1280px;margin:auto;padding:18px}.livegrid{display:grid;grid-template-columns:1.45fr .75fr;gap:16px}.center{text-align:center}.blinds{font-size:clamp(52px,9vw,100px);font-weight:900;color:var(--gold);line-height:1}.clock{font-variant-numeric:tabular-nums;font-size:clamp(72px,12vw,140px);font-weight:900;line-height:1;margin:20px 0}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.metric{background:var(--card);border:1px solid var(--line);padding:13px;border-radius:13px}.metric b{font-size:25px;display:block}.counter{display:grid;grid-template-columns:1fr 52px 52px;align-items:center;gap:8px;margin:8px 0}.payout{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--line)}.controls{justify-content:center;margin:14px 0}.warning{color:var(--gold);font-weight:900;min-height:24px}.settings-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.tv .adminonly{display:none!important}.tv .live{max-width:none;padding:2vw}.tv .clock{font-size:13vw}.tv .blinds{font-size:8vw}.tv h1{font-size:3vw}.tv .metric b{font-size:2vw}@media(max-width:800px){.livegrid{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(2,1fr)}.settings-grid,.form.inline{grid-template-columns:1fr 1fr}.wrap,.live{padding:10px}.card{padding:14px}.controls .btn{flex:1;min-width:90px}}@media(max-width:430px){.settings-grid,.form.inline{grid-template-columns:1fr}.clock{font-size:22vw}.blinds{font-size:15vw}.game{align-items:flex-start;flex-direction:column}}
.structure-head{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin:22px 0 10px}.structure-row{display:grid;grid-template-columns:110px repeat(3,minmax(100px,1fr)) 100px;gap:8px;align-items:end;padding:10px 0;border-bottom:1px solid var(--line)}.structure-row label{display:grid;gap:5px;color:var(--muted);font-size:13px}.structure-row input{width:100%;background:#0b1913;border:1px solid var(--line);color:var(--text);padding:10px;border-radius:10px;font-size:16px}.structure-type{font-weight:900;color:var(--gold);padding-bottom:12px}.breaktag{color:#d5a7ff}@media(max-width:700px){.structure-row{grid-template-columns:1fr 1fr}.structure-type{grid-column:1/-1;padding-bottom:0}.structure-row .remove{grid-column:1/-1}}

.btn.danger{border-color:#a94442;background:#6f2525;color:#fff}.btn.danger:hover{background:#843030}
.counter{grid-template-columns:minmax(120px,1fr) 48px 56px 48px}.counter>b{text-align:center;font-size:20px}.counter small{display:block;margin-top:2px}.settings-grid{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:800px){.settings-grid{grid-template-columns:1fr 1fr}}@media(max-width:430px){.settings-grid{grid-template-columns:1fr}}
.sound-status{margin-top:10px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;color:var(--muted);font-size:13px}.sound-status.good{color:#d9f4df;border-color:#416d50}audio#tournamentAudio{width:1px;height:1px;position:absolute;left:-9999px}
\n/* V2.4 TV scoreboard: fit common 16:9 TV/Android-box screens without scrolling. */
.tv{overflow:hidden}
.tv .live{height:100vh;max-height:100vh;padding:1.2vh 1.2vw;display:flex;flex-direction:column;overflow:hidden}
.tv .top{flex:0 0 auto;min-height:0;gap:.7vh}
.tv .top h1{font-size:clamp(20px,2.2vw,40px);line-height:1;margin:.2vh 0}
.tv .top .label{font-size:clamp(9px,.75vw,14px)}
.tv .top .row{gap:.5vw}
.tv .top .btn{min-height:34px;padding:.55vh .8vw;font-size:clamp(11px,.9vw,16px)}
.tv .livegrid{flex:1 1 auto;min-height:0;grid-template-columns:minmax(0,1.65fr) minmax(230px,.55fr);gap:1vw;align-items:stretch}
.tv .card{margin:.7vh 0;padding:1.1vh 1vw;border-radius:14px}
.tv .livegrid>section.card{height:calc(100% - 1.4vh);display:flex;flex-direction:column;justify-content:space-around;min-height:0}
.tv .blinds{font-size:clamp(42px,6.6vw,110px);line-height:.9}
.tv .clock{font-size:clamp(62px,9.4vw,155px);line-height:.88;margin:.5vh 0}
.tv .warning{min-height:1.2em;font-size:clamp(13px,1.15vw,22px)}
.tv .metrics{gap:.6vw}
.tv .metric{padding:.7vh .7vw;border-radius:10px;min-width:0}
.tv .metric .muted{font-size:clamp(10px,.78vw,14px)}
.tv .metric b{font-size:clamp(18px,1.7vw,31px);line-height:1.05;white-space:nowrap}
.tv aside{min-height:0;overflow:hidden;display:flex;flex-direction:column}
.tv aside .card{min-height:0}
.tv aside .card:last-child{display:none}
.tv .payout{padding:.7vh 0;font-size:clamp(12px,1vw,18px)}
.tv .muted{font-size:clamp(11px,.9vw,16px)}
@media(max-aspect-ratio:4/3){.tv{overflow:auto}.tv .live{height:auto;max-height:none;overflow:visible}.tv .livegrid{grid-template-columns:1fr}.tv aside .card:last-child{display:none}}

/* V2.5 TV mode: compact single-screen scoreboard plus JS safety-fit. */
.tv, .tv body{overflow:hidden}
.tv #app{height:100vh;overflow:hidden}
.tv .live{box-sizing:border-box;height:100vh;max-height:100vh;padding:.7vh .8vw;overflow:hidden;transform-origin:top left}
.tv .top{margin:0;gap:.4vh}
.tv .top h1{font-size:clamp(18px,1.8vw,34px);margin:0;line-height:1}
.tv .top .btn{min-height:30px;padding:.35vh .65vw;font-size:clamp(10px,.75vw,14px);border-radius:8px}
.tv .livegrid{gap:.6vw;min-height:0}
.tv .card{margin:.35vh 0;padding:.7vh .7vw;border-radius:10px}
.tv .livegrid>section.card{height:calc(100% - .7vh)}
.tv .blinds{font-size:clamp(38px,5.6vw,92px);line-height:.88}
.tv .clock{font-size:clamp(54px,8vw,128px);line-height:.84;margin:.15vh 0}
.tv .metrics{gap:.4vw}
.tv .metric{padding:.45vh .5vw}
.tv .metric b{font-size:clamp(16px,1.45vw,27px)}
.tv .payout{padding:.4vh 0}
.tv aside .card{margin:.35vh 0;padding:.7vh .7vw}
.tv aside .card:last-child{display:none!important}
@media(max-width:900px) and (orientation:landscape){.tv .livegrid{grid-template-columns:minmax(0,1.7fr) minmax(190px,.5fr)}.tv .clock{font-size:12vw}.tv .blinds{font-size:8vw}}

/* V2.6 TV safe-area: reserve left/right space for Android TV overscan. */
.tv #app{width:100%;overflow:hidden}
.tv .live{width:94vw;max-width:94vw;margin:0 auto;padding-left:1vw;padding-right:1vw}
@media(max-width:1000px) and (orientation:landscape){.tv .live{width:92vw;max-width:92vw}}

/* V2.10 broadcast-style TV scoreboard. Admin/control screens retain the proven layout. */
.tv{background:#050708;color:#f6f6f4}
.tv .live.tvboard{width:94vw;max-width:94vw;height:100vh;max-height:100vh;margin:0 auto;padding:.8vh .7vw;display:grid;grid-template-rows:auto 1fr auto;gap:.7vh;overflow:hidden;transform-origin:top center}
.tvboard .tv-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1vw;min-height:0}
.tvboard .tv-brand{text-align:center;font-weight:900;letter-spacing:.11em;font-size:clamp(20px,2.4vw,43px);white-space:nowrap}.tvboard .tv-brand .suit{font-size:1.15em;margin-right:.3em}.tvboard .tv-game{font-size:clamp(18px,1.8vw,32px);font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tvboard .tv-host{color:#9da3a7;font-size:clamp(10px,.85vw,15px);margin-top:.15vh}.tvboard .tv-now{text-align:right;font-variant-numeric:tabular-nums;font-size:clamp(13px,1.05vw,19px)}
.tvboard .tv-main{display:grid;grid-template-columns:minmax(180px,.72fr) minmax(0,2.75fr) minmax(210px,.82fr);gap:.75vw;min-height:0}.tvboard .tv-side,.tvboard .tv-center{min-height:0}.tvboard .tv-side{display:flex;flex-direction:column;gap:.7vh}.tvboard .tv-panel{background:linear-gradient(180deg,#101416,#090c0e);border:1px solid #333a3e;border-radius:8px;padding:1.25vh 1vw;min-height:0}.tvboard .tv-stat{padding:.85vh .25vw;border-bottom:1px solid #293034}.tvboard .tv-stat:last-child{border-bottom:0}.tvboard .tv-stat span,.tvboard .tv-panel-title{display:block;color:#aeb2b5;text-transform:uppercase;font-weight:800;letter-spacing:.04em;font-size:clamp(10px,.86vw,16px)}.tvboard .tv-stat b{display:block;font-size:clamp(21px,2vw,38px);line-height:1.08;margin-top:.18vh;font-variant-numeric:tabular-nums}.tvboard .tv-stat b.smallish{font-size:clamp(18px,1.55vw,30px)}
.tvboard .tv-center{background:radial-gradient(circle at 50% 45%,#43100d 0,#210807 48%,#100504 100%);border:2px solid #d52a24;border-radius:7px;padding:1vh 1.1vw;display:flex;flex-direction:column;align-items:center;justify-content:space-between;text-align:center;overflow:hidden}.tvboard .tv-level{font-weight:950;font-size:clamp(26px,3vw,54px);line-height:1}.tvboard .tv-type{color:#b8b8b8;text-transform:uppercase;font-weight:800;letter-spacing:.08em;font-size:clamp(13px,1.3vw,23px)}.tvboard .tv-blinds{font-size:clamp(46px,6.8vw,118px);font-weight:950;line-height:.9;white-space:nowrap}.tvboard .tv-ante{font-size:clamp(18px,2vw,36px);font-weight:800;min-height:1.2em}.tvboard .tv-clockbox{width:86%;background:rgba(0,0,0,.58);border:1px solid #3b3332;border-radius:16px;padding:.25vh .5vw}.tvboard .tv-clock{font-variant-numeric:tabular-nums;font-size:clamp(72px,10.5vw,180px);font-weight:950;line-height:.95;letter-spacing:-.045em}.tvboard .tv-next{width:82%;background:rgba(0,0,0,.48);border:1px solid #4b4645;border-radius:12px;padding:.6vh .8vw;font-size:clamp(12px,1.05vw,19px)}.tvboard .tv-next b{font-size:1.25em}.tvboard .tv-warning{min-height:1.1em;color:#ffcf62;font-weight:900;font-size:clamp(11px,.95vw,17px)}
.tvboard .tv-pool{text-align:center;color:#5ee26b;font-size:clamp(28px,3vw,54px);font-weight:950;line-height:1.1}.tvboard .tv-payout{display:flex;justify-content:space-between;gap:8px;padding:.45vh 0;border-bottom:1px solid #293034;font-size:clamp(11px,.95vw,17px)}.tvboard .tv-payout:last-child{border-bottom:0}.tvboard .tv-levels{flex:1;overflow:hidden}.tvboard .tv-level-row{display:grid;grid-template-columns:2.2em 1fr;gap:.45vw;padding:.45vh .35vw;border-bottom:1px solid #252b2f;font-size:clamp(10px,.82vw,15px);align-items:center}.tvboard .tv-level-row.current{background:#a91916;color:#fff;font-weight:900}.tvboard .tv-level-row.done{color:#7f898e}.tvboard .tv-level-row.breakrow{color:#d4b5ef}.tvboard .tv-footer{text-align:center;color:#6f777c;letter-spacing:.18em;font-size:clamp(9px,.7vw,13px);min-height:1em}.tvboard audio{position:absolute;left:-9999px;width:1px;height:1px}
@media(max-width:1000px) and (orientation:landscape){.tv .live.tvboard{width:92vw;max-width:92vw}.tvboard .tv-main{grid-template-columns:minmax(155px,.68fr) minmax(0,2.7fr) minmax(175px,.75fr)}.tvboard .tv-panel{padding:.8vh .75vw}.tvboard .tv-stat{padding:.55vh .15vw}.tvboard .tv-clock{font-size:12vw}.tvboard .tv-blinds{font-size:7.7vw}}

/* V2.11 TV polish: three full-height red felt panels, extra vertical safe area. */
.tv .live.tvboard{
  width:93vw;max-width:93vw;
  height:97vh;max-height:97vh;
  margin:1.1vh auto 0;
  padding:.35vh .55vw .45vh;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:.45vh;
}
.tvboard .tv-head{padding:0 .15vw;line-height:1;min-height:4.8vh}
.tvboard .tv-game{font-size:clamp(16px,1.55vw,29px);line-height:1.05}
.tvboard .tv-host{font-size:clamp(9px,.72vw,13px);line-height:1;margin-top:.1vh}
.tvboard .tv-brand{font-size:clamp(19px,2.15vw,39px);line-height:1}
.tvboard .tv-now{font-size:clamp(11px,.9vw,17px);line-height:1.15}
.tvboard .tv-main{gap:.7vw;min-height:0;align-items:stretch}
.tvboard .tv-side{display:block;min-height:0;height:100%}
.tvboard .tv-panel,
.tvboard .tv-center{
  background:
    radial-gradient(circle at 52% 42%,rgba(116,22,18,.48) 0,rgba(58,10,8,.34) 38%,rgba(18,4,4,.94) 100%),
    linear-gradient(135deg,rgba(130,20,17,.34),rgba(25,3,3,.9));
  border:2px solid #d52a24;
  box-shadow:inset 0 0 34px rgba(0,0,0,.46);
}
.tvboard .tv-panel{height:100%;margin:0;border-radius:7px;padding:.75vh .9vw;overflow:hidden}
.tvboard .tv-center{height:100%;padding:.7vh 1vw}
.tvboard .tv-stat{padding:.6vh .2vw}
.tvboard .tv-stat span,.tvboard .tv-panel-title{font-size:clamp(9px,.78vw,14px)}
.tvboard .tv-stat b{font-size:clamp(19px,1.75vw,33px)}
.tvboard .tv-stat b.smallish{font-size:clamp(16px,1.38vw,26px)}
.tvboard .tv-level{font-size:clamp(24px,2.65vw,48px)}
.tvboard .tv-type{font-size:clamp(11px,1.05vw,19px)}
.tvboard .tv-blinds{font-size:clamp(42px,6vw,106px)}
.tvboard .tv-ante{font-size:clamp(16px,1.65vw,30px)}
.tvboard .tv-clockbox{width:84%;padding:.1vh .45vw}
.tvboard .tv-clock{font-size:clamp(66px,9.25vw,160px);line-height:.92}
.tvboard .tv-next{width:78%;padding:.45vh .7vw;font-size:clamp(11px,.9vw,17px)}
.tvboard .tv-warning{font-size:clamp(10px,.82vw,15px);min-height:1em}
.tvboard .tv-right-panel{display:flex;flex-direction:column;min-height:0}
.tvboard .tv-section-title{margin-top:.65vh;padding-top:.55vh;border-top:1px solid rgba(213,42,36,.55)}
.tvboard .tv-pool{font-size:clamp(25px,2.65vw,48px)}
.tvboard .tv-payout{padding:.28vh 0;font-size:clamp(10px,.82vw,15px)}
.tvboard .tv-levels{flex:1;min-height:0;overflow:hidden}
.tvboard .tv-level-row{padding:.28vh .3vw;font-size:clamp(9px,.72vw,13px)}
.tvboard .tv-footer{font-size:clamp(8px,.64vw,12px);line-height:1;padding:.18vh 0 .05vh}
@media(max-width:1000px) and (orientation:landscape){
  .tv .live.tvboard{width:91vw;max-width:91vw;height:96vh;max-height:96vh;margin:1.4vh auto 0}
  .tvboard .tv-main{grid-template-columns:minmax(150px,.68fr) minmax(0,2.7fr) minmax(170px,.75fr)}
  .tvboard .tv-clock{font-size:10.7vw}
  .tvboard .tv-blinds{font-size:7vw}
}
#wake-lock-status{display:none!important}

/* V2.12 TV spacing polish: distribute side-panel content and add left dividers. */
.tvboard .tv-left-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.tvboard .tv-left-panel .tv-stat{
  flex:1 1 0;
  min-height:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:.55vh .25vw;
  border-bottom:1px solid rgba(213,42,36,.58);
}
.tvboard .tv-left-panel .tv-stat:last-child{border-bottom:0}
.tvboard .tv-left-panel .tv-stat span{margin-bottom:.18vh}

.tvboard .tv-right-panel{
  display:grid;
  grid-template-rows:auto auto auto auto auto minmax(0,1fr);
  align-content:stretch;
}
.tvboard .tv-right-panel > .tv-panel-title:first-child{
  align-self:end;
}
.tvboard .tv-right-panel .tv-pool{
  padding:.35vh 0 .75vh;
  align-self:start;
}
.tvboard .tv-right-panel .tv-section-title{
  margin-top:0;
  padding-top:.75vh;
  padding-bottom:.35vh;
  border-top:1px solid rgba(213,42,36,.58);
}
.tvboard #tvPayouts{
  padding:.15vh 0 .65vh;
}
.tvboard .tv-levels{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  justify-content:space-evenly;
}
.tvboard .tv-level-row{
  flex:0 0 auto;
}

/* V2.14: V2.12 dimensions preserved exactly. Only future-level rows and panel paint change. */
.tvboard .tv-left-panel,
.tvboard .tv-right-panel{
  background-image:
    radial-gradient(ellipse at 50% 48%,rgba(118,22,18,.58) 0%,rgba(70,11,9,.48) 46%,rgba(20,4,4,.96) 100%),
    linear-gradient(180deg,rgba(116,18,15,.40) 0%,rgba(48,7,6,.72) 55%,rgba(19,3,3,.96) 100%);
  background-size:cover,cover;
  background-position:center,center;
  background-repeat:no-repeat,no-repeat;
}
.tvboard .tv-levels{
  justify-content:flex-start;
  overflow:hidden;
  padding-top:.18vh;
}
.tvboard .tv-level-row{
  flex:0 0 auto;
  padding:.30vh .35vw;
  min-height:0;
  font-size:clamp(9px,.72vw,13px);
  line-height:1.15;
  border-bottom:1px solid rgba(213,42,36,.34);
}
.tvboard .tv-level-row:last-child{border-bottom:0}
.tvboard .tv-level-row.upcoming{color:#e6e8e9}
.tvboard .tv-level-row.breakrow{color:#d9b8f1}
.tvboard .tv-level-row.finalrow{color:#8e969a}

/* V2.15: keep break status text fully visible without changing the V2.14 layout. */
.tvboard .tv-blinds.tv-break-message{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:0 .5vw;
  font-size:clamp(24px,3.35vw,58px);
  line-height:1;
  white-space:nowrap;
  overflow:visible;
  letter-spacing:.015em;
}
@media(max-width:1000px) and (orientation:landscape){
  .tvboard .tv-blinds.tv-break-message{font-size:4.2vw}
}

/* Membership Dev v0.2 */
.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.mode-card{display:grid!important;grid-template-columns:auto 1fr;column-gap:10px;align-items:start;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--card);cursor:pointer}.mode-card input{width:auto!important;grid-row:1/3;margin-top:4px}.mode-card b{color:var(--text);font-size:18px}.mode-card span{color:var(--muted)}.roster-form{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.member-grid{display:grid;grid-template-columns:.8fr 1.2fr;gap:14px}.invite-box{display:grid;grid-template-columns:180px 1fr;gap:14px;align-items:end;margin:12px 0}.invite-box strong{font-size:28px;letter-spacing:.12em;display:block}.invite-link input,.grow-input,select{width:100%;background:#0b1913;border:1px solid var(--line);color:var(--text);padding:12px;border-radius:10px;font-size:16px}.invite-link{min-width:0}.invite-link .label{margin-bottom:5px}.grow-input{flex:1;min-width:180px}.form small{color:var(--muted)}@media(max-width:700px){.mode-grid,.member-grid,.invite-box,.roster-form{grid-template-columns:1fr}}

/* Membership Dev v0.3 - named rebuy/add-on transactions */
.tx-overlay{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.78);display:flex;align-items:center;justify-content:center;padding:18px}.tx-dialog{width:min(560px,100%);max-height:85vh;overflow:auto}.tx-player-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}.tx-player{min-height:52px;font-size:17px}.tx-player.unassigned{grid-column:1/-1;border-style:dashed}.named-counter>span:nth-child(2){min-width:38px}@media(max-width:600px){.tx-player-list{grid-template-columns:1fr}.tx-player.unassigned{grid-column:auto}}
