/* Shared information hierarchy. The group badge stays distinct from each card's art. */
.info-card{--set-color:#d5c285;text-align:left;color:#e9ebdc;background:linear-gradient(145deg,#29372e,#132119);border:1px solid #829578;border-top:3px solid var(--set-color);border-radius:5px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 7px 22px #0007}
.info-set{display:flex;align-items:center;gap:7px;padding:9px 13px;background:#0d1917b3;color:var(--set-color,#d5c285);font-size:13px;border-bottom:1px solid #73916b33}
.info-set>img,.info-related>img{width:22px;height:22px;object-fit:contain;border-radius:3px}.info-set>b{font-size:15px}.info-set>span:last-child,.info-set>.info-progress{margin-left:auto}
.info-progress{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:14px;color:#c6d1bc}.info-progress>span{color:#f4db8b}
.info-progress[data-choice-state=selected]{color:#a9e7aa;font-weight:700}.info-progress[data-choice-state=closed]{color:#9b9e96}
.info-title{display:flex;align-items:center;gap:12px;padding:13px}.info-title>img{width:52px;height:52px;object-fit:contain;border:1px solid #b8bb8f66;background:#11231b;border-radius:4px}.info-title>div{min-width:0}
.info-title h3,:is(#draw-dialog,#sword-route-dialog) .info-title h3{font-size:23px;line-height:1.2;letter-spacing:0;margin:0 0 8px;color:#f4e0ad}.info-tags{display:flex;gap:5px;flex-wrap:wrap}.info-tags>span{font-size:12px;line-height:1.4;padding:2px 6px;border:1px solid #718f7780;border-radius:3px;color:#bed9c4;background:#13271db3;white-space:nowrap}
.info-content{padding:0 13px 11px;display:flex;flex-direction:column;gap:10px;flex:1}.info-content small{font-size:12px;color:#a9bda6}.info-content p{margin:4px 0 0;font-size:14px;line-height:1.55}.info-content .info-gain{font-size:15px;line-height:1.55;color:#edf0df}.info-content .info-link{font-size:12px;color:#baceb5;margin:0}.info-content .info-condition{font-size:11px;color:#a7b69e;margin:0}
.info-damage{padding:8px 10px;background:#0b1811a6;border-left:2px solid #aec9a2;border-radius:2px}.info-damage>small{display:block;margin-bottom:4px}.info-damage>div{display:flex;justify-content:space-between;gap:8px;align-items:baseline;font-size:13px}.info-damage strong{font-size:16px;color:#f4d78e;font-variant-numeric:tabular-nums}.info-damage em{font-style:normal;font-size:11px;font-weight:400;color:#b7c9b0}.info-damage>p{font-size:11px;color:#a9bba1;margin:2px 0 4px;line-height:1.4}
.info-result{padding-top:9px;border-top:1px solid #758b633d;margin-top:auto}.info-result>small{color:#dec98a}.info-result>p{font-size:13px;color:#dfd6b5}.info-related{display:flex;align-items:center;gap:7px}.info-related>.info-progress{margin-left:auto}.info-content .info-math{font-size:12px;color:#afc1a8}.info-math summary{padding:6px 0;cursor:pointer;color:#b8d3af}.info-math p{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.info-actions{display:flex;gap:8px;padding:10px 13px!important;margin-top:auto;background:#0d1915cc;border-top:1px solid #78906b33}.info-actions>button{padding:7px 10px;font:inherit;font-size:13px;border-radius:3px;border:1px solid #728264;color:#c6d5bb;background:#1d3025;cursor:pointer}.info-actions>button:last-child{margin-left:auto;flex:1;max-width:75%;background:#4d4c2d;border-color:#bda76a;color:#ffe5a2;font-weight:600}.info-actions>button:hover,.info-actions>button:focus-visible{outline:2px solid #f0d48d;outline-offset:1px}.info-actions>button:disabled{opacity:.45;cursor:default}
:is(#draw-dialog,#sword-route-dialog),#evolution-dialog{zoom:1;inset:auto auto 162px 50%;transform:translateX(-50%);margin:0;width:min(1030px,calc(100vw - 70px));max-width:none;max-height:calc(100vh - 225px);padding:8px;overflow:auto;background:#0c1812b8;border:1px solid #8a9c6c66;border-radius:6px}
:is(#draw-dialog,#sword-route-dialog)[data-count="1"]{width:350px}:is(#draw-dialog,#sword-route-dialog) .draw-candidates,#evolution-candidates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:stretch}:is(#draw-dialog,#sword-route-dialog)[data-count="1"] .draw-candidates{grid-template-columns:1fr}
:is(#draw-dialog,#sword-route-dialog) .choice-card,#evolution-dialog .evolution-card{width:auto;max-width:none;min-height:0;height:auto;padding:0;border:1px solid #829578;border-top:3px solid var(--set-color);background:linear-gradient(145deg,#29372e,#132119);box-shadow:0 7px 22px #0007;transform:none;overflow:hidden}
:is(#draw-dialog,#sword-route-dialog) .choice-card:hover,#evolution-dialog .evolution-card:hover{transform:none;border-color:var(--set-color);outline:none;box-shadow:0 7px 22px #0007}
:is(#draw-dialog,#sword-route-dialog) .draw-footer{margin:9px 0 0;padding:0 0 3px;gap:10px}:is(#draw-dialog,#sword-route-dialog) .draw-footer button{height:32px;flex:0 1 120px;font-size:13px;padding:5px 12px}:is(#draw-dialog,#sword-route-dialog) .draw-giveup{flex:0 1 120px}:is(#draw-dialog,#sword-route-dialog) .draw-giveup>small{font-size:10px}:is(#draw-dialog,#sword-route-dialog) .opening-draw-heading{margin-bottom:8px;padding:7px 9px}.opening-draw-heading b{font-size:14px}.opening-draw-heading span{font-size:12px}
.info-choice-heading{display:flex;justify-content:space-between;align-items:center;color:#f0dfa5;padding:2px 4px 9px;font-size:15px}.info-choice-heading>span{font-size:12px;color:#c2cbb5}#evolution-dialog>footer{padding-top:8px}#evolution-dialog .hero-info-title>img{width:68px;height:76px;object-fit:cover}#evolution-dialog #fold-hero{height:31px}
#card-dialog{zoom:1;width:min(440px,calc(100vw - 32px));max-height:85vh;padding:28px 12px 12px;background:linear-gradient(145deg,#29372e,#132119);color:#e9ebdc;overflow:auto}#card-dialog .dialog-close{z-index:2}#card-detail .info-content{gap:12px}#card-detail .info-title h3{font-size:25px}
#shop-dialog{zoom:1;width:min(910px,calc(100vw - 64px));max-width:none;max-height:calc(100vh - 150px);left:50%;right:auto;top:auto;bottom:154px;transform:translateX(-50%);padding:14px;overflow:auto;background:#15241bf5}#shop-offers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.market-slot.info-card{width:auto;height:auto;padding:0;position:relative}.market-slot.info-card .info-title{gap:8px}.market-slot.info-card h3{font-size:19px}.market-slot.info-card .info-title>img{width:42px;height:42px}.market-slot.info-card .info-set{font-size:11px}.market-slot.info-card .info-set>b{font-size:12px}.market-slot.info-card .info-content{gap:10px}.market-slot.info-card .info-damage strong{font-size:13px}.market-slot.info-card .info-actions>button{position:static;display:block;width:auto;height:auto;min-height:30px}.market-slot.sold-out{opacity:.55}
#character-dialog{max-height:85vh;overflow:auto}#character-skill>p{font-size:14px;line-height:1.5}#character-skill .info-tags{margin:8px 0}#character-skill .info-damage{margin-top:12px}#current-hero-info:empty{display:none}#current-hero-info{margin-top:18px;border-top:1px solid #899b6f}.roster-card small{display:block!important;font-size:11px!important;color:#c9ddcf}.selected-skill .info-tags{margin:8px 0}.selected-skill .info-damage{margin:8px 0}.selected-skill .info-damage>div{justify-content:space-between}#selected-skill{max-width:360px}#selected-skill .info-damage>p{font-size:11px;margin:2px 0}
.held-card{border-bottom-color:var(--set-color)!important}.held-card>small{color:var(--set-color)!important;font-size:11px!important;white-space:nowrap}.held-card>span{font-size:12px!important}
@media(max-height:780px){:is(#draw-dialog,#sword-route-dialog),#evolution-dialog{bottom:128px;max-height:calc(100vh - 180px)}.info-title{padding:10px 12px;gap:9px}.info-title>img{width:44px;height:44px}.info-content{gap:8px;padding:0 12px 9px}.info-content .info-gain{font-size:14px}.info-title h3,:is(#draw-dialog,#sword-route-dialog) .info-title h3{font-size:21px}.info-actions{padding:8px 12px!important}.info-set{padding:7px 12px}#evolution-dialog .hero-info-title>img{width:55px;height:62px}#shop-dialog{bottom:128px}#selected-skill .info-damage{padding:5px 8px}#selected-skill footer{font-size:11px}.selected-skill>p{font-size:12px!important}}
@media(max-width:800px){:is(#draw-dialog,#sword-route-dialog),#evolution-dialog{width:calc(100vw - 24px);bottom:110px}:is(#draw-dialog,#sword-route-dialog) .draw-candidates,#evolution-candidates,#shop-offers{grid-template-columns:repeat(3,minmax(220px,1fr));gap:10px}#shop-dialog{width:calc(100vw - 24px)}.opening-draw-heading{flex-wrap:wrap}}

/* Fast choices keep the established whole-card click and sit above the HUD. */
:is(#draw-dialog,#sword-route-dialog),#evolution-dialog{top:clamp(64px,18vh,180px);bottom:auto;max-height:calc(100vh - 275px)}
:is(#draw-dialog,#sword-route-dialog) .choice-card,#evolution-dialog .evolution-card{cursor:pointer;font:inherit;text-align:left;white-space:normal}
:is(#draw-dialog,#sword-route-dialog) .choice-card:hover,:is(#draw-dialog,#sword-route-dialog) .choice-card.pointer-hover,:is(#draw-dialog,#sword-route-dialog) .choice-card:focus-visible,#evolution-dialog .evolution-card:hover,#evolution-dialog .evolution-card.pointer-hover,#evolution-dialog .evolution-card:focus-visible{border-color:#f4db8b;outline:2px solid #f4db8b;outline-offset:1px;box-shadow:0 5px 20px #0008}
:is(#draw-dialog,#sword-route-dialog) .info-content{gap:7px}:is(#draw-dialog,#sword-route-dialog) .info-title{padding:11px 13px}:is(#draw-dialog,#sword-route-dialog) .info-title h3{font-size:22px}
:is(#draw-dialog,#sword-route-dialog) .info-gain{font-size:14px;line-height:1.45}:is(#draw-dialog,#sword-route-dialog) .info-result{padding-top:7px}:is(#draw-dialog,#sword-route-dialog) .info-result p{font-size:13px;line-height:1.45}
@media(max-height:780px){:is(#draw-dialog,#sword-route-dialog),#evolution-dialog{top:64px;bottom:auto;max-height:calc(100vh - 245px)}}

/* Baozhan 2 reference: frame-042 / frame-057, tall framed cards and one-click selection. */
:is(#draw-dialog,#sword-route-dialog),#evolution-dialog{--choice-height:clamp(390px,57vh,570px);--choice-width:calc(var(--choice-height)*.58);top:clamp(70px,14vh,140px);width:calc(var(--choice-width)*3 + 60px);max-width:calc(100vw - 40px);max-height:calc(100vh - 200px);padding:18px 5px 8px;border:0;border-radius:0;overflow:visible;background:none;box-shadow:none}
:is(#draw-dialog,#sword-route-dialog)[data-count="1"]{width:var(--choice-width)}
:is(#draw-dialog,#sword-route-dialog) .draw-candidates,#evolution-candidates{gap:30px;overflow:visible;align-items:start}
:is(#draw-dialog,#sword-route-dialog) .choice-card,#evolution-dialog .evolution-card{position:relative;width:100%;height:var(--choice-height);min-height:var(--choice-height);padding:0;border:2px solid #b59c5d;border-radius:14px;overflow:visible;background:linear-gradient(180deg,#102a35 0%,#173d48 30%,#161d20 34%,#22241f 100%);box-shadow:inset 0 0 0 2px #28241a,inset 0 0 0 4px #76663c,0 4px 8px #000b;color:#f0eee3;transition:transform .12s,border-color .12s}
:is(#draw-dialog,#sword-route-dialog) .choice-card::after,#evolution-dialog .evolution-card::after{content:"";position:absolute;inset:4px;pointer-events:none;border:1px solid #d9bc76;border-radius:10px;clip-path:polygon(0 0,15% 0,15% 3%,3% 3%,3% 97%,15% 97%,15% 100%,0 100%,0 0,100% 0,85% 0,85% 3%,97% 3%,97% 97%,85% 97%,85% 100%,100% 100%,100% 0)}
:is(#draw-dialog,#sword-route-dialog) .choice-card:hover,:is(#draw-dialog,#sword-route-dialog) .choice-card.pointer-hover,:is(#draw-dialog,#sword-route-dialog) .choice-card:focus-visible,#evolution-dialog .evolution-card:hover,#evolution-dialog .evolution-card.pointer-hover,#evolution-dialog .evolution-card:focus-visible{transform:translateY(-8px);border-color:#ffe7a6;outline:none;box-shadow:inset 0 0 0 2px #3d3019,inset 0 0 0 4px #d4b56b,0 4px 22px #000b}
.choice-set-title{position:absolute;z-index:1;top:-18px;left:19%;width:62%;height:37px;display:grid;place-items:center;box-sizing:border-box;border:2px solid #bea363;border-radius:10px;background:linear-gradient(#17343e,#080e14);box-shadow:inset 0 0 0 2px #13181a,0 2px 3px #0009;color:#b7edee;font-size:20px;line-height:1;font-weight:600;white-space:nowrap}
.choice-art{height:calc(var(--choice-height)*.29);min-height:calc(var(--choice-height)*.29);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:25px 10px 4px;box-sizing:border-box;background:radial-gradient(ellipse at 50% 70%,#33778288,transparent 70%);border-radius:12px 12px 0 0}
.choice-main-icon{width:clamp(64px,9vh,90px);height:clamp(64px,9vh,90px);object-fit:contain;border:2px solid #7396a4;box-shadow:0 0 0 2px #13191e,0 0 16px #66cada35;background:#07171b}
.hero-choice-art .choice-main-icon{object-fit:cover}
.choice-bond-icon{position:absolute;right:8px;top:8px;width:42px;height:42px;object-fit:contain;border:2px solid #d4bc78;border-radius:50%;background:#152326;box-shadow:0 2px 5px #0009}
.choice-progress{color:#e3d09a;font-size:15px;line-height:23px;white-space:nowrap}
.choice-progress .info-progress{font-size:15px;font-weight:400;color:#e3d09a}
.choice-art .info-tags{position:absolute;left:10px;top:20px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:100px}
.choice-art .info-tags>span{background:#493820;border:1px solid #ad8c50;color:#ead8b7;font-size:11px;line-height:1.3;padding:2px 4px;border-radius:3px;white-space:normal}
:is(#draw-dialog,#sword-route-dialog) .choice-name,#evolution-dialog .choice-name{height:35px;min-height:35px;display:grid;place-items:center;margin:0 5px;font-size:20px;font-weight:500;line-height:1.1;color:#b8e5ec;background:linear-gradient(#1c343b,#080d12);border-top:2px solid #aa8c4e;border-bottom:2px solid #aa8c4e;box-shadow:0 2px 3px #0007;position:relative}
.choice-name::before,.choice-name::after{content:"◆";position:absolute;font-size:10px;color:#ae9258;top:9px}.choice-name::before{left:9px}.choice-name::after{right:9px}
.choice-copy{padding:14px 18px 18px;display:flex;flex-direction:column;gap:12px;overflow:auto;flex:1;min-height:0;text-align:left;scrollbar-width:thin;scrollbar-color:#8c7748 transparent}
.choice-copy p{margin:3px 0 0;font-size:15px;line-height:1.45;color:#f0eee5;overflow-wrap:anywhere}
.choice-copy p strong{font-weight:600;color:#8de275}
.choice-section-label{font-size:15px;line-height:1.5;color:#efd776;font-weight:500}
.choice-absorb{border-top:1px solid #b8994b40;padding-top:9px;margin-top:0}
.choice-absorb .choice-section-label{color:#65dcce}
.choice-skill{margin-top:8px}.choice-skill-name{display:flex;align-items:baseline;justify-content:space-between;gap:6px}.choice-skill-name>b{font-size:14px;color:#9fc9ed;font-weight:500}.choice-skill-name>span{font-size:12px;color:#e3c477;background:#0b171b;border:1px solid #76643a;border-radius:9px;padding:0 5px;white-space:nowrap}
.choice-copy .choice-skill p{font-size:13px;line-height:1.4}.choice-copy .choice-target{color:#c2d3d0}.choice-copy .choice-link{font-size:12px;color:#bfcec5}
:is(#draw-dialog,#sword-route-dialog) .opening-draw-heading,#evolution-dialog>.info-choice-heading{position:absolute;top:-33px;left:0;right:0;padding:0 5px;margin:0;background:none;border:0;color:#eee3bd;font-size:12px;text-shadow:0 1px 3px #000;display:flex;justify-content:space-between}
:is(#draw-dialog,#sword-route-dialog) .opening-draw-heading b,#evolution-dialog>.info-choice-heading b{font-size:13px}:is(#draw-dialog,#sword-route-dialog) .opening-draw-heading span{font-size:12px}
:is(#draw-dialog,#sword-route-dialog)[data-count="1"] .opening-draw-heading{justify-content:center;white-space:nowrap}:is(#draw-dialog,#sword-route-dialog)[data-count="1"] #draw-stage-title{display:none}:is(#draw-dialog,#sword-route-dialog)[data-count="1"] .opening-draw-heading span{font-size:11px}
:is(#draw-dialog,#sword-route-dialog) .draw-footer,#evolution-dialog>footer{display:flex;justify-content:center;align-items:flex-start;gap:18px;margin:24px 0 0;padding:0;background:none;border:0}
:is(#draw-dialog,#sword-route-dialog) .draw-footer button,#evolution-dialog #fold-hero{height:36px;min-height:36px;flex:0 0 150px;max-width:180px;font-size:15px;color:#f1e4c3;border:2px solid #9f8550;border-radius:5px;background:linear-gradient(#25383a,#111719);box-shadow:inset 0 0 0 1px #302919}
:is(#draw-dialog,#sword-route-dialog) .draw-giveup{flex:0 0 150px}:is(#draw-dialog,#sword-route-dialog) .draw-giveup button{width:100%}:is(#draw-dialog,#sword-route-dialog) #giveup-draw{background:linear-gradient(#653328,#2c1714)}
@media(max-height:780px){
 :is(#draw-dialog,#sword-route-dialog),#evolution-dialog{--choice-height:clamp(380px,60vh,460px);--choice-width:calc(var(--choice-height)*.64);top:clamp(62px,10vh,80px);max-height:calc(100vh - 170px)}
 .choice-set-title{height:30px;top:-15px;font-size:17px}.choice-art{height:calc(var(--choice-height)*.26);min-height:calc(var(--choice-height)*.26);padding-top:16px}.choice-art .info-tags{top:14px;left:8px}.choice-art .info-tags>span{font-size:10px;max-width:62px}.choice-bond-icon{width:32px;height:32px;right:7px;top:7px}
 :is(#draw-dialog,#sword-route-dialog) .choice-name,#evolution-dialog .choice-name{height:30px;min-height:30px;font-size:18px}.choice-name::before,.choice-name::after{top:7px}.choice-progress,.choice-progress .info-progress{font-size:13px;line-height:20px}
 .choice-copy{padding:7px 13px 5px;gap:6px}.choice-copy p,.choice-section-label{font-size:13px;line-height:1.4}.choice-copy .choice-skill p{font-size:12px}.choice-copy .choice-link{font-size:11px}.choice-skill{margin-top:5px}.choice-skill-name>b{font-size:13px}.choice-skill-name>span{font-size:11px}.choice-absorb{padding-top:6px}
 :is(#draw-dialog,#sword-route-dialog) .draw-footer,#evolution-dialog>footer{margin-top:18px}:is(#draw-dialog,#sword-route-dialog) .opening-draw-heading,#evolution-dialog>.info-choice-heading{top:-35px}
}
@media(max-width:800px){:is(#draw-dialog,#sword-route-dialog),#evolution-dialog{max-width:calc(100vw - 20px);overflow-x:auto;overflow-y:visible}:is(#draw-dialog,#sword-route-dialog) .draw-candidates,#evolution-candidates{grid-template-columns:repeat(3,minmax(210px,1fr));gap:18px}:is(#draw-dialog,#sword-route-dialog)[data-count="1"] .draw-candidates{grid-template-columns:1fr}}

/* Opening a choice keeps focus on the group; only deliberate card focus shines. */
#draw-candidates:focus,#evolution-candidates:focus,#upgrade-candidates:focus{outline:none}
:is(#draw-dialog,#sword-route-dialog) .choice-card::before,#evolution-dialog .evolution-card::before,.card-flight::after{content:"";position:absolute;inset:2px;z-index:6;pointer-events:none;border-radius:12px;opacity:0;background:linear-gradient(115deg,transparent 38%,#a3eeff22 43%,#fff3c4bb 49%,#ffffffdd 50%,#8ee4f855 54%,transparent 61%);background-size:300% 100%;background-position:150% 0}
:is(#draw-dialog,#sword-route-dialog) .choice-card:is(:hover,.pointer-hover,:focus-visible,.chosen)::before,#evolution-dialog .evolution-card:is(:hover,.pointer-hover,:focus-visible,.chosen)::before{animation:choice-sweep 1.6s ease-in-out infinite}
.card-flight::after{animation:choice-sweep .42s ease-out both}
@keyframes choice-sweep{0%{background-position:150% 0;opacity:0}12%{opacity:.75}65%{background-position:-50% 0;opacity:.65}76%,100%{background-position:-50% 0;opacity:0}}
@media(prefers-reduced-motion:reduce){:is(#draw-dialog,#sword-route-dialog) .choice-card::before,#evolution-dialog .evolution-card::before,.card-flight::after{animation:none!important}}

.market-branch{display:block;padding:9px 12px;color:#d7d5bd;font-size:12px}.market-branch select,#market-pills select{display:block;width:100%;margin-top:6px;padding:7px;background:#26372a;color:#eee3c9;border:1px solid #7c8b67}.market-slot [data-market-lock][aria-pressed=true]{color:#ffe099;border-color:#ffe099}.market-slot .info-actions{flex-wrap:wrap}#market-pills{display:grid;gap:10px;margin-top:12px}.market-pill{padding:12px;border:1px solid #7c8b67;background:#1b2c20}.market-pill h3{margin:0 0 7px;color:#ead29a}.market-pill p,.market-pill small{font-size:12px;color:#c5cfb6}.market-pill button{margin-top:9px;padding:8px 14px}.market-pill button:disabled{opacity:.5}
#shop-dialog.market-compact .tabs{display:none}#shop-dialog.market-compact .market-heading{margin-bottom:14px}.market-copy .market-note{font-size:12px;color:#c1ccb4;line-height:1.5}.market-compact .market-branch{padding-top:0}.market-compact .market-branch select{margin-top:0}#market-pills:empty{display:none}

/* One consistent place for effect tags, with the actual benefit directly below. */
.card-task-progress{padding:5px 8px;border-left:2px solid #a2c6d7;background:#0d1a2180;color:#b8dbeb;font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums}
#hud .card-slots>.held-card>.held-task-progress{position:absolute;left:2px;right:2px;top:50%;transform:translateY(-50%);z-index:1;padding:2px 0;background:#08130de6;color:#fff1c9;font-size:16px;font-style:normal;font-weight:800;line-height:20px;text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none;text-shadow:0 1px 2px #000}
#hud .card-slots>.held-card>.held-task-progress[hidden]{display:none}
:is(#draw-dialog,#sword-route-dialog) .choice-card>.info-tags,#evolution-dialog .evolution-card>.info-tags{display:flex;justify-content:center;gap:5px;padding:7px 10px 0;flex:0 0 auto}
:is(#draw-dialog,#sword-route-dialog) .choice-card>.info-tags:empty,#evolution-dialog .evolution-card>.info-tags:empty{display:none}
:is(#draw-dialog,#sword-route-dialog) .choice-card>.info-tags>span,#evolution-dialog .evolution-card>.info-tags>span{color:#dce5e1;background:#101b1bc2;border-color:#a3b4ae55;font-size:11px;padding:2px 6px}
.choice-copy .info-gain{font-size:16px;line-height:1.5;color:#fff9eb}
.choice-copy>section:first-child>.choice-link{font-size:14px;line-height:1.5;color:#edece0}
.choice-copy .choice-absorb{display:flex;flex-direction:column;gap:2px}
.choice-copy .choice-absorb .choice-link{font-size:12px;line-height:1.45;color:#bfcec5}
@media(max-height:780px){.choice-copy .info-gain{font-size:14px;line-height:1.45}.choice-copy>section:first-child>.choice-link{font-size:13px}:is(#draw-dialog,#sword-route-dialog) .choice-card>.info-tags,#evolution-dialog .evolution-card>.info-tags{padding-top:5px;gap:4px}.choice-copy .choice-absorb .choice-link{font-size:11px}}

/* Fixed categories sit beside the portrait; purpose stays below the category. */
.card-tag-rail{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.card-main-tags,.card-effect-tags{display:flex;gap:4px;flex-wrap:wrap}
.card-main-tags>span{padding:2px 6px;border:1px solid var(--family-color,#b5bfa6);border-radius:3px;background:#182522;color:#eee7cc;font-size:13px;font-weight:600;line-height:18px;white-space:nowrap}
.card-effect-tags>span{padding:1px 5px;border:1px solid #9eaca33d;border-radius:3px;background:#0f191abf;color:#bfc9c2;font-size:11px;line-height:16px;white-space:nowrap}
.choice-art>.card-tag-rail{position:absolute;left:12px;top:25px;z-index:2;gap:6px}
.choice-art .card-main-tags,.choice-art .card-effect-tags{flex-direction:column;gap:4px}
.info-title .card-tag-rail{margin-top:6px}
@media(max-height:780px){.choice-art>.card-tag-rail{left:9px;top:8px;gap:4px}.choice-art .card-main-tags,.choice-art .card-effect-tags{gap:3px}.choice-art .card-main-tags>span{font-size:12px;line-height:16px;padding:1px 5px}.choice-art .card-effect-tags>span{font-size:10px;line-height:14px;padding:0 4px}}
.card-main-tags>.card-category-icon{display:grid;place-items:center;width:30px;height:30px;padding:3px;box-sizing:border-box;background:#0d1a1ce6;border-color:currentColor;box-shadow:inset 0 0 8px #0005}
.card-category-icon>.attribute-symbol{width:23px;height:23px;flex:none}
.card-category-icon[data-category="strength"]{color:#ff896b}.card-category-icon[data-category="summon"]{color:#d4adf3}.card-category-icon[data-category="agility"]{color:#71e9a8}.card-category-icon[data-category="intelligence"]{color:#79baff}.card-category-icon[data-category="growth"]{color:#b2dc83}.card-category-icon[data-category="economy"]{color:#f0ce70}.card-category-icon[data-category="general"]{color:#e4cc8b}
.choice-art .card-main-tags{flex-direction:row}
.choice-art>.card-tag-rail{top:22px}
@media(max-height:780px){.choice-art>.card-tag-rail{top:8px}.card-main-tags>.card-category-icon{width:27px;height:27px;padding:2px}.card-category-icon>.attribute-symbol{width:21px;height:21px}}

/* Approved card hierarchy; the established outer card dimensions stay fixed. */
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-set-title,#evolution-dialog .evolution-card[data-card-family] .choice-set-title{font-size:22px;line-height:28px}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-name,#evolution-dialog .evolution-card[data-card-family] .choice-name{font-size:26px;line-height:1.35;height:auto;min-height:39px;flex-shrink:0;font-weight:600}
.choice-card>.choice-progress,.evolution-card>.choice-progress{text-align:center;padding:5px 0 2px;flex-shrink:0}
.choice-card>.choice-progress .info-progress,.evolution-card>.choice-progress .info-progress{font-size:24px;line-height:1.2;font-weight:600;color:#ead7a5}
.choice-copy{gap:8px;padding-top:6px}
.choice-copy .choice-section-label,.info-content .choice-section-label{display:block;color:#efd99d;font-size:14px;font-weight:600;line-height:1.5}
.choice-copy p strong,.info-content p strong{color:#ffe3a0}
.choice-copy .choice-absorb{border-top:0;padding-top:0;gap:8px}
.choice-copy .choice-absorb .choice-link,.info-content .card-absorption .info-condition{font-size:14px;line-height:1.55;color:#e8e3d4}
.card-set-reward{border-top:1px solid #b8994b40;padding-top:8px;margin-top:4px}
.skill-description{margin:5px 0 7px;padding:8px 10px;background:#080e12f5;border:1px solid #71624378;border-radius:4px;color:#f0eee5;line-height:1.65}
.skill-description>.skill-name{display:block;margin-bottom:3px;font-size:15px;line-height:1.5;color:#ffe3a0;font-weight:700}
.choice-copy .skill-description>p,.info-content .skill-description>p{margin:0;font-size:14px;line-height:1.65;color:#e8e3d4}
.skill-reference{color:#ffe3a0;font-weight:700;font-size:inherit}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-copy strong,#evolution-dialog .evolution-card[data-card-family] .choice-copy strong{color:#ffe3a0}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-section-label,#evolution-dialog .evolution-card[data-card-family] .choice-section-label{color:#efd99d;font-size:14px}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .skill-description>p,#evolution-dialog .evolution-card[data-card-family] .skill-description>p{font-size:14px;line-height:1.65}
/* Leave room for all sections on the opening skill card without resizing it. */
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-art,#evolution-dialog .evolution-card[data-card-family] .choice-art{height:clamp(98px,calc(var(--choice-height)*.18),110px);min-height:clamp(98px,calc(var(--choice-height)*.18),110px);padding-top:28px}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-main-icon,#evolution-dialog .evolution-card[data-card-family] .choice-main-icon{width:clamp(60px,calc(var(--choice-height)*.12),76px);height:clamp(60px,calc(var(--choice-height)*.12),76px)}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-copy,#evolution-dialog .evolution-card[data-card-family] .choice-copy{padding:5px 16px 7px;gap:5px}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-copy p,#evolution-dialog .evolution-card[data-card-family] .choice-copy p{font-size:14px;line-height:1.45}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .skill-description,#evolution-dialog .evolution-card[data-card-family] .skill-description{padding:6px 8px;margin:4px 0 5px}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-absorb,#evolution-dialog .evolution-card[data-card-family] .choice-absorb{gap:5px}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .card-set-reward,#evolution-dialog .evolution-card[data-card-family] .card-set-reward{padding-top:6px;margin-top:2px}
@media(max-height:780px){
 :is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-set-title,#evolution-dialog .evolution-card[data-card-family] .choice-set-title{font-size:20px;line-height:24px}
 :is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-name,#evolution-dialog .evolution-card[data-card-family] .choice-name{font-size:24px;min-height:35px}
 .choice-card>.choice-progress .info-progress,.evolution-card>.choice-progress .info-progress{font-size:22px}
 .choice-copy{gap:6px}.choice-copy .choice-absorb{gap:6px}.choice-copy .choice-section-label,.choice-copy .choice-absorb .choice-link{font-size:13px}
 .choice-copy .skill-description{padding:6px 8px;margin:4px 0 5px}:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .skill-description>p,#evolution-dialog .evolution-card[data-card-family] .skill-description>p{font-size:13px;line-height:1.5}.card-set-reward{padding-top:6px}
}

/* Shared card heading: the set name is a full-width title above the artwork. */
:is(#draw-dialog,#sword-route-dialog) .choice-card .card-heading,#evolution-dialog .evolution-card .card-heading{flex:0 0 auto;padding:5px 10px 0;text-align:center}
:is(#draw-dialog,#sword-route-dialog) .choice-card .card-heading .card-family-badge,#evolution-dialog .evolution-card .card-heading .card-family-badge{display:block;padding:0;min-height:0;border:0;border-radius:0;background:none;box-shadow:none;font-size:11px;line-height:16px;letter-spacing:1px;color:var(--family-color)}
:is(#draw-dialog,#sword-route-dialog) .choice-card .card-heading .choice-set-title,#evolution-dialog .evolution-card .card-heading .choice-set-title{position:static;display:block;width:100%;height:auto;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;font-size:26px;line-height:36px;font-weight:700;color:var(--family-color);white-space:normal}
:is(#draw-dialog,#sword-route-dialog) .choice-card[data-card-family] .choice-art,#evolution-dialog .evolution-card[data-card-family] .choice-art{height:78px;min-height:78px;padding-top:2px}
.card-main-tags>.card-category-icon{display:flex;align-items:center;gap:4px;width:auto;min-width:68px;height:28px;padding:2px 6px}
.card-category-label{font-size:12px;line-height:18px;font-weight:600;white-space:nowrap}
.card-main-tags .card-category-icon>.attribute-symbol{width:20px;height:20px}
.choice-art>.card-tag-rail{top:4px;left:9px}
.choice-art .card-main-tags{flex-direction:column;gap:3px}
@media(max-height:780px){:is(#draw-dialog,#sword-route-dialog) .choice-card .card-heading .choice-set-title,#evolution-dialog .evolution-card .card-heading .choice-set-title{font-size:24px;line-height:31px}.choice-art>.card-tag-rail{top:4px}}
#sword-route-dialog{width:calc(var(--choice-width)*2 + 40px)}
#sword-route-dialog .draw-candidates{grid-template-columns:repeat(2,minmax(0,1fr))}
#sword-route-dialog .sword-route-rule{margin:0 0 10px;padding:0 7px;color:#d6ceae;font-size:12px;line-height:1.5}
@media(max-width:800px){#sword-route-dialog .draw-candidates{grid-template-columns:repeat(2,minmax(210px,1fr))}}
