:root {
  --bg:#0b171b; --panel:#111f24; --gold:#e8ca8d; --ink:#e7ece8;
  --muted:#9bafad; --line:#ffffff16; --hand-card-w:62px; --hand-card-h:84px;
}
* { box-sizing:border-box; }
html { height:100%; }
body { margin:0; height:100vh; height:100dvh; min-height:440px; display:grid; grid-template-rows:54px minmax(0,1fr) 24px; background:var(--bg); color:var(--ink); font:14px system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
button,a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; cursor:pointer; }
button:disabled { opacity:.35; cursor:default; }
button:focus-visible,a:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
a { color:inherit; text-decoration:none; }
header { padding:0 20px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); min-width:0; gap:16px; }
.brand { display:flex; gap:9px; align-items:center; flex-shrink:0; }
.brand-icon { font-size:26px; color:var(--gold); border:1px solid #e8ca8d55; border-radius:9px; width:36px; text-align:center; }
.brand strong { font:normal 25px Georgia,serif; }
.brand em { font-style:normal; color:var(--gold); }
.brand small { display:none; }
nav { display:flex; align-items:center; gap:18px; }
.variant { font-size:9px; letter-spacing:1.7px; color:var(--muted); }
.quiet { border:0; background:none; color:#d2ddda; padding:7px 2px; font-size:12px; }
.quiet span { border:1px solid var(--muted); border-radius:50%; padding:0 5px; margin-left:4px; }
main { width:100%; max-width:1920px; margin:0 auto; min-height:0; min-width:0; display:grid; grid-template-rows:32px minmax(0,1fr); gap:8px; padding:8px 14px 0; }
.sidebar { display:flex; justify-content:space-between; align-items:center; min-width:0; padding:0 8px; gap:12px; }
.scorebox { display:flex; align-items:center; gap:24px; min-width:0; }
.eyebrow { font-size:9px; letter-spacing:1.6px; color:var(--gold); font-weight:650; }
.scoreline { display:flex; align-items:center; gap:10px; font-size:12px; }
.scoreline strong { font:22px Georgia,serif; }
.dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--gold); margin-right:7px; }
.dot.cpu { background:#7aaf9c; }
.handno { display:flex; gap:5px; align-items:center; color:var(--muted); font-size:10px; padding-left:22px; border-left:1px solid var(--line); }
.handno span { margin-left:12px; }
.historyBtn { background:none; border:0; color:var(--muted); font-size:10px; padding:6px 0; white-space:nowrap; }
.arena { display:grid; grid-template-rows:minmax(0,1fr) auto; min-width:0; min-height:0; border:1px solid #a7b7ab25; border-radius:13px; overflow:hidden; box-shadow:0 10px 30px #0002; }
.table { position:relative; min-height:0; min-width:0; display:grid; grid-template-columns:154px minmax(0,1fr); grid-template-rows:minmax(0,1fr) 24px; gap:8px 12px; padding:12px; background:radial-gradient(ellipse at 50% 30%,#225347,#123e36 65%,#10312e); border-bottom:1px solid #96b29e22; }
.draw-station { grid-row:1 / 3; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; border-right:1px solid #c4d9c31c; padding-right:12px; min-width:0; min-height:0; }
.opponent { display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; }
.avatar { width:28px; height:28px; border:1px solid #c6d8c135; border-radius:50%; display:grid; place-items:center; color:#d2e5d2; font-size:18px; }
.opponent b { font-size:12px; font-weight:500; }
.opponent small { display:block; color:#a5c2b3; font-size:10px; margin-top:3px; }
.status-chip { font-size:8px; letter-spacing:.8px; color:#b0c7ba; width:100%; text-align:center; }
.backs { display:none; }
.piles { display:flex; justify-content:center; align-items:center; gap:13px; }
.piles>div { text-align:center; }
.piles small { display:block; margin-top:9px; font-size:8px; color:#b5cdbf; letter-spacing:1px; }
.piles small b { font-weight:400; margin-left:2px; }
.card { position:relative; display:inline-flex; align-items:center; justify-content:center; background:#f7f5e9; color:#19282e; width:60px; height:84px; border:1px solid #dedbc9; border-radius:6px; box-shadow:0 3px 5px #0003; padding:0; flex-shrink:0; transition:transform .15s,box-shadow .15s; }
.card .corner { position:absolute; left:5px; top:4px; font:bold 18px/1 Georgia,serif; }
.card .corner small { display:block; font-size:15px; }
.card .bottom { left:auto; top:auto; right:5px; bottom:4px; transform:rotate(180deg); }
.card .pip { font-size:31px; line-height:1; }
.card.red { color:#b53c3e; }
.card.joker { color:#8c642b; }
.card.joker .corner { font:9px/1 Georgia,serif; writing-mode:vertical-rl; letter-spacing:1px; }
.back { background:repeating-linear-gradient(45deg,#183f4f 0 3px,#224e5d 3px 5px); border:3px solid #e1e1d0; }
.back:after { content:''; position:absolute; inset:4px; border:1px solid #b6c5b657; border-radius:2px; }
.back span { font-size:34px; color:#d5d6b6; }
.deck { box-shadow:2px 2px 0 #d1d1bd,4px 4px 0 #587269,5px 6px 5px #0003; }
.piles button:not(:disabled):hover { transform:translateY(-3px); }
.turnbanner { display:flex; align-items:flex-start; gap:8px; width:100%; padding:9px 8px; border-radius:8px; background:#091f1c83; border:1px solid #a7c3a51b; }
.turnbanner>span { display:grid; place-items:center; flex-shrink:0; border:1px solid #e8ca8d66; color:var(--gold); border-radius:50%; width:22px; height:22px; font-size:11px; }
.turnbanner b { font-size:11px; color:var(--gold); font-weight:500; line-height:1.3; }
.turnbanner small { display:block; font-size:10px; color:#b4cbbd; margin-top:4px; line-height:1.4; }
.draw-hint { font-size:9px; line-height:1.5; color:#9fb9a9; text-align:center; }
.table-melds { min-width:0; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
.meld-area { --meld-card-w:40px; --meld-card-h:56px; --meld-gap:3px; --meld-padding:7px; display:grid; grid-template-rows:22px minmax(0,1fr); gap:5px; min-width:0; min-height:0; border:1px solid #b7cfb325; border-top:3px solid #82b3a0; border-radius:8px; background:#082a2545; padding:8px; }
.meld-area.yours { border-top-color:var(--gold); background:#e8ca8d06; }
.meld-area-title { font:600 9px/1.3 system-ui,sans-serif; letter-spacing:1.2px; color:#d0dfd6; margin:0; display:flex; align-items:center; justify-content:space-between; gap:5px; }
.meld-area-title small { font-size:9px; letter-spacing:0; opacity:.7; font-weight:400; white-space:nowrap; }
.yours .meld-area-title { color:var(--gold); }
.meld-grid { min-width:0; min-height:0; display:flex; flex-wrap:wrap; align-content:flex-start; align-items:flex-start; gap:8px; overflow:auto; scrollbar-width:thin; scrollbar-color:#87aa94 #ffffff06; padding:2px; }
.no-meld { color:#afc6b8; font-size:11px; padding:8px 3px; }
.table-meld { background:#08251d66; border:1px solid #b6ccaa22; border-radius:6px; padding:var(--meld-padding); max-width:100%; }
.meld-heading { display:flex; align-items:center; justify-content:space-between; gap:5px; min-height:23px; margin-bottom:5px; font-size:10px; color:#d1e0d4; }
.meld-controls { display:flex; align-items:center; gap:3px; }
.meld-controls button { border:1px solid #e8ca8d66; background:#e8ca8d15; color:var(--gold); border-radius:4px; font-size:10px; padding:3px 5px; min-height:23px; white-space:nowrap; }
.meld-controls button:disabled { display:none; }
.meld-cards { display:flex; gap:var(--meld-gap); }
.meld-cards .card { width:var(--meld-card-w); height:var(--meld-card-h); border-radius:4px; box-shadow:none; margin:0; }
.meld-cards .card .corner { font-size:calc(var(--meld-card-w)*.33); left:3px; top:3px; }
.meld-cards .card .corner small { font-size:calc(var(--meld-card-w)*.29); }
.meld-cards .card .bottom { left:auto; top:auto; right:3px; bottom:3px; }
.meld-cards .card .pip { font-size:calc(var(--meld-card-w)*.51); }
.meld-cards .card.joker .corner { font-size:calc(var(--meld-card-w)*.17); letter-spacing:0; }
.joker-binding { display:block; font-size:9px; color:#e8d5a9; margin-top:5px; }
.new-meld-target { border:1px dashed #c3d4b52e; border-radius:5px; display:flex; align-items:center; justify-content:center; font-size:10px; color:#c2d3c6; }
.empty-table { grid-column:1 / -1; min-height:0; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px; border:1px dashed #c2d6b82a; border-radius:8px; text-align:center; padding:10px; color:#bfd2c2; }
.empty-table b { font:23px Georgia,serif; color:#d8e4d2; }
.empty-table span { font-size:11px; line-height:1.5; }
.hand-panel { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 12px; background:linear-gradient(#17282b,#122126); padding:9px 15px; min-width:0; }
.handheading { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; min-width:0; min-height:22px; }
.handheading b { font-size:10px; color:var(--muted); margin-left:10px; font-weight:400; }
.sorts { display:flex; gap:3px; }
.sorts button { background:none; border:0; color:var(--muted); font-size:10px; padding:5px 9px; border-radius:5px; }
.sorts .active { background:#ffffff0c; color:var(--ink); }
.hand { grid-column:1 / -1; display:flex; justify-content:center; min-width:0; gap:4px; padding:14px 0 8px; }
.hand .card { width:var(--hand-card-w); height:var(--hand-card-h); touch-action:none; user-select:none; -webkit-user-select:none; }
.hand .card:hover { transform:translateY(-5px); z-index:2; }
.hand .card.selected { transform:translateY(-9px); outline:2px solid var(--gold); outline-offset:2px; z-index:3; box-shadow:0 6px 14px #0005; }
.hand .card.meld:after { content:''; position:absolute; bottom:-5px; left:7px; right:7px; height:2px; border-radius:2px; background:#89bc9e; }
.hand .card.must-play { outline:2px solid #f2b968; outline-offset:2px; }
.hand .card.must-play:before { content:'DA USARE'; position:absolute; left:-2px; right:-2px; top:-13px; color:#f2cb87; font:700 7px system-ui,sans-serif; text-align:center; }
.hand-feedback { grid-column:1 / -1; min-height:16px; font-size:10px; color:var(--muted); line-height:1.4; }
.utility-actions { display:flex; align-items:center; gap:6px; }
.utility-actions button { background:#ffffff06; border:1px solid #b6c7b725; color:#c5d6cd; padding:6px 9px; font-size:10px; border-radius:5px; min-height:30px; white-space:nowrap; }
.utility-actions>span { display:none; }
.actions { display:flex; align-items:center; justify-content:flex-end; }
.actions>div { display:flex; gap:6px; align-items:center; justify-content:flex-end; }
.btn { padding:7px 12px; min-height:30px; border-radius:5px; font-size:11px; font-weight:600; white-space:nowrap; }
.secondary { background:#ffffff05; color:#c9d8d1; border:1px solid #b6c7b72b; }
.gold { background:var(--gold); border:1px solid var(--gold); color:#25362d; }
.btn:not(:disabled):hover { filter:brightness(1.12); }
.btn:not(:disabled):active { transform:translateY(1px); }
footer { display:flex; align-items:center; justify-content:space-between; padding:0 20px; width:100%; font-size:9px; color:#92a59e; letter-spacing:.3px; }
footer b { font-weight:400; color:#b6c9b6; }
.dialogClose { position:absolute; right:13px; top:10px; background:none; border:none; color:var(--muted); font-size:26px; }
dialog { color:var(--ink); background:#14282b; border:1px solid #809b864f; border-radius:15px; max-width:600px; width:calc(100% - 28px); max-height:calc(100dvh - 28px); overflow:auto; padding:30px; box-shadow:0 20px 100px #0008; }
dialog::backdrop { background:#030e12bb; backdrop-filter:blur(6px); }
dialog[open] { animation:dialog-in .16s ease-out; }
dialog h2 { font:30px Georgia,serif; margin:14px 0; }
dialog p,dialog li { font-size:13px; line-height:1.7; color:#b8c9c1; }
dialog li { padding:5px 0; }
dialog small { color:var(--muted); font-size:10px; }
dialog h3 { font-size:14px; }
.confirmActions { display:flex; gap:12px; margin-top:24px; }
#resultCards { margin:20px 0; }
#resultCards .card { width:41px; height:62px; display:inline-flex; margin:3px; }
.resultGroup { margin:10px 0; }
.resultGroup .pip { font-size:22px; }
.resultGroup .corner { font-size:12px; left:3px; top:3px; }
.resultGroup .corner small { font-size:11px; }
.historyRow { display:flex; justify-content:space-between; border-bottom:1px solid var(--line); padding:12px 0; font-size:12px; }
.setting-row { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px 0; border-bottom:1px solid var(--line); }
.setting-row b { font-size:14px; font-weight:500; }
.setting-row small { display:block; margin-top:5px; }
.setting-row input { accent-color:var(--gold); width:20px; height:20px; }
.settings-note { font-size:12px; }
#toast { position:fixed; bottom:28px; left:50%; transform:translateX(-50%); padding:12px 20px; background:var(--gold); color:#17382c; box-shadow:0 4px 20px #0004; border-radius:8px; font-size:12px; opacity:0; pointer-events:none; transition:opacity .2s; max-width:90%; z-index:10; }
#toast.visible { opacity:1; }
.drag-ghost { position:fixed!important; z-index:1000!important; pointer-events:none!important; width:58px!important; height:84px!important; opacity:.88; transform:rotate(-6deg)!important; outline:2px solid var(--gold); box-shadow:0 12px 24px #0005; }
.dragging { cursor:grabbing; user-select:none; }
.drop-hover { outline:2px solid var(--gold)!important; outline-offset:2px; background-color:#e8ca8d1c!important; }
.card.recent-card { animation:card-notice 1.3s ease-out both; }
.no-motion * { animation:none!important; transition:none!important; }
@keyframes card-notice { 0% { box-shadow:0 0 0 3px #e8ca8dbb; filter:brightness(1.14); } 100% { box-shadow:0 0 0 0 #e8ca8d00; filter:brightness(1); } }
@keyframes dialog-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
/* Short desktop windows, including Windows display scaling and browser bars. */
@media(min-width:761px) and (max-height:680px) {
  :root { --hand-card-w:55px; --hand-card-h:72px; }
  body { grid-template-rows:44px minmax(0,1fr) 20px; }
  main { grid-template-rows:27px minmax(0,1fr); gap:5px; padding:5px 10px 0; }
  .table { padding:8px; gap:6px 9px; grid-template-columns:142px minmax(0,1fr); grid-template-rows:minmax(0,1fr) 20px; }
  .draw-station { gap:10px; padding-right:8px; }
  .turnbanner small,.draw-hint { display:none; }
  .opponent .avatar { display:none; }
  .opponent { gap:5px; }
  .piles .card { width:52px; height:72px; }
  .hand-panel { padding:6px 11px; gap:3px 8px; }
  .hand { padding:11px 0 6px; }
  .handheading { min-height:20px; }
  .hand-feedback { font-size:9px; min-height:14px; }
  .btn { padding:6px 10px; min-height:28px; font-size:10px; }
  .utility-actions button { padding:5px 8px; min-height:28px; font-size:9px; }
  .meld-area { padding:6px; grid-template-rows:20px minmax(0,1fr); gap:3px; }
  .meld-area-title { font-size:8px; letter-spacing:.7px; }
}
@media(min-width:761px) and (max-width:1040px) {
  header { padding:0 12px; }
  .variant { display:none; }
  .table { grid-template-columns:134px minmax(0,1fr); gap:8px; }
  .piles { gap:10px; }
  .piles .card { width:50px; height:71px; }
  .draw-station { padding-right:8px; }
  .table-melds { gap:7px; }
  .utility-actions { gap:4px; }
  .utility-actions button { padding:5px 7px; font-size:9px; }
  .actions>div { gap:4px; }
  .btn { font-size:10px; padding:6px 8px; }
  .meld-area-title { letter-spacing:.5px; }
}
/* Portrait phones: draw pile row above two simultaneously visible play areas. */
@media(max-width:760px) {
  :root { --hand-card-w:42px; --hand-card-h:61px; }
  body { min-height:570px; grid-template-rows:47px minmax(0,1fr) 21px; }
  header { padding:0 11px; gap:8px; }
  .brand-icon,.variant,#fullBtn { display:none; }
  .brand strong { font-size:23px; }
  nav { gap:12px; }
  .quiet { font-size:10px; padding:7px 0; }
  main { grid-template-rows:28px minmax(0,1fr); gap:5px; padding:5px 7px 0; }
  .sidebar { padding:0 3px; gap:4px; }
  .scorebox { gap:16px; }
  .scorebox>.eyebrow,.handno span { display:none; }
  .scoreline { font-size:10px; gap:7px; }
  .scoreline strong { font-size:20px; }
  .handno { padding-left:12px; font-size:9px; }
  .historyBtn { font-size:9px; }
  .arena { border-radius:9px; }
  .table { padding:7px; grid-template-columns:minmax(0,1fr); grid-template-rows:78px minmax(0,1fr) 20px; gap:5px; }
  .draw-station { grid-row:auto; display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:minmax(0,1fr); gap:5px 10px; border-right:0; border-bottom:1px solid #c4d9c31c; padding:0 0 6px; }
  .opponent { grid-column:1; grid-row:1; justify-content:flex-start; align-self:start; gap:4px 7px; padding-top:3px; }
  .opponent .avatar { display:none; }
  .opponent b { font-size:10px; }
  .opponent small { font-size:9px; margin-top:2px; }
  .status-chip { text-align:left; width:auto; font-size:7px; }
  .piles { grid-column:2; grid-row:1; gap:14px; align-self:center; }
  .piles .card { width:42px; height:57px; border-radius:4px; }
  .piles .card .corner { font-size:14px; left:3px; top:3px; }
  .piles .card .corner small { font-size:12px; }
  .piles .card .bottom { right:3px; bottom:3px; left:auto; top:auto; }
  .piles .card .pip { font-size:22px; }
  .back span { font-size:25px; }
  .piles small { margin-top:5px; font-size:7px; letter-spacing:.6px; }
  .turnbanner { grid-column:1; grid-row:1; align-self:end; background:none; border:0; padding:0 0 1px; gap:6px; }
  .turnbanner>span { width:18px; height:18px; font-size:9px; }
  .turnbanner b { font-size:10px; }
  .turnbanner small,.draw-hint { display:none; }
  .table-melds { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) minmax(0,1fr); gap:5px; }
  .meld-area { padding:5px 6px; grid-template-rows:17px minmax(0,1fr); gap:2px; border-top-width:2px; }
  .meld-area-title { font-size:8px; letter-spacing:.7px; }
  .meld-area-title small { font-size:8px; }
  .meld-grid { gap:5px; padding:1px; }
  .meld-heading { min-height:20px; margin-bottom:3px; font-size:9px; }
  .meld-controls button { min-height:20px; font-size:9px; padding:2px 4px; }
  .joker-binding { font-size:8px; margin-top:3px; }
  .new-meld-target { font-size:9px; }
  .empty-table { grid-row:1 / -1; }
  .empty-table b { font-size:20px; }
  .empty-table span { font-size:10px; }
  .hand-panel { display:grid; grid-template-columns:minmax(0,1fr); padding:6px 8px; gap:4px; }
  .handheading { min-height:21px; gap:6px; }
  .eyebrow { font-size:8px; letter-spacing:1px; }
  .handheading b { font-size:9px; margin-left:5px; }
  .sorts button { font-size:9px; padding:5px 6px; }
  .hand { gap:4px 3px; flex-wrap:wrap; padding:12px 0 7px; }
  .hand .card { width:var(--hand-card-w); height:var(--hand-card-h); }
  .hand .card .corner { font-size:14px; left:3px; top:3px; }
  .hand .card .corner small { font-size:12px; }
  .hand .card .bottom { left:auto; top:auto; right:3px; bottom:3px; }
  .hand .card .pip { font-size:23px; }
  .hand .card.joker .corner { font-size:7px; }
  .hand .card.must-play:before { font-size:6px; top:-11px; }
  .hand .card.selected { transform:translateY(-7px); }
  .hand-feedback { font-size:9px; line-height:1.25; min-height:23px; }
  .utility-actions { justify-content:center; gap:8px; }
  .utility-actions button { min-height:28px; font-size:9px; padding:5px 9px; }
  .actions { justify-content:center; }
  .actions>div { width:100%; justify-content:center; gap:5px; }
  .btn { min-height:32px; padding:6px 9px; font-size:10px; }
  footer { justify-content:center; padding:0 8px; font-size:8px; }
  footer>span { display:none; }
  dialog { padding:24px; }
  dialog h2 { font-size:26px; }
}
@media(max-width:390px) {
  nav { gap:9px; }
  .brand strong { font-size:21px; }
  .quiet { font-size:9px; }
  .sorts button { font-size:8px; padding:5px; }
  .btn { font-size:9px; padding:6px 7px; }
  .handheading b { margin-left:3px; }
  .scorebox { gap:12px; }
}
/* Landscape phones and very short desktop windows keep the hand in one row. */
@media(min-width:600px) and (max-height:500px) {
  :root { --hand-card-w:37px; --hand-card-h:49px; }
  body { min-height:350px; grid-template-rows:36px minmax(0,1fr) 18px; }
  main { grid-template-rows:23px minmax(0,1fr); padding:3px 6px 0; gap:3px; }
  header { padding:0 10px; }
  .brand strong { font-size:21px; }
  .brand-icon,.variant { display:none; }
  .arena { border-radius:7px; }
  .table { grid-template-columns:112px minmax(0,1fr); grid-template-rows:minmax(0,1fr) 16px; padding:5px; gap:3px 6px; }
  .draw-station { grid-row:1 / 3; grid-column:1; display:flex; border-bottom:0; border-right:1px solid #c4d9c31c; padding:0 5px 0 0; gap:6px; }
  .opponent { align-self:auto; padding:0; font-size:9px; }
  .opponent b,.opponent small { font-size:9px; }
  .status-chip,.avatar,.draw-hint { display:none; }
  .piles { gap:10px; align-self:auto; }
  .piles .card { width:40px; height:54px; }
  .piles small { font-size:7px; margin-top:5px; }
  .turnbanner { align-self:auto; padding:3px; gap:4px; }
  .turnbanner b { font-size:9px; }
  .turnbanner>span { display:none; }
  .turnbanner small { display:none; }
  .table-melds { grid-column:2; grid-row:1; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr); gap:5px; }
  .meld-area { padding:4px; grid-template-rows:15px minmax(0,1fr); gap:2px; }
  .meld-area-title { font-size:7px; letter-spacing:.1px; }
  .meld-area-title small { font-size:7px; }
  .new-meld-target { grid-column:2; grid-row:2; font-size:8px; }
  .hand-panel { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 5px; padding:4px 7px; }
  .handheading { min-height:18px; }
  .hand { flex-wrap:nowrap; padding:9px 0 5px; gap:3px; }
  .hand .card .corner { font-size:12px; left:3px; top:3px; }
  .hand .card .corner small { font-size:10px; }
  .hand .card .pip { font-size:19px; }
  .hand-feedback { min-height:12px; font-size:8px; }
  .utility-actions { gap:4px; justify-content:flex-start; }
  .utility-actions button { min-height:24px; font-size:8px; padding:4px 6px; }
  .actions>div { gap:4px; }
  .btn { min-height:25px; font-size:9px; padding:4px 6px; }
}
@media(prefers-reduced-motion:reduce) { * { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
@media(max-width:760px) and (max-height:700px) and (min-height:501px) {
  .table { grid-template-rows:58px minmax(0,1fr) 18px; }
  .piles .card { width:37px; height:48px; }
  .piles small { margin-top:4px; }
  .piles { gap:12px; }
  .hand { padding-top:10px; padding-bottom:5px; flex-wrap:nowrap; row-gap:3px; }
  .hand-panel { gap:3px; padding:5px 7px; }
  .hand-feedback { min-height:12px; }
  .utility-actions button { min-height:26px; }
  .btn { min-height:29px; }
}

@media(max-width:760px) and (max-height:700px) and (min-height:501px) { .opponent .status-chip { display:none; } .opponent small { display:inline; margin-left:4px; } .opponent b { font-size:9px; } .turnbanner b { font-size:9px; } .meld-heading { min-height:16px; margin-bottom:2px; } .meld-controls button { min-height:18px; } .meld-area-title { font-size:7px; } .hand-feedback { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } }
