:root{--bg:#f5f3ed;--ink:#183d35;--muted:#75847c;--green:#123e32;--gold:#c59646;--line:#e4e6de;--red:#b34c4c;--white:#fff;--shadow:0 14px 44px #193a3210}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.7 Tahoma,Arial,sans-serif}button,input,select,textarea{font:inherit}button,a,input,select{touch-action:manipulation}button{border:1px solid var(--line);background:white;color:var(--ink);border-radius:12px;padding:10px 17px;cursor:pointer;font-weight:700;transition:background .15s,transform .15s}button:hover{background:#edf2e9}button:active{transform:translateY(1px)}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--green);color:#fff;border-color:var(--green)}button.gold{background:#dab572;color:#2a2e1f;border-color:#dab572}button.danger{color:var(--red)}button.small{padding:6px 11px;font-size:12px}.ghost{background:transparent}input,select,textarea{width:100%;border:1px solid #dce1d6;border-radius:10px;padding:11px 13px;background:#fff;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus,button:focus-visible{outline:3px solid #c9b27a80;outline-offset:2px}label{display:block;font-size:13px;font-weight:700;margin:14px 0 7px}h1,h2,h3,p{margin:0}h1{font-size:38px;letter-spacing:-1px;line-height:1.5}h2{font-size:24px}h3{font-size:17px}small,.muted{color:var(--muted)}.num{font-variant-numeric:tabular-nums}.header{height:84px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:0 5%;background:#fbfaf7}.brand{display:flex;align-items:center;gap:12px}.brandmark{width:43px;height:43px;background:var(--green);border-radius:13px;color:#d9b56d;font-size:28px;text-align:center;line-height:43px;transform:rotate(-5deg)}.brand b{font-size:25px}.brand small{display:block;font-size:10px;letter-spacing:1px;margin-top:-7px}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.between{justify-content:space-between}.pill{display:inline-flex;align-items:center;gap:6px;border:1px solid #dce4d8;border-radius:30px;padding:4px 11px;font-size:11px;white-space:nowrap;background:#edf2e9}.pill.gold{background:#fff4dc;border-color:#e1c793;color:#8e6422}.pill.red{background:#faece9;color:var(--red)}.dot{width:6px;height:6px;background:#61a776;border-radius:50%}.wrap{max-width:1380px;margin:auto;padding:30px 5% 50px}.hero{display:grid;grid-template-columns:1.1fr 1fr;gap:50px;align-items:center;margin:12px 0 35px}.eyebrow{font-size:12px;letter-spacing:2px;color:#9c7a3c;margin-bottom:8px}.hero p{color:var(--muted);max-width:490px;margin:12px 0 18px}.mini-table{position:relative;margin:auto;width:310px;height:230px;border:12px solid #294a3d;border-radius:50%;background:radial-gradient(ellipse,#346c53,#17452f);box-shadow:0 16px 0 #122a22,0 35px 40px #183b3220;display:flex;align-items:center;justify-content:center;color:#d2b975;transform:rotate(-8deg)}.mini-table:before{content:'';position:absolute;inset:12px;border:1px solid #d5c18d55;border-radius:50%}.mini-table b{font-size:40px;opacity:.6}.mini-card{position:absolute;width:45px;height:65px;background:#fffaf0;border-radius:6px;color:#233b30;text-align:center;font:700 25px/65px Georgia;box-shadow:0 5px 10px #0003}.mini-card.one{top:155px;left:145px;transform:rotate(-15deg)}.mini-card.two{top:151px;left:178px;transform:rotate(10deg);color:#b44646}.mini-chip{position:absolute;width:45px;height:45px;border-radius:50%;background:#ead6aa;border:5px dashed #977341;top:-23px;left:119px}.panels{display:grid;grid-template-columns:1.35fr .8fr;gap:24px}.panel{background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px;box-shadow:var(--shadow)}.section-top{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:18px}.modes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.mode{text-align:right;padding:17px;min-height:105px}.mode.active{background:#eef4ee;border:2px solid #587762;padding:16px}.mode b{display:block;margin:3px 0}.mode span{font-size:12px;color:var(--muted);font-weight:400}.mode-icon{font-size:25px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.check{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:400}.check input{width:auto;accent-color:var(--green)}.hint{padding:10px 13px;border-radius:10px;background:#f5f5ee;color:#747661;font-size:12px}.history-item{padding:14px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}.history-item:last-child{border:0}.empty{text-align:center;color:var(--muted);padding:32px 10px}.subtitle{color:var(--muted);font-size:13px}.toolbar{margin:0 0 22px}.game-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px}.arena-panel{background:#eceee5;border:1px solid #e1e5da;border-radius:24px;overflow:hidden;position:relative}.arena-meta{padding:18px 22px;display:flex;align-items:center;justify-content:space-between;gap:8px}.arena-scroll{overflow:auto;padding:2px 0}.arena{height:540px;min-width:600px;position:relative;margin:0 auto;max-width:850px}.felt{position:absolute;inset:88px 100px;border:13px solid #29483c;border-radius:48%;background:radial-gradient(ellipse at 50% 35%,#31684c,#194530 75%);box-shadow:0 9px 0 #132d22,0 19px 29px #1532252e;display:flex;align-items:center;justify-content:center;text-align:center;color:#eee4cb}.felt:before{content:'';position:absolute;inset:13px;border:1px solid #cbb97960;border-radius:48%;pointer-events:none}.table-center{max-width:230px;position:relative}.table-center .table-logo{font-size:42px;opacity:.13;letter-spacing:3px;margin-bottom:6px}.table-center .main-number{font-size:30px;font-weight:700;color:#f1d59a;line-height:1.4}.table-center small{color:#b2c6af}.table-center .phase-label{font-size:12px;color:#b9c8b4}.seat{position:absolute;transform:translate(-50%,-50%);width:132px;text-align:center;z-index:1}.seat-card{border:1px solid #d9e0d2;border-radius:15px;padding:9px 8px;background:#fffef8;box-shadow:0 5px 16px #183b3212;position:relative}.seat.current .seat-card{outline:3px solid #83b696;outline-offset:3px;box-shadow:0 0 24px #82b68d44}.seat.sheikh .seat-card{border:2px solid #c39a51;background:#fff8e9}.seat.out{opacity:.42}.seat.passed .seat-card{background:#eceee8}.avatar{width:31px;height:31px;border-radius:50%;margin:0 auto 2px;background:#e9eee4;color:#4c6851;font-weight:bold;line-height:31px}.seat b{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.seat .balance{font-size:16px;font-weight:bold;line-height:1.4}.seat .status{font-size:10px;color:#87907d;white-space:nowrap}.seat .bid{font-size:11px;color:#917037;margin-top:4px}.seat-label{position:absolute;top:-13px;right:50%;transform:translateX(50%);background:#d8b66c;border-radius:10px;color:#483916;font-size:10px;white-space:nowrap;padding:0 9px}.dealer{position:absolute;left:-6px;top:5px;border:2px solid #fff;background:#385948;color:#fff;width:23px;height:23px;border-radius:50%;font-size:10px;line-height:19px}.backs{display:flex;justify-content:center;height:22px;gap:2px;margin-top:5px}.back{width:16px;height:22px;border-radius:3px;background:repeating-linear-gradient(45deg,#3e6050,#3e6050 2px,#547562 2px,#547562 4px);border:2px solid #eee7d4}.arena-foot{padding:12px 20px;font-size:11px;color:#798573;border-top:1px solid #dde2d6;text-align:center}.action-panel{margin-top:18px;padding:20px;border:1px solid var(--line);border-radius:17px;background:#fff}.action-panel h3{margin-bottom:10px}.side .panel{padding:20px;margin-bottom:16px}.stat{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid #edf0e8;font-size:13px}.stat:last-child{border:0}.progress{height:5px;background:#e9ede3;border-radius:10px;margin-top:6px;overflow:hidden}.progress i{display:block;background:#8da975;height:100%}.feed{max-height:260px;overflow:auto}.feed-item{position:relative;padding:0 12px 15px 0;border-right:1px solid #e1e6d9;font-size:12px}.feed-item:before{content:'';position:absolute;right:-4px;top:7px;width:7px;height:7px;border-radius:50%;background:#b2bf9d}.feed-item time{font-size:10px;color:#8d9685;display:block}.cards{display:flex;justify-content:center;gap:8px;margin:14px 0;direction:ltr}.card{width:65px;height:89px;border-radius:9px;background:#fffaf0;border:1px solid #d7dccf;color:#244534;font:700 28px/1 Georgia;padding:8px;text-align:left;box-shadow:0 3px 8px #0001}.card.red{color:#b04d43}.card em{font-size:28px;display:block;text-align:center;font-style:normal;margin-top:6px}.card.hidden{background:repeating-linear-gradient(45deg,#315543,#315543 3px,#3b614b 3px,#3b614b 6px);border:4px solid #f7efdd}.my-cards{text-align:center}.my-cards .hold{width:100%;margin-top:7px;user-select:none;-webkit-user-select:none;touch-action:none}.hidden-note{font-size:11px;color:var(--muted)}.notice{padding:12px 18px;border-radius:13px;background:#fff3d9;border:1px solid #e8d5ac;font-size:12px;margin-bottom:20px;color:#7d6339}.result-banner{padding:15px;background:#edf4e8;border-radius:12px;margin:12px 0}.result-banner h3{color:#3e643e}.amount-row{display:flex;gap:8px;align-items:center}.amount-row input{max-width:170px;direction:ltr;text-align:center}.offer{border:1px solid #e3e7dc;border-radius:12px;padding:12px;margin:10px 0}.manual-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.manual-player{border:1px solid var(--line);border-radius:13px;padding:14px}.manual-player input{margin:8px 0;direction:ltr}.manual-player .row button{flex:1;padding:6px}.modal{width:min(580px,94vw);max-height:88vh;border:1px solid var(--line);border-radius:20px;padding:25px;color:var(--ink);box-shadow:0 25px 80px #0003;background:#fffef9}.modal::backdrop{background:#11291ecc;backdrop-filter:blur(3px)}.modal h2{margin-bottom:12px}.modal .close{float:left}.modal .body{max-height:64vh;overflow:auto}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}td,th{padding:12px 9px;text-align:right;border-bottom:1px solid var(--line)}th{color:var(--muted);font-weight:400}.positive{color:#487954}.negative{color:var(--red)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:90vw;padding:13px 25px;background:#173e31;color:#fff;border-radius:12px;box-shadow:0 10px 40px #0003;display:none;z-index:100}.footer{text-align:center;color:#9aa18f;font-size:11px;padding:25px}.divider{height:1px;background:var(--line);margin:20px 0}.join-code{font:700 28px/1.4 monospace;letter-spacing:5px;direction:ltr}.link{color:#9a793c;text-decoration:none}.compact-check{display:inline-flex;gap:7px;align-items:center}.compact-check input{width:auto}.spark{width:100%;height:110px}.seat-mini-cards{display:flex;justify-content:center;gap:2px;direction:ltr;margin:4px 0}.seat-mini-cards span{background:#fff;border:1px solid #d9ddcf;border-radius:3px;font-size:10px;padding:0 3px}.chips{display:flex;gap:6px;flex-wrap:wrap}.chips button{font-size:11px;padding:5px 9px}.long-list{max-height:400px;overflow:auto}@media(min-width:1100px){.arena.crowded{height:650px}.arena.crowded .felt{inset:90px 100px}.arena.crowded .seat{width:112px}.arena.crowded .seat-card{padding:5px}.arena.crowded .avatar{display:none}}@media(max-width:1000px){.game-grid{grid-template-columns:1fr}.side{display:grid;grid-template-columns:1fr 1fr;gap:15px}.side .panel{margin:0}.side .my-cards{grid-column:1/-1}.hero{gap:15px}.wrap{padding:22px 4%}.header{padding:0 4%}.arena{max-width:760px}.arena.crowded{min-width:900px;height:690px}}@media(max-width:650px){.header{height:70px}.header .tagline{display:none}h1{font-size:29px}.hero{grid-template-columns:1fr;margin-bottom:25px}.hero-art{display:none}.panels{grid-template-columns:1fr}.panel{padding:19px}.wrap{padding:20px 14px}.fields{grid-template-columns:1fr 1fr}.game-grid{gap:15px}.arena{min-width:0;height:440px}.felt{inset:83px 52px;border-width:9px}.seat{width:91px}.seat-card{padding:6px 4px}.seat .balance{font-size:13px}.seat b{font-size:11px}.seat .status{font-size:9px}.avatar{width:25px;height:25px;line-height:25px;font-size:12px}.seat-label{font-size:9px;padding:0 6px}.seat .bid{font-size:10px}.table-center{max-width:160px}.table-center .table-logo{font-size:27px}.table-center .main-number{font-size:24px}.table-center .phase-label{font-size:10px}.arena-meta{padding:14px 12px}.arena-meta .pill{font-size:9px;padding:3px 7px}.arena.crowded{min-width:780px;height:620px}.side{grid-template-columns:1fr}.side .my-cards{grid-column:auto}.toolbar h2{font-size:20px}.toolbar .row{gap:6px}.toolbar button{font-size:11px;padding:7px 9px}.modes{gap:8px}.mode{padding:12px}.mode.active{padding:11px}.mini-card{display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.catalog-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:25px 0}.catalog-summary .panel{padding:18px 24px}.catalog-summary strong{display:block;font-size:30px;color:#335d3f}.archive-filters{display:grid;grid-template-columns:1fr 2fr 1fr;gap:12px;margin:15px 0}.recovery-code{margin-top:20px;font-family:monospace;font-size:17px;text-align:center;letter-spacing:1px}.seating-editor{margin-top:16px;border:1px solid var(--line);border-radius:13px;padding:12px;background:#f7f8f0}.seating-editor summary{cursor:pointer;font-size:13px;font-weight:700}.setup-circle{height:360px;min-width:370px;max-width:550px;margin:12px auto;position:relative}.seating-editor{overflow-x:auto}.setup-felt{position:absolute;inset:50px 60px;border-radius:50%;background:#315840;border:8px solid #1b3b2c;color:#ceb67d;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:28px}.setup-felt small{font-size:11px;color:#c7d3bd}.setup-seat{position:absolute;transform:translate(-50%,-50%);border:1px solid #d9ddce;border-radius:10px;background:#fff;width:90px;text-align:center;cursor:grab;box-shadow:0 3px 8px #17332112}.setup-seat span{font-size:10px;display:block;padding:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.setup-seat button{font-size:10px;padding:0 8px;border:0;background:transparent}.setup-seat button:hover{background:#e8eddd}@media(max-width:650px){.header>.row>.pill{display:none}.header .row{gap:3px}.header button{font-size:10px;padding:6px 8px}.catalog-summary{gap:8px}.catalog-summary .panel{padding:12px}.catalog-summary strong{font-size:25px}.archive-filters{grid-template-columns:1fr}.recovery-code{font-size:13px}}
.trend-chart{display:block;width:100%;height:auto;max-height:190px;direction:ltr;margin:10px 0}
.setup-circle.crowded{min-width:600px;max-width:650px;height:560px}.arena.crowded{min-width:850px}

/* v0.3: progressive entry fields, true circular seat editor and legible showdowns */
.name-fields{display:grid;gap:9px;margin-bottom:12px}.name-field{display:flex;align-items:center;gap:10px;padding:8px 10px;background:#f8faf6;border:1px solid #e0e7d9;border-radius:12px}.name-field input{flex:1;min-width:0;font-size:16px;font-weight:700}.name-number{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#dfe8d9;color:#25523b;width:30px;height:30px;flex:none;font-weight:700}.name-field button{flex:none}.setup-circle,.setup-circle.crowded{width:var(--seat-size,480px);min-width:var(--seat-size,480px);max-width:none;height:var(--seat-size,480px);margin:20px auto;position:relative}.setup-felt{inset:19%;border-radius:50%;box-shadow:0 9px 0 #163a28,0 17px 25px #163a2833;background:radial-gradient(circle,#367451,#174630)}.setup-felt small{display:block}.setup-seat{min-width:118px;width:clamp(118px,14%,148px);padding:4px 0;z-index:2;touch-action:manipulation}.setup-seat span{font-size:13px;font-weight:700}.setup-seat button{font-size:16px;min-width:34px}.arena,.arena.crowded{width:var(--arena-width,600px);min-width:var(--arena-width,600px);max-width:none;height:var(--arena-height,600px)}.felt,.arena.crowded .felt{inset:19%;border-radius:50%}.felt:before{border-radius:50%}.seat,.arena.crowded .seat{width:132px}.seat b,.arena.crowded .seat b{font-size:16px;white-space:normal;line-height:1.35;overflow-wrap:anywhere}.seat-card{padding:9px 6px}.seat .status{font-size:11px}.seat .balance{font-size:14px}.arena.crowded .avatar{display:block}.showdown-panel{margin:18px 0;padding:18px;background:#e8eee2;border:1px solid #cedecc;border-radius:18px;text-align:center}.showdown-players{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,305px),1fr));gap:13px;margin-top:14px}.showdown-player{min-width:0;padding:12px;background:#fffefa;border-radius:12px}.showdown-player h3{font-size:18px}.showdown-cards{gap:5px;flex-wrap:nowrap}.showdown-cards .card{width:clamp(46px,6vw,86px);height:clamp(75px,9vw,116px);font-size:clamp(22px,3vw,32px);padding:8px 6px}.showdown-cards .card em{font-size:clamp(22px,3vw,34px)}.seat-mini-cards span{font-size:14px;font-weight:700;padding:1px 4px}.my-cards .card{width:clamp(62px,7vw,82px);height:clamp(88px,9vw,110px)}.arena-scroll{overflow-x:auto}.seating-editor{overflow-x:auto}#name-fields + .row{margin-bottom:12px}@media(max-width:650px){.seat b,.arena.crowded .seat b{font-size:15px}.seat .balance{font-size:13px}.seat,.arena.crowded .seat{width:118px}.setup-seat span{font-size:12px}.showdown-panel{padding:12px}.showdown-cards .card{width:clamp(46px,19vw,78px);height:88px}.showdown-cards .card em{font-size:25px}}

/* v0.4 — accessible cards, shared-room controls, visual scores & mobile-first play */
:root{--surface:#fffefa;--ink-soft:#64756d;--rule:#e7eae3}
.header .row button{white-space:nowrap}
.name-field .avatar-choice{width:82px;min-width:82px;padding:10px 6px;font-size:17px;background:#edf2e9;border-color:#d4dfd0;text-align:center}
.avatar{width:43px;height:43px;line-height:42px;font-size:25px;background:linear-gradient(135deg,#e8f0e2,#f7f4e9);box-shadow:inset 0 0 0 1px #dce7da,0 2px 8px #183b3215}
.seat.out{opacity:.48;filter:saturate(.55)}
.seat.out .seat-card{box-shadow:0 0 0 2px #a94f5070,0 0 20px 5px #ae3d3a28,0 7px 24px #7d272321;border-color:#ae7070;position:relative}
.seat.out .seat-card:after{content:"";position:absolute;inset:-6px;border-radius:20px;pointer-events:none;border:1px solid #bc66664a}
.seat.sheikh .seat-card{box-shadow:0 0 0 2px #dfbb764f,0 10px 25px #8f6a2440}
.cards{gap:7px;flex-wrap:nowrap}
.card,.showdown-cards .card,.my-cards .card{padding:0;overflow:hidden;position:relative;background:#fffefa;border-radius:7px;flex-shrink:0;aspect-ratio:5 / 7;height:auto}
.card.vector-card img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}
.card.hidden{border:3px solid #f1e5cb;background:radial-gradient(circle at 50% 50%,transparent 21%,#d7b57077 22%,transparent 24%),repeating-linear-gradient(55deg,#174a3b 0 8px,#215847 8px 12px);display:flex;align-items:center;justify-content:center}
.card-back-mark{font-size:35px;color:#f8e6b3;opacity:.9;text-shadow:0 1px 4px #102c22;line-height:1}
.card.vector-card{box-shadow:0 6px 15px #102d261c;border:1px solid #c6c9c0}
.showdown-cards{display:flex;justify-content:center;gap:clamp(3px,1vw,8px);flex-wrap:nowrap;margin:14px 0 4px}
.showdown-cards .card{width:clamp(60px,6.5vw,112px)!important;max-width:calc((100% - 21px)/4);height:auto!important}
.showdown-players{grid-template-columns:repeat(auto-fit,minmax(min(100%,370px),1fr))}
.showdown-player{background:linear-gradient(155deg,#fffefa,#f1f4ef);border:1px solid #dce5d8;padding:18px;border-radius:17px}
.my-cards .card{width:clamp(55px,5.6vw,82px);height:auto}
html[data-deck="royal"] .card.vector-card img, .theme-sample.royal img{filter:sepia(.22) hue-rotate(174deg) saturate(1.18)}
html[data-deck="royal"] .card.hidden{background:repeating-linear-gradient(45deg,#132c56 0 6px,#284c78 6px 12px);border-color:#dcb874}
html[data-deck="modern"] .card.vector-card img, .theme-sample.modern img{filter:sepia(.13) hue-rotate(105deg) saturate(.78) contrast(1.05)}
html[data-deck="modern"] .card.hidden{background:repeating-linear-gradient(45deg,#0b2e2b 0 7px,#165d51 7px 14px);border-color:#b7ddd1}
.scoreboard{background:linear-gradient(154deg,#fff 2%,#f4f7ef 100%);border-color:#dce4d8}
.scoreboard .section-top{align-items:flex-start;margin-bottom:18px}
.scoreboard h3{font-size:24px;letter-spacing:-.5px}
.score-live{color:#327854;background:#e5f5e9;border:1px solid #d5e9da;border-radius:30px;font-size:11px;padding:6px 10px;white-space:nowrap}
.score-list{display:grid;gap:9px}
.score-row{display:flex;align-items:center;gap:11px;padding:12px 13px;border:1px solid #e8ede6;border-radius:14px;background:#fff;min-width:0}
.score-row:first-child{border-color:#d9c393;background:linear-gradient(95deg,#fffaf0,#fff)}
.score-rank{width:26px;font:700 15px/1 Tahoma,Arial;color:#92713f;text-align:center;flex-shrink:0}
.score-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#edf1e8;font-size:23px;flex-shrink:0}
.score-identity{min-width:0;flex:1;display:grid;line-height:1.45}
.score-identity b{font-size:17px;overflow-wrap:anywhere}
.score-identity span{font-size:10px;color:var(--ink-soft)}
.score-amount{min-width:100px;width:34%;text-align:left}
.score-amount b{font-size:17px;color:#244f3d;font-variant-numeric:tabular-nums}
.score-track{height:6px;border-radius:12px;background:#e6ebe3;overflow:hidden;margin-top:8px}
.score-track i{display:block;height:100%;border-radius:12px;background:linear-gradient(90deg,#397d65,#d6b36b);transition:width .3s}
.score-eliminated{opacity:.62;box-shadow:inset 3px 0 0 #a65b5f;background:#faf7f5}
.manual-layout .scoreboard-lead{grid-column:1 / -1;grid-row:1}
.manual-layout>div:first-of-type{grid-row:2}
.manual-layout>.side{grid-row:2}
.activity-panel{background:linear-gradient(145deg,#fffefa,#f8faf5)}
.feed-upgrade{max-height:440px;display:grid;gap:0;overflow:auto}
.feed-upgrade .feed-item{padding:14px 0;border:0;border-bottom:1px solid #e9eee7;display:flex;flex-direction:row;align-items:flex-start;gap:12px;line-height:1.45}
.feed-upgrade .feed-item:before{display:none}
.feed-upgrade .feed-item:last-child{border-bottom:none}
.feed-icon{display:grid;place-items:center;border-radius:11px;width:34px;height:34px;flex-shrink:0;background:#e7efe5;color:#426a53;font-size:17px;font-weight:bold}
.feed-copy{display:grid;gap:5px;min-width:0;flex:1}
.feed-kind{color:#94743f;font-size:10px;font-weight:700;letter-spacing:.3px}
.feed-copy b{font-size:13px;font-weight:600;color:#315242;overflow-wrap:anywhere}
.feed-copy time{font-size:10px;color:#87978b}
.delta-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;direction:ltr}
.delta-controls button{padding:8px 2px!important;font-size:12px;font-weight:700;min-width:0;border-radius:9px}
.delta-controls button:first-child,.delta-controls button:nth-child(2){color:#a64c4c;background:#fff7f6;border-color:#f1dfdb}
.delta-controls button:nth-child(3),.delta-controls button:nth-child(4){color:#2d7552;background:#eff7f0;border-color:#d6e6d9}
.manual-player{padding:13px;min-width:0;background:#fdfefa}
.manual-player b{font-size:15px}
.mobile-action-row{display:flex;flex-wrap:wrap;gap:7px;padding:10px;border-radius:12px;border:1px solid #e3e9e0;background:#f8faf6}
.mobile-action-row input{flex:1 1 115px;min-width:95px;max-width:none!important;font-size:18px;font-weight:bold;padding:12px 8px}
.mobile-action-row>button{min-height:46px;padding:9px 13px}
.mobile-action-row .stepper{background:#e8efe5;color:#28543c;min-width:50px;font-variant-numeric:tabular-nums}
.offer-action-row>button.primary,.mobile-action-row>.primary{background:#174d3b;color:white}
.modal{max-width:min(580px,calc(100vw - 20px));width:min(580px,calc(100vw - 20px));max-height:min(700px,calc(100dvh - 24px));overflow-y:auto;overscroll-behavior:contain;position:fixed;inset:0;margin:auto;padding:clamp(15px,3vw,26px);border:1px solid #dce3d7;border-radius:18px;box-shadow:0 23px 75px #09251f60}
.modal .body{max-height:none;overflow:visible;padding-bottom:2px;min-width:0}
.modal h2{font-size:21px;padding-left:35px;line-height:1.4}
.modal .close{position:absolute;left:15px;top:14px;width:36px;height:36px;display:grid;place-items:center;float:none;z-index:1}
.modal-compact{width:min(410px,calc(100vw - 22px));max-height:min(420px,calc(100dvh - 25px))}
.modal-compact p{font-size:14px;color:#5c7166}
.modal-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:19px}
.modal-actions button{flex:1;min-height:45px}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:20px}
.theme-option{border:1px solid #dce5da;background:#fafcf8;text-align:center;padding:10px 6px;display:grid;gap:4px;position:relative}
.theme-option.selected{border:2px solid #366f59;background:#edf6ef;padding:9px 5px}
.theme-option b{font-size:15px}
.theme-option small{font-size:10px}
.theme-sample{height:85px;display:flex;align-items:center;justify-content:center}
.theme-sample img{width:50px;height:70px;object-fit:contain;box-shadow:0 3px 5px #0002;border-radius:4px}
.theme-sample img+img{margin-right:-12px;transform:rotate(-8deg)}
.theme-selected{font-size:10px;color:#2c6b50}
.summary-overview{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.summary-overview>div{background:#eff5ee;border-radius:12px;padding:12px;display:grid;gap:4px;text-align:center}
.summary-overview span{color:#7e9183;font-size:11px}
.summary-overview b{font-size:16px}
@media(max-width:1000px){.manual-layout>.side{grid-row:3}.manual-layout>div:first-of-type{grid-row:2}.side .scoreboard{grid-column:1/-1}}
@media(max-width:650px){
 .toolbar{align-items:flex-start}.toolbar>.row{width:100%;display:flex;flex-wrap:wrap}
 .toolbar>.row button{min-height:36px;flex:1 0 auto}
 .scoreboard-lead{padding:14px}.scoreboard .section-top{margin-bottom:13px}
 .scoreboard h3{font-size:21px}.score-row{padding:9px 8px;gap:7px}
 .score-avatar{width:35px;height:35px;font-size:20px}.score-identity b{font-size:15px}
 .score-amount{min-width:85px;width:35%}.score-amount b{font-size:14px}
 .feed-upgrade{max-height:none}
 .manual-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr))}
 .mobile-action-row{padding:8px}.mobile-action-row input{flex-basis:90px;width:auto}
 .mobile-action-row .stepper{min-width:45px}.mobile-action-row>button{min-height:47px}
 .offer-action-row .small{flex:1}.offer .row{gap:8px}
 .modal{max-width:calc(100vw - 12px);width:calc(100vw - 12px);max-height:calc(100dvh - 16px);padding:16px 14px;border-radius:16px}
 .modal-compact{width:min(390px,calc(100vw - 16px));max-height:calc(100dvh - 30px)}
 .modal-actions{position:sticky;bottom:0;background:#fffefa;padding-top:9px}
 .showdown-cards .card{width:clamp(52px,20.5vw,88px)!important;max-width:calc((100% - 12px)/4)}
 .showdown-player{padding:12px 8px}
 .name-field{gap:6px;padding:7px 6px}.name-field .avatar-choice{width:66px;min-width:66px;font-size:16px}.name-field input{font-size:14px}
 .name-field button{padding:6px 8px;font-size:11px}
 .theme-options{gap:6px}.theme-option{padding:7px 4px}.theme-sample img{width:37px;height:53px}.theme-sample{height:66px}
}
/* Keep the wide circular table horizontally scrollable without widening the whole page. */
html,body,#app{max-width:100%;overflow-x:clip}
.game-grid,.game-grid>div,.game-grid>.side,.arena-panel,.arena-scroll,.action-panel,.panel{min-width:0}
.arena-panel,.arena-scroll{width:100%;max-width:100%}
.game-grid{grid-template-columns:minmax(0,1fr) minmax(0,300px)}
.toolbar{min-width:0}
@media(max-width:1000px){.game-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.toolbar>.row{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.toolbar>.row button{white-space:normal;min-width:0;padding:8px 3px;font-size:10px}.toolbar>.row .pill{grid-column:1/-1;justify-self:start}}
/* v0.5 — conventional cards, portrait avatars, calmer hierarchy and truly responsive game table */
body{background:#f3f5f1;color:#163c30}
.panel,.action-panel,.arena-panel{box-shadow:0 12px 35px #173a2710;border-color:#dce7dc}
button{transition:background .14s,box-shadow .14s,transform .12s}button:focus-visible,summary:focus-visible{outline:3px solid #be9c51;outline-offset:3px}
button.primary{box-shadow:0 5px 14px #174d3b20}
.room-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #dde8db;border-radius:17px;background:#fff;padding:11px 17px;margin-bottom:13px}
.toolbar-title{min-width:0}.toolbar-title h2{font-size:clamp(17px,2vw,23px);line-height:1.3}.toolbar-title .eyebrow{font-size:11px;line-height:1.4}
.toolbar-quick{display:flex;align-items:center;gap:9px;flex-shrink:0}.toolbar-quick .pill{font-size:11px;padding:7px 9px}
.share-quick{min-height:40px}.toolbar-more{position:relative}.toolbar-more>summary{list-style:none;cursor:pointer;border:1px solid #dce4db;border-radius:10px;padding:9px 12px;white-space:nowrap;font-weight:700;font-size:12px;background:#f5f8f3}.toolbar-more>summary::-webkit-details-marker{display:none}
.toolbar-more[open]>summary{background:#e8f1e8;color:#234c35}.toolbar-controls{display:flex;flex-wrap:wrap;gap:8px;padding:14px;border:1px solid #dce5d9;background:#fff;border-radius:13px;box-shadow:0 16px 35px #153d302a;position:absolute;top:calc(100% + 7px);left:0;min-width:260px;max-width:min(88vw,500px);z-index:20;direction:rtl}
.toolbar-controls button{font-size:12px;padding:8px 11px;flex:1 1 auto}.toolbar-more .toolbar-controls button{min-height:38px}
.avatar-picker{display:flex;align-items:center;gap:5px;flex:0 0 138px;min-width:0}.avatar-picker .avatar-choice{flex:1;min-width:0;width:87px!important;background:#fafcf9;font-size:11px;padding:6px 2px}.avatar-preview{height:43px;width:43px;display:block;border-radius:12px;border:1px solid #d9e4da;object-fit:cover;background:#e6ede6}
.avatar-image{display:block;width:100%;height:100%;border-radius:inherit;object-fit:cover}
.seat .avatar{width:42px;height:42px;background:#eef2eb;line-height:1;overflow:hidden;box-shadow:0 2px 8px #12372d22;margin-bottom:5px;border:1px solid #e0e8dc}
.score-avatar{padding:0;overflow:hidden}.score-avatar .avatar-image{width:100%;height:100%;border-radius:inherit}
.stat .avatar-image{display:inline-block;width:29px;height:29px;vertical-align:middle;margin-inline:4px;border-radius:9px}
#guest-join-form .avatar-picker{width:min(260px,100%);flex:initial}.guest-avatar-select{width:180px}
.arena,.arena.crowded{max-width:100%;margin-inline:auto;aspect-ratio:1;height:auto;min-height:0;position:relative}
.arena-scroll{overflow:visible;max-width:100%;padding:0 10px 2px}
.arena-foot{font-size:11px;line-height:1.5;padding:8px 13px}
.my-cards.focus-cards{margin-top:11px;text-align:center;padding:15px 16px;border:1px solid #d6e4d9;background:linear-gradient(160deg,#ffffff,#f1f6f0);border-radius:16px;box-shadow:0 8px 24px #183f3020}
.my-cards.focus-cards .section-top{margin-bottom:7px}.my-cards.focus-cards h3{font-size:17px}
.my-cards.focus-cards .cards{margin:8px 0;gap:clamp(4px,1.4vw,10px)}
.my-cards.focus-cards .card{width:clamp(50px,8vw,94px)}
.my-cards.focus-cards .hold{min-height:47px;background:#174b3a;color:white;border-color:#174b3a;touch-action:none}
.my-cards.focus-cards .hold:active{background:#287458}
.action-panel{margin-top:11px;padding:16px 20px}
.modal{background:#fffefa}
.modal::backdrop{background:#091f1ad4;backdrop-filter:blur(2px)}
.modal .body{padding-bottom:8px}
@media(max-width:1000px){
 .arena,.arena.crowded{width:min(100%,var(--arena-width,680px));min-width:0;height:auto;min-height:0}
 .game-grid{gap:13px}.side{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
 .side .panel{min-width:0}.play-main{min-width:0}
}
@media(max-width:650px){
 html,body,#app{overflow-x:clip}
 .wrap{padding:10px 10px 24px}
 .header{height:58px;padding-inline:13px}.header .brandmark{transform:scale(.83)}.header .tagline{display:none}
 .room-toolbar{gap:6px;padding:8px 10px;margin-bottom:8px;border-radius:12px;align-items:center;display:flex}
 .toolbar-title h2{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:130px}.toolbar-title .eyebrow{font-size:10px}
 .toolbar-quick{gap:5px;min-width:0}.toolbar-quick .pill{display:none}
 .share-quick{font-size:11px;padding:7px 10px;min-height:36px}
 .toolbar-more>summary{font-size:11px;min-height:36px;padding:6px 7px}
 .toolbar-controls{min-width:0;width:min(300px,calc(100vw - 30px));left:0;max-width:calc(100vw - 30px);padding:10px;gap:5px}
 .toolbar-controls button{flex:1 1 calc(50% - 6px);font-size:11px;min-height:39px}
 .game-grid{display:flex;flex-direction:column;gap:10px;min-width:0}
 .game-grid .play-main{display:flex;flex-direction:column;min-width:0}
 .arena-panel{order:1;border-radius:14px}.my-cards.focus-cards{order:2}.action-panel{order:3}.showdown-panel{order:4;margin-top:11px}
 .arena-meta{padding:6px 9px;min-height:32px;gap:4px}.arena-meta .pill{font-size:9px;padding:2px 5px}.arena-meta>b{font-size:12px}
 .arena-scroll{overflow:visible!important;padding:1px 4px 3px}
 .arena,.arena.crowded{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:1;position:relative}
 .felt,.arena.crowded .felt{inset:19%;border-width:clamp(5px,1.3vw,9px);box-shadow:0 6px 0 #142e24,0 12px 20px #142e2430}
 .felt:before{inset:5px}
 .table-center{max-width:52%;overflow:hidden}.table-center .table-logo{font-size:18px;margin:0}.table-center .phase-label{font-size:9px;line-height:1.2}
 .table-center .main-number{font-size:clamp(13px,4.2vw,20px);line-height:1.3}.table-center small{font-size:9px;line-height:1.2;display:block;overflow-wrap:anywhere}
 .seat,.arena.crowded .seat{width:clamp(59px,19vw,79px);min-width:0}
 .seat-card{border-radius:9px;padding:4px 3px}.seat .avatar{height:23px;width:23px;margin:0 auto 1px;border-radius:8px}
 .seat b,.arena.crowded .seat b{font-size:11px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .seat .balance{font-size:10px;line-height:1.2}.seat .status{font-size:9px;max-width:100%;overflow:hidden;text-overflow:ellipsis}.seat .bid{margin-top:1px;font-size:9px}
 .seat-label{font-size:8px;padding:0 4px;top:-12px}.seat .dealer{font-size:9px}
 .arena:has(.seat:nth-of-type(10)) .seat,.arena.crowded:has(.seat:nth-of-type(10)) .seat{width:clamp(42px,14vw,56px)}
 .arena:has(.seat:nth-of-type(10)) .seat .avatar{width:18px;height:18px}
 .arena:has(.seat:nth-of-type(10)) .seat b{font-size:9px}
 .arena:has(.seat:nth-of-type(10)) .seat .balance{font-size:8px}
 .arena:has(.seat:nth-of-type(10)) .seat .status{display:none}
 .arena:has(.seat:nth-of-type(10)) .seat-card{padding:3px 1px}
 .arena:has(.seat:nth-of-type(10)) .seat-label{font-size:7px}
 .seat-mini-cards{margin:0}.seat-mini-cards span{font-size:8px;padding:0 1px}
 .arena-foot{font-size:9px;padding:5px 8px}
 .my-cards.focus-cards{padding:11px 12px;margin-top:9px}.my-cards.focus-cards h3{font-size:15px}.my-cards.focus-cards .section-top{margin-bottom:2px}
 .my-cards.focus-cards .card{width:clamp(49px,14.4vw,68px)}.my-cards.focus-cards .cards{margin:5px auto}
 .my-cards.focus-cards .hold{min-height:41px;margin-top:5px;padding:7px;font-size:12px}
 .my-cards.focus-cards .hidden-note{font-size:10px}
 .action-panel{padding:12px;margin-top:8px}.action-panel h3{font-size:15px}.action-panel .section-top{margin-bottom:7px}
 .side{display:flex;flex-direction:column;gap:10px}.side>.panel{margin-bottom:0;padding:13px}
 .modal{max-width:calc(100vw - 22px);width:calc(100vw - 22px);max-height:calc(100dvh - 22px);padding:14px 13px}.modal h2{font-size:18px}
 .modal-compact{width:min(380px,calc(100vw - 28px))}
 .avatar-picker{flex:0 0 107px;gap:3px}.avatar-preview{width:34px;height:34px;border-radius:9px}.name-field .avatar-choice{width:68px!important;min-width:0;font-size:10px;padding:5px 2px}
 .name-field input{min-width:0;font-size:14px}
 .mode,.panel{min-width:0}
}
/* v0.5 follow-up: seat-order editing is responsive as well, not horizontally scrollable. */
@media(max-width:650px){
 .seating-editor{overflow:visible!important;min-width:0;padding:9px;margin-top:9px}
 .setup-circle,.setup-circle.crowded{position:relative;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;aspect-ratio:1;margin:10px auto 4px;overflow:visible}
 .setup-felt{inset:19%;border-width:clamp(5px,1.5vw,8px);box-shadow:0 5px 0 #163a28,0 10px 14px #163a2830;font-size:20px}
 .setup-felt small{font-size:8px;max-width:95%}
 .setup-seat{min-width:0;width:clamp(48px,15.5vw,64px);border-radius:8px;padding:2px 0;box-shadow:0 3px 7px #17332113}
 .setup-seat span{font-size:9px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px}
 .setup-seat button{font-size:12px;padding:0;width:23px;min-width:23px;min-height:24px}
 .setup-seat div{display:flex;justify-content:space-evenly}
 .arena:has(.seat:nth-of-type(10)) .seat-mini-cards{display:none}
}

/* v0.6 — original individual playing cards, readable amount controls, per-player results */
html[data-deck] .card.vector-card img,html[data-deck] .theme-sample img{filter:none!important}
.card.vector-card{aspect-ratio:63 / 88;border-radius:5px;overflow:hidden;background:#fff}
.card.vector-card img{height:100%;width:100%;object-fit:contain}
html[data-deck="modern"] .card.hidden{background:repeating-linear-gradient(125deg,#112e35 0 9px,#26515c 9px 18px);border-color:#9eaab1}
html[data-deck="royal"] .card.hidden{background:repeating-linear-gradient(125deg,#142448 0 9px,#324f7a 9px 18px);border-color:#e0c482}
.name-person-icon{display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;border:1px solid #dce5dd;border-radius:11px;color:#4d7161;background:#edf4ef;font-size:23px;font-weight:400}
.name-field{background:var(--name-field-bg,#f8faf6)}
.name-field .name-number{flex-shrink:0}
.manual-amount,.inline-amount{position:relative;min-width:0;flex:1 1 104px}
.manual-amount input,.inline-amount input{width:100%;min-width:0;padding-inline-end:41px!important}
.clear-amount{position:absolute;top:50%;inset-inline-end:7px;transform:translateY(-50%);border-radius:8px;padding:0;display:grid;place-items:center;width:30px;height:30px;color:#a25653;background:#f1e9e7;border:1px solid #e6d1ce;font-size:20px;line-height:1;z-index:2}
.clear-amount:hover{background:#e9d9d6}
.clear-amount:active{transform:translateY(-50%) scale(.96)}
.manual-player .manual-amount input{margin:8px 0}
.manual-player .manual-amount .clear-amount{margin:0}
.delta-controls button{font-size:15px;font-variant-numeric:tabular-nums;min-height:42px;font-weight:800}
.delta-controls button:first-child,.delta-controls button:nth-child(2){border-bottom:3px solid #a65555}
.delta-controls button:nth-child(3),.delta-controls button:nth-child(4){border-bottom:3px solid #428766}
.dealer{width:26px;height:26px;border-radius:7px;background:linear-gradient(130deg,#ecdfbd,#d2af68);border:1px solid #a7854d;box-shadow:0 1px 4px #0003;padding:3px;display:grid;place-items:center;z-index:3;transform:rotate(-13deg);line-height:1}
.dealer-back{display:grid;place-items:center;background:repeating-linear-gradient(45deg,#235547 0 3px,#2e6e57 3px 6px);border:1px solid #eff2d8;color:#d9bb75;border-radius:2px;width:100%;height:100%;font:700 9px Georgia}
.round-impact{position:relative;margin:4px 14px 12px;padding:14px 14px;display:grid;place-items:center;gap:2px;border:1px solid;border-radius:16px;box-shadow:0 10px 24px #152a1f10;text-align:center}
.round-impact span{font-size:13px;font-weight:700}
.round-impact strong{font-size:clamp(25px,4.8vw,42px);font-weight:900;line-height:1.5;font-variant-numeric:tabular-nums;unicode-bidi:isolate}
.round-impact.win{background:linear-gradient(125deg,#e9f9ed,#f5fff7);color:#1c6d3d;border-color:#b8dfc3}
.round-impact.loss{background:linear-gradient(125deg,#fff0ed,#fff9f6);color:#a03b40;border-color:#e9b9b9}
.round-impact.even{background:#f1f3f2;color:#586961;border-color:#d7dfd9}
.seat-change{display:inline-block;border-radius:7px;font-size:11px;line-height:1.4;font-weight:800;padding:2px 5px;margin:3px 0 0;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.seat-change.win{color:#206a3d;background:#e2f5e6;border:1px solid #b6d9be}
.seat-change.loss{color:#9e3941;background:#fae7e7;border:1px solid #eac0c3}
.appearance-toggle{white-space:nowrap;min-height:36px}
@media(max-width:650px){
 .appearance-toggle{font-size:0!important;min-width:39px;min-height:38px;display:inline-grid;place-items:center}
 .appearance-toggle::before{content:'◐';font-size:21px;line-height:1}
 .version-pill{display:none}
 .name-person-icon{flex-basis:30px;width:30px;height:33px;font-size:18px}
 .round-impact{margin:4px 6px 7px;padding:9px;border-radius:11px;gap:0}
 .round-impact strong{font-size:27px}
 .seat-change{font-size:9px;padding:0 2px;margin-top:1px;border-radius:4px;line-height:1.25}
 .arena:has(.seat:nth-of-type(10)) .seat-change{font-size:7px;max-width:100%}
 .seat .dealer{width:18px;height:21px;padding:2px;left:-7px;top:0;border-radius:4px}
 .seat .dealer-back{font-size:6px}
 .mobile-action-row .inline-amount{flex:1 1 100px;min-width:0}
 .mobile-action-row .inline-amount input{width:100%;padding-inline-end:34px!important}
 .mobile-action-row .clear-amount{width:28px;height:30px;inset-inline-end:3px}
}

/* Night theme: surfaces, controls, tables, dialogs and modal menus all adapt.
   The supplied SVG card faces keep their original colors for legibility. */
html[data-theme="dark"]{
 color-scheme:dark;
 --bg:#101916;--ink:#eef5ee;--muted:#9cb4a8;--green:#306b54;--gold:#e3ba73;
 --line:#334e41;--red:#f29b9b;--white:#172720;--shadow:0 13px 36px #0006;
 --surface:#1b3027;--ink-soft:#9eb6a8;--rule:#34493f;--name-field-bg:#20352b;
}
html[data-theme="dark"] body{background:#101916;color:var(--ink)}
html[data-theme="dark"] .header{background:#14231d;border-color:#2f493c}
html[data-theme="dark"] .brandmark{background:#286449;color:#f2d59b}
html[data-theme="dark"] button:not(.primary):not(.gold):not(.clear-amount){background:#263d31;color:#e9f1e8;border-color:#44604c}
html[data-theme="dark"] button:not(.primary):not(.gold):not(.clear-amount):hover{background:#315342}
html[data-theme="dark"] button.primary{background:#38795e;color:#fff;border-color:#589879}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#1a3026;color:#eef5ee;border-color:#3c5747}
html[data-theme="dark"] input::placeholder{color:#a2b5a8}
html[data-theme="dark"] .panel,html[data-theme="dark"] .action-panel,html[data-theme="dark"] .room-toolbar,html[data-theme="dark"] .modal,html[data-theme="dark"] .scoreboard,html[data-theme="dark"] .activity-panel{background:#1b2d25!important;color:#eaf3ea;border-color:#385344;box-shadow:0 13px 32px #0003}
html[data-theme="dark"] .arena-panel{background:#192f25;border-color:#385344}
html[data-theme="dark"] .arena-meta{background:#193529}
html[data-theme="dark"] .seat-card,html[data-theme="dark"] .setup-seat,html[data-theme="dark"] .showdown-player{background:#26392e;color:#f0f3e8;border-color:#52725b}
html[data-theme="dark"] .seat.sheikh .seat-card{background:#3b3727;border-color:#b79c66}
html[data-theme="dark"] .seat.out .seat-card{border-color:#a56666}
html[data-theme="dark"] .seating-editor,html[data-theme="dark"] .hint,html[data-theme="dark"] .mobile-action-row,html[data-theme="dark"] .name-field{background:#21372b;color:#cddbcc;border-color:#3e5847}
html[data-theme="dark"] .name-number,html[data-theme="dark"] .name-person-icon{background:#314d3b;color:#dbeadd;border-color:#4d6855}
html[data-theme="dark"] .score-row{background:#23392e;border-color:#3b5545;color:#f4f4ea}
html[data-theme="dark"] .score-row:first-child{background:#353c2c;border-color:#b69e5e}
html[data-theme="dark"] .score-amount b{color:#e8f5ea}
html[data-theme="dark"] .score-track{background:#375142}
html[data-theme="dark"] .score-live,html[data-theme="dark"] .pill{background:#294637;color:#cdebd6;border-color:#40634d}
html[data-theme="dark"] .pill.gold{background:#4a3d26;color:#efd39f;border-color:#a48a56}
html[data-theme="dark"] .feed-icon{background:#365741;color:#d7edda}
html[data-theme="dark"] .feed-kind{color:#e0be81}
html[data-theme="dark"] .feed-copy b{color:#e7f3e6}
html[data-theme="dark"] .feed-copy time{color:#a3b5a9}
html[data-theme="dark"] .feed-upgrade .feed-item,html[data-theme="dark"] .history-item{border-color:#3a5543}
html[data-theme="dark"] .manual-player{background:#24372c}
html[data-theme="dark"] .delta-controls button:nth-child(-n+2){background:#4a3230;color:#ffd2ce;border-color:#8f5552}
html[data-theme="dark"] .delta-controls button:nth-child(n+3){background:#294739;color:#b0e8c3;border-color:#4c8866}
html[data-theme="dark"] .clear-amount{background:#503633;color:#f8c9c1;border-color:#79544a}
html[data-theme="dark"] .round-impact.win{background:linear-gradient(120deg,#1e4431,#1e392c);color:#acf0bc;border-color:#3c8654}
html[data-theme="dark"] .round-impact.loss{background:linear-gradient(120deg,#4d292b,#3b2225);color:#ffb5b5;border-color:#965f66}
html[data-theme="dark"] .round-impact.even{background:#2b3c31;color:#d3dfd2;border-color:#506755}
html[data-theme="dark"] .seat-change.win{background:#204631;color:#b5f5c6;border-color:#3e7656}
html[data-theme="dark"] .seat-change.loss{background:#512d32;color:#ffc6c6;border-color:#875057}
html[data-theme="dark"] .result-banner,html[data-theme="dark"] .summary-overview>div{background:#294334;color:#e5f1de}
html[data-theme="dark"] .result-banner h3,html[data-theme="dark"] .catalog-summary strong{color:#cbebc9}
html[data-theme="dark"] .toolbar-more>summary,html[data-theme="dark"] .toolbar-controls,html[data-theme="dark"] .theme-option{background:#243c2e;color:#e9f2e8;border-color:#44614b}
html[data-theme="dark"] .theme-option.selected,html[data-theme="dark"] .mode.active{background:#345340;border-color:#a5c99d}
html[data-theme="dark"] .modal-actions{background:#1b2d25}
html[data-theme="dark"] .showdown-panel{background:#203c2c;border-color:#3f6b50}
html[data-theme="dark"] .my-cards.focus-cards{background:linear-gradient(160deg,#22382c,#172c25)!important;border-color:#46684c}
html[data-theme="dark"] .notice{background:#2b4936;color:#eaf0dc;border-color:#50715b}
html[data-theme="dark"] .round-impact,.seat-change{font-variant-numeric:tabular-nums}

/* Keep semantic gain/loss colors distinct in night mode (button base selectors are stronger). */
html[data-theme="dark"] .delta-controls button:nth-child(-n+2){background:#563130!important;color:#ffd4d0!important;border-color:#965d59!important}
html[data-theme="dark"] .delta-controls button:nth-child(n+3){background:#285643!important;color:#b4f1cb!important;border-color:#579773!important}
.name-person-icon{padding:6px;stroke:currentColor;fill:none;flex-shrink:0}

/* v0.7 — face-up showdown on the actual table felt */
.felt-reveal{inset:13% 14%;border-width:clamp(6px,1.1vw,12px);z-index:0}
.felt-reveal:before{inset:6px}
.table-reveal{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:clamp(3px,.6vw,7px);min-width:0;width:100%;max-width:100%;padding:6px 9px;color:#fff4d7}
.reveal-title{font-size:clamp(11px,1.2vw,16px);font-weight:800;color:#f4d49d;white-space:nowrap}
.reveal-player-picker{direction:rtl;display:flex;gap:4px;width:100%;min-width:0;max-width:100%;padding:3px 2px 6px;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain;justify-content:flex-start;align-items:center}
.reveal-player{flex:none;padding:3px 9px!important;white-space:nowrap;border-radius:25px!important;border:1px solid #cce3cf60!important;background:#173e32d9!important;color:#e5eee1!important;min-height:29px;font-size:clamp(10px,1vw,13px)}
.reveal-player.selected,.reveal-player[aria-pressed="true"]{background:#f2dbac!important;color:#254434!important;border-color:#f2dbac!important}
.reveal-player-name{font-size:clamp(12px,1.4vw,18px);line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reveal-face-cards{display:flex;justify-content:center;align-items:center;gap:clamp(3px,.6vw,8px);width:100%;min-width:0;max-width:100%;margin:1px auto}
.reveal-face-cards .card.vector-card{width:clamp(34px,6vw,85px);height:auto;aspect-ratio:63 / 88;max-width:calc((100% - 20px)/4);box-shadow:0 4px 14px #071d16a6;border:1px solid #f6ebd3;border-radius:4px}
.reveal-delta{border-radius:8px;font-weight:900;font-size:clamp(12px,1.7vw,19px);line-height:1.3;padding:0 9px;min-width:0;text-align:center}
.reveal-delta.win{color:#c4f5cb;background:#21573c}.reveal-delta.loss{color:#ffcccc;background:#60342e}.reveal-delta.even{color:#f0deb1;background:#3b5645}
.seat-revealed{color:#246644;font-size:10px;font-weight:700;margin-top:4px}
@media(max-width:650px){
 .felt-reveal,.arena.crowded .felt-reveal{inset:10% 12%;border-width:6px}
 .table-reveal{gap:3px;padding:3px 6px}
 .reveal-title{font-size:11px}.reveal-player{font-size:10px;min-height:24px;padding:2px 7px!important}
 .reveal-player-picker{padding:0 2px 3px}
 .reveal-player-name{font-size:12px}
 .reveal-face-cards .card.vector-card{width:clamp(40px,15vw,64px);max-width:calc((100% - 12px)/4)}
 .reveal-delta{font-size:12px;padding:0 6px}
 .seat-revealed{font-size:7px;white-space:nowrap}
}
@media(max-width:350px){.felt-reveal,.arena.crowded .felt-reveal{inset:9% 10%}.table-reveal{padding:2px 4px}.reveal-face-cards .card.vector-card{width:clamp(35px,14vw,49px)}}

/* v0.7: clearer Arabic typography, with safe offline system fallbacks. */
html,body{font-family:"IBM Plex Sans Arabic",system-ui,Tahoma,Arial,sans-serif}
body{line-height:1.65}
button,input,select,textarea{font-family:inherit}
h1,h2,h3,.brand b{letter-spacing:0}
/* The clear button is a separate RTL-leading control, NEVER drawn over the amount. */
.manual-player .manual-amount{display:flex;flex-direction:row;direction:rtl;align-items:center;gap:7px;min-height:48px}
.manual-player .manual-amount input{flex:1;min-width:0;width:1px;margin:0!important;padding:9px 8px!important;text-align:center;font-variant-numeric:tabular-nums}
.manual-player .manual-amount .clear-amount{position:static;inset:auto;top:auto;transform:none;order:-1;flex:0 0 36px;width:36px;height:43px;margin:0!important;border-radius:11px;font-size:23px}
.manual-player .manual-amount .clear-amount:active{transform:scale(.95)}
.manual-player .manual-amount .clear-amount:focus-visible{outline:3px solid #c9b27a;outline-offset:1px}
@media(max-width:650px){.manual-player .manual-amount .clear-amount{flex-basis:39px;width:39px;height:44px}}
