/* A single 5:7 card silhouette; containers leave space instead of stretching it. */
body .special-card{width:var(--trick-width,180px)!important;min-width:var(--trick-width,180px)!important;height:calc(var(--trick-width,180px) * 1.4)!important;min-height:0!important;max-height:none!important}
#app .special-card.compact{--trick-width:calc(100px * var(--card-scale,1))}.card-detail .special-card,.card-hover .special-card{--trick-width:220px}
:root{--collection-card-base:180px;--collection-card-width:calc(var(--collection-card-base) * var(--card-scale,1));--collection-card-height:calc(var(--collection-card-width) * 1.4)}
@media(max-width:450px){:root{--collection-card-base:145px}}
body .special-card,#app .special-card.compact{box-sizing:border-box;aspect-ratio:5 / 7;width:180px;min-width:0;height:252px;min-height:0;max-height:none;flex:none;padding:8px;overflow:hidden}
body .special-card .special-art{height:65px;min-height:65px;margin:3px 0;flex-shrink:0}
body .special-card>strong{font-size:14px;line-height:1.25;margin:4px 0}
body .special-card>p{font-size:11px;line-height:1.4;min-height:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;margin:0;padding:3px}
body .special-card .special-foot{font-size:9px;margin-top:auto;padding-top:4px}
body .special-card .special-top,body .special-card .card-cost{font-size:9px;min-height:0;margin-bottom:2px}
.shop-cards,.reward-cards,.collection-grid{grid-template-columns:repeat(auto-fit,var(--collection-card-width))!important;justify-content:center;align-items:start;gap:18px!important}
.shop-item,.reward-cards>div,.collection-grid>div{width:var(--collection-card-width);min-width:0}
#app .special-card.compact{width:100px;min-width:100px;height:140px;padding:5px}
#app .compact .special-art{height:32px;min-height:32px}
#app .compact>strong{font-size:11px;margin:3px 0}
#app .compact>p{font-size:9px;line-height:1.25;-webkit-line-clamp:2}
#app .compact .special-top,#app .compact .card-cost,#app .compact .special-foot{font-size:8px;line-height:1.2;min-height:0;margin:0;padding:0}
#app .special-hand{min-height:calc(140px * var(--card-scale,1) + 15px);height:calc(140px * var(--card-scale,1) + 15px)}
.card-detail .special-card,.card-hover .special-card{width:220px;height:308px;min-height:0}
.card-detail .special-card .special-art,.card-hover .special-card .special-art{height:86px;min-height:86px}
.card-detail .special-card>p{font-size:12px}
.act-summary{display:flex;gap:8px;flex-wrap:wrap}.act-summary span{border:1px solid #738667;padding:8px 12px;border-radius:8px;font-size:12px}
.encounter-node[aria-pressed="true"]{outline:3px solid #f1d083;outline-offset:4px}.encounter-panel [data-action="node-cancel"]{margin-top:8px}
.modal:has([data-deck-count]) .filter-bar{position:sticky;top:0;background:#1c3027;z-index:2;padding:10px}.modal [data-action="toggle-deck"]{min-height:44px}
/* Revealed values remain full-size and separated, regardless of hidden hand count. */
body #app .battle-layout .opponent-hand{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:6px;overflow-x:auto;overflow-y:hidden;width:100%;max-width:100%;min-width:0;height:62px;min-height:62px;margin:0;padding:4px;transform:none}
body #app .battle-layout .opponent-hand .poker-card{position:relative;flex:0 0 38px;width:38px!important;height:52px!important;margin:0!important;transform:none!important}
body #app .opponent-hand .card-corner{top:3px;left:4px;font-size:15px;line-height:1}
body #app .opponent-hand .card-corner small{display:block;font-size:13px;line-height:1}
body #app .opponent-hand .card-pip{font-size:17px;left:auto;right:4px;top:auto;bottom:4px;transform:none}
body #app .opponent-hand .card-bottom{display:none}
@media(min-width:1000px) and (min-height:650px){#app .table-center{grid-template-rows:17px 62px minmax(100px,1fr) 28px}#app .battle-layout{min-height:760px}}
@media(max-width:450px){.shop-cards,.reward-cards,.collection-grid{grid-template-columns:repeat(auto-fit,145px)!important;gap:12px!important}.shop-item,.reward-cards>div,.collection-grid>div{width:145px}body .shop-cards .special-card,body .reward-cards .special-card,body .collection-grid .special-card{width:145px;height:203px;padding:6px}body .collection-grid .special-card>strong,body .shop-cards .special-card>strong,body .reward-cards .special-card>strong{font-size:12px}body .collection-grid .special-art,body .shop-cards .special-art,body .reward-cards .special-art{height:44px;min-height:44px}.collection-grid .special-card>p,.shop-cards .special-card>p,.reward-cards .special-card>p{font-size:10px!important;-webkit-line-clamp:3}.card-detail{grid-template-columns:1fr}.card-detail>div:first-child{margin:auto}}
/* One size authority for every card in a collection, including unknown cards. */
.collection-grid,.shop-cards,.reward-cards{grid-template-columns:repeat(auto-fit,var(--collection-card-width))!important}
.collection-grid>div,.shop-item,.reward-cards>div{width:var(--collection-card-width)}
.collection-grid .special-card,.shop-cards .special-card,.reward-cards .special-card{--trick-width:var(--collection-card-width)}
.collection-grid .undiscovered-card{box-sizing:border-box;width:var(--collection-card-width);height:var(--collection-card-height);min-height:0;max-height:var(--collection-card-height);align-self:start;aspect-ratio:5/7}
.collection-grid .discovery-stats{box-sizing:border-box;height:40px;min-height:40px;margin:0;padding:6px 0;font-size:10px;line-height:14px;overflow:hidden}
.collection-grid .special-card>strong,.shop-cards .special-card>strong,.reward-cards .special-card>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* Fixed inner slots keep short, long and upgraded cards aligned at every size. */
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card{display:grid;grid-template-rows:12px minmax(22px,1fr) 22px 35px 46px 16px;gap:2px}
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card>*{min-width:0;margin:0}
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card .special-top{height:12px;line-height:12px;overflow:hidden}
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card .special-art{height:100%;min-height:0}
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card .card-cost{height:22px;min-height:0;line-height:11px}
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card>strong{height:35px;min-height:0}
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card>p{height:100%;padding:0;-webkit-line-clamp:3}
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card .upgrade-note{display:none}
body :is(.collection-grid,.shop-cards,.reward-cards) .special-card .special-foot{height:16px;min-height:0;padding-top:2px;white-space:nowrap;overflow:hidden}
@media(max-width:450px){body :is(.collection-grid,.shop-cards,.reward-cards) .special-card{grid-template-rows:12px minmax(22px,1fr) 22px 30px 42px 16px}body :is(.collection-grid,.shop-cards,.reward-cards) .special-card>strong{height:30px}}
/* Use text glyphs instead of platform emoji in mixed suit labels. */
body{font-variant-emoji:text}.suit-symbol{font-family:Georgia,'Segoe UI Symbol',serif;font-size:1em;line-height:1;display:inline-block;width:1em;text-align:center;vertical-align:baseline;font-variant-emoji:text}.board-frozen{display:block;color:#eed487;font-size:12px;text-align:center;margin:5px}
html:lang(en) .special-card,html:lang(ja) .special-card{word-break:normal;overflow-wrap:anywhere}html:lang(en) .topbar nav,html:lang(ja) .topbar nav{flex-wrap:wrap}html:lang(en) .settings-form label,html:lang(ja) .settings-form label{gap:10px}
@font-face{font-family:TableSuits;src:local('Segoe UI Symbol'),local('Apple Symbols'),local('DejaVu Sans');unicode-range:U+2660,U+2663,U+2665-2666;font-display:swap}
:root{font-family:TableSuits,'Malgun Gothic','Apple SD Gothic Neo',Arial,sans-serif}
