/* Dedicated illustrations keep their full 3:2 composition; type labels stay in the header. */
.tabletop .hand-card::before,.hand-card.drag-card::before{display:none}
.tabletop .hand-card{height:232px}
.card-illustration{margin:12px -3px 8px;aspect-ratio:3/2;border:2px solid var(--type-color);border-radius:12px 12px 6px 6px;overflow:hidden;background:#251833;box-shadow:0 3px 6px #120b2244}
.card-illustration img{display:block;width:100%;height:100%;object-fit:contain}
.tabletop .hand-card .card-head{top:5px;font-size:9px}.tabletop .hand-card h3{margin-top:5px}
.staged-card.has-card:not(.locked){padding:7px;display:flex;flex-direction:column;justify-content:center;gap:8px;overflow:hidden}
.stage-art{display:block;width:100%;aspect-ratio:3/2;object-fit:contain;border:1px solid var(--type-color);border-radius:6px}
.tabletop .seat-played{padding:4px;min-height:86px}.seat-card-art{display:block;width:100%;aspect-ratio:3/2;object-fit:contain;border-radius:4px;margin-bottom:5px}.reveal-card-art{display:block;width:100%;max-width:200px;aspect-ratio:3/2;object-fit:contain;border-radius:8px;margin:9px auto}
.drag-card .card-illustration{margin-top:18px}.drag-card h3{font-size:16px;margin:6px 0}.drag-card p{font-size:10px;line-height:1.4}
/* Keep rules and damage in normal flow, including the clone used while dragging. */
.tabletop .hand-card,.hand-card.drag-card{display:flex;flex-direction:column;gap:5px;height:auto;min-height:246px;padding:10px;justify-content:flex-start}
.tabletop .hand-card .card-head,.hand-card.drag-card .card-head{position:static;flex:none;font-size:9px;display:flex;justify-content:space-between}
.tabletop .hand-card .card-illustration,.hand-card.drag-card .card-illustration{flex:none;width:100%;margin:0;box-sizing:border-box}
.tabletop .hand-card h3,.hand-card.drag-card h3{flex:none;margin:2px 0;font-size:15px;line-height:1.25;text-align:center}
.tabletop .hand-card p,.hand-card.drag-card p{flex:none;margin:0;font-size:11px;line-height:1.45;overflow:visible;white-space:normal}
.tabletop .hand-card .card-foot,.hand-card.drag-card .card-foot{position:static;flex:none;display:flex;align-items:center;justify-content:space-between;margin:auto 0 0;padding-top:5px;font-size:10px}
.hand-card.drag-card{height:auto!important;min-height:246px;max-height:none}
.tabletop .hand-card:hover,.tabletop .hand-card:focus-visible{z-index:40}
.tabletop .hand-card.selected:not(:hover):not(:focus-visible){z-index:30}
.staged-card.has-card b{font-size:14px;line-height:1.3;overflow-wrap:anywhere}
.game-shell{min-height:780px}.tabletop{min-height:720px}
/* The first five seats are the upper row; reserve their full name/status height. */
.tabletop .arena-opponent:nth-child(-n+5){top:48px;transform:translateX(-50%)}
.table-center{top:210px}.staged-card{height:110px;transform:none}
.staged-card .stage-art{max-height:55px;width:auto;max-width:100%;margin:0 auto}
.table-action .play-button{min-width:0}
.self-hero{left:9%;bottom:190px}.hero-skill{left:calc(9% - 40px);bottom:110px}
.tabletop .draw-notice{left:auto;right:4%;bottom:195px;text-align:right}
@media(min-width:1400px){.tabletop .hand-card{height:251px}}
@media(max-width:950px){.tabletop .hand-card{height:215px}.tabletop .card-illustration{margin-top:12px;margin-bottom:7px}.tabletop .seat-played{min-height:69px}}
@media(max-width:600px){.tabletop .hand-card{height:198px}.tabletop .hand-card .card-head{font-size:7px}.tabletop .card-illustration{margin-top:11px;margin-bottom:6px;border-width:1px;border-radius:8px 8px 4px 4px}.tabletop .hand-card h3{font-size:12px}.tabletop .hand-card p{font-size:9px}.tabletop .seat-played{min-height:47px;padding:2px}.seat-card-art{margin-bottom:3px;border-radius:2px}.staged-card.has-card:not(.locked){padding:5px;gap:5px}.staged-card b{font-size:11px}}
.tabletop .hand-card{height:auto}
@media(max-width:950px){.tabletop .hand-card{min-height:232px}.self-hero{left:9%;bottom:220px}.hero-skill{left:calc(9% - 34px);bottom:145px}}
@media(max-width:600px){.tabletop .hand-card{min-height:218px;gap:4px;padding:7px}.tabletop .hand-card .card-illustration{margin:0}.tabletop .hand-card p{font-size:10px;line-height:1.4}.tabletop .hand-card:hover,.tabletop .hand-card:focus-visible,.tabletop .hand-card.selected{transform:translateX(-50%) translateY(-38px) rotate(0) scale(1.12)}.self-hero{left:14%;bottom:285px}.tabletop .hero-skill{left:calc(14% - 29px);bottom:225px}.table-action{bottom:320px;left:auto;right:5%;transform:none;width:100px}.table-center{top:185px}.tabletop .arena-selection{margin:8px 0 0}}

/* Controls occupy their own row outside the clipped, animated card table. */
.game-shell{height:auto;min-height:100dvh;overflow:visible}
.tabletop{height:calc(100dvh - 160px)}
.player-controls{display:flex;align-items:center;justify-content:center;gap:24px;min-height:100px;padding:12px 20px;background:#21152f;border-top:2px solid #b798d1;position:relative}
.player-controls .self-hero{position:static;transform:none;display:flex;align-items:center;gap:18px;min-width:0}
.player-controls .self-hero .hero-portrait{width:48px;height:56px;flex:none;margin:0}
.player-controls .self-hero strong{margin:0;max-width:180px;overflow-wrap:anywhere;font-size:12px}
.player-controls .hero-skill{position:static;width:auto;min-width:110px;height:auto;min-height:44px;border-radius:12px;padding:10px;flex:none}
.player-controls .agent-launcher{position:static;display:flex;flex-direction:row;gap:12px}
.player-controls .agent-launcher button{transform:none;max-width:none;min-height:44px;white-space:normal}
/* The exposed upper-left corner remains visible in the fan, unlike the card foot. */
.tabletop .hand-card .card-foot>b,.hand-card.drag-card .card-foot>b{position:absolute;top:5px;left:5px;display:grid;place-items:center;width:28px;height:28px;border:2px solid #ffdc8e;border-radius:50%;background:#b64769;color:#fff;font-size:20px;line-height:1;z-index:2}
.tabletop .hand-card .card-head,.hand-card.drag-card .card-head{padding-left:30px;min-height:25px;align-items:center;justify-content:flex-end}
.tabletop .hand-card .card-head>span,.hand-card.drag-card .card-head>span{display:none}
.hand-card.drag-card .card-foot small{display:none}
@media(max-width:600px){.tabletop .hand-card:not(:hover):not(:focus-visible):not(.selected){transform:translateX(-50%) translateY(var(--fan-lift)) rotate(calc(var(--fan-angle)*.5))}.tabletop .hand-cards{--fan-step:clamp(12px,calc((100vw - 250px)/7),24px)}.tabletop .hand-card .card-foot>b{width:20px;height:20px;font-size:15px;top:4px;left:4px}.tabletop .hand-card .card-head{padding-left:23px;min-height:22px}}
@media(max-width:600px){.player-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:12px 16px}.player-controls .agent-launcher{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.player-controls .self-hero{gap:14px}.player-controls .self-hero strong{font-size:11px}.player-controls .hero-skill{min-width:100px;font-size:11px}.player-controls .agent-launcher button{font-size:12px}}


