:root{--ink:#203b33;--green:#244f41;--paper:#f7f5ef;--line:#dfdfd3;--muted:#737c70;--gold:#d8b771;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,a,summary{-webkit-tap-highlight-color:transparent}button,.button{font:inherit;cursor:pointer;border:1px solid transparent;border-radius:8px;min-height:46px;padding:12px 18px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:12px;text-decoration:none;transition:background .2s,transform .2s}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #bd8b32;outline-offset:3px}button:hover:not(:disabled){filter:brightness(.94)}a{color:inherit}header{max-width:1400px;margin:auto;min-height:106px;padding:24px 5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;font-weight:650;font-size:20px;letter-spacing:-.5px;line-height:1.05}.brandmark{font-size:39px}.brand-sub{display:block;font-size:16px;letter-spacing:2px;font-weight:400;margin-top:5px}nav{display:flex;align-items:center;gap:24px;font-size:14px}nav a{text-decoration:none}.text{background:none;color:var(--ink);padding:10px 8px}.primary{background:var(--green);color:white}.outline{background:transparent;border-color:#bac3b6;color:var(--ink)}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.eyebrow{font-size:11px;font-weight:750;letter-spacing:2px;color:#78816f}h1,h2,h3,p{margin-top:0}h1{font-family:Georgia,serif;font-weight:400;letter-spacing:-2.6px;font-size:72px;line-height:1.04;margin:24px 0}h2{font-family:Georgia,serif;font-size:30px;font-weight:400;letter-spacing:-.7px;margin:15px 0}h3{font-size:16px;margin-bottom:16px}p{line-height:1.7;font-size:14px;color:#647062}small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:6px}em{font-weight:400;color:#78856a}.home{max-width:1400px;padding:58px 5% 0;margin:auto}.hero{position:relative;min-height:520px;padding-top:18px;width:52%;float:left}.hero>p{max-width:380px;font-size:16px;margin-top:26px}.hero-tags{display:flex;gap:18px;font-size:12px;color:#7c826f;margin:28px 0}.hero-tags span+span:before{content:'·';padding-right:18px}.entry{width:43%;margin-left:auto;display:flex;flex-direction:column;gap:22px}.panel{background:#fffefb;border:1px solid var(--line);border-radius:13px;padding:30px}.entry .panel{padding:28px 32px}.entry h2{margin:12px 0}.entry p{margin-bottom:20px}.secondary{background:#efeee5}label{font-size:12px;font-weight:650;display:block;margin:14px 0}.optional{font-weight:400;color:#8c9386;margin-left:6px}input{display:block;width:100%;font:inherit;font-size:15px;padding:13px 14px;border:1px solid #d6dacd;background:#fffefb;border-radius:6px;margin-top:8px;min-height:47px;color:var(--ink)}input:focus{outline:2px solid #799379;outline-offset:1px}input::placeholder{color:#a4a998;font-weight:400}#join-code{text-transform:uppercase;letter-spacing:2px}#join>.primary{width:100%;justify-content:space-between;margin-top:6px}.hero-cards{position:relative;margin:54px 0 0 42px;width:310px;height:235px}.card{width:88px;height:126px;border-radius:8px;border:1px solid #dddcd0;background:#fffefb;box-shadow:0 3px 5px #0001;position:relative;padding:8px;display:inline-flex;flex-direction:column;justify-content:space-between;color:#263c33;flex-shrink:0;user-select:none}.card>span{font-size:21px;line-height:1;text-align:left;font-family:Georgia,serif}.card small{font-size:20px;color:inherit;margin-top:3px}.card>b{font-size:37px;align-self:center;font-weight:400}.card .bottom{font-size:16px;align-self:flex-end;transform:rotate(180deg)}.card.red{color:#b95b49}.hero-cards .card{position:absolute;width:114px;height:157px;box-shadow:0 6px 14px #233d3218}.hero-cards .card:nth-child(1){transform:rotate(-16deg);left:0;top:17px}.hero-cards .card:nth-child(2){transform:rotate(5deg);left:93px;top:0}.hero-cards .card:nth-child(3){transform:rotate(22deg);left:184px;top:24px}.table-note{position:absolute;top:190px;left:52px;font-size:11px;font-weight:700;letter-spacing:3px;white-space:nowrap}.table-note span{font-weight:400;letter-spacing:0;margin-left:8px;color:var(--muted)}footer{clear:both;display:flex;justify-content:space-between;border-top:1px solid var(--line);margin-top:44px;padding:25px 0;font-size:12px;color:#7c8475;gap:20px}.continue{clear:both;padding-top:25px}.room{max-width:1400px;margin:auto;padding:34px 5% 60px}.room-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}.room h1{font-size:40px;letter-spacing:-1px;margin:12px 0}.invite-code{font-size:22px;letter-spacing:3px;font-weight:700}.lobby-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:25px}.seat{display:flex;align-items:center;gap:16px;border-bottom:1px solid var(--line);padding:20px 0}.seat>span:last-child{margin-left:auto;font-size:12px;color:var(--muted)}.avatar{display:inline-flex;width:44px;height:44px;min-width:44px;align-items:center;justify-content:center;border-radius:50%;font-family:Georgia,serif;font-size:22px;background:#e5ebdd;color:#4b654c}.team1{background:#efe3d0;color:#8e6840}.seats{margin-bottom:28px}.lobby-grid .primary{margin-right:12px;margin-top:12px}.rule-summary{background:#e9eddf}.game-icon{font-size:52px;padding-top:24px}.rule-summary dl{margin:28px 0}.rule-summary dl>div{display:flex;justify-content:space-between;border-bottom:1px solid #d0d9c6;padding:12px 0;font-size:13px}.rule-summary dd{font-weight:650}.muted{color:var(--muted);font-size:12px}.settings{margin-top:25px;background:transparent}.settings summary{cursor:pointer;font-weight:600;min-height:24px}.settings-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:30px;margin-top:30px}.settings-grid .outline{margin-top:10px}.connection{color:#a2784c;font-size:12px;white-space:nowrap}.connection:before{content:'●';margin-right:7px}.connection.on{color:#57794f}.offline{background:#fff0cb;padding:18px;border-radius:10px;margin-bottom:20px;font-size:14px}.scorebar{display:grid;grid-template-columns:1fr 1fr 1.1fr;background:#e9eddf;border:1px solid #d7decb;border-radius:12px;padding:24px 28px;gap:26px;margin-bottom:26px}.team-score{display:flex;justify-content:space-between;align-items:center;border-right:1px solid #cdd5c2;padding-right:26px}.team-score>span{font-size:11px;font-weight:700;letter-spacing:1px}.team-score strong{font-family:Georgia,serif;font-weight:400;font-size:42px}.team-score small{letter-spacing:0}.turn{display:flex;align-items:center;gap:14px;font-size:16px}.pulse{display:block;width:10px;height:10px;background:#6a8959;border-radius:50%;flex-shrink:0}.tabs{display:flex;gap:10px;margin-bottom:18px}.tabs button{background:none}.tabs .active{background:#dfe6d7}.hand{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0}.hand .card{padding:8px;font-weight:400;min-height:126px;transition:transform .18s,box-shadow .18s}.hand .selected{transform:translateY(-8px);outline:3px solid #638255;box-shadow:0 9px 12px #0002;background:#f5faed}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.selection{color:#6f796a;font-size:14px;min-height:44px}.hand-actions{display:flex;gap:12px;flex-wrap:wrap}.hand-panel>p{margin:20px 0}.hand-panel details{border-top:1px solid var(--line);padding-top:20px}.hand-panel summary{cursor:pointer;font-size:14px}.plan{padding:20px;background:#eff3e7;border-radius:10px;margin:20px 0}.plan button{margin-right:8px}.piles{display:flex;justify-content:center;gap:35px;align-items:flex-start;padding:25px}.piles>div{text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px}.piles strong{font-size:12px}.piles small{margin-top:-5px}.card.back{background:repeating-linear-gradient(45deg,#355c4b,#355c4b 3px,#3e6554 3px,#3e6554 6px);border:5px solid #e1e2d2;justify-content:center;color:#d8d9ba}.empty-card{width:88px;height:126px;border:1px dashed #aaa;border-radius:8px;display:grid;place-items:center;font-size:12px}.table{border-radius:15px;background:#214b3e;color:#f5f0df;min-height:450px;padding:26px;box-shadow:inset 0 0 70px #102c2533}.table-top{display:flex;justify-content:space-between;font-size:10px;letter-spacing:2px;color:#b3c5b4;border-bottom:1px solid #ffffff20;padding-bottom:20px}.table-grid{display:grid;grid-template-columns:1fr 1fr}.team-melds{padding:15px 25px}.team-melds+div{border-left:1px solid #ffffff20}.team-melds h2{font-size:25px}.table-empty{padding:45px 0;color:#a2b6a4;font-size:13px}.melds{display:flex;gap:20px;flex-wrap:wrap}.meld{width:100%;max-width:380px;margin:10px 0}.meld-title{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin-bottom:14px}.meld-title span{font-size:9px;letter-spacing:1px;color:#dac58d}.meld-cards{display:flex;padding-right:30px}.meld-cards .card{width:68px;height:98px;margin-right:-32px;padding:6px}.meld-cards .card>b{font-size:24px}.meld-cards .card>span{font-size:16px}.meld-cards .card small{font-size:16px}.red-threes{border-top:1px solid #ffffff20;margin-top:20px;padding-top:16px;font-size:12px;color:#beccb9;display:flex;gap:12px}.red-threes span{color:#f7b3a0}.game-bottom{display:grid;grid-template-columns:1fr 1fr;gap:25px;margin-top:25px}.player-line{display:flex;align-items:center;gap:12px;padding:12px 0;font-size:14px}.player-line>strong{margin-left:auto;font-size:12px}.player-line.current{border-right:3px solid #6e8a59}.event-log{font-size:13px;color:#74806b;list-style:none;padding:0;line-height:1.65}.event-log li{border-bottom:1px solid #edf0e7;padding:9px 0}.results{margin-top:24px}.results table{border-collapse:collapse;width:100%;font-size:14px;margin:25px 0}.results th,.results td{text-align:right;padding:12px;border-bottom:1px solid var(--line)}.results td:first-child,.results th:first-child{text-align:left}.results tr:last-child{font-weight:700}.tv-start{text-align:center;padding:70px 25px}.tv-start h1{font-size:62px}.pair-code{font-size:64px;font-weight:600;letter-spacing:10px;padding:25px}.tv .table{min-height:500px}.tv .team-melds h2{font-size:34px}.tv .meld-title{font-size:19px}.tv .game-bottom{font-size:18px}dialog{border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:16px;padding:32px;max-width:560px;width:calc(100% - 30px);max-height:88dvh}dialog::backdrop{background:#102b27b0;backdrop-filter:blur(5px)}dialog h2{margin-top:0}.rules-dialog{max-width:780px}.rules-dialog section{border-top:1px solid var(--line);padding-top:22px;margin-top:22px}.rules-dialog h3{font-family:Georgia,serif;font-size:23px;font-weight:400}.rules-dialog p{font-size:15px}.rules-dialog .section-heading{align-items:start}#notice{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:#203c33;color:#fffef6;padding:17px 25px;border-radius:10px;box-shadow:0 8px 30px #0003;opacity:0;pointer-events:none;transition:.2s;z-index:100;width:max-content;max-width:90vw;font-size:14px}#notice.shown{opacity:1;transform:translate(-50%,0)}@media(min-width:1500px){.home{padding-top:75px}.hero h1{font-size:84px}}@media(max-width:950px){h1{font-size:56px}.hero{width:48%}.entry{width:48%}.hero-cards{transform:scale(.8);transform-origin:left top;margin-left:12px}.entry .panel{padding:24px}.settings-grid{grid-template-columns:1fr 1fr}.scorebar{grid-template-columns:1fr 1fr}.turn{grid-column:1/-1}.team-score:nth-child(2){border:0}.room-heading{align-items:flex-start;flex-direction:column}}@media(max-width:650px){header{min-height:85px;padding:18px 6%}nav{gap:10px}nav a{font-size:12px}nav button{font-size:12px}.brand{font-size:17px}.brand-sub{font-size:13px}.brandmark{font-size:31px}.home{padding:30px 6% 0}.hero{float:none;width:100%;min-height:unset}.hero h1{font-size:57px}.hero>p{font-size:15px}.hero-cards{display:none}.hero-tags{margin-bottom:30px;gap:10px;font-size:11px}.hero-tags span+span:before{padding-right:10px}.entry{width:100%;margin:0}.entry .panel{padding:25px}.entry h2{font-size:29px}footer{flex-direction:column;line-height:1.6;margin-top:30px}.room{padding:25px 4%}.room h1{font-size:34px}.room-heading .row{gap:5px}.room-heading .button,.room-heading button{font-size:12px;padding:10px}.lobby-grid,.settings-grid,.game-bottom{grid-template-columns:1fr}.panel{padding:22px}.seat{gap:10px}.seat>span:last-child{font-size:10px}.seat small{font-size:11px}.scorebar{padding:18px;gap:15px}.team-score{padding-right:14px;gap:10px}.team-score strong{font-size:30px}.team-score small{font-size:11px}.turn{font-size:14px}.section-heading{align-items:start}.section-heading h2{font-size:28px}.section-heading button{font-size:12px;padding:8px}.hand{gap:8px}.hand .card{width:66px;height:101px;min-height:101px}.hand .card>span{font-size:17px}.hand .card>b{font-size:27px}.hand .card small{font-size:16px}.hand-actions{gap:8px}.hand-actions button{font-size:12px;flex:1}.table{padding:16px}.table-top span:last-child{display:none}.table-grid{grid-template-columns:1fr}.team-melds{padding:16px 4px}.team-melds+div{border-left:0;border-top:1px solid #fff3}.table-empty{padding:20px 0}.settings summary{line-height:1.5}.pair-code{font-size:35px;letter-spacing:4px}.tv-start h1{font-size:48px}.invite-code{font-size:19px}.plan button{margin-top:8px}.brand+nav .connection{font-size:0}.brand+nav .connection:before{font-size:12px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

select{font:inherit;padding:12px;border:1px solid #bac3b6;border-radius:8px;background:#fffefb;color:#203b33;min-height:46px;margin:6px 0 0 10px}
.recovery-page{max-width:740px;margin:40px auto;padding:36px}.recovery-page h1{font-size:48px;letter-spacing:-1px}.recovery-page form{max-width:430px}.recovery-page select,.settings select{display:block;width:100%;margin-left:0}.recovery-code{background:#e9eddf;padding:24px;border-radius:10px;margin:24px 0}.recovery-code>span{display:block;font-size:12px}.recovery-code>strong{display:block;font-size:32px;letter-spacing:5px;margin:12px 0}.recovery-code p{margin-bottom:0}.recovery-request{border:1px solid var(--line);padding:18px;border-radius:10px;margin-bottom:15px}.restore-panel,.abort-panel{margin-bottom:24px}.abort-panel{background:#f4eedb}.statistics-panel{margin-top:25px}.statistics-panel summary{font-weight:650;cursor:pointer;min-height:24px}.statistics-panel>p{margin-top:24px}.table-scroll{overflow-x:auto}.statistics-panel table{border-collapse:collapse;width:100%;font-size:14px}.statistics-panel caption{text-align:left;font-size:12px;color:var(--muted);padding:10px 0}.statistics-panel th,.statistics-panel td{text-align:right;white-space:nowrap;border-bottom:1px solid var(--line);padding:14px 10px}.statistics-panel th:first-child{text-align:left}.statistics-panel tbody th{font-weight:500}.history-entry{padding:20px 0;border-bottom:1px solid var(--line)}.history-entry p{margin:8px 0 0}.settings-grid section{min-width:0}.settings-grid .recovery-request .row button{font-size:12px}.recovery-page+footer{display:none}@media(max-width:650px){.recovery-page{margin:25px 4%;padding:24px}.recovery-page h1{font-size:38px}.statistics-panel{padding:18px}.statistics-panel th,.statistics-panel td{padding:12px 8px;font-size:12px}nav{flex-wrap:wrap;justify-content:flex-end}nav a{font-size:11px}}

/* A display has a different information density from a player's scrolling
   phone. Keep the essential public state within a 720p/1080p viewport. */
@media (min-width:1000px) and (min-height:600px){
  body.display-mode{overflow:hidden}
  .display-mode header{height:54px;min-height:54px;max-width:none;padding:8px 24px}
  .display-mode .brand{font-size:15px;gap:9px}
  .display-mode .brandmark{font-size:29px}
  .display-mode .brand-sub{font-size:11px;margin-top:2px}
  .display-mode header nav{font-size:12px;gap:16px}
  .display-mode header button{min-height:34px;padding:6px}
  .display-mode .room.tv{max-width:none;height:calc(100dvh - 54px);padding:12px 24px;display:flex;flex-direction:column;gap:12px;overflow:hidden}
  .tv .room-heading{margin:0;flex-shrink:0;min-height:52px}
  .tv .room-heading h1{font-size:27px;margin:5px 0}
  .tv .room-heading .eyebrow{font-size:10px}
  .tv .room-heading button,.tv .room-heading .button{font-size:12px;min-height:40px;padding:8px 14px}
  .tv .scorebar{margin:0;padding:12px 20px;gap:20px;flex-shrink:0;min-height:76px}
  .tv .team-score strong{font-size:38px}
  .tv .team-score small{font-size:13px}
  .tv .turn{font-size:17px}
  .tv>.table{flex:1;min-height:0;padding:16px;display:grid;grid-template-columns:minmax(0,1fr) 168px;grid-template-rows:auto minmax(0,1fr);column-gap:12px;row-gap:8px}
  .tv .table-top{grid-column:1/-1;padding-bottom:10px}
  .tv .table-grid{min-height:0;min-width:0}
  .tv .team-melds{padding:8px 16px;display:flex;flex-direction:column;min-height:0;min-width:0}
  .tv .team-melds h2{font-size:28px;margin:0 0 10px}
  .tv .melds{min-height:0;overflow:auto;align-content:flex-start;gap:10px}
  .tv .meld{margin:0;width:calc(50% - 5px);min-width:130px}
  .tv .meld-title{font-size:14px;margin-bottom:6px;flex-wrap:wrap;gap:4px}
  .tv .meld-title span{font-size:10px}
  .tv .meld-cards{overflow:hidden;padding-right:18px}
  .tv .meld-cards .card{width:48px;height:68px;margin-right:-27px;padding:4px}
  .tv .meld-cards .card>span,.tv .meld-cards .card small{font-size:12px}
  .tv .meld-cards .card>b{font-size:20px}
  .tv .red-threes{flex-shrink:0;margin-top:auto;padding-top:10px;font-size:14px;flex-wrap:wrap;gap:8px}
  .tv .table-empty{padding:20px 0;flex:1;font-size:15px}
  .tv .piles{grid-column:2;grid-row:2;flex-direction:column;align-items:center;justify-content:center;padding:0;gap:12px;border-left:1px solid #ffffff20}
  .tv .piles>div{gap:7px}
  .tv .piles .card,.tv .piles .empty-card{width:64px;height:88px}
  .tv .piles .card>span{font-size:17px}
  .tv .piles .card small{font-size:16px}
  .tv .piles .card>b{font-size:28px}
  .tv .piles strong{font-size:14px}
  .tv .piles small{font-size:12px}
  .tv .game-bottom{display:block;margin:0;flex-shrink:0}
  .tv .game-bottom>.panel:first-child{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding:9px 14px}
  .tv .game-bottom h3,.tv .game-bottom>.panel:last-child{display:none}
  .tv .player-line{padding:0;gap:9px;min-width:0}
  .tv .player-line>span:not(.avatar){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tv .player-line>strong{font-size:14px;white-space:nowrap}
  .tv .player-line small{font-size:11px}
  .tv .avatar{width:36px;height:36px;min-width:36px;font-size:21px}
  .tv>.statistics-panel:not([open]){margin:0;padding:0;background:none;border:none;align-self:flex-end;flex-shrink:0}
  .tv>.statistics-panel summary{font-size:12px;min-height:22px}
  .tv>.statistics-panel[open]{position:fixed;bottom:20px;right:24px;width:min(720px,90vw);max-height:80dvh;overflow:auto;margin:0;z-index:10;box-shadow:0 8px 40px #0004}
  .tv:has(>.results)>.table{display:none}
  .tv>.results{flex:1;min-height:0;overflow:auto;margin:0;padding:18px 24px}
  .tv>.results h2{font-size:28px;margin:8px 0}
  .tv>.results table{margin:12px 0}
  .tv>.results td,.tv>.results th{padding:7px 12px}
  .tv>.abort-panel,.tv>.offline{flex-shrink:0;margin:0;padding:14px 20px}
  .tv>.abort-panel h2{font-size:24px;margin:0 0 8px}
  .tv>.abort-panel p{margin:0;font-size:13px}
}

.personal-settings,.account-security{margin-top:24px}
.personal-settings summary,.account-security summary{font-weight:600;cursor:pointer;min-height:26px}
.home>.personal-settings,.home>.account-security{clear:both;max-width:900px;margin:24px auto}
.preference-grid{display:flex;gap:16px;flex-wrap:wrap;align-items:center;margin-top:22px}
.check-label{display:flex;gap:10px;align-items:center;min-height:44px;font-size:14px;font-weight:500;margin:0}
.check-label input{width:22px;min-height:22px;height:22px;margin:0;accent-color:var(--green)}
.account-security form{max-width:420px}.account-security p{margin-top:18px}
.order-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0 20px}
.order-controls button{min-height:44px;font-size:12px}.order-controls small{margin:0}
.hand-actions{position:sticky;bottom:0;z-index:3;padding:12px 0;background:#fffefb;box-shadow:0 -6px 14px #fffefb}
.reaction-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:20px;font-size:12px}
.reaction-bar>span{font-weight:650}.reaction-bar .text{font-size:13px;background:#e9eddf;padding:9px 12px}
.reaction-bar small{flex-basis:100%}.preview-message{font-weight:600;color:var(--ink)}
.stock-status{margin:0 0 20px;background:#f4eedb;display:flex;align-items:center;justify-content:space-between;gap:18px;font-size:14px;line-height:1.5}
.stock-status strong{font-weight:500}.stock-status button{flex-shrink:0}
.secret-field{display:block;width:100%;min-height:90px;resize:vertical;padding:14px;background:#fffefb;border:1px solid var(--line);border-radius:8px;font:15px ui-monospace,monospace;color:var(--ink);margin:20px 0;overflow-wrap:anywhere}
dialog>.outline{margin-right:12px}.offline-page{max-width:700px;margin:40px auto}.offline-page h1{font-size:42px}
#effects{position:fixed;top:15%;left:50%;transform:translateX(-50%);width:min(580px,90vw);z-index:30;pointer-events:none;display:flex;flex-direction:column;gap:10px}
.effect{pointer-events:auto;background:#fffefb;color:var(--ink);padding:18px 22px;box-shadow:0 10px 40px #102b2740;border:1px solid #b4c69f;border-radius:14px;display:flex;align-items:center;justify-content:space-between;gap:20px;animation:effect-arrive .6s ease-out;font-size:20px}
.effect.celebration{background:#e9eddf;border:2px solid var(--gold);font-size:28px;font-family:Georgia,serif}
.effect button{background:none;color:var(--muted);font-size:12px;min-height:44px;padding:8px}
@keyframes effect-arrive{from{transform:translateY(20px) scale(.93);opacity:0}to{transform:none;opacity:1}}
/* A short, non-interactive celebration when a canasta is completed. */
#canasta-fireworks{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:31}.firework-burst{position:absolute;width:0;height:0}.firework-spark{position:absolute;width:clamp(3px,.5vmin,9px);height:clamp(8px,1.6vmin,26px);margin:-3px;border-radius:50%;background:var(--spark-color);box-shadow:0 0 9px 2px var(--spark-color);opacity:0;animation:canasta-firework 1.25s ease-out both;will-change:transform,opacity}@keyframes canasta-firework{0%{opacity:0;transform:translate(0,0) rotate(var(--spark-angle)) scale(.2)}12%{opacity:1;transform:translate(calc(var(--dx)*.15),calc(var(--dy)*.15)) rotate(var(--spark-angle)) scale(1)}70%{opacity:1;transform:translate(calc(var(--dx)*.85),calc(var(--dy)*.85)) rotate(var(--spark-angle)) scale(.85)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--spark-angle)) scale(.2)}}.phone-results-mode #canasta-fireworks,.reduce-motion #canasta-fireworks{display:none!important}@media(prefers-reduced-motion:reduce){#canasta-fireworks{display:none!important}}
body.reduce-motion *,body.reduce-motion *:before,body.reduce-motion *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(max-width:650px){.personal-settings,.account-security{padding:20px}.preference-grid{display:block}.preference-grid .check-label{margin-bottom:10px}.order-controls{gap:8px}.order-controls button{flex:1}.effect{padding:14px 18px;font-size:16px}.effect.celebration{font-size:23px}.secret-field{font-size:13px}}
@media(min-width:1000px) and (min-height:600px){
  .tv>.stock-status{flex-shrink:0;margin:0;padding:12px 18px;font-size:13px}
  .tv>.personal-settings:not([open]){position:static;margin:16px 0 0;padding:12px 16px;border:1px solid var(--line);background:var(--paper);z-index:auto}
  .tv>.personal-settings summary{font-size:12px;min-height:22px}
  .tv>.personal-settings[open]{position:fixed;bottom:56px;right:24px;width:min(650px,90vw);max-height:80dvh;overflow:auto;margin:0;z-index:15;box-shadow:0 8px 40px #0004}
}
@media(max-width:650px){.stock-status{flex-direction:column;align-items:stretch;padding:18px}}

/* Persistent room camera overlay; never re-mounted by card updates. */
#room-video-corner{position:fixed;right:18px;bottom:18px;width:clamp(240px,26vw,390px);z-index:35;border:1px solid #d8b771;border-radius:12px;background:#17392f;color:#fff;box-shadow:0 8px 35px #0005;overflow:hidden}#room-video-corner.on-left{right:auto;left:18px}.video-corner-title{display:flex;align-items:center;justify-content:space-between;padding:4px 10px;font-size:13px}.video-corner-title button{background:none;color:#fff;padding:6px 10px;min-height:38px}#room-video-corner video{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;background:#10231c}#room-video-corner p{color:#eef0dc;font-size:11px;line-height:1.4;margin:8px 10px}.video-corner-actions{display:flex;flex-wrap:wrap;gap:3px;padding:5px}.video-corner-actions button{flex:1;background:#315c4d;color:white;font-size:11px;min-height:44px;padding:6px}.video-settings section{border-top:1px solid var(--line);padding:18px 0}.video-settings select{display:block;width:100%;margin:10px 0;min-height:46px;font:inherit;padding:9px}.video-settings [data-video-status]{padding:12px;background:#e9eddf;border-radius:8px}.local-video-preview{display:block;width:100%;max-width:360px;aspect-ratio:16/9;background:#17392f;border-radius:8px;margin:14px 0}.video-test-help,.call-instructions{margin:16px 0}.video-test-help summary,.call-instructions summary{cursor:pointer;min-height:44px;padding:12px 0}.video-test-help p,.call-instructions li{font-size:14px;line-height:1.7}.call-instructions ol{padding-left:20px}@media(max-width:650px){#room-video-corner{width:220px;right:8px;bottom:105px}#room-video-corner.on-left{left:8px}.video-corner-actions button{font-size:10px}.video-settings h2{font-size:28px}}

.remote-microphones{padding:8px 12px}.remote-microphones summary{font-size:12px;min-height:44px;cursor:pointer;padding:8px 0}.remote-microphones label{display:flex;align-items:center;gap:8px;min-height:44px;font-size:12px;color:#fff;margin:0}.remote-microphones input{width:20px;height:20px;margin:0}.remote-microphones p{margin:5px!important}#room-video-corner audio{display:none}

#room-video-corner [hidden]{display:none}

.device-page{max-width:850px;margin:35px auto;padding:32px}.device-page h1{font-size:45px;letter-spacing:-1px}.device-page section{border-top:1px solid var(--line);margin-top:24px;padding-top:15px}.device-checklist{line-height:1.8;padding-left:22px;font-size:15px}.device-page meter{display:block;width:100%;height:24px;margin-top:10px}.device-page video[hidden]{display:none}.device-page [data-device-status]{background:#e9eddf;padding:15px;border-radius:8px}.device-confirm{display:flex;align-items:center;gap:10px;min-height:44px}.device-confirm input{width:22px;height:22px;margin:0}@media(max-width:650px){.device-page{margin:24px 4%;padding:22px}.device-page h1{font-size:34px}}

/* TV-first setup and phone-only joining. QR images include a four-module quiet zone. */
.tv-qr-start{max-width:1200px;margin:auto;display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:48px;text-align:left;padding:36px 5%}
.tv-qr-start h1{font-size:clamp(38px,4.5vw,62px)}.tv-qr-start>section>p{font-size:16px;max-width:500px}.tv-qr-start .pair-code{padding:12px 0;font-size:40px;letter-spacing:6px}
.qr-card{text-align:center;min-width:0}.qr-card h2{font-size:30px}.join-qr-image{display:block;width:min(100%,320px);height:auto;aspect-ratio:1;margin:14px auto;background:white;border-radius:8px}.qr-card p{margin:10px 0}.qr-card select{display:block;margin:8px auto 0;width:min(100%,280px)}.qr-room-code strong{display:block;font-size:24px;letter-spacing:3px;color:var(--ink)}.qr-join-link{display:inline-block;padding:10px;min-height:44px;font-size:13px}
.tv-phone-banner{max-width:900px;margin:24px auto;background:#e9eddf}.tv-phone-banner h2{margin:10px 0}.tv-phone-banner p{margin-bottom:12px}.home+.tv-phone-banner{clear:both}
.join-phone-page{max-width:480px;margin:32px auto}.join-phone-page h1{font-size:48px;letter-spacing:-1px}.join-phone-page select{display:block;width:100%;margin:8px 0 0}.join-phone-page #join{margin:24px 0}.join-qr-dialog{max-width:480px}.join-qr-dialog>.qr-card{padding:12px;border:0;background:none}
.tv-steps ol{padding-left:26px;margin:28px 0}.tv-steps li{padding:10px 0 10px 8px}.tv-steps strong{font-size:20px}.tv-steps p{margin:10px 0}.tv-session-panel{margin-bottom:24px;background:#e9eddf}.tv-session-panel summary{font-weight:650;cursor:pointer;min-height:30px}.tv-session-panel p{margin:16px 0}.tv-active-code{display:block;font-size:42px;letter-spacing:9px;margin:14px 0}.tv-public-address{display:inline-block;font-size:18px;overflow-wrap:anywhere}.tv-session-panel button{min-height:44px}#connect-tv{max-width:370px;margin:24px 0}#connect-tv label{font-size:15px}#tv-session-code{text-transform:uppercase;font-size:32px;letter-spacing:10px;font-weight:600}#tv-session-code::placeholder{font-size:18px;letter-spacing:2px}#connect-tv .primary{width:100%}
@media(min-width:1000px) and (min-height:600px){.tv>.lobby-grid{flex:1;min-height:0;overflow:auto;gap:20px;grid-template-columns:1.4fr 1fr}.tv .lobby-grid>.panel{padding:18px 24px}.tv .lobby-grid h2{margin:10px 0;font-size:27px}.tv .lobby-grid .seat{padding:15px 0}.tv .lobby-grid .seats{margin-bottom:12px}.tv .qr-card .join-qr-image{width:min(100%,34dvh);margin:6px auto}.tv .qr-card p{font-size:13px;line-height:1.4;margin:8px 0}.tv .qr-card label{margin:7px 0}.tv .qr-card select{min-height:40px;padding:7px}.tv .qr-join-link{min-height:32px;padding:7px}.tv .qr-card .eyebrow{font-size:10px}}
@media(max-width:700px){.tv-qr-start{display:block;padding:28px 5%}.tv-qr-start>section{margin-bottom:24px}.tv-qr-start h1{font-size:42px}.tv-qr-start .pair-code{font-size:29px;letter-spacing:4px}.join-phone-page{margin:24px 4%;padding:24px}.tv-phone-banner{margin:20px 4%;padding:22px}.qr-card{padding:22px}}

.new-game-dialog{width:min(560px,calc(100% - 28px));max-height:90vh;overflow:auto;border:1px solid var(--line);border-radius:13px;padding:26px;background:var(--paper);color:var(--ink)}.new-game-dialog::backdrop{background:#122c2580}.new-game-dialog select{display:block;width:100%;margin:8px 0 0}.new-game-dialog select:disabled,#create select:disabled{opacity:.55}

.qr-team-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.qr-team-setup{border-top:1px solid var(--line);padding-top:22px;margin-top:20px}.qr-team-setup h3{margin-top:20px}.qr-team-setup select{display:block;width:100%;margin:8px 0 0}.join-phone-page #join-game-code{text-transform:uppercase;letter-spacing:7px;font-size:25px}.qr-card .tv-active-code{font-size:32px;margin:10px 0;letter-spacing:8px}@media(max-width:600px){.qr-team-grid{grid-template-columns:1fr}}

/* A turn always exposes both draw choices and the next required action. */
.hand-area{min-width:0}.hand-heading h2{margin:0}.turn-status{margin:6px 0 12px;line-height:1.4;font-size:14px}.turn-status strong,.turn-status span{display:block}.turn-status span{font-size:12px;color:var(--muted);margin-top:4px}.take-help{font-size:12px;line-height:1.4;margin:10px 0}.hand-details{margin-top:12px}.hand-details p{margin-top:12px}.take-dialog{max-width:640px}.take-dialog section{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}.take-dialog h3{margin-bottom:10px}.take-cards{display:flex;gap:6px;flex-wrap:wrap}.take-cards .card{width:58px;height:82px;padding:5px}.take-cards .card>span,.take-cards .card small{font-size:15px}.take-cards .card>b{font-size:23px}.take-cards .bottom{display:none}.game-menu .row{align-items:stretch}.game-menu p{margin:20px 0 0}

/* The live public table fills the browser, including 960x540 TV viewports. */
body.display-mode.playing-mode{height:100vh;height:100dvh;overflow:hidden}
.display-mode.playing-mode header{display:none}
.display-mode.playing-mode .room.tv{height:100vh;height:100dvh;max-width:none;padding:8px 12px;display:flex;flex-direction:column;gap:8px;overflow:hidden}
.display-mode.playing-mode .tv .room-heading{margin:0;min-height:36px;flex-direction:row;align-items:center;flex-shrink:0;gap:8px}
.display-mode.playing-mode .tv .room-heading>div:first-child{min-width:0}
.display-mode.playing-mode .tv h1{font-size:clamp(18px,2vw,38px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52vw;margin:0}
.display-mode.playing-mode .tv .room-heading .eyebrow{display:none}
.display-mode.playing-mode .tv .room-heading button{min-height:34px;font-size:clamp(10px,1vw,18px);padding:6px 10px}
.display-mode.playing-mode .tv .scorebar{display:grid;grid-template-columns:1fr 1fr 1.15fr;flex-shrink:0;margin:0;padding:8px 14px;gap:14px;min-height:60px}
.display-mode.playing-mode .tv .team-score{padding-right:12px;min-width:0}.display-mode.playing-mode .tv .team-score strong{font-size:clamp(26px,3vw,52px)}
.display-mode.playing-mode .tv .team-score small{font-size:clamp(10px,1.05vw,18px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:28vw}
.display-mode.playing-mode .tv .turn{grid-column:auto;font-size:clamp(12px,1.4vw,24px);gap:8px}.display-mode.playing-mode .tv .turn small{font-size:clamp(10px,1vw,18px)}
.display-mode.playing-mode .tv>.table{flex:1;min-height:0;padding:12px;display:grid;grid-template-columns:minmax(0,1fr) clamp(100px,12vw,230px);grid-template-rows:auto minmax(0,1fr);gap:8px}
.display-mode.playing-mode .tv .table-top{grid-column:1/-1;padding-bottom:7px;font-size:clamp(9px,.8vw,16px)}
.display-mode.playing-mode .tv .table-grid{display:grid;grid-template-columns:1fr 1fr;min-height:0;min-width:0}
.display-mode.playing-mode .tv .team-melds{padding:6px 12px;display:flex;flex-direction:column;min-height:0;min-width:0}
.display-mode.playing-mode .tv .team-melds h2{font-size:clamp(22px,2.6vw,46px);margin:0 0 8px}
.display-mode.playing-mode .tv .melds{flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr);min-height:0;gap:8px;overflow:hidden;align-content:stretch}
.display-mode.playing-mode .tv [data-meld-rows="2"] .melds{grid-template-rows:repeat(2,minmax(0,1fr))}.display-mode.playing-mode .tv [data-meld-rows="3"] .melds{grid-template-rows:repeat(3,minmax(0,1fr))}.display-mode.playing-mode .tv [data-meld-rows="4"] .melds{grid-template-rows:repeat(4,minmax(0,1fr))}.display-mode.playing-mode .tv [data-meld-rows="5"] .melds{grid-template-rows:repeat(5,minmax(0,1fr))}.display-mode.playing-mode .tv [data-meld-rows="6"] .melds{grid-template-rows:repeat(6,minmax(0,1fr))}
.display-mode.playing-mode .tv .meld{width:auto;max-width:none;min-width:0;min-height:0;margin:0;display:flex;flex-direction:column}
.display-mode.playing-mode .tv .meld-title{font-size:clamp(11px,1.2vw,22px);margin-bottom:4px;flex-wrap:wrap;gap:3px}.display-mode.playing-mode .tv .meld-title span{font-size:clamp(8px,.7vw,13px)}
.display-mode.playing-mode .tv .meld-cards{display:flex;flex:1;min-height:0;padding:0 24px 0 0;overflow:hidden;align-items:flex-start}
.display-mode.playing-mode .tv .meld-cards .card{height:100%;max-height:clamp(74px,16vh,190px);width:auto;aspect-ratio:5/7;min-width:24px;margin-right:-26px;padding:4px}
.display-mode.playing-mode .tv .meld-cards .card>span,.display-mode.playing-mode .tv .meld-cards .card small{font-size:clamp(10px,1.1vw,20px)}.display-mode.playing-mode .tv .meld-cards .card>b{font-size:clamp(16px,1.7vw,32px)}.display-mode.playing-mode .tv .meld-cards .bottom{display:none}
.display-mode.playing-mode .tv .red-threes{margin-top:8px;padding-top:8px;flex-shrink:0;font-size:clamp(11px,1vw,20px);gap:8px;flex-wrap:wrap}
.display-mode.playing-mode .tv .table-empty{padding:12px 0;grid-column:1/-1;font-size:clamp(12px,1.2vw,22px)}
.display-mode.playing-mode .tv .piles{grid-column:2;grid-row:2;flex-direction:column;align-items:center;justify-content:center;padding:0;gap:14px;border-left:1px solid #ffffff20}
.display-mode.playing-mode .tv .piles>div{gap:6px}.display-mode.playing-mode .tv .piles .card,.display-mode.playing-mode .tv .piles .empty-card{width:clamp(52px,6vw,120px);height:clamp(74px,9vw,170px)}
.display-mode.playing-mode .tv .piles strong{font-size:clamp(12px,1.2vw,22px)}.display-mode.playing-mode .tv .piles small{font-size:clamp(10px,1vw,18px)}
.display-mode.playing-mode .tv .game-bottom{display:block;flex-shrink:0;margin:0}.display-mode.playing-mode .tv .game-bottom>.panel:first-child{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:6px 10px;gap:10px}
.display-mode.playing-mode .tv .game-bottom h3,.display-mode.playing-mode .tv .game-bottom>.panel:last-child{display:none}.display-mode.playing-mode .tv .player-line{padding:0;gap:6px;min-width:0;font-size:clamp(11px,1vw,19px)}
.display-mode.playing-mode .tv .player-line>span:not(.avatar){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.display-mode.playing-mode .tv .player-line>strong{font-size:clamp(11px,1.1vw,20px);white-space:nowrap}.display-mode.playing-mode .tv .player-line small{font-size:clamp(9px,.8vw,16px)}.display-mode.playing-mode .tv .avatar{width:clamp(28px,3vw,50px);height:clamp(28px,3vw,50px);min-width:28px}
.display-mode.playing-mode .tv>.statistics-panel:not([open]){margin:0;padding:0;border:0;background:none;align-self:flex-start;flex-shrink:0}.display-mode.playing-mode .tv>.statistics-panel summary{font-size:11px;min-height:18px}
.display-mode.playing-mode .tv>.personal-settings:not([open]){position:fixed;top:auto;bottom:8px;right:12px;margin:0;padding:0;border:0;background:none;z-index:5}.display-mode.playing-mode .tv>.personal-settings summary{font-size:11px;min-height:18px}
.display-mode.playing-mode .tv>.personal-settings[open],.display-mode.playing-mode .tv>.statistics-panel[open]{position:fixed;right:12px;bottom:32px;width:min(650px,94vw);max-height:80dvh;overflow:auto;z-index:15;background:var(--paper);box-shadow:0 8px 40px #0004}
.display-mode.playing-mode .tv>.stock-status,.display-mode.playing-mode .tv>.offline,.display-mode.playing-mode .tv>.abort-panel{flex-shrink:0;margin:0;padding:8px 12px;font-size:12px}

@media(max-width:900px),(max-height:600px){
  body.player-mode:not(.tools-mode){height:100vh;height:100dvh;overflow:hidden}
  .player-mode header{display:none}
  .player-mode .room{padding:calc(5px + env(safe-area-inset-top)) calc(7px + env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) calc(7px + env(safe-area-inset-left));max-width:none}
  .player-mode:not(.tools-mode) .room{height:100vh;height:100dvh;display:flex;flex-direction:column;gap:5px;overflow:hidden}
  .player-mode .room-heading{flex-direction:row;align-items:center;gap:6px;min-height:30px;margin:0;flex-shrink:0}.player-mode .room-heading>div:first-child{min-width:0}
  .player-mode .room-heading .eyebrow{display:none}.player-mode .room h1{font-size:17px;letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:64vw;margin:0}
  .player-mode .room-heading .row>*{display:none}.player-mode .room-heading .row>[data-act="fullscreen"]{display:inline-flex;font-size:10px;padding:4px 7px;min-height:30px}
  .player-mode .scorebar{grid-template-columns:1fr 1fr;gap:3px 8px;padding:5px 9px;margin:0;flex-shrink:0;min-height:62px;border-radius:8px}
  .player-mode .team-score{gap:5px;padding-right:8px;min-width:0}.player-mode .team-score strong{font-size:23px}.player-mode .team-score>span{font-size:9px;letter-spacing:.4px}.player-mode .team-score small{font-size:9px;line-height:1.1;margin:2px 0 0;max-width:33vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .player-mode .turn{grid-column:1/-1;font-size:11px;gap:5px;line-height:1.1}.player-mode .turn small{display:none}.player-mode .pulse{width:6px;height:6px}
  .player-mode .tabs{margin:0;gap:4px;flex-shrink:0}.player-mode .tabs button{flex:1;min-height:34px;padding:5px;font-size:11px;gap:4px;border-radius:7px}
  .player-mode:not(.tools-mode) .room>.tv-session-panel,.player-mode:not(.tools-mode) .room>.statistics-panel,.player-mode:not(.tools-mode) .room>.settings,.player-mode:not(.tools-mode) .room>.account-security,.player-mode:not(.tools-mode) .room>.personal-settings,.player-mode:not(.tools-mode) .room>.reaction-bar,.player-mode:not(.tools-mode) .game-bottom{display:none}
  .player-mode .hand-panel{flex:1;min-height:0;margin:0;padding:7px;display:flex;flex-direction:column;gap:4px;overflow:visible}
  .player-mode .hand-heading{gap:3px;align-items:center;flex-shrink:0}.player-mode .hand-heading h2{font-size:20px;white-space:nowrap;margin:0}.player-mode .hand-heading .row{gap:2px;flex-wrap:nowrap}.player-mode .hand-heading button{font-size:10px;min-height:30px;padding:4px;max-width:82px;line-height:1.15}
  .player-mode .hand-area{flex:1;min-height:0;overflow:auto;padding:4px 2px;overscroll-behavior:contain}
  .player-mode .hand{--hand-columns:5;--card-w:52px;--card-h:72px;display:grid;grid-template-columns:repeat(var(--hand-columns),minmax(0,1fr));grid-auto-rows:var(--card-h);align-content:center;justify-items:center;gap:5px;margin:0;min-height:0;height:100%;width:100%}
  .player-mode .hand .card{width:var(--card-w);height:var(--card-h);min-height:0;padding:4px;border-radius:5px;gap:0}.player-mode .hand .card>span,.player-mode .hand .card small{font-size:clamp(12px,calc(var(--card-w)*.28),22px);margin:0}.player-mode .hand .card>b{font-size:clamp(18px,calc(var(--card-w)*.45),34px)}.player-mode .hand .card .bottom{display:none}.player-mode .hand .selected{transform:translateY(-2px);outline:2px solid #638255}
  .player-mode .phone-controls{flex-shrink:0;min-width:0}.player-mode .selection{font-size:11px;min-height:22px;display:flex;align-items:center;justify-content:space-between;gap:3px}.player-mode .selection button{font-size:10px;padding:2px 5px;min-height:25px}
  .player-mode .turn-status{font-size:11px;line-height:1.25;margin:3px 0 6px}.player-mode .turn-status span{font-size:10px;margin-top:3px}
  .player-mode .hand-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}.player-mode .hand-actions button{min-height:44px;font-size:12px;padding:5px 7px;gap:4px;line-height:1.2}
  .player-mode .take-help{font-size:10px;line-height:1.2;margin:4px 0;max-height:28px;overflow:auto}
  .player-mode .hand-details{margin:3px 0 0;padding-top:3px;border-top:1px solid var(--line);font-size:11px}.player-mode .hand-details summary{font-size:10px;min-height:24px;padding:3px 0}.player-mode .hand-details[open]{max-height:35dvh;overflow:auto}.player-mode .hand-details p{font-size:11px;line-height:1.3;margin:6px 0}.player-mode .hand-details .order-controls{margin:4px 0}.player-mode .hand-details button{font-size:11px;padding:5px;min-height:36px}.player-mode .hand-details label{font-size:11px;margin:6px 0}.player-mode .hand-details select{display:block;margin:3px 0;width:100%;min-height:36px;padding:6px}
  .player-mode .hand-panel .plan{position:fixed;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));z-index:40;max-height:75dvh;overflow:auto;margin:0;padding:16px;border:1px solid #bccbb0;box-shadow:0 8px 60px #102b2766}.player-mode .plan h3{font-size:15px;margin:0 0 10px}.player-mode .plan p{font-size:12px;margin:8px 0;line-height:1.4}.player-mode .plan button{min-height:44px;font-size:12px;margin:3px}
  .player-mode .hand-panel .plan.plan-minimized{position:static;padding:4px 7px;max-height:42px;display:flex;justify-content:space-between;align-items:center;box-shadow:none}.player-mode .plan-minimized>h3{font-size:11px;margin:0}.player-mode .plan-minimized>:not(h3):not([data-act="show-plan"]){display:none}.player-mode .plan-minimized [data-act="show-plan"]{min-height:30px;font-size:10px}
  .player-mode:not(.tools-mode) .room>.table{flex:1;min-height:0;overflow:auto;margin:0}.player-mode:not(.tools-mode) .room>.offline,.player-mode:not(.tools-mode) .room>.stock-status{margin:0;padding:6px;font-size:11px;flex-shrink:0}.player-mode .stock-status button{font-size:10px;min-height:30px;padding:4px}
  .player-mode .abort-panel{margin:0;padding:8px;max-height:28dvh;overflow:auto;flex-shrink:0}.player-mode .abort-panel h2{font-size:18px;margin:0}.player-mode .abort-panel p{font-size:10px;line-height:1.2;margin:4px 0}.player-mode .abort-panel button{font-size:11px;min-height:34px;padding:5px}
  .player-mode.tools-mode .room{min-height:100dvh}.player-mode.tools-mode .room-heading{margin-bottom:5px}.player-mode.tools-mode .scorebar{margin-bottom:5px}.player-mode.tools-mode .tabs{margin-bottom:12px}.player-mode.tools-mode .game-bottom{display:none}.player-mode.tools-mode .panel{padding:16px}.player-mode.tools-mode .tv-session-panel{margin-top:18px}.player-mode .game-menu h2{font-size:25px}.player-mode .game-menu button{font-size:12px}
  .take-dialog{padding:18px;max-height:90dvh}.take-dialog h2{font-size:28px}.take-dialog p{font-size:12px;line-height:1.4}.take-dialog .row button{min-height:44px;font-size:12px}
  .player-mode #notice{bottom:10px;font-size:12px;padding:12px;max-width:94vw}
}
@media(min-width:600px) and (max-height:600px){
  .player-mode:not(.tools-mode) .room{gap:3px}.player-mode .room-heading{min-height:24px}.player-mode .room h1{font-size:14px}.player-mode .room-heading .row>[data-act="fullscreen"]{min-height:24px}
  .player-mode .scorebar{grid-template-columns:1fr 1fr 1fr;min-height:36px;padding:3px 8px}.player-mode .turn{grid-column:auto}.player-mode .team-score small{display:none}.player-mode .tabs button{min-height:28px;padding:3px}
  .player-mode .hand-panel{display:grid;grid-template-columns:minmax(0,1fr) 240px;grid-template-rows:auto minmax(0,1fr);gap:5px}.player-mode .hand-heading{grid-column:1}.player-mode .hand-area{grid-column:1;grid-row:2}.player-mode .phone-controls{grid-column:2;grid-row:1/3;overflow:auto}.player-mode .hand-actions button{font-size:11px;min-height:42px}
}
@media(max-width:350px){.player-mode .hand{gap:2px}.player-mode .hand-heading button{font-size:9px}.player-mode .hand-actions button{font-size:11px}.player-mode .take-help{font-size:9px}}

.hand-layout-toggle[aria-pressed="true"]{background:#dfe6d7;border-color:#638255}
.hand.hand-overlap{gap:12px 0;padding-right:44px}.hand.hand-overlap .card{margin-right:-44px}.hand.hand-overlap .card.selected,.hand.hand-overlap .card:focus-visible{z-index:3}
@media(max-width:900px),(max-height:600px){.player-mode .hand.hand-overlap{grid-template-columns:repeat(var(--hand-columns),calc(var(--card-w)/2));column-gap:5px;row-gap:5px;padding-right:calc(var(--card-w)/2);justify-content:center;justify-items:start}.player-mode .hand.hand-overlap .card{margin-right:0}.player-mode .hand.hand-overlap .selected{transform:translateY(-5px)}}
@media(max-width:350px){.player-mode .hand.hand-overlap{column-gap:2px;row-gap:2px}}
/* At a crowded table the rank and count stay legible; cards use the row's space. */
.display-mode.playing-mode .tv [data-meld-rows="4"] .meld-cards .card>b,.display-mode.playing-mode .tv [data-meld-rows="5"] .meld-cards .card>b,.display-mode.playing-mode .tv [data-meld-rows="6"] .meld-cards .card>b{display:none}
.display-mode.playing-mode .tv [data-meld-rows="4"] .meld-title,.display-mode.playing-mode .tv [data-meld-rows="5"] .meld-title,.display-mode.playing-mode .tv [data-meld-rows="6"] .meld-title{font-size:clamp(10px,1vw,18px);margin-bottom:2px;line-height:1.1}
.display-mode.playing-mode .tv [data-meld-rows="4"] .meld-title span,.display-mode.playing-mode .tv [data-meld-rows="5"] .meld-title span,.display-mode.playing-mode .tv [data-meld-rows="6"] .meld-title span{font-size:9px;letter-spacing:0}
.display-mode.playing-mode .tv [data-meld-rows="4"] .meld-cards .card,.display-mode.playing-mode .tv [data-meld-rows="5"] .meld-cards .card,.display-mode.playing-mode .tv [data-meld-rows="6"] .meld-cards .card{padding:2px;min-width:22px;margin-right:-12px}


/* Keep rank and suit on the visible half of an overlapping hand card. */
.hand .card>span:first-child{align-self:flex-start}.hand.hand-overlap .card.selected{z-index:auto}

.google-login{width:100%;background:#fff;color:#263c33;border:1px solid #bcc4b8;min-height:48px;margin-top:8px}.auth-divider{display:flex;align-items:center;gap:12px;justify-content:center;color:var(--muted);font-size:12px;margin:18px 0}.auth-divider:before,.auth-divider:after{content:'';height:1px;background:var(--line);flex:1}.account-security>h3{margin:24px 0 8px}.account-security>p{margin-bottom:12px}.account-security form{max-width:480px}.recovery-key-details{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}.recovery-key-details>summary{min-height:44px;padding:10px 0;cursor:pointer;font-weight:600;font-size:13px}.recovery-key-details>p{margin-top:12px}.auth-recovery .google-login{max-width:430px}.auth-feedback{background:#e9eddf;padding:14px;border-radius:8px;margin-top:18px}.auth-recovery h1{font-size:42px}@media(max-width:650px){.auth-recovery h1{font-size:34px}.account-security>h3{font-size:15px}}
.auth-email-option{margin:12px 0 18px}.auth-email-option summary{font-size:12px;cursor:pointer;min-height:28px;padding:5px 0}#auth>p{margin:8px 0 12px}
/* Public TV table: velvet, padded leather rail and brass seat plaques. */
body.display-mode.playing-mode{background:radial-gradient(ellipse at 50% 30%,#30322b,#111b18 75%);color:#eee6d4}
.display-mode.playing-mode .tv .room-heading button{color:#e9dcc0;border-color:#a78a5159;background:#ffffff05}
.display-mode.playing-mode .tv .scorebar{background:linear-gradient(120deg,#23312b,#17241f);border-color:#a78a5159;color:#f0e5cc;box-shadow:0 8px 24px #0003}
.display-mode.playing-mode .tv .team-score{border-color:#b89a5740}
.display-mode.playing-mode .tv .scorebar small{color:#b7bbae}
.display-mode.playing-mode .tv .team-score strong{color:#edcf8e}
.tv>.luxury-table,.display-mode.playing-mode .tv>.luxury-table{
  position:relative;isolation:isolate;min-height:360px;padding:72px 152px 70px;
  border:16px solid #332a22;border-radius:clamp(70px,10vw,180px);
  background:repeating-linear-gradient(93deg,#ffffff03 0px,#ffffff03 1px,transparent 1px,transparent 3px),repeating-linear-gradient(3deg,#00000005 0px,#00000005 1px,transparent 1px,transparent 4px),radial-gradient(ellipse at 42% 32%,#256b53 0%,#144b3a 48%,#092b23 100%);
  box-shadow:0 0 0 1px #a88650,0 0 0 5px #171c18,0 12px 30px #0007,inset 0 0 0 2px #cca65b99,inset 0 0 0 9px #0a302780,inset 0 12px 28px #0007;
  margin:5px 6px 10px;color:#f4edda;
}
.luxury-table:before{content:'';position:absolute;inset:15px;border:1px solid #d7bb7140;border-radius:inherit;pointer-events:none;z-index:-1}
.luxury-table .table-top{color:#d8c390;border-color:#c5ab6240;letter-spacing:2px}
.luxury-table .team-melds h2{color:#e8d5a7;font-family:Georgia,serif}
.luxury-table .team-melds+.team-melds{border-color:#d5bc7433}
.luxury-table .table-empty{color:#b3c6b7;font-style:italic}
.luxury-table .red-threes{color:#c6cfbd}
.luxury-table .piles small{color:#c2ccbb}
.luxury-table .card{box-shadow:1px 4px 7px #001c2580}
.table-profiles{position:absolute;inset:0;pointer-events:none;z-index:2}
.table-profile{position:absolute;display:flex;align-items:center;gap:9px;width:136px;padding:10px;border:1px solid #bfa16b66;border-radius:16px;background:linear-gradient(140deg,#2c342d,#141f1b);box-shadow:0 5px 15px #0006,inset 0 1px #ffffff0d;color:#f2e9d3;text-align:center;flex-direction:column}
.table-profile-0{bottom:9px;left:50%;transform:translateX(-50%)}
.table-profile-1{left:10px;top:50%;transform:translateY(-50%)}
.table-profile-2{top:9px;left:50%;transform:translateX(-50%)}
.table-profile-3{right:10px;top:50%;transform:translateY(-50%)}
.table-profile-0,.table-profile-2{flex-direction:row;width:240px;padding:7px 12px;text-align:left;border-radius:40px}
.profile-avatar{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:50%;font-size:25px;border:1px solid #d9bf8077;background:linear-gradient(135deg,#59715a,#2c4939);color:#fff0c9;box-shadow:inset 0 1px 4px #ffffff20}
.profile-avatar.team1{background:linear-gradient(135deg,#8a694a,#493624)}
.profile-info{min-width:0;width:100%}.profile-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(12px,1.15vw,21px)}
.profile-info small{color:#b9beac;font-size:clamp(9px,.75vw,14px);margin-top:3px}
.profile-status{display:block;font-size:clamp(9px,.75vw,14px);margin-top:5px;color:#ceceb8}
.table-profile.is-turn{border-color:#f1d18b;background:linear-gradient(140deg,#51472c,#252d20);box-shadow:0 0 0 2px #cfaa5733,0 0 24px #e4bc4930,0 5px 15px #0006}
.table-profile.is-turn .profile-status{color:#ffe1a0}
/* The moving turn marker belongs to the active player's seat. */
.display-mode.playing-mode .tv .table-profile.is-turn{border-color:#ff5757;animation:tv-turn-frame 1.4s ease-in-out infinite}
@keyframes tv-turn-frame{0%,100%{border-color:#ff5757;box-shadow:0 0 0 3px #ff4141a0,0 0 22px #ff414188,0 5px 15px #0006}50%{border-color:#843b3b;box-shadow:0 0 0 1px #ff414122,0 0 5px #ff414122,0 5px 15px #0006}}
.display-mode.playing-mode .tv .game-bottom{display:none}
.display-mode.playing-mode .tv>.statistics-panel summary,.display-mode.playing-mode .tv>.personal-settings summary{color:#bfc2ad}
@media(min-width:1500px) and (min-height:800px){.display-mode.playing-mode .tv>.luxury-table{padding:90px 190px 88px;border-width:23px}.table-profile-1,.table-profile-3{width:170px;padding:16px}.table-profile-0,.table-profile-2{width:290px;padding:10px 16px}.profile-avatar{width:52px;height:52px;flex-basis:52px;font-size:30px}}
@media(max-width:1050px),(max-height:650px){.display-mode.playing-mode .tv>.luxury-table{padding:61px 117px 60px;border-width:10px;min-height:0;margin:3px 2px 5px}.table-profile{width:105px;padding:7px;gap:5px;border-radius:12px}.table-profile-1{left:5px}.table-profile-3{right:5px}.table-profile-0,.table-profile-2{width:210px;padding:5px 9px;border-radius:30px}.table-profile-0{bottom:5px}.table-profile-2{top:5px}.profile-avatar{width:32px;height:32px;flex-basis:32px;font-size:21px}.profile-info strong{font-size:12px}.profile-info small,.profile-status{font-size:9px}.profile-status{margin-top:3px}.display-mode.playing-mode .tv .luxury-table .team-melds{padding:3px 6px}.display-mode.playing-mode .tv .luxury-table .team-melds h2{font-size:20px;margin-bottom:4px}.display-mode.playing-mode .tv .luxury-table .table-top{font-size:8px;letter-spacing:1px}}
/* Let both piles fit the available felt height on compact TV screens. */
.display-mode.playing-mode .tv .luxury-table .piles{min-height:0;gap:8px}
.display-mode.playing-mode .tv .luxury-table .piles>div{flex:1;min-height:0;justify-content:center;gap:4px}
.display-mode.playing-mode .tv .luxury-table .piles .card,.display-mode.playing-mode .tv .luxury-table .piles .empty-card{flex-shrink:1;min-height:24px;height:auto;max-height:calc(100% - 44px);width:auto;max-width:100%;aspect-ratio:5/7}
.display-mode.playing-mode .tv .luxury-table .piles strong,.display-mode.playing-mode .tv .luxury-table .piles small{flex-shrink:0;white-space:nowrap}
@media(max-height:650px){.display-mode.playing-mode .tv .luxury-table .piles .card>b{font-size:20px}.display-mode.playing-mode .tv .luxury-table .piles .card>span,.display-mode.playing-mode .tv .luxury-table .piles .card small{font-size:12px}.display-mode.playing-mode .tv .luxury-table .piles .card .bottom{display:none}}
/* Completed canastas share a compact rail; only unfinished melds use the felt grid. */
.display-mode.playing-mode .tv .luxury-table .melds{grid-template-columns:repeat(var(--meld-cols,2),minmax(0,1fr));grid-template-rows:repeat(var(--meld-rows,1),minmax(0,1fr));gap:7px 10px}
.display-mode.playing-mode .tv .luxury-table .meld-title{font-family:Georgia,serif;font-size:clamp(15px,1.4vw,24px);line-height:1.1;margin-bottom:4px;flex-wrap:nowrap;gap:5px}
.display-mode.playing-mode .tv .luxury-table .meld-title span{font-family:Inter,Segoe UI,Arial,sans-serif;font-size:clamp(10px,.85vw,16px);letter-spacing:0;white-space:nowrap;color:#d2dac7}
.display-mode.playing-mode .tv .luxury-table .meld-cards{display:grid;grid-template-columns:repeat(var(--meld-count),minmax(0,1fr));align-items:start;gap:0;padding:0 16px 0 0;min-height:0}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card{width:calc(100% + 16px);max-width:clamp(42px,5vw,86px);min-width:28px;height:100%;max-height:clamp(44px,11vh,120px);aspect-ratio:auto;margin:0;padding:4px;border-radius:5px}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card>span:first-child{display:flex;align-items:center;gap:3px;font-size:clamp(11px,1vw,18px)}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card small{font-size:inherit;margin:0}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card>b{font-size:clamp(18px,2vw,32px)}
.canasta-tray{flex-shrink:0;margin-top:10px;padding-top:7px;border-top:1px solid #d8bf7340}
.canasta-heading{display:flex;align-items:center;gap:7px;letter-spacing:1.5px;font-size:clamp(8px,.7vw,12px);color:#d7c18a;margin-bottom:6px}
.canasta-heading strong{font-size:1.2em;color:#f7dfab}
.canasta-stacks{display:grid;grid-template-columns:repeat(var(--canasta-columns),minmax(0,1fr));gap:8px;max-width:100%}
.canasta-stack{min-width:0;max-width:90px;text-align:center;justify-self:start;width:100%;padding:0 4px}
.canasta-face{position:relative;isolation:isolate;height:clamp(42px,6.5vh,76px)}
.canasta-face:before,.canasta-face:after{content:'';position:absolute;inset:0;border:1px solid #c9b98b;background:#f4edda;border-radius:5px;box-shadow:0 2px 4px #0004;z-index:-1}
.canasta-face:before{transform:translate(-3px,2px) rotate(-5deg)}
.canasta-face:after{transform:translate(3px,2px) rotate(5deg)}
.display-mode.playing-mode .tv .canasta-face .card{width:100%;height:100%;padding:4px;border:2px solid #b95843;border-radius:5px;box-shadow:0 2px 5px #0004}
.display-mode.playing-mode .tv .canasta-mixed .canasta-face .card{border-color:#71857d}
.display-mode.playing-mode .tv .canasta-face .card>span:first-child{font-size:clamp(14px,1.4vw,24px);display:flex;gap:3px;align-items:center}
.display-mode.playing-mode .tv .canasta-face .card small{display:none}
.display-mode.playing-mode .tv .canasta-face .card>b,.display-mode.playing-mode .tv .canasta-face .card .bottom{display:none}
.canasta-count{position:absolute;right:4px;bottom:3px;background:#824c39;color:#fff6dc;border-radius:4px;padding:2px 5px;font-size:clamp(10px,.85vw,16px);line-height:1.1}
.canasta-mixed .canasta-count{background:#31483e}
.canasta-kind{display:block;font-size:clamp(8px,.65vw,12px);color:#ead9ae;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-height:650px){
  .display-mode.playing-mode .tv .luxury-table .meld-title{font-size:14px;margin-bottom:3px}
  .display-mode.playing-mode .tv .luxury-table .meld-title span{font-size:10px}
  .display-mode.playing-mode .tv .luxury-table .melds{gap:5px 8px}
  .display-mode.playing-mode .tv .luxury-table .meld-cards .card{padding:3px;min-width:26px}
  .display-mode.playing-mode .tv .luxury-table .meld-cards .card>b{display:none}
  .display-mode.playing-mode .tv .luxury-table .meld-cards .card>span:first-child{font-size:11px;gap:2px}
  .canasta-tray{margin-top:6px;padding-top:4px}.canasta-heading{margin-bottom:4px;font-size:8px}
  .canasta-face{height:32px}.canasta-kind{font-size:8px;margin-top:4px}
  .display-mode.playing-mode .tv .canasta-face .card>span:first-child{font-size:13px}
  .canasta-count{font-size:9px;padding:1px 3px;right:3px;bottom:2px}
  .display-mode.playing-mode .tv .luxury-table .red-threes{margin-top:6px;padding-top:5px;font-size:10px;gap:5px}
}

.open-games{display:grid;gap:12px}.open-game{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.open-game strong{overflow-wrap:anywhere;min-width:0}
.display-mode.playing-mode .tv .team-table-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-shrink:0}
.table-threes{white-space:nowrap;font-size:clamp(11px,1vw,18px);color:#edb4a1}.table-threes strong{margin-left:4px;color:#e4d9bc}
/* Keep the footer controls outside the space reserved for cards. */
.display-mode.playing-mode .tv>.statistics-panel:not([open]){position:fixed;left:12px;bottom:8px;z-index:5}

.card.just-drawn{outline:3px solid #e2ad37;outline-offset:2px;box-shadow:0 0 16px #e2ad3780}.card .drawn-label{position:absolute;left:2px;right:2px;top:45%;font:700 10px/1.4 sans-serif;text-align:center;background:#ffe5a0;color:#322000;border-radius:3px;z-index:2}.discard-stack{position:relative;display:inline-block}.discard-stack.is-frozen{margin:18px 28px}.discard-stack>.card{position:relative;z-index:1}.freeze-card{position:absolute;left:-20px;top:12px;transform:rotate(90deg);transform-origin:center;z-index:0}.freeze-card .card{pointer-events:none}

.meld.near-natural{outline:3px solid #ef4848;outline-offset:2px;border-radius:8px}.meld.near-mixed{outline:3px solid #f6a02d;outline-offset:2px;border-radius:8px}.meld-targets{display:grid;gap:16px;margin:18px 0}.meld-target{display:block;text-align:left;background:#234b3c;color:#fff;padding:12px;width:100%;min-width:0}.meld-target .meld{margin:0;padding:8px}.meld-target .meld-cards{display:flex;overflow:hidden}.my-turn::after{content:'';position:fixed;inset:0;border:5px solid #2ee56c;box-shadow:inset 0 0 12px #2ee56c66;pointer-events:none;z-index:1000;border-radius:8px}

/* Keep each meld rank and its card count together: 7 (3). */
.meld-title .meld-value{font-weight:inherit;white-space:nowrap}.meld-title>span:empty{display:none}
/* Every open card keeps its own visible rank, including after fullscreen resize. */
.display-mode.playing-mode .tv .luxury-table .meld-cards{display:grid;grid-template-columns:repeat(var(--fan-columns,var(--meld-count)),minmax(0,var(--fan-width,1fr)));grid-template-rows:repeat(var(--fan-rows,1),minmax(0,var(--fan-height,1fr)));gap:2px;padding:0;overflow:visible;align-content:start}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;aspect-ratio:auto;margin:0;padding:2px 3px}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card>span:first-child{font-size:var(--fan-font,12px);line-height:1.05;gap:2px;white-space:nowrap}
.display-mode.playing-mode .tv .luxury-table .meld-cards.fan-tight .card{padding:1px 0}
.display-mode.playing-mode .tv .luxury-table .meld-cards.fan-tight .card>span:first-child{align-self:center}
.display-mode.playing-mode .tv .luxury-table .meld-cards.fan-tight .card>b{display:none}
.display-mode.playing-mode .tv .luxury-table .meld-title{flex-shrink:0;min-width:0}
.display-mode.playing-mode .tv .luxury-table .meld-title>span{min-width:0;overflow:hidden;text-overflow:ellipsis}

/* Keep overflowing hands reachable after live updates and expanded controls. */
@media(max-width:900px),(max-height:600px){
 .player-mode .hand-panel{overflow:auto;overscroll-behavior:contain}
 .player-mode .hand-area{min-height:120px;flex-shrink:0}
 .player-mode .hand{align-content:start;height:auto;min-height:100%;padding-top:4px;padding-bottom:4px}
 .player-mode .phone-controls{max-height:55dvh;overflow:auto;overscroll-behavior:contain}
}

.hand [data-card]{touch-action:none;cursor:grab}.hand.is-dragging{user-select:none}.hand.is-dragging [data-card]{cursor:grabbing}.hand .card.drag-source{opacity:.55}.hand .card.drag-target{outline:3px solid #4788df;outline-offset:2px}

.pause-panel{border:2px solid #718c65;margin:12px 0;padding:20px;flex-shrink:0}.pause-panel h2{margin-top:0}.pause-panel ul{padding-left:20px;line-height:1.7}.paused-room{max-width:720px;min-height:65dvh;display:flex;align-items:center;justify-content:center}.paused-room .pause-panel{width:100%;text-align:center}.paused-room .pause-panel ul{text-align:left;display:table;margin:16px auto}.paused-room button{min-height:52px}@media(max-width:900px),(max-height:600px){.player-mode .pause-panel{max-height:45dvh;overflow:auto;padding:12px;margin:0}.player-mode .pause-panel h2{font-size:22px;margin:0}.player-mode .pause-panel p{font-size:12px;margin:6px 0}.player-mode .pause-panel ul{font-size:12px;margin:6px 0}}

/* Joker target selection, named teams and saved games. */
.meld-target-dialog{max-width:760px}.meld-targets{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:18px 0}.meld-target{min-width:0;text-align:left;padding:12px;background:#173d35;color:#fff}.meld-target .meld{margin:0}.meld-target .meld-title{color:inherit}.meld-target:disabled{opacity:.6}.meld-target-reason{display:block;white-space:normal;font-size:13px;line-height:1.4;margin-top:10px;color:inherit}.meld-target .card{width:38px;height:54px;min-height:54px}.meld-target .card>b{font-size:18px}.meld-target .card>span{font-size:12px}
.end-game-actions{display:flex;flex-direction:column;gap:10px}.end-game-actions button{min-height:48px}.end-game-dialog h2{margin-top:0}.team-name-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.team-names-panel{margin:12px 0}.team-names-panel h3{margin-top:0}.team-names-panel input{width:100%;min-width:0}.team-names-panel button{margin-top:12px}
.game-paused{border:2px solid #718c65;border-radius:16px;background:#fffef7;padding:24px;display:flex;flex-direction:column;gap:14px;color:#203b33;text-align:center}.game-paused strong{font-size:28px}.paused-mode .paused-room{display:flex;flex-direction:column;justify-content:center;gap:20px;max-width:720px;min-height:70dvh}.paused-mode .pulse{animation:none}.team-score>span{min-width:0;overflow:hidden;text-overflow:ellipsis}.team-table-heading h2,.profile-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.team-table-heading h2{min-width:0}
@media(max-width:500px){.team-name-fields{grid-template-columns:1fr}.meld-targets{grid-template-columns:1fr}.meld-target-dialog{padding:20px}.game-paused{padding:20px}}
/* Organizer's saved games: name / participants / actions. */
.saved-games .open-games{list-style:none;padding:0;margin:0;display:grid;gap:0;border-top:1px solid var(--line)}
.saved-games .open-game{display:grid;grid-template-columns:minmax(140px,1fr) minmax(180px,1.5fr) auto;gap:18px;padding:18px 0;border-bottom:1px solid var(--line);align-items:center}
.saved-games .open-game h3{font-family:Georgia,serif;font-size:21px;font-weight:400;margin:0;overflow-wrap:anywhere;min-width:0}
.saved-games .open-game-people{margin:0;overflow-wrap:anywhere;min-width:0}
.saved-games .joined-games-title{margin-top:30px}
.resume-game-dialog{max-width:540px}.resume-game-name{font-size:18px;color:var(--ink);overflow-wrap:anywhere}
.resume-code{display:block;text-align:center;font:600 48px/1.3 Georgia,serif;letter-spacing:10px;padding:18px 8px 18px 18px;border:1px solid #c5ccb9;border-radius:10px;background:#e9eddf;color:var(--ink)}
.resume-game-dialog>.row{margin-top:22px}.resume-game-dialog>small{line-height:1.5}
@media(max-width:650px){.saved-games .open-game{grid-template-columns:minmax(0,1fr) auto;gap:5px 12px}.saved-games .open-game-people{grid-column:1;font-size:12px}.saved-games .open-game>.row{grid-column:2;grid-row:1/3;flex-direction:column;gap:7px}.saved-games .open-game>.row button{width:88px;min-height:44px;padding:8px 10px}.saved-games .open-game h3{font-size:19px}.resume-game-dialog{padding:24px}.resume-game-dialog>.row{gap:6px}.resume-game-dialog>.row button{font-size:12px;padding:10px}}

.card .joker-art{position:absolute;left:21%;top:19%;width:64%;height:67%;object-fit:contain;pointer-events:none;user-select:none}.card.joker-card>span{z-index:1}.card.joker-card .drawn-label{z-index:2}
/* Current round's opening minimum, read from the rule engine for each team. */
.display-mode.playing-mode .tv .team-score>span{min-width:0}
.display-mode.playing-mode .tv .team-score .tv-opening{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 7px;max-width:none;overflow:visible;white-space:normal;letter-spacing:0;line-height:1.2;margin:6px 0 0;padding:5px 0 0;border-top:1px solid #d5bb6850;font-size:clamp(12px,1vw,20px);color:#e5d6ac}
.display-mode.playing-mode .tv .tv-opening b{font-size:clamp(18px,1.5vw,30px);font-weight:750;white-space:nowrap;color:#ffe2a0}
.display-mode.playing-mode .tv .tv-opening .opening-state{font-size:clamp(10px,.8vw,16px);color:#dbc998}
.display-mode.playing-mode .tv .tv-opening.is-open .opening-state{color:#b7d9b1}
@media(max-height:650px){.display-mode.playing-mode .tv .team-score .tv-opening{font-size:11px;gap:2px 5px;margin-top:4px;padding-top:3px}.display-mode.playing-mode .tv .tv-opening b{font-size:18px}.display-mode.playing-mode .tv .tv-opening .opening-state{font-size:10px}}
/* TV visual corrections: bounded fans, visible opening limits and frozen cards. */
.my-turn::after{border-color:#2ee56c;box-shadow:inset 0 0 12px #2ee56c66}
.card .joker-art{position:absolute;left:17%;top:17%;width:70%;height:74%;object-fit:contain;pointer-events:none;user-select:none}
.card.joker-card>span{position:relative;z-index:1}
.display-mode.playing-mode .tv .team-melds>.tv-opening{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;flex-shrink:0;margin:0 0 9px;padding:5px 8px;border:1px solid #d8b87070;border-radius:7px;background:#102d24;color:#ecdfba;line-height:1.2;font-size:clamp(12px,1.05vw,20px);white-space:normal;overflow:visible;max-width:none;letter-spacing:0}
.display-mode.playing-mode .tv .team-melds>.tv-opening b{font-size:clamp(18px,1.6vw,30px);color:#ffe2a0;white-space:nowrap}
.display-mode.playing-mode .tv .team-melds>.tv-opening .opening-state{font-size:clamp(10px,.9vw,16px)}
.display-mode.playing-mode .tv .luxury-table .meld{position:relative;isolation:isolate;overflow:hidden}
.display-mode.playing-mode .tv .luxury-table .meld-cards{grid-template-columns:repeat(var(--fan-columns,var(--meld-count)),minmax(0,var(--fan-step,1fr)));column-gap:0;row-gap:2px;overflow:hidden;padding:0;isolation:isolate}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card{width:var(--fan-width,100%);margin:0;max-width:none;min-width:0}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card>span:first-child,.display-mode.playing-mode .tv .luxury-table .meld-cards.fan-tight .card>span:first-child{align-self:flex-start;white-space:nowrap}
.display-mode.playing-mode .tv .luxury-table .meld-cards .joker-art{left:7%;top:8%;width:86%;height:84%}
.display-mode.playing-mode .tv .luxury-table .meld-cards.fan-tight .joker-card>span{display:none}
.discard-stack{position:relative;isolation:isolate;display:block;flex-shrink:0;width:var(--pile-width,88px);height:var(--pile-height,126px);overflow:visible}
.discard-stack.is-frozen{margin:0}
.discard-stack.is-draw-turn{z-index:3}
.discard-stack>.card{transform-origin:50% 100%}
.discard-stack.is-draw-turn>.card{transform:scale(1.45);box-shadow:0 6px 20px #0005}
.discard-stack.is-draw-turn>.sideways-top>.card,.discard-stack.is-draw-turn.top-is-freezer>.freeze-card>.card{transform:scale(1.45);box-shadow:0 6px 20px #0005}
.discard-stack>.card,.discard-stack>.empty-card{position:relative;z-index:2}
.freeze-card{position:absolute;left:50%;top:68%;width:var(--pile-width,88px);height:var(--pile-height,126px);transform:translate(-50%,-50%) rotate(90deg);transform-origin:center;z-index:1}
.top-is-freezer .freeze-card{top:50%}
.display-mode.playing-mode .tv .luxury-table .piles .discard-stack>.card,.display-mode.playing-mode .tv .luxury-table .piles .freeze-card>.card,.discard-stack>.card,.freeze-card>.card{width:var(--pile-width,88px);height:var(--pile-height,126px);max-height:none;max-width:none;min-height:0;aspect-ratio:auto;flex-shrink:0}
.freeze-card .joker-card:before,.freeze-card .joker-card:after{content:'';position:absolute;left:25%;width:50%;height:20%;background:url('/joker.svg?v=tv-visuals-2') center/contain no-repeat}
.freeze-card .joker-card:before{top:1px}.freeze-card .joker-card:after{bottom:1px;transform:rotate(180deg)}
.display-mode.playing-mode .tv .piles .freeze-card .card .bottom{display:block;font-size:clamp(10px,1.1vw,18px)}
.display-mode.playing-mode .tv .luxury-table .piles small{white-space:normal;text-align:center}
@media(max-height:650px){.display-mode.playing-mode .tv .team-melds>.tv-opening{margin-bottom:5px;padding:3px 5px;gap:3px 5px;font-size:11px}.display-mode.playing-mode .tv .team-melds>.tv-opening b{font-size:17px}}

.continue-round{text-align:center;border-top:1px solid var(--line);padding:18px 0 0;margin-top:18px}.continue-round ul{display:table;margin:12px auto;text-align:left;line-height:1.6}.match-total{font-size:20px;font-weight:700;text-align:center;margin:16px 0}.display-mode .results{max-width:1100px;margin:12px auto}.display-mode .results table{font-size:clamp(14px,1.7vw,25px);margin:12px 0}.display-mode .results th,.display-mode .results td{padding:8px 12px}.display-mode .results h2{margin:8px 0}.display-mode .continue-round{padding-top:10px;margin-top:10px}.display-mode .continue-round ul{display:flex;list-style:none;gap:10px 22px;flex-wrap:wrap;justify-content:center;padding:0}
.display-mode.playing-mode .tv .luxury-table .meld-cards{contain:size}
/* Creation and the single-step player lobby. */
.creation-setup{min-width:0;border:1px solid var(--line);border-radius:12px;padding:16px;margin:12px 0}.creation-setup legend{font-weight:700;padding:0 8px}.creation-setup h3{font-size:19px;margin:18px 0 7px}.creation-setup p{font-size:13px}.setup-name-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.creation-setup [hidden]{display:none}.ready-team h3{margin:20px 0 8px;font-size:21px}.ready-team .seat{gap:10px}.ready-team .seat>div{min-width:0}.ready-team .seat strong,.ready-team .seat small{overflow-wrap:anywhere}.ready-team .seat>span:last-child{font-size:12px;white-space:nowrap}.own-ready{padding:12px;background:#e8eee2;border-radius:9px}.ready-start{margin-top:22px}.ready-start>.primary{width:100%}
/* After the TV code, the complete QR has priority over all secondary controls. */
body.display-lobby{height:100vh;height:100dvh;overflow:hidden}body.display-lobby> #app>header{display:none}.tv-join-lobby{height:100vh;height:100dvh;max-width:none;padding:16px 24px;display:grid;grid-template-rows:auto minmax(0,1fr);gap:14px;overflow:hidden}.tv-lobby-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.tv-lobby-heading h1{margin:3px 0;font-size:clamp(24px,2.5vw,44px)}.tv-lobby-code{font-size:15px}.tv-lobby-code strong{font-size:30px;letter-spacing:5px;margin-left:10px}.tv-lobby-content{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;min-height:0}.tv-lobby-content>.panel{min-height:0;margin:0;padding:18px 24px;overflow:hidden}.tv-lobby-content .qr-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}.tv-lobby-content .qr-card>h2{font-size:clamp(21px,2vw,32px);margin:0}.tv-lobby-content .qr-card>.eyebrow{font-size:11px}.tv-lobby-content .qr-card>.tv-active-code,.tv-lobby-content .qr-card>p:first-of-type{display:none}.tv-lobby-content .qr-card>p{max-width:520px;margin:0;line-height:1.4;font-size:clamp(13px,1.2vw,19px)}.tv-lobby-content .join-qr-image{display:block;width:min(36vw,56vh);width:min(36vw,56dvh);height:min(36vw,56vh);height:min(36vw,56dvh);max-width:100%;max-height:none;flex:none;object-fit:contain;background:white;border-radius:8px;padding:6px;margin:0}.tv-lobby-content .qr-join-link{font-size:12px}.tv-ready-roster{display:flex;flex-direction:column;justify-content:center}.tv-ready-roster>h2{font-size:clamp(20px,2vw,34px);margin:8px 0}.tv-ready-roster>.ready-teams{min-height:0}.tv-ready-roster .seat{padding:12px 0}.tv-ready-roster .seat strong{font-size:clamp(17px,1.5vw,26px)}.tv-ready-roster .seat small{font-size:clamp(12px,1vw,18px)}.tv-ready-roster>p{margin-bottom:0;line-height:1.5}.qr-complete{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.ready-check{color:#2c6a4a;font-size:100px}
/* Use the full remaining TV height for the table, without reserving a footer. */
.display-mode.playing-mode .room.tv{padding:6px 8px 4px;gap:6px}.display-mode.playing-mode .tv>.luxury-table{flex:1 1 0;min-height:0;margin:0 3px 3px}.display-mode.playing-mode .tv>.statistics-panel:not([open]){position:fixed;left:22px;bottom:7px;z-index:8;margin:0;padding:0;background:transparent;border:0;color:#ead9b4;font-size:11px}.display-mode.playing-mode .tv>.personal-settings:not([open]){bottom:7px;right:22px}
.game-clock{position:absolute;right:14px;top:12px;z-index:4;display:grid;justify-items:center;gap:2px;padding:7px 12px;border:1px solid #caa76a80;border-radius:9px;background:#132e26e8;color:#f5e2b9;box-shadow:0 3px 10px #0003;pointer-events:none}.game-clock>span{font-size:10px;letter-spacing:1px;text-transform:uppercase}.game-clock>strong{font-variant-numeric:tabular-nums;font-size:clamp(20px,1.7vw,32px);line-height:1.1}.game-clock>small{font-size:10px}.game-clock>small:empty{display:none}.paused-room>.game-clock{position:static;max-width:200px;margin:0 auto 18px}
@media(max-height:650px){.tv-join-lobby{padding:10px 16px;gap:8px}.tv-lobby-heading h1{font-size:25px}.tv-lobby-heading .eyebrow{font-size:9px}.tv-lobby-heading button{min-height:35px;padding:8px 12px}.tv-lobby-content{gap:12px}.tv-lobby-content>.panel{padding:12px 18px}.tv-lobby-content .qr-card{gap:7px}.tv-lobby-content .join-qr-image{width:min(34vw,52dvh);height:min(34vw,52dvh)}.tv-ready-roster .ready-team h3{font-size:19px;margin:10px 0 3px}.tv-ready-roster .seat{padding:7px 0}.tv-ready-roster .avatar{width:32px;height:32px;font-size:15px}.tv-ready-roster>p{font-size:12px;margin-top:8px}.game-clock{top:7px;right:8px;padding:4px 8px}.game-clock>span{font-size:8px}.game-clock>strong{font-size:19px}}
@media(max-width:500px){.setup-name-grid{grid-template-columns:1fr}.creation-setup{padding:12px}}
.sideways-top{position:absolute;left:50%;top:50%;width:var(--pile-width,88px);height:var(--pile-height,126px);transform:translate(-50%,-50%) rotate(90deg);z-index:2}
.display-mode.playing-mode .tv .luxury-table .piles .sideways-top>.card,.sideways-top>.card{width:var(--pile-width,88px);height:var(--pile-height,126px);max-height:none;max-width:none;min-height:0;aspect-ratio:auto}

.tv-lobby-heading>div:first-child{min-width:0;flex:1}.tv-lobby-heading h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tv-lobby-heading>.row{flex-shrink:0}.tv-ready-roster .seat strong,.tv-ready-roster .seat small,.tv-ready-roster .ready-team h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}


/* TV only: give the visible discard the draw-choice area until a card is drawn. */
.display-mode.playing-mode .tv>.luxury-table.awaiting-draw{grid-template-columns:minmax(0,1fr) clamp(156px,17vw,280px)}
.display-mode.playing-mode .tv .luxury-table.awaiting-draw .piles>div:first-child{flex:0 0 auto}
.display-mode.playing-mode .tv .luxury-table.awaiting-draw .piles>div:first-child>.back{display:none}
.display-mode.playing-mode .tv .luxury-table.awaiting-draw .piles>div:last-child{flex:1;min-height:0}
.display-mode.playing-mode .tv .luxury-table .discard-stack.is-draw-turn>.card,.display-mode.playing-mode .tv .luxury-table .discard-stack.is-draw-turn>.sideways-top>.card,.display-mode.playing-mode .tv .luxury-table .discard-stack.is-draw-turn.top-is-freezer>.freeze-card>.card{transform:none;box-shadow:0 8px 24px #0007}
.display-mode.playing-mode .tv .luxury-table.awaiting-draw .piles .card>span,.display-mode.playing-mode .tv .luxury-table.awaiting-draw .piles .card small{font-size:clamp(17px,1.9vw,32px)}
.display-mode.playing-mode .tv .luxury-table.awaiting-draw .piles .card>b{font-size:clamp(36px,5vw,82px)}
.team-choice-form{margin:16px 0;padding:16px;border:1px solid #b6c7af;border-radius:10px;background:#eef2e8}.team-choice-form h3{margin:0 0 10px}.team-choice-form p{margin-bottom:8px}.team-choice-form button{width:100%}.own-team-settings{margin-top:16px}.own-team-settings summary{cursor:pointer;font-size:13px}

/* Keep the latest meld action visible until the next meld. */
.display-mode .luxury-table .latest-meld{outline:3px solid #f5ce70;outline-offset:-3px;border-radius:8px;background:#f5ce7026;box-shadow:inset 0 0 18px #f5ce7033}
.player-mode .phone-controls>.game-clock{position:static;display:flex;align-items:baseline;justify-content:center;gap:7px;padding:4px 8px;margin:0 0 4px;background:#f1eddf;border:1px solid #d7cfb7;color:#203b33;box-shadow:none;pointer-events:auto}
.player-mode .phone-controls>.game-clock>span{font-size:10px}.player-mode .phone-controls>.game-clock>strong{font-size:18px}.player-mode .phone-controls>.game-clock>small{margin:0;color:#6a735e}
.my-turn::after{border-color:#ed4141;box-shadow:inset 0 0 12px #ed414166}

.round-ending-notice{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);z-index:10;padding:10px 20px;border:1px solid #f5ce70;border-radius:10px;background:#132e26f2;color:#ffe4a1;text-align:center;font-weight:600;max-width:90vw}

.display-mode.playing-mode .tv .luxury-table .piles>div{width:100%;min-width:0}

/* TV: one proportional card size across both teams, including canasta faces. */
.display-mode.playing-mode .tv .luxury-table .meld-cards .card{width:var(--table-card-width,60px);height:var(--table-card-height,84px);aspect-ratio:5/7;min-width:0;min-height:0;max-width:none;max-height:none}
.display-mode.playing-mode .tv .luxury-table .canasta-stack{max-width:none}.display-mode.playing-mode .tv .luxury-table .canasta-face{width:var(--table-card-width,60px);height:var(--table-card-height,84px)}
.display-mode.playing-mode .tv .luxury-table .canasta-face .card{width:var(--table-card-width,60px);height:var(--table-card-height,84px)}
.display-mode.playing-mode .tv .luxury-table .meld.near-natural,.display-mode.playing-mode .tv .luxury-table .meld.near-mixed{outline:none}
.display-mode.playing-mode .tv .luxury-table .meld-title .meld-rank{display:inline-flex;align-items:center;justify-content:center;font:inherit;color:inherit;line-height:inherit;min-width:1.4em;padding:1px 4px;border:2px solid transparent;border-radius:5px}
.display-mode.playing-mode .tv .luxury-table .near-natural .meld-rank{border-color:#ef4848}.display-mode.playing-mode .tv .luxury-table .near-mixed .meld-rank{border-color:#f6a02d}

.display-mode.playing-mode .tv .luxury-table .canasta-kind{width:var(--table-card-width,60px);max-width:100%;text-align:center}

.display-mode.playing-mode .tv .luxury-table .canasta-face .card{display:flex;padding:min(4px,calc(var(--table-card-width,60px)*.06))}.display-mode.playing-mode .tv .luxury-table .canasta-face .card>span:first-child{font-size:var(--table-card-font,14px)}
.display-mode.playing-mode .tv .luxury-table .canasta-count{font-size:clamp(6px,calc(var(--table-card-width,60px)*.22),16px);padding:1px 2px;right:1px;bottom:1px}

/* Keep each exposed meld card's suit beneath its rank, including tight fans. */
.meld-cards .card>span:first-child,.canasta-face .card>span:first-child{display:flex;flex-direction:column;align-items:center;align-self:flex-start;gap:0;line-height:1}
.meld-cards .card>span:first-child small,.canasta-face .card>span:first-child small{display:block;font:inherit;line-height:1;margin:0}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card,.display-mode.playing-mode .tv .luxury-table .meld-cards.fan-tight .card{padding:2px 1px}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card>span:first-child,.display-mode.playing-mode .tv .luxury-table .meld-cards.fan-tight .card>span:first-child,.display-mode.playing-mode .tv .luxury-table .canasta-face .card>span:first-child{display:flex;flex-direction:column;align-items:center;align-self:flex-start;gap:0;line-height:1}
.display-mode.playing-mode .tv .luxury-table .meld-cards .card>span:first-child small,.display-mode.playing-mode .tv .luxury-table .canasta-face .card>span:first-child small{display:block;font:inherit;line-height:1;margin:0}

/* A small return link on the TV frame opens a QR without taking table height. */
.tv-return-link{font-size:12px;text-decoration:underline;min-height:30px;padding:4px 8px}
.display-mode.playing-mode .tv>.tv-return-link{position:fixed;left:50%;bottom:3px;transform:translateX(-50%);z-index:9;min-height:22px;padding:2px 9px;color:#ead9b4;font-size:11px;background:#241f18d9;border-radius:5px}
.return-qr-dialog{width:min(620px,94vw);max-height:94dvh;padding:20px;text-align:center}.return-qr-dialog .section-heading{gap:12px;margin-bottom:12px}.return-qr-dialog h2{font-size:clamp(22px,3vw,32px);margin:0}.return-qr-dialog .section-heading button{min-height:38px;padding:6px 12px}.return-qr-panel img{display:block;width:min(52dvh,520px);height:min(52dvh,520px);max-width:100%;margin:0 auto;object-fit:contain;background:white}.return-qr-panel p{font-size:14px;line-height:1.5;margin:12px auto 0;max-width:480px}.return-qr-panel>a{display:inline-block;margin-top:10px}

/* Player end screen contains scores and the continuation choice only. */
.phone-results-mode{height:auto;min-height:100dvh;overflow:auto;background:var(--paper)}.phone-results-mode #effects,.phone-results-mode #room-video-corner{display:none!important}.phone-results-only{width:100%;max-width:650px;padding:16px 12px;margin:0 auto}.phone-results-only>.results{margin:0;padding:18px 14px}.phone-results-only .results>h2{font-size:28px;margin:0 0 14px;text-align:center}.phone-results-only table{table-layout:fixed;font-size:14px;margin:12px 0;width:100%}.phone-results-only th,.phone-results-only td{padding:11px 5px;overflow-wrap:anywhere;vertical-align:middle}.phone-results-only th:first-child{width:46%}.phone-results-only th:not(:first-child){width:27%}.phone-results-only .match-total-row{font-weight:750;background:#e9eddf}.phone-results-only .continue-round{margin-top:18px;padding-top:16px}.phone-results-only .continue-round h2{font-size:27px;margin:0 0 14px}.phone-results-only .continue-round button{width:100%;min-height:54px;font-size:16px}@media(max-height:650px){.phone-results-only{padding:8px}.phone-results-only>.results{padding:12px}.phone-results-only .results>h2{font-size:24px;margin-bottom:8px}.phone-results-only th,.phone-results-only td{padding:8px 4px}.phone-results-only .continue-round{margin-top:12px;padding-top:12px}}

.emoji-dialog{width:min(430px,94vw);max-height:90dvh;overflow:auto;border:1px solid #bcc9b5;border-radius:16px;padding:22px;color:var(--ink);background:var(--paper)}.emoji-dialog::backdrop{background:#102b2780}.emoji-dialog h2{font-size:26px;margin:0 0 16px}.emoji-dialog fieldset{border:0;padding:0;margin:0}.emoji-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.emoji-choices label{margin:0;cursor:pointer;position:relative}.emoji-choices input{position:absolute;opacity:0;width:1px;height:1px;min-height:0}.emoji-choices span{display:flex;justify-content:center;align-items:center;font-size:32px;min-height:58px;border:2px solid transparent;border-radius:10px;background:white}.emoji-choices input:checked+span{border-color:var(--green);background:#e7efdf}.emoji-choices input:focus-visible+span{outline:3px solid var(--gold)}.emoji-error{color:#a33020}.display-mode .effect{font-size:clamp(24px,3vw,48px);overflow-wrap:anywhere}.effect>span{min-width:0;overflow-wrap:anywhere}

/* TV totals live on the upper rail, leaving the playing area full height. */
.tv-team-corners{position:absolute;inset:0;pointer-events:none;z-index:3}.tv-team-corner{position:absolute;top:10px;display:flex;align-items:center;justify-content:space-between;gap:12px;width:clamp(180px,24vw,370px);max-width:calc(50% - 140px);padding:7px 12px;border:1px solid #caa76a80;border-radius:10px;background:#132e26ed;color:#f5e2b9;box-shadow:0 3px 10px #0003}.tv-team-corner-0{left:clamp(18px,2vw,38px)}.tv-team-corner-1{right:clamp(18px,2vw,38px)}.tv-team-corner>div{min-width:0}.corner-team-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(14px,1.2vw,23px);font-weight:700}.tv-team-corner small{margin-top:3px;color:#d7c89f;font-size:clamp(10px,.75vw,14px)}.tv-team-corner>strong{font-family:Georgia,serif;font-weight:400;font-size:clamp(28px,2.6vw,48px);line-height:1;white-space:nowrap;flex-shrink:0;color:#f5d58b}.display-mode.playing-mode .tv .luxury-table>.game-clock{top:auto;right:20px;bottom:10px}.display-mode.playing-mode .tv>.scorebar{display:none}@media(max-width:1050px),(max-height:650px){.tv-team-corner{top:6px;padding:5px 8px;gap:8px;max-width:calc(50% - 125px)}.tv-team-corner>strong{font-size:27px}.display-mode.playing-mode .tv .luxury-table>.game-clock{right:16px;bottom:7px}}

/* Put opening limits on the upper rail and keep only a compact label above the cards. */
.tv-team-corner .corner-team-info{min-width:0;flex:1}
.tv-team-corner .corner-team-totals{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0;gap:0}
.tv-team-corner .corner-team-totals>strong{font-family:Georgia,serif;font-weight:400;font-size:clamp(28px,2.6vw,48px);line-height:1;white-space:nowrap;color:#f5d58b}
.tv-team-corner .corner-team-totals>small{margin:3px 0 0;line-height:1.1}
.tv-team-corner .tv-opening{display:grid;grid-template-columns:auto auto;justify-content:start;align-items:baseline;gap:1px 5px;margin:3px 0 0;padding:0;border:0;background:none;font-size:clamp(10px,.75vw,14px);line-height:1.1;color:#d7c89f;letter-spacing:0}
.tv-team-corner .tv-opening b{font-size:clamp(12px,.95vw,18px);white-space:nowrap;color:#ffe2a0}
.tv-team-corner .tv-opening .opening-state{grid-column:1/-1;font-size:clamp(9px,.65vw,12px);line-height:1.1;color:#d7c89f}
.tv-team-corner .tv-opening.is-open .opening-state{color:#b7d9b1}
.display-mode.playing-mode .tv .luxury-table .team-table-heading.compact-team-heading{min-width:0;flex-shrink:0;margin:0 0 4px;padding:0}
.display-mode.playing-mode .tv .luxury-table .compact-team-heading h2{font-family:inherit;font-size:clamp(11px,.85vw,17px);font-weight:650;line-height:1.15;letter-spacing:.3px;color:#d8c390;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;min-width:0}
@media(max-width:1050px),(max-height:650px){.tv-team-corner .corner-team-totals>strong{font-size:27px}.tv-team-corner .tv-opening{gap:1px 4px;margin-top:2px;font-size:9px}.tv-team-corner .tv-opening b{font-size:11px}.tv-team-corner .tv-opening .opening-state{font-size:8px}}

.tv-team-corner .corner-team-totals>.corner-red-threes{color:#ff6961;font-weight:700}

.display-mode.playing-mode .tv .luxury-table .team-melds{padding-left:clamp(4px,.6vw,8px);padding-right:clamp(4px,.6vw,8px)}
.display-mode.playing-mode .tv .luxury-table .melds{column-gap:clamp(6px,.6vw,9px)}

.finish-question{position:fixed;left:50%;top:20%;transform:translateX(-50%);z-index:45;max-width:92vw;width:420px;background:#fffefb;color:#203b33;border:3px solid #d8b771;border-radius:14px;padding:20px;box-shadow:0 8px 40px #0005;text-align:center}.finish-question strong{font-size:24px}.finish-question p{margin:12px 0}.finish-question .row{justify-content:center}.finish-question button{min-width:100px}.display-mode .finish-question{width:650px}.display-mode .finish-question strong{font-size:36px}.display-mode .finish-question p{font-size:24px}

/* Confirm one group, then select the next from the remaining cards. */
.hand .card.is-planned{filter:grayscale(1);opacity:.42;cursor:default;transform:none;outline:0}.planned-label{position:absolute;left:0;right:0;bottom:5%;background:#404940;color:white;text-align:center;font:700 10px/1.5 sans-serif}.planned-groups{display:grid;gap:6px}.planned-group{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--line)}.planned-group>strong{font-size:13px;white-space:nowrap}.planned-tokens{display:flex;gap:4px;flex-wrap:wrap;flex:1}.planned-tokens>span{border:1px solid #bdc8b4;border-radius:4px;background:white;padding:4px;font-weight:650;font-size:14px}.plan-actions{display:flex;flex-wrap:wrap;gap:6px}.plan-actions>.primary,.plan-actions>.outline{flex:1}.plan-actions>.text{width:100%}.player-mode .hand-panel .plan:not(.plan-minimized){max-height:55dvh}.player-mode .hand-panel .plan .planned-group button{min-height:36px}.player-mode .hand-panel .plan.plan-minimized{max-height:none;min-height:40px}.display-mode.playing-mode .tv .luxury-table .canasta-count{font-size:clamp(16px,calc(var(--table-card-width,60px)*.42),28px);min-width:1.35em;text-align:center;padding:2px 4px;line-height:1.15;right:1px;bottom:1px}

.display-mode.playing-mode .tv .luxury-table .canasta-face .card>span:first-child{font-size:clamp(16px,calc(var(--table-card-width,60px)*.48),34px);line-height:1.05}

.player-mode .hand .card>.planned-label,.hand .card>.planned-label{font:700 10px/1.3 sans-serif;white-space:nowrap;left:0;right:0;bottom:5%;padding:2px 0;text-align:center;align-self:auto}

.postponed-game{width:min(650px,100%);margin:20px auto;text-align:center}.postponed-game h2{font-size:32px}.postponed-game button{display:flex;width:100%;margin-top:12px}.display-mode .postponed-game{margin:8vh auto;padding:32px}.display-mode .postponed-game h2{font-size:44px}.display-mode .postponed-game p{font-size:22px}.continue-round>.outline{margin-top:10px}

/* Make selected opening points easy to read beside the hand. */
.player-mode .selection-summary{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;font-size:12px;min-width:0}.player-mode .selection .selection-points,.player-mode .plan .selection-points{display:inline-block;padding:4px 9px;border-radius:7px;background:#e4eddb;color:#203b33;font-size:24px;font-weight:750;line-height:1.15;font-variant-numeric:tabular-nums;white-space:nowrap}.player-mode .selection:has(.selection-points){gap:8px;padding:3px 0 5px}@media(max-height:600px){.player-mode .selection .selection-points,.player-mode .plan .selection-points{font-size:22px;padding:3px 7px}}
/* Account identity and first-time player profile. */
.identity-page{max-width:1040px;margin:32px auto;padding:24px;display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center}.identity-intro h1{font-size:clamp(34px,5vw,60px);line-height:1.08}.identity-intro p{max-width:44ch}.identity-faces{display:flex;margin:28px 0}.identity-faces img{width:104px;height:104px;border-radius:50%;border:3px solid #cab477;margin-right:-14px}.identity-card{padding:28px}.identity-card h2{margin-top:0}.identity-card .google-login,.identity-card form>button{width:100%}.remember-choice{display:flex;align-items:center;gap:9px;font-size:13px;margin:16px 0}.remember-choice input{width:18px;height:18px;margin:0}.legacy-login{margin-top:24px}.legacy-login summary{cursor:pointer;font-size:13px}.legacy-login form{margin-top:14px}#email-login-code{font-size:28px;letter-spacing:.3em;text-align:center}.profile-page{max-width:720px;margin:28px auto;padding:28px}.profile-page h1{margin:8px 0}.profile-person{display:flex;align-items:center;gap:20px;margin:24px 0}.profile-person label{flex:1;min-width:0}.account-avatar{display:inline-flex;width:84px;height:84px;flex:0 0 auto;border-radius:50%;overflow:hidden;background:#173f35;border:2px solid #cbb377;align-items:center;justify-content:center;font-size:32px}.account-avatar img,.profile-avatar img,.avatar img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}.avatar-picker{border:0;padding:0;margin:0}.avatar-picker legend{font-weight:700}.avatar-picker h2{font-family:inherit;font-size:14px;margin:18px 0 10px;color:var(--green)}.avatar-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.avatar-option{position:relative;display:flex;flex-direction:column;align-items:center;gap:5px;padding:6px 3px;border-radius:12px;border:2px solid transparent;cursor:pointer;min-width:0}.avatar-option input{position:absolute;opacity:0;width:1px;height:1px}.avatar-option img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:50%;border:2px solid #ffffff24}.avatar-option span{font-size:11px;text-align:center;line-height:1.2}.avatar-option:has(input:checked){border-color:#eac16b;background:#d8b66c22}.avatar-option:has(input:focus-visible){outline:3px solid #fff;outline-offset:2px}.own-photo{margin:24px 0 12px;border-top:1px solid var(--line);padding-top:18px}.own-photo input{max-width:100%;padding:10px;font-size:13px}.own-photo p{margin:8px 0;font-size:13px}.join-profile{display:flex;align-items:center;gap:14px;margin:18px 0}.join-profile .account-avatar{width:56px;height:56px}.join-profile strong,.join-profile small{display:block}.join-profile small{font-size:12px;opacity:.7}.profile-avatar,.avatar{overflow:hidden}.profile-page input[readonly],.creation-setup input[readonly]{opacity:.8}
@media(max-width:650px){.identity-page{display:block;padding:16px;margin:12px auto}.identity-intro h1{font-size:34px;margin:10px 0}.identity-intro p{margin:10px 0}.identity-faces{margin:18px 0}.identity-faces img{width:66px;height:66px}.identity-card{padding:20px}.profile-page{margin:12px;padding:18px}.profile-person{gap:14px}.profile-person .account-avatar{width:68px;height:68px}.avatar-options{gap:5px}.avatar-option{padding:4px 1px}.avatar-option span{font-size:10px}.identity-page .panel{margin-top:20px}}
.uno-mode.playing-mode,.uno-mode.player-mode{height:auto;min-height:100dvh;overflow:auto}.uno-mode .room{max-width:1280px;width:100%;height:auto;overflow:visible}.uno-mode .room>.uno-game{min-height:0;overflow:visible}.uno-heading{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}.uno-heading>strong{font-size:22px;margin-right:auto}.uno-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin:12px 0}.uno-player{display:flex;flex-direction:column;gap:6px;padding:12px 16px;border:2px solid #c7cec3;background:#fffdf7;border-radius:12px;color:#203b33}.uno-player strong{font-size:19px}.uno-player b{font-size:23px}.uno-player span{font-size:14px}.uno-player.uno-current{border-color:#bd8a24;box-shadow:0 0 0 3px #e9c46a55;background:#fff4d5}.uno-table{display:flex;align-items:center;justify-content:center;gap:clamp(18px,4vw,65px);padding:30px;background:#145c4c;color:white;border:2px solid #cdb47d}.uno-table h2{font-size:30px;margin:14px 0}.uno-deck,.uno-discard{display:flex;flex-direction:column;gap:10px;align-items:center;flex-shrink:0}.uno-deck>span,.uno-discard>span{font-size:13px}.uno-back{width:100px;height:150px;display:grid;place-items:center;border:7px solid white;border-radius:14px;background:#161616;color:#fff;font-size:27px;font-weight:900;font-style:italic;box-shadow:4px 5px 0 #dccdab,7px 8px 0 #fff}.uno-card{--uno-color:#1c1c1c;width:100px;height:150px;flex-shrink:0;border:5px solid white;border-radius:13px;background:var(--uno-color);color:white;box-shadow:0 3px 9px #0004;position:relative;padding:5px;display:inline-flex;flex-direction:column;align-items:stretch;justify-content:space-between;overflow:hidden;font-family:Arial,sans-serif;min-height:0;line-height:1}.uno-red{--uno-color:#c42632}.uno-yellow{--uno-color:#f5c536;color:#252525}.uno-green{--uno-color:#15734b}.uno-blue{--uno-color:#1768af}.uno-wild{background:conic-gradient(#c42632 0 25%,#1768af 0 50%,#15734b 0 75%,#f5c536 0);color:white}.uno-face{position:absolute;inset:19% 9%;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#fffc;color:var(--uno-color);transform:rotate(-15deg);font-size:52px;font-weight:900;border:2px solid #fff}.uno-face svg{width:85%;height:85%;fill:none;stroke:currentColor;stroke-width:11;stroke-linecap:round;stroke-linejoin:round}.uno-corner{z-index:1;font-size:20px;font-weight:900;text-align:left;text-shadow:0 1px 2px #0005}.uno-bottom{transform:rotate(180deg);position:absolute;bottom:6px;right:5px}.uno-card-label{font-size:9px;font-weight:700;position:absolute;bottom:7px;left:4px;max-width:67%;line-height:1.1}.uno-own{margin-top:14px}.uno-hand{display:flex;flex-wrap:wrap;gap:12px;padding:12px 4px}.uno-hand button.uno-card{cursor:pointer;outline:3px solid #bb8a25;outline-offset:1px}.uno-hand button.uno-card:hover{transform:translateY(-6px)}.uno-hand button.uno-card:focus-visible{outline:4px solid #064fdd}.uno-hand>div.uno-card{opacity:.65}.uno-drawn{box-shadow:0 0 0 4px #e8ae29}.uno-drawn-label{position:absolute;top:37%;left:0;right:0;background:#152a22eb;color:#fff;z-index:2;font-size:13px;padding:5px;text-align:center}.uno-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}.uno-actions p{width:100%}.uno-declare{display:flex;align-items:center;gap:9px;padding:12px;border:2px solid #b68c2b;border-radius:8px;background:#fff4cc}.uno-declare input{width:24px;min-height:24px;height:24px;margin:0}.uno-color-name{display:inline-flex;padding:10px 20px;border-radius:20px;font-size:21px;font-weight:700;border:2px solid white}.uno-badge-red{background:#b51f2c!important;color:white!important}.uno-badge-yellow{background:#f6ca40!important;color:#202020!important}.uno-badge-green{background:#146441!important;color:white!important}.uno-badge-blue{background:#155b9d!important;color:white!important}.uno-badge-wild{background:#292929;color:white}.uno-colors{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.uno-colors button{min-height:64px;border:2px solid #fff;border-radius:9px;font-size:18px}.uno-color-dialog{width:min(440px,94vw);padding:26px;border:0;border-radius:18px;background:#fffdf7;color:#203b33}.uno-color-dialog::backdrop{background:#092d2999}.uno-reveal{border:2px solid #c79937;padding:10px}.uno-mode .statistics-panel{margin-top:20px}.uno-mode .tv>.room-heading{display:flex}.uno-mode.display-mode.playing-mode .tv{padding:24px;height:auto;display:block}.uno-mode.display-mode .uno-card{width:150px;height:225px}.uno-mode.display-mode .uno-face{font-size:78px}.uno-mode.display-mode .uno-corner{font-size:30px}.uno-mode.display-mode .uno-card-label{font-size:13px}.uno-mode.display-mode .uno-table{min-height:340px}.uno-mode.display-mode .uno-player strong{font-size:26px}.uno-mode.display-mode .uno-player b{font-size:36px}.uno-mode.display-mode .uno-turn-info h2{font-size:42px}.uno-mode.display-mode .uno-turn-info p{font-size:22px}.uno-mode.display-mode .uno-back{width:150px;height:225px;font-size:42px}.uno-mode .uno-lobby{max-width:1000px;margin:20px auto}.uno-mode .uno-lobby .qr-card{max-width:440px;margin:22px auto}.uno-mode .uno-lobby>button{margin:8px}.uno-mode [hidden]{display:none!important}@media(max-width:600px){.uno-mode.player-mode .room{padding:9px;display:block}.uno-roster{grid-template-columns:repeat(2,1fr);gap:6px}.uno-player{padding:8px 10px;gap:3px}.uno-player strong{font-size:15px}.uno-player b{font-size:18px}.uno-player span{font-size:12px}.uno-table{gap:15px;padding:16px 10px;flex-wrap:wrap}.uno-turn-info{width:100%;text-align:center}.uno-table h2{font-size:25px;margin:8px 0}.uno-turn-info p{margin:6px 0}.uno-card{width:80px;height:120px;border-width:4px}.uno-face{font-size:40px}.uno-corner{font-size:16px}.uno-card-label{font-size:8px}.uno-back{width:80px;height:120px;font-size:23px}.uno-hand{gap:10px;justify-content:center}.uno-own{padding:14px 10px}.uno-own h2{font-size:22px}.uno-heading{gap:8px}.uno-heading>strong{font-size:18px}.uno-heading>span{font-size:14px}.uno-actions button{flex:1}.uno-mode.player-mode .room>.room-heading{display:flex;height:auto}.uno-mode.player-mode .room>.room-heading h1{font-size:23px}.uno-mode.player-mode .room>.room-heading .row{flex-wrap:wrap}}

form [hidden]{display:none!important}.uno-table p{color:white}.uno-menu{position:relative}.uno-menu[open]{background:#fffdf7;padding:10px;border-radius:8px;z-index:5}.uno-menu button{display:block;margin-top:8px}.uno-mode.player-mode header,.uno-mode.player-mode .room>.room-heading,.uno-mode.player-mode .tv-session-panel{display:none!important}.uno-mode.player-mode .room{padding-top:12px}.uno-mode.player-mode .uno-heading{margin-bottom:8px}.uno-mode .uno-color-name{color:white}.uno-mode .uno-badge-yellow{color:#202020}.uno-mode .uno-table .uno-discard>.uno-card{opacity:1}
.profile-page h1{font-size:clamp(36px,6vw,54px);line-height:1.12;letter-spacing:-1.4px}.avatar-option{margin:4px 0}.avatar-picker h2{font-weight:650}.identity-page h1{letter-spacing:-1.5px}
@media(max-width:600px){.uno-mode.player-mode .uno-player{display:grid;grid-template-columns:1fr auto;padding:7px 9px}.uno-mode.player-mode .uno-player strong{font-size:13px;overflow-wrap:anywhere}.uno-mode.player-mode .uno-player b{font-size:14px}.uno-mode.player-mode .uno-player span{grid-column:1 / -1;font-size:11px}.uno-mode.player-mode .uno-roster{gap:5px;margin:7px 0}.uno-mode.player-mode .uno-table{display:grid;grid-template-columns:61px 61px 1fr;gap:12px;padding:12px 9px}.uno-mode.player-mode .uno-table .uno-card,.uno-mode.player-mode .uno-back{width:60px;height:90px;border-width:3px;border-radius:9px}.uno-mode.player-mode .uno-back{font-size:18px}.uno-mode.player-mode .uno-table .uno-face{font-size:30px}.uno-mode.player-mode .uno-table .uno-corner{font-size:12px}.uno-mode.player-mode .uno-table .uno-card-label{font-size:6px}.uno-mode.player-mode .uno-deck>span,.uno-mode.player-mode .uno-discard>span{font-size:9px;text-align:center}.uno-mode.player-mode .uno-turn-info{width:auto;text-align:left}.uno-mode.player-mode .uno-turn-info h2{font-size:21px}.uno-mode.player-mode .uno-turn-info p{font-size:12px}.uno-mode.player-mode .uno-color-name{font-size:14px;padding:6px 10px}.uno-mode.player-mode .uno-hand .uno-card{width:74px;height:111px}.uno-mode.player-mode .uno-hand{gap:9px;padding:8px 0}.uno-mode.player-mode .uno-own{margin-top:9px}.uno-mode.player-mode .uno-heading button{min-height:36px;padding:8px 12px}.uno-mode.player-mode .uno-heading{gap:6px}.uno-mode.player-mode .uno-heading>span{font-size:12px}.uno-mode.player-mode .uno-own h2{font-size:21px}}
.uno-mode.display-mode .uno-heading>button{color:#f8ecd0;border-color:#9a957e}.uno-mode.display-mode .uno-game>details.panel{color:#203b33}.uno-mode.display-mode .uno-game>details.panel summary{color:#203b33}.uno-mode.display-mode .uno-results{color:#203b33}

.statistics-avatar{display:inline-flex;vertical-align:middle;width:28px;height:28px;overflow:hidden;border-radius:50%;align-items:center;justify-content:center}.statistics-avatar img{width:100%;height:100%;object-fit:cover}
.rankings-page{max-width:1200px}.rankings-page>h1{font-size:clamp(36px,6vw,64px)}.rankings-page #ranking-filters{margin:24px 0;gap:18px}.rankings-page #ranking-filters label{flex:1;min-width:160px}.rankings-page select{display:block;width:100%;padding:12px;margin-top:8px;border:1px solid #b8c6b2;border-radius:7px;background:#fffefb;font:inherit}.ranking-table table{border-collapse:collapse;width:100%;margin:18px 0 30px;font-size:14px}.ranking-table caption{text-align:left;font:26px Georgia,serif;padding:12px 0}.ranking-table th,.ranking-table td{padding:12px 9px;border-bottom:1px solid #d8dfd0;text-align:right;white-space:nowrap}.ranking-table th:first-child{text-align:left;white-space:normal;min-width:150px}.rankings-page .panel{margin-bottom:22px}.ranking-awards{border-bottom:1px solid #d8dfd0;padding:12px 0}.achievement{display:inline-block;margin:4px;padding:6px 10px;border-radius:18px;background:#eadbb4;color:#513c15;font-size:13px}.ranking-public-choice{display:flex;align-items:center;gap:10px;line-height:1.5}.ranking-public-choice input{width:20px;height:20px;min-height:20px;margin:0;flex:0 0 20px}.ranking-badge{display:block;font-size:11px;color:#8a6829;font-weight:400;margin-top:5px}

.ranking-awards-inline{font-weight:400;font-size:12px;margin-top:5px}.ranking-awards-inline summary{cursor:pointer;color:#8a6829}.ranking-awards-inline ul{padding-left:17px;line-height:1.6;min-width:150px}
.shanghai-mode.playing-mode,.shanghai-mode.player-mode{height:auto;min-height:100dvh;overflow:auto}.shanghai-mode .room{max-width:1380px;width:100%;height:auto;overflow:visible}.sh-game{min-width:0}.sh-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}.sh-heading>strong{font-size:23px}.sh-heading>span{flex:1;font-size:17px}.sh-heading details[open]{background:#fffdf5;color:#203b33;padding:12px;border-radius:8px;z-index:4}.sh-heading details button{display:block;margin-top:8px}.sh-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin:12px 0}.sh-roster>div{display:flex;flex-direction:column;gap:5px;border:2px solid #c4cdbd;border-radius:10px;padding:10px;background:#fffdf5;color:#203b33}.sh-roster strong{font-size:18px}.sh-roster b{font-size:22px}.sh-roster span{font-size:12px}.sh-roster .sh-current{background:#fff1c7;border-color:#b88b28;box-shadow:0 0 0 2px #e7ca81}.sh-card{width:84px;height:118px;display:inline-flex;flex-direction:column;justify-content:space-between;position:relative;flex-shrink:0;border:1px solid #b3b8ac;border-radius:8px;background:#fffefa;color:#172e29;padding:5px;box-shadow:0 2px 5px #0003;line-height:1;min-height:0;font-family:Georgia,serif}.sh-card>span:first-child{font-size:24px;font-weight:700;z-index:1;align-self:flex-start}.sh-card small{display:block;font-size:14px}.sh-card b{position:absolute;inset:20% 10%;display:grid;place-items:center;font-size:43px}.sh-card-bottom{font-size:23px;align-self:flex-end;transform:rotate(180deg)}.sh-red{color:#b72b33}.sh-hand{display:flex;flex-wrap:wrap;gap:10px;padding:16px 2px}.sh-hand button{cursor:pointer}.sh-selected{outline:3px solid #bd902d;transform:translateY(-5px);background:#fff7d7}.sh-reserved{opacity:.38;filter:grayscale(1)}.sh-card em{position:absolute;left:0;right:0;bottom:10%;background:#596257;color:white;font:10px/1.4 Arial;text-align:center}.sh-back,.sh-empty{width:84px;height:118px;border:5px solid #fff;border-radius:9px;background:repeating-linear-gradient(45deg,#174d42 0 5px,#1f6354 5px 10px);display:grid;place-items:center;color:#efdb9c;font-size:34px;box-shadow:3px 3px #d9cdaa}.sh-empty{background:#e9eddf;color:#516254;font-size:15px}.sh-piles{display:flex;gap:24px;align-items:center;justify-content:center;background:#145747;border-color:#bca367;color:#fff}.sh-piles>div:not(.sh-turn){display:flex;align-items:center;flex-direction:column;gap:8px;flex-shrink:0}.sh-piles small{font-size:12px;text-align:center}.sh-piles p{color:#fff}.sh-turn h2{font-size:30px;margin:8px 0}.sh-turn button{margin:4px}.sh-own{margin-top:12px}.sh-own h2{font-size:26px}.sh-group-controls{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:10px 0}.sh-group-controls label{flex:1;min-width:170px;font-size:13px}.sh-group-controls select{margin-top:5px}.sh-planned{display:grid;gap:7px;margin:12px 0}.sh-planned>div{display:flex;align-items:center;gap:8px;border-bottom:1px solid #d5dbcd;padding:5px}.sh-planned span{flex:1;font-size:15px}.sh-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.sh-protect{display:flex;align-items:center;gap:8px;width:100%;font-size:13px}.sh-protect input{width:22px;height:22px;min-height:22px;margin:0}.sh-buy{background:#fff3c8;border:2px solid #bf8c24;margin:12px 0}.sh-buy h2{font-size:27px}.sh-buy button{margin-right:10px}.sh-alert{color:#a12c20;font-weight:700}.sh-melds{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;margin:12px 0}.sh-meld{min-width:0;background:#e8eddf;border:1px solid #c7d1bf;border-radius:9px;padding:10px;color:#203b33}.sh-meld>strong{display:block;font-size:15px;margin-bottom:8px}.sh-meld>div{display:flex;flex-wrap:wrap;gap:4px}.sh-meld .sh-card{width:48px;height:67px;padding:3px;border-radius:5px}.sh-meld .sh-card>span:first-child,.sh-meld .sh-card-bottom{font-size:17px}.sh-meld .sh-card small{font-size:10px}.sh-meld .sh-card b{font-size:23px}.shanghai-mode .sh-lobby{max-width:1000px;margin:20px auto}.sh-lobby>button{margin:8px}.sh-lobby .qr-card{max-width:420px;margin:20px auto}.shanghai-mode .tv-session-panel,.shanghai-mode.player-mode header,.shanghai-mode.player-mode .room>.room-heading{display:none!important}.shanghai-mode:not(.playing-mode) .tv-session-panel{display:block!important}.shanghai-mode.player-mode .room{display:block;padding-top:12px}.shanghai-mode.display-mode.playing-mode .tv{height:auto;display:block;padding:18px}.shanghai-mode.display-mode .room>.room-heading{display:flex}.shanghai-mode.display-mode .sh-heading>button{color:#f5e8c5}.shanghai-mode.display-mode .sh-roster{margin:7px 0}.shanghai-mode.display-mode .sh-roster strong{font-size:21px}.shanghai-mode.display-mode .sh-roster b{font-size:27px}.shanghai-mode.display-mode .sh-piles{padding:12px;gap:30px;min-height:150px}.shanghai-mode.display-mode .sh-melds{grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:8px}.shanghai-mode.display-mode .sh-meld{padding:7px}.shanghai-mode.display-mode .sh-meld .sh-card{width:36px;height:50px;padding:2px}.shanghai-mode.display-mode .sh-meld .sh-card>span:first-child,.shanghai-mode.display-mode .sh-meld .sh-card-bottom{font-size:16px}.shanghai-mode.display-mode .sh-meld .sh-card small{font-size:8px}.shanghai-mode.display-mode .sh-meld .sh-card b{font-size:19px}.shanghai-mode.display-mode .sh-game>details.panel{color:#203b33}.shanghai-mode.display-mode .sh-game>details.panel summary{color:#203b33}.shanghai-mode .sh-results{color:#203b33}@media(max-width:600px){.shanghai-mode.player-mode .room{padding:8px}.sh-heading{gap:7px;margin-top:6px}.sh-heading>strong{font-size:19px}.sh-heading>span{width:100%;flex:initial;order:4;font-size:14px;padding:7px;background:#e6eddc;border-radius:6px}.sh-heading>button{min-height:34px;padding:6px 9px}.sh-roster{grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:5px;margin:7px 0}.sh-roster>div{padding:6px;gap:3px}.sh-roster strong{font-size:13px}.sh-roster b{font-size:16px}.sh-roster span{font-size:10px}.sh-piles{padding:10px;gap:12px}.sh-piles .sh-card,.sh-back,.sh-empty{width:52px;height:73px;border-radius:6px}.sh-piles .sh-card>span:first-child,.sh-piles .sh-card-bottom{font-size:18px}.sh-piles .sh-card b{font-size:25px}.sh-piles .sh-card small{font-size:10px}.sh-piles>div small{font-size:9px}.sh-turn{flex:1;min-width:0}.sh-turn h2{font-size:22px}.sh-turn p{font-size:11px;margin:5px 0}.sh-turn .row{gap:5px}.sh-turn button{font-size:12px;padding:8px;min-height:36px;margin:0}.sh-own{padding:12px 8px}.sh-own h2{font-size:22px}.sh-hand{gap:5px;padding:10px 0;justify-content:center}.sh-hand .sh-card{width:52px;height:73px;padding:3px;border-radius:5px}.sh-hand .sh-card>span:first-child,.sh-hand .sh-card-bottom{font-size:19px}.sh-hand .sh-card b{font-size:26px}.sh-hand .sh-card small{font-size:11px}.sh-group-controls{gap:6px}.sh-group-controls label{min-width:130px;font-size:11px}.sh-group-controls select{padding:8px;font-size:12px;min-height:38px}.sh-group-controls button{flex:1;padding:9px;font-size:12px;min-height:38px}.sh-actions>button{flex:1}.sh-planned>div{flex-wrap:wrap}.sh-planned span{font-size:13px}.sh-buy{padding:14px}.sh-buy h2{font-size:23px}.sh-buy p{font-size:13px}.sh-buy button{width:100%;margin:5px 0}.sh-melds{grid-template-columns:1fr 1fr;gap:6px}.sh-meld{padding:6px}.sh-meld>strong{font-size:12px}.sh-meld .sh-card{width:32px;height:45px;padding:2px}.sh-meld .sh-card>span:first-child,.sh-meld .sh-card-bottom{font-size:14px}.sh-meld .sh-card small{font-size:8px}.sh-meld .sh-card b{font-size:17px}}

.sh-piles small{color:#f0ead7}.shanghai-mode.display-mode .sh-lobby{color:#203b33}.shanghai-mode.display-mode .sh-buy{color:#203b33}

.shanghai-mode [hidden]{display:none!important}

.shanghai-mode.display-mode .sh-density-low{grid-template-columns:repeat(auto-fit,minmax(270px,1fr))}.shanghai-mode.display-mode .sh-density-low .sh-card{width:72px;height:101px;padding:4px}.shanghai-mode.display-mode .sh-density-low .sh-card>span:first-child,.shanghai-mode.display-mode .sh-density-low .sh-card-bottom{font-size:30px}.shanghai-mode.display-mode .sh-density-low .sh-card small{font-size:15px}.shanghai-mode.display-mode .sh-density-low .sh-card b{font-size:38px}.shanghai-mode.display-mode .sh-density-mid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}.shanghai-mode.display-mode .sh-density-mid .sh-card{width:50px;height:70px}.shanghai-mode.display-mode .sh-density-mid .sh-card>span:first-child,.shanghai-mode.display-mode .sh-density-mid .sh-card-bottom{font-size:21px}.shanghai-mode.display-mode .sh-density-mid .sh-card b{font-size:27px}
.qr-reader{width:min(520px,calc(100vw - 28px));max-height:90dvh;overflow:auto;border-radius:18px;padding:25px}.qr-reader video{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#171c22;border-radius:12px}.qr-reader-status{min-height:3em}.qr-reader form{display:grid;gap:12px;margin-bottom:16px}.ready-start-dialog{width:min(520px,calc(100vw - 28px));border-radius:18px;padding:28px}.ready-start-dialog h2{font-size:1.8rem}.ready-start-dialog::backdrop,.qr-reader::backdrop{background:#111b2bc9}.new-game-setup>summary{font-size:1.3rem;font-weight:bold;cursor:pointer;padding:16px;border-radius:10px;background:#173d35;color:#fff}.new-game-setup[open]>summary{margin-bottom:20px}.player-join-entry{margin:20px 0}.account-play-actions .row{flex-wrap:wrap;gap:12px}
.dashboard-intro{padding:36px 0 12px}.dashboard-intro h1{font-size:clamp(2rem,5vw,3.5rem);overflow-wrap:anywhere}.dashboard-intro p{margin-bottom:0}
.home .entry{display:block}.home .entry>.secondary{width:100%;max-width:none;grid-column:auto}

@media(max-width:950px){.display-mode:not(.playing-mode) #app>header{height:auto;min-height:54px;flex-wrap:wrap;gap:12px}.display-mode:not(.playing-mode) #app>header nav{flex-wrap:wrap;gap:10px 16px}}

.home-editor [data-home-rows]{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:0 1rem}.home-editor-actions{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.home-editor-actions button{min-height:44px}.home-editor .home-name-row input{width:100%;min-width:0}

/* Player microphone and TV home selection, 2026-11-02. */
.microphone-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:66px;min-height:44px;padding:7px 10px;border:1px solid #8e9d92;border-radius:9px;background:#f4f3ed;color:#394b41;line-height:1;flex-shrink:0;font-size:13px;font-weight:750}
.microphone-toggle svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.microphone-toggle.is-on{background:#247348;color:#fff;border-color:#247348}.microphone-toggle.is-on .microphone-off-line{display:none}.microphone-toggle.is-pending{background:#f1df9e;color:#473b1a}
.microphone-toggle:focus-visible,.tv-audio-home select:focus-visible,.tv-home-options button:focus-visible{outline:3px solid #c68328;outline-offset:3px}
.player-mode .tabs>.microphone-toggle{flex:0 0 62px;min-height:38px;padding:5px 7px;font-size:12px}.player-mode .tabs>.microphone-toggle svg{width:21px;height:21px}
.uno-own .section-heading,.sh-own .section-heading,.rs-own .section-heading{gap:8px;flex-wrap:wrap}.uno-own .section-heading h2,.sh-own .section-heading h2,.rs-own .section-heading h2{margin-right:auto}
.tv-audio-home{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:13px;font-weight:650;white-space:nowrap}.tv-audio-home select{min-width:145px;max-width:240px;min-height:40px;margin:0;padding:7px 10px;font-size:16px;background:#fffaf1;color:#203b33;border-radius:8px;border:1px solid #a5afa4}
.tv-home-dialog{max-width:900px;width:calc(100% - 40px);padding:36px}.tv-home-dialog h2{font-size:clamp(28px,3vw,44px);margin:0 0 18px}.tv-home-dialog>p{font-size:20px;line-height:1.5;margin:0 0 26px}.tv-home-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}.tv-home-options button{min-height:90px;font-size:clamp(22px,2.2vw,30px);padding:20px;border-width:2px;overflow-wrap:anywhere}.tv-home-options button:hover{background:#e7efdf}
#room-video-corner[hidden]{display:none!important}
@media(max-width:450px){.microphone-toggle{min-width:60px;padding:7px}.tv-home-dialog{padding:25px}.tv-home-options{grid-template-columns:1fr}.tv-home-dialog>p{font-size:17px}}

/* Visible TV speech controls, independent of camera visibility. */
.tv-audio-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;max-width:680px}.tv-audio-controls button{min-height:44px;white-space:nowrap}.tv-audio-controls [data-tv-audio-status]{display:block;flex-basis:100%;font-size:14px;line-height:1.35;font-weight:500;white-space:normal;overflow-wrap:break-word}#room-audio-receiver{position:absolute;width:1px;height:1px;overflow:hidden;pointer-events:none}#room-audio-receiver audio{width:1px;height:1px}
