:root{--gold:#efbd70;--text:#f8f4ed;--muted:var(--text);--panel:#101011ee;--line:#6b4b2c}*{box-sizing:border-box}body{margin:0;background:#09090b;color:#f8f4ed;font-family:Inter,Arial,sans-serif}button{cursor:pointer;font:inherit}#app{display:flex;min-height:100vh}.sidebar{width:222px;flex-shrink:0;background:linear-gradient(#101010,#080808);border-right:1px solid #392818;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;padding:26px 16px}.brand{font-size:35px;color:var(--gold);font-weight:900;letter-spacing:3px;margin:0 12px 44px}.brand span{font-size:18px;vertical-align:middle}.sidebar nav{display:grid;gap:10px}.nav{border:0;text-align:left;background:transparent;color:var(--text);padding:16px;border-radius:8px}.nav.active,.nav:hover{background:linear-gradient(90deg,#f4cb85,#a97031);color:#130d07;font-weight:700}.season{margin-top:auto;border:1px solid #70502c;background:#19130d;padding:18px;border-radius:12px}.season small{color:var(--gold)}.season h2{margin:12px 0 0}.season p{color:var(--text);margin:4px 0 15px}.progress{height:7px;border-radius:8px;background:#39302a;overflow:hidden;margin:12px 0}.progress span{display:block;width:60%;height:100%;background:linear-gradient(90deg,#a76e2c,#f5d397)}.sidefoot{font-size:10px;color:var(--text);text-align:center;margin-top:20px}main{min-width:0;flex:1}header{height:70px;background:#0a0a0bdc;border-bottom:1px solid #34281d;display:flex;align-items:center;justify-content:space-between;padding:0 32px}.crumb{font-size:11px;letter-spacing:3px;color:#e1ba7b}.account{display:flex;gap:12px;align-items:center;font-size:13px}.coin{color:var(--gold);margin-right:12px}.avatar{width:39px;height:39px;border:2px solid var(--gold);border-radius:50%;display:inline-grid;place-items:center;background:#292018;color:var(--gold);font-weight:800}.view{display:none}.view.active{display:block}#play{padding:0 30px 40px}.hero{padding:65px 42px;min-height:310px;background:linear-gradient(90deg,#090909ee 5%,#15100aa0 58%,#120e0766),radial-gradient(ellipse at 85% 30%,#f6a04799,transparent 42%),linear-gradient(135deg,#302015,#09090a);border-bottom:1px solid #75502b;position:relative;overflow:hidden}.hero:after{content:'♠';position:absolute;right:12%;top:-95px;font-size:400px;color:#efb65b12;transform:rotate(-16deg)}.eyebrow{color:var(--gold);font-size:12px;letter-spacing:3px}.hero h1{font-size:clamp(35px,5vw,66px);line-height:1.03;margin:17px 0}.hero h1 em{font-style:normal;color:var(--gold)}.hero p{color:var(--text);margin-bottom:22px}.gold{background:linear-gradient(#ffdda0,#c68d46);border:1px solid #f8cc83;color:#170f06;font-weight:800;border-radius:7px;padding:14px 24px}.gold:hover{filter:brightness(1.15)}.section-title{display:flex;align-items:center;justify-content:space-between;margin:26px 0 15px}.section-title h2{font-size:19px;color:var(--gold)}.section-title span{font-size:11px;color:var(--muted)}.modes,.bottom-cards,.theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.mode,.panel{border:1px solid #654728;background:#101010f5;border-radius:10px;padding:18px}.mode{text-align:center}.mini-table{height:112px;margin-bottom:10px;background:radial-gradient(ellipse,#242426 35%,#0c0b0b 36%,#bd8845 39%,#16100b 43%,#090909 60%);display:grid;place-items:center;font-size:32px;color:#b58240}.mode h3{margin:8px 0}.mode p,.panel p{color:var(--text);font-size:13px}.mode .gold{width:100%;margin-top:12px}.bottom-cards{margin-top:20px;grid-template-columns:repeat(2,minmax(0,1fr))}.panel h3{color:var(--gold);font-size:13px}.panel strong{font-size:27px}.panel b{float:right}.positive{color:#4bd28e}.negative{color:#ff7070}.theme-preview{height:95px;display:grid;place-items:center;color:#f1bd76;font-weight:800;letter-spacing:4px;background:radial-gradient(ellipse at 50% 100%,#9d552b,#1e1711 50%,#08090a);border:1px solid #80572b;border-radius:8px}.gamebar{display:flex;gap:24px;align-items:center;justify-content:space-between;padding:14px 25px;background:#0c0b0b}.gamebar>div{display:grid;gap:3px}.gamebar small{color:var(--text);font-size:10px}.gamebar strong{font-size:19px}.outline{border:1px solid #765333;background:#181411;color:white;padding:11px 15px;border-radius:7px}.table-scene{min-height:460px;padding:12px 28px 30px;background:radial-gradient(ellipse at 50% 10%,#d06e3488,transparent 48%),linear-gradient(135deg,#23170e,#08090a 55%,#2b190e)}.skyline{text-align:center;letter-spacing:6px;color:#e8ad63;font-size:12px;padding:10px}.poker-table{position:relative;margin:16px auto 0;width:min(920px,94%);height:390px;border-radius:48%;background:radial-gradient(ellipse,#272729,#111113 70%);border:15px solid #211913;box-shadow:0 0 0 3px #bc8846,0 0 0 10px #080808,0 20px 80px #000}.seat{position:absolute;display:flex;align-items:center;gap:5px;background:#080808d9;border:1px solid #70522e;border-radius:25px;padding:3px 9px 3px 3px;font-size:12px;white-space:nowrap}.seat .avatar{width:32px;height:32px}.s1{top:-20px;left:13%}.s2{top:-35px;right:15%}.s3{top:40%;right:-30px}.s4{bottom:-12px;right:15%}.s5{top:42%;left:-30px}.pot{position:absolute;top:25%;left:50%;transform:translateX(-50%);display:grid;text-align:center;color:var(--gold);font-size:11px}.pot strong{font-size:23px}.community{position:absolute;top:43%;left:50%;transform:translateX(-50%);display:flex;gap:5px}.card{width:43px;height:63px;background:#f3eee7;color:#171717;border-radius:4px;padding:5px;font-size:21px;font-weight:bold;display:flex;flex-direction:column;justify-content:space-between}.card span{align-self:center}.card .red{color:#ce2f3d}.card.back{background:#1c1c20;color:#796b5c;border:1px solid #72624c;place-content:center;text-align:center}.myseat{position:absolute;bottom:-18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:#090909;border:1px solid #e4ad5d;box-shadow:0 0 15px #d7a45166;padding:6px 13px;border-radius:32px}.myseat small{display:block;color:var(--gold);font-size:12px}.turn{border:3px solid #3ecc6f;border-radius:50%;padding:8px}.actions{display:flex;align-items:center;justify-content:center;gap:12px;padding:18px;background:#0d0d0e}.actions>button{min-width:115px;padding:17px}.fold{background:#7e1520;border:1px solid #bb2c39;color:white;border-radius:7px}.check{background:#17202a;border:1px solid #394f60;color:white;border-radius:7px}.raise{border:1px solid #4d3927;border-radius:8px;padding:7px 12px;min-width:210px}.raise label{display:flex;justify-content:space-between;font-size:10px;color:#c9a474}.raise input{width:100%;accent-color:#e6b873}.raise div{display:flex;gap:4px}.raise button{flex:1;background:#181a20;color:white;border:1px solid #36363c;border-radius:4px;padding:5px;font-size:10px}.bottom-toggle{text-align:center;background:#090909}.bottom-toggle button{background:#16120e;color:#e3bb7b;border:1px solid #725331;border-radius:9px 9px 0 0;padding:12px 24px}.game-panel{background:#111113;border-top:1px solid #75532d;overflow:hidden;transition:max-height .25s ease;max-height:260px;padding:10px 22px}.game-panel.collapsed{max-height:0;padding:0 22px;border:0}.tabs{display:flex;gap:12px;flex-wrap:wrap}.tab{background:transparent;color:var(--text);border:0;padding:10px}.tab.selected{color:var(--gold);border-bottom:2px solid var(--gold)}#tabcontent{padding:8px 12px;color:var(--text);font-size:13px}.demo-notice{text-align:center;font-size:11px;color:var(--text);padding:10px}.content-view{padding:35px}.content-view h1{color:var(--gold)}.profile-card{display:flex;align-items:center;gap:24px;max-width:600px}.avatar.large{width:95px;height:95px;font-size:40px}.muted{color:var(--text)}.rankrow{display:grid;grid-template-columns:70px 1fr 100px;padding:16px;border-bottom:1px solid #38302b}.rankrow:first-child{color:var(--gold)}.theme-grid .chosen{border-color:#e4b66e}.midnight{background:linear-gradient(135deg,#080e22,#102c6c)}.royal{background:linear-gradient(135deg,#35080b,#8e2227)}@media(max-width:850px){.sidebar{width:75px;padding:16px 8px}.brand{margin:0 0 35px;font-size:25px}.brand span,.nav{font-size:0}.nav{padding:16px;text-align:center}.nav:first-letter{font-size:20px}.season,.sidefoot{display:none}.modes,.bottom-cards,.theme-grid{grid-template-columns:1fr}.hero{padding:35px 25px}.actions{flex-wrap:wrap}.poker-table{width:100%;height:320px}.seat{font-size:0}.seat .avatar{font-size:12px}.community .card{width:31px;height:48px;font-size:16px}.raise{width:100%}header{padding:0 15px}.crumb{font-size:9px}}@media(max-width:520px){.sidebar{width:54px}.brand{font-size:21px}.account .coin{display:none}#play{padding:0 12px 30px}.gamebar{gap:8px;padding:12px 8px}.gamebar strong{font-size:14px}.gamebar .outline{font-size:10px;padding:8px}.table-scene{padding:10px 8px}.poker-table{border-width:9px}.seat{padding:2px}.seat .avatar{width:25px;height:25px}.s3{right:-15px}.s5{left:-15px}.myseat{font-size:11px}.actions>button{min-width:75px;padding:12px}}
/* v0.2 — game screen is a single viewport; panel opens in-place, never scrolls. */
body.in-game{overflow:hidden}
body.in-game #app{height:100dvh;min-height:0;overflow:hidden}
body.in-game main{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body.in-game main>header{flex:0 0 56px;height:56px}
body.in-game #table.active{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}
body.in-game .gamebar{flex:0 0 58px;padding:5px 22px}
body.in-game .gamebar strong{font-size:17px}
body.in-game .table-scene{flex:1;min-height:0;padding:5px 24px 17px;display:flex;flex-direction:column;justify-content:center;overflow:hidden}
body.in-game .skyline{flex:0 0 auto;padding:3px;font-size:10px}
body.in-game .poker-table{flex:0 1 auto;width:min(80%,760px,calc((100dvh - 285px)*2.05));height:auto;aspect-ratio:2.35/1;min-height:0;margin:10px auto 14px;border-width:clamp(5px,1.3vh,12px)}
body.in-game .seat{font-size:clamp(9px,1.3vh,12px)}
body.in-game .seat .avatar{width:clamp(24px,3.7vh,32px);height:clamp(24px,3.7vh,32px)}
body.in-game .community .card{width:clamp(24px,4.6vh,43px);height:clamp(35px,6.7vh,63px);font-size:clamp(13px,2.2vh,21px)}
body.in-game .actions{flex:0 0 76px;padding:6px 12px;gap:10px}
body.in-game .actions>button{padding:12px 16px}
body.in-game .raise{padding:4px 10px}
body.in-game .bottom-toggle{flex:0 0 34px}
body.in-game .bottom-toggle button{height:34px;padding:5px 22px;font-size:12px}
body.in-game .game-panel{flex:0 0 110px;max-height:none;padding:5px 18px;transition:none;overflow:hidden}
body.in-game .game-panel.collapsed{flex-basis:0;max-height:0;padding:0;border:0}
body.in-game .tabs{gap:8px}
body.in-game .tab{padding:7px;font-size:11px}
body.in-game #tabcontent{padding:4px 8px;font-size:12px}
body.in-game .demo-notice{flex:0 0 22px;margin:0;padding:4px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px}
@media(max-width:850px){body.in-game .poker-table{width:min(88%,680px,calc((100dvh - 300px)*2.05))}body.in-game .actions{flex-wrap:nowrap}body.in-game .raise{width:auto;min-width:150px}body.in-game .actions>button{min-width:65px}}
@media(max-width:600px){body.in-game .gamebar{padding:3px 7px}body.in-game .poker-table{width:88%;border-width:6px}body.in-game .actions{gap:4px;padding:4px}body.in-game .actions>button{padding:8px 5px;font-size:11px;min-width:48px}body.in-game .raise{min-width:110px;padding:3px}body.in-game .raise button{font-size:8px;padding:3px}body.in-game .game-panel{flex-basis:115px}body.in-game .tabs{gap:2px}body.in-game .tab{font-size:9px;padding:6px 4px}}
@media(max-height:650px){body.in-game main>header{flex-basis:44px}body.in-game .gamebar{flex-basis:46px}body.in-game .actions{flex-basis:62px}body.in-game .game-panel{flex-basis:85px}body.in-game .bottom-toggle{flex-basis:28px}body.in-game .bottom-toggle button{height:28px}body.in-game .demo-notice{flex-basis:18px}body.in-game .poker-table{width:min(75%,650px,calc((100dvh - 250px)*2.05))}}
.practice-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;padding:13px 17px;border:1px solid #76512c;border-radius:8px;background:#18130e;color:#e7c390;font-size:13px}.practice-banner label{white-space:nowrap}.practice-banner input{accent-color:#e9b977}label.practice-banner{display:inline-flex;margin:0 0 18px 12px;padding:10px 15px;cursor:pointer;vertical-align:middle}.holecards{display:flex;gap:3px}.holecards .card{width:30px;height:44px;font-size:15px;padding:3px}.red-card,.red-card span{color:#b92a34!important}.seat.active-seat{box-shadow:0 0 0 2px #d4a34c}.actions button:disabled{opacity:.4;cursor:not-allowed}.game-panel #tabcontent{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.myseat{z-index:3}body.in-game .holecards .card{width:clamp(23px,3.6vh,30px);height:clamp(32px,5vh,44px);font-size:clamp(12px,1.8vh,15px)}@media(max-width:750px){.practice-banner{flex-wrap:wrap}}

/* v0.6 — full-size, keyboard-editable betting console */
body.in-game .actions{flex:0 0 120px;min-height:120px;display:grid;grid-template-columns:repeat(3,minmax(105px,150px)) minmax(290px,390px);justify-content:center;align-items:stretch;gap:12px;padding:9px 16px}
body.in-game .actions>button{width:100%;min-width:0;font-size:17px;font-weight:800;padding:12px 8px;border-radius:10px;min-height:70px}
body.in-game .raise{min-width:0;width:100%;padding:8px 12px;display:flex;flex-direction:column;justify-content:space-between;background:#171411;border-color:#9c7143}
body.in-game .raise label{font-size:11px;letter-spacing:.6px;font-weight:800;color:#e9be80}
body.in-game .amount-row{display:grid;grid-template-columns:37px minmax(0,1fr) 37px;gap:7px;align-items:center}
body.in-game .amount-row input{min-width:0;width:100%;height:38px;background:#222022;color:#fff;font-size:21px;font-weight:800;border:1px solid #bd8b4d;border-radius:6px;padding:3px 10px;appearance:textfield}
body.in-game .amount-row input::-webkit-inner-spin-button,body.in-game .amount-row input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
body.in-game .amount-row button{height:38px;background:#28231f;border:1px solid #88643b;color:#f7d6a4;border-radius:6px;font-size:23px;padding:0}
body.in-game .raise input[type=range]{height:13px;margin:3px 0;accent-color:#efbd70}
body.in-game .raise .quick-bets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
body.in-game .raise .quick-bets button{font-size:10px;padding:6px 2px;font-weight:700}
body.in-game .table-scene{padding-bottom:10px}
body.in-game .poker-table{width:min(80%,760px,calc((100dvh - 340px)*2.05))}
body.in-game .s1{top:-28px}body.in-game .s2{top:-28px}
@media(max-width:1150px){body.in-game .actions{grid-template-columns:repeat(3,minmax(85px,1fr)) minmax(255px,1.8fr);gap:7px}body.in-game .actions>button{font-size:14px}}
@media(max-width:750px){body.in-game .actions{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:48px 94px;flex-basis:150px;padding:4px 8px}body.in-game .actions>button{min-height:0;font-size:13px}body.in-game .raise{grid-column:1/-1;grid-row:2;padding:4px 9px}body.in-game .amount-row input{height:29px;font-size:17px}body.in-game .amount-row button{height:29px}body.in-game .raise input[type=range]{height:8px}body.in-game .raise .quick-bets button{padding:3px}body.in-game .poker-table{width:min(88%,680px,calc((100dvh - 390px)*2.05))}}
@media(max-height:740px) and (min-width:751px){body.in-game .actions{flex-basis:105px;min-height:105px}body.in-game .amount-row input,body.in-game .amount-row button{height:31px}body.in-game .poker-table{width:min(77%,720px,calc((100dvh - 325px)*2.05))}}

/* v0.7: pot chips and compact winner effects */
.poker-table{position:relative;overflow:visible}
.pot{z-index:3}
.pot-chips{display:flex;justify-content:center;align-items:end;gap:3px;margin-top:6px;height:24px;pointer-events:none}
.pot-chip,.flying-chip{display:block;width:22px;height:22px;border-radius:50%;border:3px dashed rgba(255,255,255,.8);box-shadow:inset 0 0 0 3px rgba(0,0,0,.28),0 3px 6px #0008;background:#bd2929}
.pot-chip:nth-child(2),.flying-chip:nth-child(2){background:#2676c6}.pot-chip:nth-child(3),.flying-chip:nth-child(3){background:#268a60}.pot-chip:nth-child(4),.flying-chip:nth-child(4){background:#242424}.pot-chip:nth-child(5),.flying-chip:nth-child(5){background:#b78a2f}
.win-fx{display:none;position:absolute;left:50%;top:54%;transform:translate(-50%,-50%);z-index:30;pointer-events:none;text-align:center;min-width:230px;padding:13px 24px;border:1px solid #dfb55d;border-radius:16px;background:linear-gradient(125deg,#1a130bf5,#090909f5);box-shadow:0 0 34px #e6ae4380,0 0 80px #b78b2438;color:#f5d28b;animation:winnerIn .35s ease-out}
.win-fx.visible{display:block}.win-fx strong{display:block;font-size:23px;letter-spacing:.09em}.win-fx small{display:block;color:#fff4d6;margin-top:5px;font-size:13px}.win-fx .win-hand{font-size:14px;color:#fff;margin-top:3px}
@keyframes winnerIn{from{opacity:0;transform:translate(-50%,-45%) scale(.85)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
.chip-flight{position:absolute;inset:0;pointer-events:none;z-index:25;overflow:visible}
.flying-chip{position:absolute;left:50%;top:48%;animation:chipTravel .85s ease-in-out forwards;--dx:0px;--dy:130px}
@keyframes chipTravel{0%{opacity:1;transform:translate(-50%,-50%) scale(.8)}75%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(.55)}}
.winning-seat{box-shadow:0 0 0 3px #f5ce73,0 0 22px #e7b74d!important;filter:brightness(1.15)}
.card.newly-dealt{animation:cardFlip .4s ease-out both;transform-origin:center}
@keyframes cardFlip{0%{transform:rotateY(90deg) scale(.9);opacity:.4}100%{transform:rotateY(0) scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){.win-fx,.card.newly-dealt,.flying-chip{animation:none!important}}

/* v0.8: chips stay clear of the community cards */
body.in-game .pot{top:14%;z-index:3;min-width:110px}
body.in-game .pot-chips{margin-top:2px;height:19px;align-items:center}
body.in-game .pot-chip{width:18px;height:18px;flex:0 0 18px}
body.in-game .community{top:45%;z-index:4}
body.in-game .sound-setting{display:flex;align-items:center;gap:15px;margin-top:12px;color:#f0c783}
body.in-game .sound-setting input{width:180px;accent-color:#e4b66e}

/* v0.9: deliberate flop reveal, smoother visual cadence */
.card.newly-dealt{animation-duration:.58s;animation-timing-function:cubic-bezier(.2,.65,.2,1);opacity:0}

/* v1.2: keep the game-panel toggle in its own row below betting controls. */
body.in-game .actions{
  flex:0 0 132px;
  min-height:132px;
  padding:8px 16px;
  align-items:stretch;
}
body.in-game .raise{
  height:100%;
  min-height:0;
  gap:3px;
  padding:6px 11px;
}
body.in-game .raise .amount-row input,
body.in-game .raise .amount-row button{height:32px}
body.in-game .raise .quick-bets button{padding:4px 2px}
body.in-game .bottom-toggle{
  flex:0 0 38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  z-index:4;
}
body.in-game .bottom-toggle button{
  height:32px;
  padding:5px 22px;
  border-radius:8px;
}
@media(max-width:750px){
  body.in-game .actions{flex:0 0 158px;min-height:158px;grid-template-rows:46px 96px;padding:5px 8px;gap:5px}
  body.in-game .raise{padding:4px 9px}
}
@media(max-height:740px) and (min-width:751px){
  body.in-game .actions{flex:0 0 120px;min-height:120px;padding:5px 12px}
  body.in-game .raise{padding:4px 9px;gap:1px}
  body.in-game .raise .amount-row input,body.in-game .raise .amount-row button{height:28px}
  body.in-game .raise .quick-bets button{padding:3px 2px}
}

/* RIVL classic chip artwork — lobby mode cards only */
.mode .mini-table{background:radial-gradient(ellipse at center,#27201a 0%,#12100e 39%,#090909 72%);overflow:hidden}
.rivl-chip{width:102px;height:102px;border-radius:50%;position:relative;display:grid;place-items:center;background:repeating-conic-gradient(from 10deg,#d6a253 0deg 12deg,#181411 12deg 35deg,#edc27c 35deg 43deg,#181411 43deg 60deg);box-shadow:0 7px 18px #000b,0 0 18px #b27a3340,inset 0 0 0 3px #e8ba71,inset 0 0 0 8px #16120e;transform:rotate(-9deg)}
.rivl-chip:before{content:"";position:absolute;inset:12px;border-radius:50%;background:radial-gradient(circle at 35% 28%,#36312a,#111111 70%);border:2px solid #c69a57;box-shadow:inset 0 0 0 3px #211b15,inset 0 0 0 4px #8b683b}
.rivl-chip-inner{z-index:1;display:flex;flex-direction:column;align-items:center;line-height:.83;text-shadow:0 1px 4px #000;color:#f3cb7f}
.rivl-chip-ace{font-family:Georgia,serif;font-size:32px;font-weight:bold}
.rivl-chip-spade{font-family:Georgia,serif;font-size:26px;margin-top:5px}

/* v1.3.3: single centered golden spade on lobby chips */
.rivl-chip-inner{justify-content:center;line-height:1}
.rivl-chip-spade{font-family:Georgia,serif;font-size:53px;margin-top:-3px;color:#f3cb7f}

/* v1.3.4 — realistic understated casino chip, lobby artwork only */
.mode .mini-table{background:radial-gradient(ellipse at 50% 80%,#292018 0%,#100e0d 44%,#080808 76%);perspective:450px;overflow:hidden}
.mode .rivl-chip{width:112px;height:112px;transform:rotateX(17deg) rotateZ(-13deg);border-radius:50%;background:repeating-conic-gradient(from -4deg,#1a1a1b 0deg 29deg,#a57a40 29deg 34deg,#d7b47a 34deg 38deg,#1a1a1b 38deg 45deg);border:2px solid #aa8047;box-shadow:0 4px 0 #5b452b,0 7px 0 #191613,0 11px 13px #000b,0 0 0 1px #32291f,inset 0 0 0 3px #161616,inset 0 0 0 7px #b18a54;filter:none}
.mode .rivl-chip:before{inset:12px;background:radial-gradient(circle at 34% 23%,#2b2b2b 0%,#171718 43%,#0b0b0c 100%);border:1px solid #927349;box-shadow:inset 0 0 0 4px #151515,inset 0 0 0 5px #5d492f,inset 0 0 13px #000b}
.mode .rivl-chip-inner{position:relative;z-index:2;transform:rotateZ(13deg);text-shadow:0 1px 1px #0008}
.mode .rivl-chip-spade{font-family:Georgia,'Times New Roman',serif;font-size:43px;font-weight:normal;line-height:1;margin:0;color:#d8ab66;text-shadow:0 1px 0 #f9dfac66,0 2px 3px #0009}

/* v1.4 — rated play: live decision grades, results screen, real ladder */
:root{--g-brilliant:#3fd6d9;--g-best:#4bd28e;--g-excellent:#86d58f;--g-good:#b3bfa8;--g-inaccuracy:#f2c14e;--g-mistake:#f08a3c;--g-blunder:#ff5a5a}
.g-brilliant{--gc:var(--g-brilliant)}.g-best{--gc:var(--g-best)}.g-excellent{--gc:var(--g-excellent)}.g-good{--gc:var(--g-good)}.g-inaccuracy{--gc:var(--g-inaccuracy)}.g-mistake{--gc:var(--g-mistake)}.g-blunder{--gc:var(--g-blunder)}
.practice-banner{justify-content:flex-start}.practice-banner label{margin-left:auto}
.grade-fx{position:absolute;left:50%;bottom:clamp(34px,9vh,62px);transform:translate(-50%,8px);z-index:6;display:flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border-radius:999px;background:#0b0b0cf2;border:1px solid var(--gc,#efbd70);box-shadow:0 0 18px color-mix(in srgb,var(--gc,#efbd70) 45%,transparent);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;white-space:nowrap}
.grade-fx.visible{opacity:1;transform:translate(-50%,0)}
.grade-fx b{display:grid;place-items:center;min-width:28px;height:28px;border-radius:50%;background:var(--gc);color:#0b0b0c;font-size:13px;font-weight:900;padding:0 4px}
.grade-fx span{color:var(--gc);font-weight:800;letter-spacing:.1em;font-size:12px}
.grade-fx small{color:var(--text);font-size:11px}
.match-result{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px;background:#050505c9;backdrop-filter:blur(3px)}
.mr-card{width:min(560px,100%);max-height:calc(100dvh - 32px);overflow:auto;background:linear-gradient(160deg,#1b140d,#0b0b0c 60%);border:1px solid #b88a4c;border-radius:14px;padding:22px 24px;box-shadow:0 20px 70px #000,0 0 40px #e6ae4330}
.mr-card h2{font-size:44px;margin:6px 0 2px;color:#f8f4ed;letter-spacing:.02em}.mr-card h2 span{font-size:18px;color:var(--muted);font-weight:600}
.mr-rating{display:flex;align-items:baseline;gap:12px;font-variant-numeric:tabular-nums}.mr-rating strong{font-size:22px;color:var(--gold)}.mr-rating em{font-style:normal;font-weight:800;font-size:20px}
.mr-split{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0 6px}.mr-split div{border:1px solid #4a3622;border-radius:8px;padding:8px 10px;background:#0e0c0a}.mr-split small{display:block;color:var(--text);font-size:10px;letter-spacing:.08em}.mr-split b{font-size:18px;font-variant-numeric:tabular-nums}
.mr-tier{color:var(--text);font-size:13px;margin:8px 0}
.grade-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 12px}
.grade-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--gc);color:var(--gc);border-radius:999px;padding:3px 10px 3px 4px;font-size:12px;font-weight:700}
.grade-chip b{background:var(--gc);color:#0b0b0c;border-radius:999px;padding:1px 6px;font-size:11px}
.moment{border-left:3px solid var(--gc);background:#ffffff08;border-radius:0 8px 8px 0;padding:8px 12px;margin:8px 0}.moment small{color:var(--gc);font-size:10px;letter-spacing:.1em;font-weight:800}.moment p{margin:4px 0 0;font-size:13px;color:var(--text);line-height:1.45}
.mr-table{margin-top:12px}.mr-row{display:grid;grid-template-columns:52px minmax(0,1fr) 90px 110px;gap:8px;padding:7px 4px;border-bottom:1px solid #2c241c;font-size:13px;font-variant-numeric:tabular-nums}.mr-row.head{color:var(--gold);font-size:10px;letter-spacing:.1em;font-weight:800}.mr-row.me{color:var(--gold);font-weight:700}.mr-row span:nth-child(n+3){text-align:right}
.mr-actions{display:flex;gap:10px;margin-top:16px}.mr-actions .gold{flex:1}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px}.stat-grid h2{margin:6px 0 0;font-variant-numeric:tabular-nums}
.profile-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:16px;margin:16px 0}
.content-view>.panel{margin-top:16px}.profile-card{margin-top:0}
.spark{width:100%;height:120px;display:block}.spark-axis{display:flex;justify-content:space-between;color:var(--text);font-size:11px;font-variant-numeric:tabular-nums}
.lbar{display:grid;grid-template-columns:118px minmax(0,1fr) 34px;gap:8px;align-items:center;font-size:12px;padding:3px 0}.lbar b{color:var(--gc);display:inline-block;min-width:20px;float:none!important}.lbar i{height:8px;background:#26201b;border-radius:6px;overflow:hidden}.lbar em{display:block;height:100%;background:var(--gc)}.lbar span:last-child{text-align:right;font-variant-numeric:tabular-nums;color:var(--text)}
.ladder{padding:6px 18px;overflow-x:auto}.ladder-row{display:grid;grid-template-columns:40px minmax(150px,1fr) 90px 80px 60px 80px 90px;gap:8px;padding:13px 4px;border-bottom:1px solid #38302b;font-variant-numeric:tabular-nums;min-width:600px}.ladder-row.head{color:var(--gold);font-size:11px;letter-spacing:.1em;font-weight:800}.ladder-row.me{color:var(--gold);font-weight:700;background:#efbd700d}.ladder-row small{font-size:9px;color:var(--text);border:1px solid #4a3a2b;border-radius:4px;padding:1px 4px;margin-left:4px}.ladder-row span:nth-child(n+4){text-align:right}
.how p{color:var(--text)!important;font-size:14px!important;line-height:1.6;max-width:72ch}.how b{float:none!important;color:#f3dcb3}
.reset-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:10px;font-size:13px;color:var(--text)}
@media(max-width:850px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-grid{grid-template-columns:1fr}.content-view{padding:20px 14px}}
@media(max-width:520px){.mr-card{padding:16px}.mr-card h2{font-size:34px}.mr-split{grid-template-columns:1fr 1fr}.mr-row{grid-template-columns:40px minmax(0,1fr) 72px 80px;font-size:12px}}
@media(max-width:600px){body.in-game .gamebar>div:nth-child(4){display:none}}
[hidden]{display:none!important}
/* v1.4 — seats 6–8 for 9-player tables */
.s6{bottom:-12px;left:15%}.s7{top:-35px;left:50%;transform:translateX(-50%)}.s8{top:12%;left:-40px}
body.in-game .s7{top:-28px}
/* v1.4 — phone table: tall oval, seats around both edges */
@media(max-width:600px){
 .account>span:last-child{display:none}.crumb{max-width:170px}
 body.in-game .poker-table{width:min(80%,calc((100dvh - 340px)*.78));aspect-ratio:.78/1;border-radius:50%/42%;margin:22px auto 26px}
 body.in-game .seat{font-size:10px;padding:2px 7px 2px 2px;max-width:150px;overflow:hidden}
 body.in-game .seat .avatar{width:22px;height:22px;font-size:10px}
 body.in-game .s1,body.in-game .s2,body.in-game .s3,body.in-game .s4,body.in-game .s5,body.in-game .s6,body.in-game .s7,body.in-game .s8{top:auto;bottom:auto;left:auto;right:auto;transform:none}
 body.in-game .s7{top:-16px;left:50%;transform:translateX(-50%)}
 body.in-game .s1{top:8%;left:-14%}body.in-game .s8{top:27%;left:-18%}body.in-game .s5{top:60%;left:-18%}body.in-game .s6{top:79%;left:-12%}
 body.in-game .s2{top:8%;right:-14%}body.in-game .s3{top:27%;right:-18%}body.in-game .s4{top:60%;right:-18%}
 body.in-game .pot{top:21%}body.in-game .community{top:41%;gap:3px}
 body.in-game .community .card{width:28px;height:42px;font-size:14px;padding:2px}
 body.in-game .myseat{bottom:-20px;padding:4px 9px;gap:6px}
 body.in-game .grade-fx{bottom:44px}
}

/* v1.4.1: decorative hero spade never blocks taps */
.hero:after{pointer-events:none}.hero>*{position:relative;z-index:1}

/* RIVL v1.5: two-stage mode selector */
.rivl-menu-step[hidden]{display:none!important}
.rivl-mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.rivl-mode-option{min-width:0;text-align:center;border:1px solid #79572f;border-radius:16px;padding:28px 18px;background:radial-gradient(ellipse at 50% 0%,#302315,#0e0d0d 72%);display:flex;align-items:center;flex-direction:column}
.rivl-mode-option h3{font-size:19px;letter-spacing:2px;color:#f3cc8a;margin:20px 0 4px}
.rivl-mode-option p{color:var(--text);line-height:1.55;font-size:13px;min-height:44px}
.rivl-mode-option button{width:100%;margin-top:auto}
.rivl-mode-option button:disabled{opacity:.55;cursor:not-allowed}
.rivl-mode-chip{width:min(100%,172px);aspect-ratio:1;border-radius:50%;display:grid;place-items:center;background:repeating-conic-gradient(#d6a55b 0deg 14deg,#1a1714 14deg 24deg);padding:12px;box-shadow:0 12px 35px #000b,0 0 0 2px #a77a3d}
.rivl-mode-chip:before{content:'';grid-area:1/1;width:100%;height:100%;border-radius:50%;background:radial-gradient(circle at 35% 25%,#303036,#090909 70%);border:3px double #e7bd78}
.rivl-mode-chip span{grid-area:1/1;z-index:1;color:#eac17d;font-size:clamp(54px,7vw,84px);text-shadow:0 4px 14px #000}
.rivl-back{margin:0 0 18px}@media(max-width:750px){label.practice-banner{margin-left:0}}#accountHint a{color:var(--gold)}
.rivl-card-art{height:150px;display:flex;align-items:center;justify-content:center;padding-left:25px}
.rivl-playing-card{display:flex;flex-direction:column;justify-content:space-between;width:87px;height:123px;padding:9px;background:linear-gradient(140deg,#fffdf7,#dfd9cc);color:#1a1714;border:2px solid #c59b60;border-radius:10px;font-family:Georgia,serif;font-size:27px;font-weight:700;box-shadow:0 10px 25px #0009;transform:rotate(-13deg)}
.rivl-playing-card span{align-self:center;font-size:42px}
.rivl-playing-card+.rivl-playing-card{transform:translateX(-20px) rotate(12deg)}
.rivl-card-modes .mode:nth-child(2) .rivl-playing-card:first-child,.rivl-card-modes .mode:nth-child(3) .rivl-playing-card:first-child{color:#bd2635}
@media(max-width:950px){.rivl-mode-grid{grid-template-columns:1fr}.rivl-mode-option{padding:22px}.rivl-mode-option p{min-height:0}.rivl-mode-chip{width:135px}}

/* v1.5: symmetric desktop seating for each bot table size. */
@media (min-width:601px){
 body.in-game .poker-table[data-player-count] .seat{right:auto;bottom:auto;transform:translateX(-50%)}
 /* 9 players: four mirrored pairs around the human's bottom-center seat. */
 body.in-game .poker-table[data-player-count="9"] .s1{top:-24px;left:22%}
 body.in-game .poker-table[data-player-count="9"] .s2{top:-24px;left:78%}
 body.in-game .poker-table[data-player-count="9"] .s3{top:29%;left:100%}
 body.in-game .poker-table[data-player-count="9"] .s4{top:calc(100% - 12px);left:78%}
 body.in-game .poker-table[data-player-count="9"] .s5{top:29%;left:0%}
 body.in-game .poker-table[data-player-count="9"] .s6{top:calc(100% - 12px);left:22%}
 body.in-game .poker-table[data-player-count="9"] .s7{top:68%;left:0%}
 body.in-game .poker-table[data-player-count="9"] .s8{top:68%;left:100%}
 /* 6 players: top-center opponent and mirrored side pairs. */
 body.in-game .poker-table[data-player-count="6"] .s1{top:-24px;left:50%}
 body.in-game .poker-table[data-player-count="6"] .s2{top:23%;left:7%}
 body.in-game .poker-table[data-player-count="6"] .s3{top:23%;left:93%}
 body.in-game .poker-table[data-player-count="6"] .s4{top:75%;left:93%}
 body.in-game .poker-table[data-player-count="6"] .s5{top:75%;left:7%}
 /* 3 players: opponents mirror each other above the board. */
 body.in-game .poker-table[data-player-count="3"] .s1{top:-24px;left:25%}
 body.in-game .poker-table[data-player-count="3"] .s2{top:-24px;left:75%}
}

/* Online room lobby */
.room-entry{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:22px 0}
.room-entry .panel{display:flex;flex-direction:column;gap:14px}
.room-entry label{display:flex;flex-direction:column;gap:8px;color:#d7bc91}
.room-entry input{background:#161513;color:#f8e6c9;border:1px solid #84633b;padding:13px;border-radius:8px;font:inherit;max-width:100%}
.room-topline,.room-visibility{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0}
.room-topline{justify-content:space-between}
.room-seats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0}
.room-seat{min-height:115px;background:linear-gradient(150deg,#251c13,#0c0b0b);border:1px solid #755a35;border-radius:14px;padding:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#ead3aa}
.room-seat button{border:1px solid #9b7947;background:#21180d;color:#eac78b;border-radius:50%;width:44px;height:44px;font-size:25px;cursor:pointer}
.room-seat .room-avatar{display:grid;place-items:center;border:2px solid #c29b5e;border-radius:50%;width:46px;height:46px;font-size:23px}
.room-seat small{color:var(--text)}
.room-seat .room-remove{border-radius:8px;font-size:12px;width:auto;height:auto;padding:5px 12px}
.room-levels{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
.room-levels button{background:#332515;color:#f4d39d;border:1px solid #b98a4a;border-radius:8px;padding:12px;cursor:pointer}
.room-disclaimer{color:var(--text);font-size:13px}
@media(max-width:700px){.room-entry{grid-template-columns:1fr}.room-seats{gap:6px}.room-seat{padding:7px;min-height:98px;font-size:12px}}

/* RIVL Multiplayer beta table */
#roomGame{margin-top:18px;padding:24px;background:radial-gradient(ellipse at 50% 20%,#20170e,#0c0b0b 65%);border:1px solid #b78b4a}
.rivl-live-table{margin:20px auto;padding:22px;border:12px solid #64472c;border-radius:45% / 30%;background:radial-gradient(ellipse,#233d30,#10271e);box-shadow:0 12px 36px #000b,inset 0 0 0 3px #b89152;text-align:center;max-width:920px;min-height:230px}
#roomPot{color:#ffd28d;font-weight:900;letter-spacing:.12em}
.rivl-board{min-height:75px;padding:18px 6px;font-size:clamp(22px,3vw,36px);color:#fff;letter-spacing:.2em}
.rivl-live-seats{display:flex;flex-wrap:wrap;justify-content:center;gap:7px}
.rivl-live-seat{background:#0b0e0ddd;border:1px solid #997748;border-radius:9px;padding:8px 12px;color:#eee;font-size:12px}
.rivl-live-seat.is-turn{border-color:#ffdc7d;box-shadow:0 0 12px #e5ad58}.rivl-live-seat.is-folded{opacity:.4}
.rivl-timer-row{display:flex;gap:15px;align-items:center;margin:12px 0}
#roomTimer{width:68px;height:68px;border-radius:50%;display:grid;place-items:center;background:#52bd76;flex-shrink:0}
#roomTimer span{background:#0e0e0f;border-radius:50%;height:53px;width:53px;display:grid;place-items:center;color:#f3cb88;font-size:12px;font-weight:800}
.rivl-bet-actions{display:flex;gap:10px;align-items:stretch;flex-wrap:wrap}.rivl-bet-actions button{min-height:55px;padding:12px 20px;font-weight:900;font-size:15px;flex:1}
.rivl-bet-actions input{width:125px;background:#151515;color:white;border:1px solid #bc9256;border-radius:8px;font-size:19px;text-align:center}
#roomWinner{color:#ffdc88;margin-top:18px}
@media(max-width:650px){.rivl-live-table{border-radius:30px;border-width:7px;padding:14px}.rivl-bet-actions button{min-width:90px}.rivl-live-seat{font-size:10px}}

/* Multiplayer match is a separate screen, never a section below room setup. */
#rooms.rivl-match-mode{padding-top:12px}
#rooms.rivl-match-mode>.section-title,#rooms.rivl-match-mode>#roomStatus{display:none}
#rooms.rivl-match-mode .room-visibility,#rooms.rivl-match-mode #roomHostNotice,#rooms.rivl-match-mode #roomSeats,#rooms.rivl-match-mode #roomBotPicker,#rooms.rivl-match-mode #roomStart,#rooms.rivl-match-mode .room-disclaimer{display:none!important}
#rooms.rivl-match-mode .room-topline{margin:0 0 12px;min-height:42px}
#rooms.rivl-match-mode .room-topline h2{font-size:15px;letter-spacing:.13em;color:#e9c27c}
#rooms.rivl-match-mode #roomGame{margin:0;min-height:calc(100vh - 190px);display:flex;flex-direction:column;justify-content:space-around;gap:14px;padding:clamp(14px,2.5vw,30px)}
#rooms.rivl-match-mode #roomGame[hidden]{display:none}
#rooms.rivl-match-mode .rivl-felt{min-height:260px}
@media(max-width:700px){#rooms.rivl-match-mode #roomGame{min-height:calc(100dvh - 150px)}#rooms.rivl-match-mode .room-topline{gap:8px}}

/* Centered bot difficulty picker, no scrolling to choose skill. */
.rivl-modal-backdrop:not([hidden]){position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.78);backdrop-filter:blur(5px)}
.rivl-modal-backdrop[hidden]{display:none!important}
.rivl-modal{width:min(520px,100%);background:linear-gradient(155deg,#241a10,#0e0d0c 70%);border:1px solid #d1a15e;border-radius:18px;box-shadow:0 25px 100px #000;padding:28px;text-align:center}
.rivl-modal h3{color:#f2c77e;font-size:22px;letter-spacing:.08em;margin:0 0 12px}
.rivl-modal p{color:var(--text);margin:0 0 22px}
.rivl-modal .room-levels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.rivl-modal .room-levels button{min-height:58px;border-radius:9px;font-size:14px;font-weight:800;background:linear-gradient(#3b2919,#1b140d);color:#f5cf91;border:1px solid #a47b45}
.rivl-modal .room-levels button:hover,.rivl-modal .room-levels button:focus-visible{background:linear-gradient(#fbd997,#bc8544);color:#18100a}
.rivl-modal #cancelBotPicker{margin-top:22px;min-width:140px}
body.rivl-modal-open{overflow:hidden}
@media(max-width:480px){.rivl-modal{padding:20px 14px}.rivl-modal .room-levels{grid-template-columns:1fr}}

/* PvP reuses the Cairo bot-table composition while retaining separate server state. */
#rooms.rivl-match-mode{padding:0!important;max-width:none!important;width:100%;height:calc(100dvh - 68px);overflow:hidden}
#rooms.rivl-match-mode #roomLobby{height:100%;display:flex;flex-direction:column}
#rooms.rivl-match-mode .room-topline{position:absolute;z-index:3;right:14px;top:8px;margin:0;min-height:0}
#rooms.rivl-match-mode .room-topline h2{display:none}
#rooms.rivl-match-mode #roomGame{height:100%;min-height:0;display:flex;flex-direction:column;justify-content:initial;gap:0;padding:0;background:transparent;border:0;border-radius:0}
#roomGame .rivl-pvp-gamebar{flex:0 0 58px;padding:5px 22px}
#roomGame .rivl-pvp-scene{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;overflow:hidden;padding:8px 24px 16px}
#roomGame .rivl-pvp-table{flex:0 1 auto;width:min(80%,760px,calc((100dvh - 290px)*2.05));height:auto;aspect-ratio:2.35/1;min-height:0;margin:12px auto 16px;border-width:clamp(5px,1.3vh,12px)}
#roomGame .rivl-pvp-board{display:flex;gap:5px;align-items:center;justify-content:center}
#roomGame .rivl-pvp-board .card{flex:0 0 auto}
#roomGame .rivl-pvp-myseat{display:flex;align-items:center;gap:8px}
#roomGame .rivl-pvp-opponents{display:contents}
#roomGame .rivl-pvp-seat.is-turn{border-color:#fbd68b;box-shadow:0 0 16px #c89d56}
#roomGame .rivl-pvp-seat.is-folded{opacity:.45}
#roomGame .rivl-pvp-controls{flex:0 0 auto;background:#0c0c0d;padding:6px 20px 10px}
#roomGame .rivl-timer-row{position:absolute;z-index:2;bottom:112px;left:20px;gap:10px;margin:0;font-size:11px;pointer-events:none}
#roomGame #roomTimer{width:40px;height:40px}
#roomGame #roomTimer span{width:30px;height:30px;font-size:10px}
#roomGame .rivl-bet-actions{display:grid;grid-template-columns:1fr 1fr 1fr minmax(210px,2.5fr);gap:10px;align-items:stretch;max-width:980px;margin:auto}
#roomGame .rivl-bet-actions>button{min-height:80px;min-width:0;font-size:16px}
#roomGame .rivl-pvp-raise{min-width:0;display:flex;flex-direction:column}
#roomGame .rivl-pvp-raise label{font-size:11px}
#roomGame .rivl-pvp-raise .amount-row{display:flex}
#roomGame .rivl-pvp-raise input[type=number]{width:100%;min-width:0}
#roomGame .rivl-pvp-raise input[type=range]{width:100%}
#roomGame .rivl-pvp-raise .quick-bets{display:grid;grid-template-columns:repeat(4,1fr)}
#roomGame .rivl-pvp-raise .quick-bets button{min-width:0;font-size:10px;padding:5px}
#roomGame #roomAllin{display:none}
#roomGame #roomWinner{text-align:center;margin:5px 0}
#roomGame #roomNext{display:block;margin:5px auto}
#roomGame #roomNext[hidden]{display:none}
#roomGame #roomActions[hidden]{display:none}
#roomGame .rivl-pvp-table[data-player-count="2"] .s1{top:-24px;left:50%}
#roomGame .rivl-pvp-table[data-player-count="4"] .s1{top:-24px;left:50%}
#roomGame .rivl-pvp-table[data-player-count="4"] .s2{top:48%;left:2%}
#roomGame .rivl-pvp-table[data-player-count="4"] .s3{top:48%;left:98%}
#roomGame .rivl-pvp-table[data-player-count="5"] .s1{top:-24px;left:50%}
#roomGame .rivl-pvp-table[data-player-count="5"] .s2{top:27%;left:3%}
#roomGame .rivl-pvp-table[data-player-count="5"] .s3{top:27%;left:97%}
#roomGame .rivl-pvp-table[data-player-count="5"] .s4{top:75%;left:97%}
#roomGame .rivl-pvp-table[data-player-count="7"] .s1{top:-24px;left:50%}
#roomGame .rivl-pvp-table[data-player-count="7"] .s2{top:20%;left:5%}
#roomGame .rivl-pvp-table[data-player-count="7"] .s3{top:20%;left:95%}
#roomGame .rivl-pvp-table[data-player-count="7"] .s4{top:60%;left:95%}
#roomGame .rivl-pvp-table[data-player-count="7"] .s5{top:60%;left:5%}
#roomGame .rivl-pvp-table[data-player-count="7"] .s6{top:88%;left:50%}
#roomGame .rivl-pvp-table[data-player-count="8"] .s1{top:-24px;left:30%}
#roomGame .rivl-pvp-table[data-player-count="8"] .s2{top:-24px;left:70%}
#roomGame .rivl-pvp-table[data-player-count="8"] .s3{top:30%;left:3%}
#roomGame .rivl-pvp-table[data-player-count="8"] .s4{top:30%;left:97%}
#roomGame .rivl-pvp-table[data-player-count="8"] .s5{top:70%;left:3%}
#roomGame .rivl-pvp-table[data-player-count="8"] .s6{top:70%;left:97%}
#roomGame .rivl-pvp-table[data-player-count="8"] .s7{top:90%;left:50%}
@media(max-width:750px){#roomGame .rivl-pvp-table{width:92%}#roomGame .rivl-bet-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}#roomGame .rivl-pvp-raise{grid-column:1/-1}#roomGame .rivl-bet-actions>button{min-height:50px;font-size:12px}#roomGame .rivl-timer-row{bottom:160px;left:10px}#roomGame .rivl-pvp-controls{padding:4px 8px}#roomGame .rivl-pvp-gamebar{padding-right:110px}}

#roomGame .rivl-timer-row{position:static;display:flex;justify-content:center;min-height:18px;margin:0 0 3px;pointer-events:none}
#roomGame .rivl-seat-clock{width:43px;height:43px;flex:0 0 43px;border-radius:50%;display:grid;place-items:center;background:#52bd76;box-shadow:0 0 0 2px #0a0a0a}
#roomGame .rivl-seat-clock span{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#101112;color:#f7d291;font-weight:800;font-size:11px}
#roomGame .rivl-seat-clock[hidden]{display:none}
#roomGame .rivl-pvp-myseat{overflow:visible}
#roomGame .rivl-pvp-board .card.red,#roomGame .rivl-pvp-myseat .card.red{color:#bd1e35}
#roomGame .rivl-deal-in{animation:rivlPvpDeal .42s ease-out both}
@keyframes rivlPvpDeal{0%{opacity:0;transform:translateY(-28px) rotateY(85deg) scale(.8)}100%{opacity:1;transform:translateY(0) rotateY(0) scale(1)}}
.account-name{display:flex;align-items:center;gap:10px;background:none;border:0;color:inherit;font:inherit;padding:0}.account-name:hover span:last-child{text-decoration:underline}
@media(max-width:750px){.account-name span:last-child{display:none}}
#roomGame .rivl-shown{display:inline-flex;gap:2px;margin-left:6px;vertical-align:middle}#roomGame .rivl-shown .card{width:24px;height:34px;font-size:12px;padding:2px}
.room-seat.is-offline{opacity:.6}.room-seat .room-offline{color:#dc8f55}
.account-forms{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end}.account-forms label,.room-entry label{display:flex;flex-direction:column;gap:6px}
.account-key{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.account-key code{background:#000;padding:8px 10px;border-radius:6px;word-break:break-all;color:#efbd70}
@media(max-width:750px){.account-forms{grid-template-columns:1fr}}
.room-finder{margin-bottom:16px}.room-finder-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.room-finder-head h3{margin:0}
.lobby-list{display:grid;gap:8px}.lobby-room{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border:1px solid #38302b;border-radius:8px}
.lobby-room button{min-height:40px}.capacity-note{border:1px solid #8a5a2b;background:#1c140c;color:#e7c390;padding:12px 14px;border-radius:8px}
.room-entry .check{flex-direction:row;align-items:center;font-size:13px}.verified-badge{color:#7fd09b;margin-left:4px}
.online-row{display:grid;grid-template-columns:40px minmax(120px,1fr) 70px 50px 70px 50px;gap:8px;padding:11px 4px;border-bottom:1px solid #38302b;font-size:14px}.online-row.head{color:var(--muted);font-size:11px;letter-spacing:.1em}.online-row.me{color:var(--gold)}
#roomRatings{margin-top:8px;text-align:center}#roomRatings .up{color:#7fd09b}#roomRatings .down{color:#e08585}

/* Private-room PvP polish: clear header and original centered-suit cards. */
#rooms.rivl-match-mode .room-topline{top:0;right:0;position:relative;flex:0 0 auto;display:flex;justify-content:flex-end;padding:4px 20px;background:#0b0b0c;border-bottom:1px solid #49351e;z-index:5}
#rooms.rivl-match-mode .room-topline #leaveRoom{position:static;min-height:34px;padding:6px 12px;font-size:12px}
#rooms.rivl-match-mode #roomGame{flex:1;height:auto;min-height:0}
#roomGame .rivl-pvp-gamebar{padding-right:22px}
#roomGame .rivl-pvp-seat{width:max-content;max-width:175px;justify-content:center}
#roomGame .rivl-pvp-board .card:not(.back),#roomGame .rivl-pvp-myseat .card:not(.back){position:relative;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;line-height:1}
#roomGame .card:not(.back)>strong{font-size:15px;font-weight:900;align-self:flex-start}
#roomGame .card:not(.back)>.rivl-card-center{position:absolute;inset:0;display:grid;place-items:center;font-size:29px;font-weight:400;pointer-events:none}
#roomGame .rivl-pvp-myseat .card:not(.back)>.rivl-card-center{font-size:22px}

/* Private room bottom game panel follows original bot-table controls. */
#roomGame .rivl-room-panel-toggle{display:flex;justify-content:center;margin-top:4px}
#roomGame .rivl-room-panel-toggle button{font-size:12px}
#roomGame #roomGamePanel{width:min(980px,100%);margin:5px auto 0;max-height:180px;overflow:auto}
#roomGame #roomGamePanel.collapsed{display:none}
#roomGame #roomGamePanel .tabs{display:flex;flex-wrap:wrap}
#roomGame #roomGamePanel .tab{flex:1;min-width:100px}
#roomGame #roomTabContent{padding:12px 16px;font-size:13px;color:var(--text)}
#roomGame .rivl-pvp-myseat .card{width:37px;height:49px;padding:4px}
#roomGame .rivl-pvp-myseat .card:not(.back)>strong{font-size:12px}
#roomGame .rivl-pvp-myseat .card:not(.back)>.rivl-card-center{font-size:20px}

/* One rank in top-left and one centered suit in both poker modes. */
#roomGame .card:not(.back)>strong{position:relative;z-index:1;align-self:flex-start;font-size:12px;line-height:1}
#roomGame .card:not(.back)>.rivl-card-center{position:absolute;inset:0;display:grid;place-items:center;line-height:1}
#table .rivl-clean-card{position:relative;display:flex;flex-direction:column;justify-content:flex-start}
#table .rivl-clean-card>strong{position:relative;z-index:1;align-self:flex-start;font-size:.65em;line-height:1}
#table .rivl-clean-card>span{position:absolute;inset:0;display:grid;place-items:center;font-size:1.1em;line-height:1}

/* RIVL player identity, showdown cards, and account inputs */
.rivl-dialog{border:1px solid #98703b;border-radius:18px;background:linear-gradient(145deg,#211810,#0c0b0c 65%);color:#f7ebd7;width:min(440px,calc(100vw - 30px));padding:28px;box-shadow:0 24px 90px #000b}
.rivl-dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}
.rivl-dialog-brand{color:var(--gold);font-size:12px;letter-spacing:3px;font-weight:800}
.rivl-dialog h2{font-size:25px;margin:18px 0 8px}.rivl-dialog p{color:var(--text);font-size:14px;line-height:1.5}
.rivl-dialog label{display:block;color:var(--gold);font-size:11px;letter-spacing:2px;margin:20px 0 8px}
.rivl-dialog input,.account-panel input{width:100%;min-height:46px;min-width:0;border-radius:9px;border:1px solid #665037;background:#131113!important;color:#fff4e2!important;padding:10px 13px;font:inherit;outline:none}
.rivl-dialog input:focus,.account-panel input:focus{border-color:#e9ba72;box-shadow:0 0 0 3px #e9ba7225}
.rivl-dialog-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:24px}.rivl-dialog-actions button{padding:12px 18px}
.account-panel{border:1px solid #6d4c2b;background:linear-gradient(135deg,#1c1712,#100e0e)}
.account-panel h3{color:var(--gold);letter-spacing:2px}.account-panel .account-forms{gap:16px}.account-panel .account-forms label{color:#e7c99b;font-size:13px}
#roomGame .rivl-pvp-seat .avatar,#roomGame .rivl-pvp-myseat .avatar{display:grid;place-items:center;border-radius:50%;font-size:20px;line-height:1;background:#241b13;border:2px solid #e9b86a;color:#f1c983;flex-shrink:0}
#roomGame .rivl-shown{display:inline-flex;gap:5px;align-items:center;flex-shrink:0;vertical-align:middle;margin-left:8px}
#roomGame .rivl-shown .card{width:34px;height:48px;padding:4px;flex:0 0 34px;border-radius:5px;box-shadow:0 2px 5px #0008}
#roomGame .rivl-shown .card>strong{font-size:12px;line-height:1}
#roomGame .rivl-shown .card>.rivl-card-center{font-size:23px;position:absolute;inset:0;display:grid;place-items:center}
#roomGame .rivl-pvp-seat{max-width:none;gap:5px;flex-wrap:nowrap}
@media(max-width:650px){#roomGame .rivl-shown .card{width:27px;height:39px;flex-basis:27px}#roomGame .rivl-shown .card>.rivl-card-center{font-size:18px}}

/* Separate online rated PvP from browser-local bot practice */
.online-profile-summary{border:1px solid #8e6534;background:linear-gradient(130deg,#251b12,#101011);padding:22px;margin:18px 0}
.online-profile-summary h3{color:var(--gold);letter-spacing:.12em;font-size:12px;margin:0 0 12px}
.online-profile-score{display:block;font-size:38px;line-height:1.2;color:#f4d197;font-weight:800}
.online-profile-summary p{margin:7px 0}
.profile-section-heading{color:var(--gold);font-size:15px;letter-spacing:.12em;margin:28px 0 12px}
/* Showdown: revealed opponent cards hang off the seat pill toward the felt, fully drawn, without hiding the name or stack. */
#roomGame .rivl-pvp-seat.has-shown{z-index:4}
#roomGame .rivl-pvp-seat>span:not(.rivl-shown){flex-shrink:0}
#roomGame .rivl-pvp-seat .rivl-shown{position:absolute;left:50%;transform:translateX(-50%);margin:0;gap:4px;z-index:1}
#roomGame .rivl-pvp-seat.shown-below .rivl-shown{top:calc(100% + 4px)}
#roomGame .rivl-pvp-seat.shown-above .rivl-shown{bottom:calc(100% + 4px)}
@media(min-width:601px) and (orientation:landscape),(min-width:1025px){
 #roomGame .rivl-pvp-seat.shown-right .rivl-shown,#roomGame .rivl-pvp-seat.shown-left .rivl-shown{top:50%;bottom:auto;transform:translateY(-50%)}
 #roomGame .rivl-pvp-seat.shown-right .rivl-shown{left:calc(100% + 4px)}
 #roomGame .rivl-pvp-seat.shown-left .rivl-shown{left:auto;right:calc(100% + 4px)}
}
/* Leave room above the felt so top seats never sit on the rim label. */
#roomGame .rivl-pvp-scene .skyline{margin-bottom:30px}
/* Phones and portrait tablets: tall oval so every revealed hand has its own space. */
@media(max-width:600px),(max-width:1024px) and (orientation:portrait){
 #roomGame .rivl-pvp-scene{padding:8px 6px 12px}
 #roomGame .rivl-pvp-table{width:min(84%,440px,calc((100dvh - 310px)*.72));aspect-ratio:.72/1;border-radius:50%/42%;margin:22px auto 26px}
 #roomGame .rivl-pvp-scene .skyline{margin-bottom:10px}
 /* Lower side seats sit beside the hero pill, so their cards drop below rather than into the seat above. */
 #roomGame .rivl-pvp-seat.shown-above .rivl-shown{top:calc(100% + 3px);bottom:auto}
}
/* Small screens and short landscape tables: compact revealed cards so neighbouring hands stay apart. */
@media(max-width:600px),(max-height:760px) and (orientation:landscape){
 #roomGame .rivl-shown{gap:2px}
 #roomGame .rivl-shown .card{width:24px;height:34px;flex-basis:24px;padding:2px}
 #roomGame .rivl-shown .card>strong{font-size:10px}
 #roomGame .rivl-shown .card>.rivl-card-center{font-size:15px}
}
#roomGame .rivl-shown .card:not(.back){position:relative;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;color:#171717;border:1px solid #c9b896}
#roomGame .rivl-shown .card.red{color:#bd1e35}
#roomGame .rivl-shown .card>.rivl-card-center{color:inherit}

/* RIVL gold-on-dark public-room checkbox */
.room-public-check{display:flex;align-items:center;gap:10px;color:#e8d2b3!important;background:transparent!important}
.room-public-check input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:0 0 20px;width:20px;height:20px;min-height:20px;margin:0;border:1px solid #ba8b4e;border-radius:5px;background:#151110!important;cursor:pointer;position:relative}
.room-public-check input[type=checkbox]:checked{background:#d9a657!important;border-color:#f0c987}
.room-public-check input[type=checkbox]:checked::after{content:'✓';position:absolute;inset:0;text-align:center;line-height:18px;color:#15100a;font-weight:900}
.room-public-check input[type=checkbox]:focus-visible{outline:2px solid #f0c987;outline-offset:3px}
/* Ranked tracker on the Profile tab */
.ranked-tracker{border:1px solid #8e6534;background:linear-gradient(135deg,#2a1d12 0%,#141012 55%,#0f0f10 100%);padding:24px;margin-top:0}
.rt-head{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.rt-id{flex:1;min-width:160px}.rt-id h2{margin:4px 0 8px}
.rt-eyebrow{color:var(--gold);letter-spacing:.14em;font-size:11px;font-weight:800}
.rt-tier,.rt-flag{display:inline-block;font-size:11px;letter-spacing:.1em;font-weight:800;text-transform:uppercase;padding:3px 9px;border-radius:999px;border:1px solid #c79a55;color:#f4d197;background:#efbd7014;margin-right:6px}
.rt-flag{border-color:#6b5a48;color:var(--text);background:transparent}
.rt-score{text-align:right}.rt-score strong{display:block;font-size:48px;line-height:1;color:#f4d197;font-weight:800;font-variant-numeric:tabular-nums}.rt-score small{color:var(--muted);font-size:13px}
.rt-progress{margin:20px 0 4px}.rt-bar{height:8px;border-radius:999px;background:#2b2520;overflow:hidden}.rt-bar span{display:block;height:100%;width:0;background:linear-gradient(90deg,#b8843f,#f4d197);border-radius:inherit;transition:width .4s}
.rt-bar-labels{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin-top:6px}
.rt-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.rt-tiles div{border:1px solid #3d3128;border-radius:10px;padding:12px 14px;background:#0d0c0ccc}.rt-tiles small{display:block;color:var(--muted);font-size:10px;letter-spacing:.12em;font-weight:700}.rt-tiles b{display:block;font-size:24px;margin-top:4px;font-variant-numeric:tabular-nums}
.rt-body{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px}.rt-body h3{color:var(--gold);letter-spacing:.12em;font-size:12px;margin:0 0 10px}
.rt-body .mr-row{grid-template-columns:70px 1fr 70px 70px}
.rt-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:16px;border-top:1px solid #3d3128;padding-top:14px}.rt-foot p{margin:0}
@media(max-width:850px){.rt-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.rt-body{grid-template-columns:1fr}.rt-score{text-align:left}}
.rt-tiles b{float:none!important;text-align:left}
#profile .profile-card:not(.ranked-tracker){max-width:none}
@media(max-width:520px){.ranked-tracker{padding:16px}.rt-score strong{font-size:40px}.rt-body .mr-row{grid-template-columns:44px minmax(0,1fr) 40px 44px;font-size:12px}}

/* Ranked has its own three-card selection screen; Casual lobby contains no ranked entry. */
#rankedSelect .rivl-card-modes{margin-top:18px}
#rankedSelect .ranked-join{width:100%}
#rankedSelectStatus{margin:18px 0 0}

/* Dealer button: a small "D" chip on the dealer's avatar, in bot practice and online rooms. */
.is-dealer>.avatar{position:relative}
.is-dealer>.avatar::after{content:'D';position:absolute;right:-4px;bottom:-3px;width:15px;height:15px;border-radius:50%;background:#f4efe4;color:#111;border:1px solid #b88a3e;font:900 9px/15px Inter,Arial,sans-serif;text-align:center;box-shadow:0 1px 3px #000a}
/* Bot practice showdown: bots' hole cards beside their seat. */
.bot-shown{position:absolute;transform:translateX(-50%);display:flex;gap:3px;z-index:5;pointer-events:none}
.bot-shown.above{transform:translate(-50%,-100%)}
.bot-shown .card{width:28px;height:40px;padding:3px;font-size:13px;box-shadow:0 2px 5px #0008}
/* Bot practice result banner: one compact line placed under the board (top is set in script.js) so the board stays visible. */
#table .win-fx{min-width:0;max-width:92%;width:max-content;padding:7px 16px;border-radius:999px}
#table .win-fx strong{display:inline;font-size:16px}
#table .win-fx .win-hand{display:inline;margin:0 0 0 8px;font-size:13px}
#table .win-fx small{display:inline;margin:0 0 0 8px;font-size:12px}
@media(max-width:600px){.bot-shown .card{width:22px;height:32px;padding:2px;font-size:11px}
#table .win-fx{max-width:none;white-space:nowrap;padding:5px 12px}
#table .win-fx strong{font-size:14px}
#table .win-fx .win-hand,#table .win-fx small{margin-left:6px;font-size:11px}}

/* Online seat label: name and chips on one line on wide screens, two short lines on phones. */
#roomGame .rivl-seat-label b{font-weight:inherit}
#roomGame .rivl-seat-label small{font-size:inherit;color:inherit}
#roomGame .rivl-seat-label small:before{content:' · '}
/* Phones in an online match: one compact screen, so your turn's controls never push the table under your seat. */
@media(max-width:600px){
 body:has(#rooms.active.rivl-match-mode){overflow:hidden}
 body:has(#rooms.active.rivl-match-mode) main>header{height:50px}
 #rooms.rivl-match-mode{height:calc(100dvh - 50px)}
 #rooms.rivl-match-mode #roomLobby{position:relative}
 #rooms.rivl-match-mode .room-topline{position:absolute;top:0;right:0;padding:7px 8px;background:none;border:0}
 #rooms.rivl-match-mode .room-topline #leaveRoom{min-height:30px;padding:4px 9px;font-size:11px}
 #roomGame .rivl-pvp-gamebar{flex:0 0 44px;gap:12px;justify-content:flex-start;padding:4px 10px}
 #roomGame .rivl-pvp-gamebar>div:nth-child(n+3){display:none}
 #roomGame .rivl-pvp-gamebar small{font-size:9px}
 #roomGame .rivl-pvp-gamebar strong{font-size:13px;white-space:nowrap}
 #roomGame .rivl-pvp-scene{padding:4px 6px 8px}
 #roomGame .rivl-pvp-scene .skyline{padding:2px;margin:0;font-size:9px;letter-spacing:4px}
 #roomGame .rivl-pvp-table{width:min(84%,420px,calc((100dvh - 380px)*.72));margin:30px auto 30px}
 #roomGame .rivl-pvp-board{gap:2px}
 #roomGame .rivl-pvp-board .card{width:28px;height:40px;padding:3px}
 #roomGame .rivl-pvp-board .card:not(.back)>.rivl-card-center{font-size:20px}
 #roomGame .pot{top:20%}
 #roomGame .pot strong{font-size:20px}
 #roomGame .rivl-pvp-myseat{bottom:-22px;gap:6px;padding:4px 8px;white-space:nowrap}
 #roomGame .rivl-pvp-myseat .card{width:30px;height:42px;padding:3px}
 #roomGame .rivl-pvp-myseat .avatar{width:28px;height:28px;font-size:14px}
 #roomGame .rivl-pvp-myseat small{font-size:11px}
 #roomGame .rivl-seat-clock{width:34px;height:34px;flex-basis:34px}
 #roomGame .rivl-seat-clock span{width:26px;height:26px;font-size:10px}
 /* Opponents: a small pill with the name over the stack. */
 #roomGame .rivl-pvp-seat{gap:3px;padding:2px 6px 2px 2px;font-size:9px;line-height:1.1}
 #roomGame .rivl-pvp-seat .avatar{width:20px;height:20px;font-size:10px;border-width:1px}
 #roomGame .rivl-seat-label{display:flex;flex-direction:column;max-width:48px}
 #roomGame .rivl-seat-label b,#roomGame .rivl-seat-label small{overflow:hidden;text-overflow:ellipsis}
 #roomGame .rivl-seat-label small:before{content:none}
 /* 7 to 9 players: too many seats for labels on a phone, so opponents stay avatar-only as before. */
 #roomGame .rivl-pvp-table:is([data-player-count="7"],[data-player-count="8"],[data-player-count="9"]) .rivl-seat-label{display:none}
 #roomGame .rivl-pvp-table:is([data-player-count="7"],[data-player-count="8"],[data-player-count="9"]) .rivl-pvp-seat{padding:2px;border-radius:50%}
 /* 5 to 9 players: revealed cards sit on the seat itself, so they never land on the board or a neighbour. */
 #roomGame .rivl-pvp-table:is([data-player-count="5"],[data-player-count="6"],[data-player-count="7"],[data-player-count="8"],[data-player-count="9"]) .rivl-pvp-seat .rivl-shown{top:50%;bottom:auto;left:50%;right:auto;transform:translate(-50%,-50%)}
 #roomGame .rivl-pvp-controls{padding:4px 8px 6px}
 #roomGame .rivl-timer-row{min-height:16px;margin:0 0 3px;font-size:11px}
 #roomGame .rivl-bet-actions{grid-template-rows:42px auto;gap:5px}
 #roomGame .rivl-bet-actions>button{min-height:0;font-size:13px;padding:0}
 #roomGame .rivl-pvp-raise{padding:3px 8px 6px;gap:3px}
 #roomGame .rivl-pvp-raise label{font-size:10px}
 #roomGame .rivl-pvp-raise .amount-row{gap:4px}
 #roomGame .rivl-pvp-raise .amount-row>*{height:30px;min-height:0;padding:0 10px;font-size:15px}
 #roomGame .rivl-pvp-raise input[type=range]{height:14px;margin:2px 0}
 #roomGame .rivl-pvp-raise .quick-bets{gap:4px}
 #roomGame .rivl-pvp-raise .quick-bets button{height:26px;min-height:0;padding:0}
 #roomGame .rivl-room-panel-toggle{margin-top:4px}
 #roomGame .rivl-room-panel-toggle button{height:30px;padding:0 18px;font-size:11px}
}

/* Launch welcome and support — follows the existing Cairo black-and-gold design. */
.rivl-welcome-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.83);backdrop-filter:blur(7px)}
.rivl-welcome-overlay[hidden]{display:none}
.rivl-welcome-dialog{width:min(100%,480px);padding:38px 30px;text-align:center;border:1px solid #c99a50;border-radius:16px;background:linear-gradient(145deg,#201910,#0b0b0c 68%);box-shadow:0 24px 90px #000}
.rivl-welcome-mark{font-size:48px;color:#e7bb71;margin-bottom:12px}
.rivl-welcome-dialog h2{font-size:clamp(25px,5vw,38px);color:#efc77f;letter-spacing:.07em;margin:0 0 16px}
.rivl-welcome-dialog p{line-height:1.65;color:#d4d0c9;font-size:15px;margin:0 0 24px}
.rivl-welcome-dialog p strong{display:block;margin-top:12px;color:#efc77f}
.rivl-welcome-dialog .gold{width:100%;min-height:48px}
.rivl-welcome-skip{margin-top:12px;width:100%;border:0;background:transparent;color:#c8bba5;text-decoration:underline;cursor:pointer;padding:12px}
.rivl-support-panel,.rivl-privacy-panel{max-width:780px;margin:18px 0;padding:24px}
.rivl-support-panel form{display:grid;gap:12px;margin-top:20px}
.rivl-support-panel label{font-weight:600;color:#e9c383}
.rivl-support-panel :is(select,textarea){width:100%;background:#141414;border:1px solid #816338;border-radius:8px;padding:12px;color:#eee;font:inherit}
.rivl-support-panel textarea{resize:vertical}
.rivl-privacy-panel h3:not(:first-child){margin-top:24px}
.rivl-privacy-panel p{line-height:1.7}
@media(max-width:600px){.rivl-welcome-dialog{padding:28px 20px}.rivl-support-panel,.rivl-privacy-panel{padding:16px}}
/* Ranked leagues */
:root{--prospect:#d08a4e;--challenger:#cfd6de;--elite:#efbd70;--master:#5b9bff;--grandmaster:#b07cf0;--champion:#ff5a5f}
.league-prospect{--league:var(--prospect)}.league-challenger{--league:var(--challenger)}.league-elite{--league:var(--elite)}.league-master{--league:var(--master)}.league-grandmaster{--league:var(--grandmaster)}.league-champion{--league:var(--champion)}
[class*="league-"]:not(.league-tabs){color:var(--league)}
.rt-tier[class*="league-"]{border-color:var(--league);background:color-mix(in srgb,var(--league) 12%,transparent)}
.online-row{grid-template-columns:40px minmax(120px,1fr) 100px 60px 50px 70px 50px;min-width:520px}
.ladder-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.league-tabs{display:flex;gap:6px}.league-tabs button{padding:7px 12px;font-size:11px;letter-spacing:.08em;font-weight:800}.league-tabs button[aria-pressed="true"]{border-color:var(--gold);color:var(--gold)}
#rtBar[class*="league-"]{background:linear-gradient(90deg,color-mix(in srgb,var(--league) 55%,#000),var(--league))}
@media(max-width:600px){.online-row{grid-template-columns:28px minmax(70px,1fr) 92px 52px;min-width:0;font-size:13px}.online-row span:nth-child(n+5){display:none}}

/* League emblems appear to the left of the player name, never replace the name. */
.rivl-league-name{display:inline-flex;align-items:center;gap:5px;vertical-align:middle}
.rivl-league-icon{width:19px;height:19px;flex:none;filter:drop-shadow(0 1px 2px #0008)}
.rt-id .rivl-league-icon{width:25px;height:25px}
.online-row .rivl-league-icon{width:17px;height:17px}
.rivl-seat-label .rivl-league-icon{width:15px;height:15px}
