:root{--bg:#f4f6fb;--ink:#172033;--muted:#738096;--line:#e3e8f1;--blue:#3867ee;--card:#fff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.45 Inter,system-ui,-apple-system,"Segoe UI",sans-serif}.wrap{max-width:1240px;margin:auto;padding:26px 22px 64px}.top,.section-head,.toolbar,.builder-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.top{margin-bottom:24px}.top h1{font-size:25px;margin:0}.top h1 span{color:var(--blue)}p{color:var(--muted);margin:2px 0}.static-note{color:var(--blue);font-weight:800;background:#eaf0ff;padding:8px 12px;border-radius:9px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:26px}.stat,.panel{background:var(--card);border:1px solid var(--line);border-radius:16px}.stat{padding:16px 18px}.stat label{display:block;color:var(--muted);font-size:12px}.stat b{display:block;font-size:27px;margin-top:4px}.panel{padding:20px;margin-bottom:24px}.section-head{margin-bottom:14px}.section-head h2{margin:0;font-size:19px}.sort,.mode,.toolbar button,.builder-actions button{border:0;border-radius:9px;background:#edf1ff;color:var(--blue);font-weight:750;padding:8px 11px;cursor:pointer}.sort.active,.mode.active,.builder-actions button{background:var(--blue);color:#fff}.deck{display:grid;grid-template-columns:1fr 70px 80px 80px 80px 95px;align-items:center;gap:15px;border-top:1px solid var(--line);padding:13px 0}.cards{display:flex;gap:5px}.cards img{width:76px;height:96px;object-fit:contain;background:#f0f3fa;border-radius:6px}.rank{font-weight:800;color:var(--muted)}.metric b{display:block;font-size:13px}.metric:first-of-type b{font-size:24px}.rate b{font-size:24px!important;color:#168455}.metric small{color:var(--muted);font-size:11px}.toolbar{justify-content:flex-start;flex-wrap:wrap;background:#f7f9fd;border-radius:11px;padding:10px;margin-bottom:10px}.hint{color:var(--muted);font-size:12px}.rarity-group{display:grid;grid-template-columns:repeat(auto-fill,82px);justify-content:start;gap:8px;background:#fbfcff;border:1px solid var(--line);border-radius:12px;margin:0 0 12px;padding:13px 10px 15px}.rarity-title{grid-column:1/-1;font-size:13px;color:#62708a;margin:0;font-weight:800}.pick{width:82px;height:112px;display:flex;flex-direction:column;align-items:center;background:#f8f9fc;border:1px solid var(--line);border-radius:8px;padding:5px 3px;color:var(--ink);font-size:10px;line-height:1.15;cursor:pointer}.pick img{width:58px;height:72px;object-fit:contain;flex:0 0 72px;margin-bottom:3px}.pick span{height:25px;width:100%;overflow:hidden;text-align:center}.pick.required{outline:3px solid #f0a800}.pick.optional{outline:3px solid var(--blue)}.pick.unavailable{opacity:.5;cursor:not-allowed}.rarity-group:nth-child(1){background:linear-gradient(90deg,#F8B809,#FEBD0C,#FFC835,#F5B20E)}.rarity-group:nth-child(2){background:linear-gradient(90deg,#9BFFA2,#B0EA9F,#F5C1B4,#FFDAC7,#C74EAF)}.rarity-group:nth-child(3){background:linear-gradient(90deg,#D04DFF,#C746FF,#B843FC,#A249EB)}.rarity-group:nth-child(4){background:linear-gradient(90deg,#FACA58,#EEBC51,#FCC367,#E9A656)}.rarity-group:nth-child(5){background:linear-gradient(90deg,#4B8AFF,#5687FF,#4275FD,#4865E2)}.results{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px}.result{border:1px solid var(--line);border-radius:12px;padding:12px}.result .cards{flex-wrap:wrap}.result .cards img{width:54px;height:68px}.replace{color:#a96700;font-size:11px;margin-top:5px}.leftover{margin-top:12px}@media(max-width:850px){.stats{grid-template-columns:repeat(2,1fr)}.deck{grid-template-columns:1fr 70px 70px 70px}.deck .cards{grid-column:1/-1}.results{grid-template-columns:repeat(2,1fr)}}@media(max-width:520px){.wrap{padding:18px 12px}.stats{gap:8px}.stat{padding:12px}.stat b{font-size:22px}.deck{grid-template-columns:1fr 1fr}.deck .metric:nth-of-type(3){display:none}.results{grid-template-columns:1fr}.cards img{width:62px;height:78px}}
.pick{background:transparent;border-color:transparent;box-shadow:none}.pick:hover{background:rgba(255,255,255,.28);border-color:rgba(255,255,255,.5)}.pick.required{outline:none;background:rgba(255,255,255,.94);border-color:rgba(255,255,255,.98);box-shadow:0 4px 12px rgba(30,35,55,.16),inset 0 0 0 1px rgba(255,255,255,.9)}.pick.optional{outline:none;background:rgba(222,230,239,.68);border-color:rgba(255,255,255,.58);box-shadow:0 3px 9px rgba(30,35,55,.12),inset 0 0 0 1px rgba(255,255,255,.4)}.pick.unavailable{background:rgba(235,238,244,.52);border-color:rgba(255,255,255,.45)}
.builder-sticky{position:sticky;top:0;z-index:20;display:flex;justify-content:flex-end;align-items:center;gap:6px;margin:0 -20px 12px;padding:9px 20px;background:rgba(255,255,255,.9);backdrop-filter:blur(10px);border-bottom:1px solid rgba(227,232,241,.7)}.builder-sticky #count{font-size:12px;color:var(--muted);white-space:nowrap;margin-right:2px}.builder-sticky button{min-width:58px}.bottom-actions{justify-content:flex-end;margin-top:14px;margin-bottom:0}.rarity-group{grid-template-columns:repeat(auto-fill,74px);gap:0;margin-bottom:4px;padding:6px 4px 8px}.pick{width:74px;height:104px;padding:2px 0}.pick img{width:54px;height:68px;flex-basis:68px;margin-bottom:0}.pick span{height:22px;line-height:1.05}@media(max-width:600px){body{background:radial-gradient(ellipse at 50% -10%,rgba(255,174,64,.42),transparent 40%),radial-gradient(ellipse at 8% 24%,rgba(81,63,190,.58),transparent 42%),linear-gradient(180deg,#0d1638 0%,#141b4e 44%,#261330 100%);background-attachment:fixed}.wrap{padding:12px 8px}.top{align-items:flex-start}.top h1{font-size:21px}.static-note{font-size:11px;padding:6px 8px}.panel{padding:12px;border-radius:12px}.builder-sticky{margin:0 -12px 10px;padding:8px 12px;top:0}.builder-sticky button{min-width:52px;padding:8px 9px}.builder-sticky #count{font-size:11px}.deck{grid-template-columns:1fr 1fr;gap:7px;padding:10px 0}.deck .cards{grid-column:1/-1;overflow-x:auto}.deck .cards img{width:48px;height:60px}.metric:first-of-type b,.rate b{font-size:20px!important}.rarity-group{grid-template-columns:repeat(auto-fill,74px);gap:0;padding:6px 2px 8px}.pick{width:74px;height:104px}.results{grid-template-columns:1fr}}@media(min-width:601px){body{background:radial-gradient(ellipse at 50% -12%,rgba(255,174,64,.4),transparent 36%),radial-gradient(ellipse at 8% 22%,rgba(81,63,190,.48),transparent 34%),linear-gradient(180deg,#0d1638 0%,#141b4e 46%,#261330 100%);background-attachment:fixed}.panel,.stat{background:rgba(255,255,255,.94);backdrop-filter:blur(8px)}}
.top h1{color:#fff}.top p{color:rgba(255,255,255,.72)}
.hidden{display:none!important}.open-chooser{border:0;border-radius:9px;background:var(--blue);color:#fff;font-weight:800;padding:9px 14px;cursor:pointer}.req-mark{position:relative;display:inline-flex}.result-cards .req-mark img{opacity:.46;filter:saturate(.7)}.req-mark i{position:absolute;right:1px;bottom:1px;background:#b4233c;color:#fff;border-radius:4px;padding:1px 3px;font-size:8px;font-style:normal;font-weight:900}.result-cards{position:relative}.related-title{margin-top:12px;font-size:12px;font-weight:800;color:#55627a}.related-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.related-card{display:flex;align-items:center;gap:4px;background:#f7f9fd;border:1px solid var(--line);border-radius:7px;padding:3px 5px;font-size:11px}.related-card img{width:30px;height:38px;object-fit:contain}.related-card span{font-weight:800}.related-card small{display:block;color:var(--muted);font-size:9px;font-weight:500;white-space:nowrap}.related-empty{font-size:11px;color:var(--muted)}#error-toast{position:fixed;top:18px;left:50%;transform:translate(-50%,-140%);z-index:1000;max-width:min(680px,calc(100vw - 24px));background:#7f1d2d;color:#fff;border:2px solid #ffb4bf;border-radius:12px;padding:12px 16px;box-shadow:0 12px 35px rgba(20,0,10,.3);font-size:13px;line-height:1.5;transition:transform .22s ease}#error-toast.show{transform:translate(-50%,0)}

/* Static Royale-style presentation layer. Official Supercell Store artwork is used as decorative background imagery. */
body{background-color:#0f377d;background-image:linear-gradient(180deg,rgba(15,55,125,.78),rgba(8,27,76,.92)),url('https://store.supercell.com/public/royale-store-preview-cta-figure-USESM2PA.png'),url('https://store.supercell.com/public/divider-coins-NAFZMV66.png');background-position:center top, right 40px top 92px, 8% 64px;background-repeat:no-repeat,no-repeat,no-repeat;background-size:cover,min(560px,48vw) auto,100px auto;background-attachment:fixed}.top h1{color:#fff;text-shadow:0 3px 0 #09285e}.top h1 span{color:#ffd84a}.top p{color:#dbe9ff}.static-note{color:#102b62;background:#ffd84a;border:2px solid #fff;box-shadow:0 4px 0 #09285e}.panel,.stat{background:rgba(248,252,255,.94);border:2px solid rgba(255,255,255,.75);box-shadow:0 10px 28px rgba(4,20,67,.24)}button,.sort,.mode,.toolbar button,.builder-actions button,.open-chooser{border:2px solid #fff;border-radius:999px;background:linear-gradient(180deg,#ffdb58,#f1a91b);color:#132e6b;font-weight:900;box-shadow:0 4px 0 #9a5a08,0 8px 18px rgba(0,0,0,.18);text-transform:uppercase;letter-spacing:.02em;transition:transform .12s ease,filter .12s ease}.sort,.mode,.toolbar button{background:linear-gradient(180deg,#477dff,#2446b8);color:#fff;box-shadow:0 4px 0 #142967,0 7px 16px rgba(0,0,0,.18);text-transform:none}.sort.active,.mode.active,.builder-actions button,.open-chooser{background:linear-gradient(180deg,#ffdf64,#ed9f16);color:#132e6b}.sort:hover,.mode:hover,.toolbar button:hover,.builder-actions button:hover,.open-chooser:hover,button:hover{filter:brightness(1.06);transform:translateY(-1px)}button:active{transform:translateY(2px);box-shadow:0 2px 0 #9a5a08}.deck{border-color:#d5dfef}.result{background:rgba(255,255,255,.75);box-shadow:0 7px 18px rgba(10,31,83,.12)}.result .cards img{width:72px;height:90px;background:transparent}.result-cards .card-result{position:relative;display:inline-flex;width:72px;height:90px;align-items:flex-end;justify-content:center}.result-cards .card-result img{width:72px;height:90px}.result-cards .req-mark img{opacity:1;filter:brightness(.34) saturate(.45) contrast(1.18)}.result-cards .req-mark i{right:2px;bottom:3px;background:#070b18;color:#fff;border:2px solid #ffcf39;border-radius:6px;padding:3px 6px;font-size:12px;line-height:1;font-style:normal;font-weight:1000;letter-spacing:.04em;box-shadow:0 2px 5px #0008}.result-cards .non-opt-mark-wrap:not(.req-mark) img{opacity:.58;filter:grayscale(.15)}.result-cards .non-opt-mark-wrap>b{position:absolute;right:1px;top:1px;color:#fff;background:#26324b;border:1px solid #fff;border-radius:50%;width:17px;height:17px;display:grid;place-items:center;font-size:14px;line-height:1;box-shadow:0 2px 5px #0006}.result-cards .req-mark.non-opt-mark-wrap>b{position:absolute;right:1px;top:1px;color:#fff;background:#26324b;border:1px solid #fff;border-radius:50%;width:17px;height:17px;display:grid;place-items:center;font-size:14px;line-height:1;box-shadow:0 2px 5px #0006}.related-card small{font-size:12px;font-weight:900;color:#1c335f}.related-card{background:#f1f6ff}.related-card img{width:38px;height:48px}.related-title{color:#1c335f}.result p{color:#4c5e7b}.metric:first-of-type b,.rate b{font-size:25px!important}.deck{grid-template-columns:1fr 70px 90px 80px 100px}.deck .metric b{font-size:13px}.deck .metric:first-of-type b,.deck .rate b{font-size:24px}.deck .cards img{background:transparent}
@media(max-width:600px){body{background-position:center top,right -90px 72px,8% 40px;background-size:auto,560px auto,80px auto}.result .cards img,.result-cards .card-result,.result-cards .card-result img{width:64px;height:82px}.deck{grid-template-columns:1fr 1fr}.deck .metric:first-of-type b,.deck .rate b{font-size:20px!important}}
#error-toast{display:none;transform:translate(-50%,-140%)}#error-toast.show{display:block;transform:translate(-50%,0)}
#expert-controls{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}.simple-result .simple-unmatched,.simple-result .simple-downgrade{position:relative;display:inline-flex}.simple-result .simple-unmatched img{filter:grayscale(.75) brightness(.62)}.simple-result .simple-unmatched i,.simple-result .simple-downgrade i{position:absolute;right:0;bottom:1px;color:#fff;border-radius:4px;padding:2px 4px;font-size:10px;font-style:normal;font-weight:900}.simple-result .simple-unmatched i{background:#a41e35}.simple-result .simple-downgrade img{filter:brightness(.9)}.simple-result .simple-downgrade i{background:#7043a6}.simple-result .result-cards{gap:4px}

/* Candidate-card density, special-card tint, and pointer-following usage tooltip. */
.result-cards .req-mark img{opacity:1;filter:brightness(.48) saturate(.62) contrast(1.08)}
.result-cards .req-mark.non-opt-mark-wrap>b{display:none}
.related-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:7px;align-items:start}
.related-card{position:relative;min-width:0;min-height:82px;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:2px;padding:4px 3px;background:#f7f9fd;border:1px solid var(--line);border-radius:8px;text-align:center}
.related-card.special-card{background:linear-gradient(110deg,rgba(190,171,255,.35),rgba(255,223,144,.38))}
.related-card.used-other{opacity:.48;filter:saturate(.72)}
.related-card img{width:48px;height:56px;object-fit:contain;flex:0 0 56px}
.related-card>span{display:flex;flex-direction:column;align-items:center;line-height:1.05;font-weight:900;font-size:10px}
.related-card small{font-size:10px;font-weight:900;color:#1c335f;white-space:nowrap}
#candidate-tooltip{display:none;position:fixed;z-index:2000;pointer-events:none;padding:7px 9px;background:#101a33;color:#fff;border:1px solid #ffcc42;border-radius:7px;box-shadow:0 8px 22px #0007;font-size:12px;font-weight:800;white-space:nowrap}
#candidate-tooltip.show{display:flex;gap:8px}
#candidate-tooltip span.top{color:#ff5b58;font-weight:1000}
.search-debug{white-space:pre-wrap;margin:12px 0;padding:10px 12px;border-radius:10px;background:rgba(20,24,40,.08);font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;color:#263044}
/* Final compact/dense interaction pass */
.builder-actions{min-height:30px;justify-content:flex-start;margin:4px 0 8px}
.builder-actions .hint{font-size:14px;font-weight:800;color:#17356d}
#build{min-width:150px;padding:14px 30px!important;font-size:18px!important;line-height:1.1}
.debug-row{display:flex;justify-content:flex-end;align-items:flex-start;margin:4px 0}
.debug-toggle{border:0!important;background:transparent!important;color:#71809a!important;box-shadow:none!important;font-size:10px!important;padding:3px 6px!important;opacity:.6}
.debug-toggle:hover{opacity:1;transform:none!important}
.search-debug{width:100%;order:2}
.related-list{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:6px}
.related-card{min-height:128px;height:128px;padding:3px 2px;justify-content:flex-start}
.related-card img{width:84px;height:100px;flex:0 0 100px}
.related-card>span{position:static;width:100%;min-height:20px;justify-content:flex-start}
.related-card .related-usage{position:absolute;left:50%;top:76px;transform:translateX(-50%);padding:2px 5px;border-radius:6px;background:rgba(8,20,52,.86);color:#fff;font-size:14px;line-height:1;font-weight:1000;text-shadow:0 1px 2px #000;white-space:nowrap}
.related-card small{font-size:10px;line-height:1.1;min-height:11px}
.rarity-group{grid-template-columns:repeat(auto-fill,minmax(102px,1fr));gap:3px;padding:10px 7px 12px}
.pick{width:102px;height:140px;padding:2px;color:var(--ink);font-size:9px;font-weight:400}
.pick img{width:86px;height:106px;flex-basis:106px;margin-bottom:1px}
.pick span{height:22px;font-weight:400;font-size:9px;line-height:1.05}
.stats{grid-template-columns:repeat(3,1fr)}
.updated-at{margin:8px 0 0;text-align:right;color:#cfe0ff;font-size:11px;min-height:16px}
@media(max-width:850px){.stats{grid-template-columns:repeat(3,1fr)}.related-list{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}.related-card img{width:76px;height:94px;flex-basis:94px}.related-card .related-usage{top:70px}}
@media(max-width:520px){.stats{grid-template-columns:1fr 1fr 1fr;gap:5px}.stat{padding:9px 6px}.stat b{font-size:17px}.rarity-group{grid-template-columns:repeat(4,1fr);padding-left:4px;padding-right:4px}.pick{width:100%;height:128px}.pick img{width:78px;height:96px;flex-basis:96px}.related-list{grid-template-columns:repeat(3,1fr)}.related-card{height:116px;min-height:116px}.related-card img{width:68px;height:82px;flex-basis:82px}.related-card .related-usage{top:59px;font-size:12px}}

/* Tight card presentation and Exclude mode. */
.result-cards{gap:0!important}
.result-cards .card-result,.result-cards .card-result img{width:68px!important;height:86px!important}
.related-list{grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:0!important}
.related-card{height:116px;min-height:116px;border:0;border-radius:2px;padding:0!important;gap:0!important}
.related-card img{width:72px!important;height:88px!important;flex-basis:88px!important}
.related-card .related-usage{top:62px;font-size:16px;padding:3px 6px}
.related-card>span{min-height:18px}
.related-card small{font-size:10px}
.pick{width:78px!important;height:110px!important;padding:0!important;border-radius:4px}
.pick img{width:70px!important;height:88px!important;flex-basis:88px!important;margin:0!important}
.pick span{height:19px;font-size:8px!important;font-weight:400!important}
.rarity-group{grid-template-columns:repeat(auto-fill,78px);gap:0!important;padding:3px 2px 6px!important;margin-bottom:2px!important}
.pick.excluded{background:rgba(106,22,38,.7)!important;box-shadow:inset 0 0 0 2px #ff6676!important;opacity:.68}
.pick.excluded img{filter:grayscale(.8) brightness(.62)}
.more-toggle{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:#243d72;font-weight:800;white-space:nowrap;cursor:pointer}
.more-toggle input{accent-color:#d88914}
.special-help{width:20px!important;height:20px!important;min-width:20px!important;padding:0!important;border-radius:50%!important;font-size:12px!important;line-height:16px!important;text-transform:none!important}
#candidate-tooltip{font-size:17px!important;line-height:1.45!important;padding:10px 13px!important}
#candidate-tooltip .hero-dot::first-letter{color:#ffd229}#candidate-tooltip .ev1-dot::first-letter{color:#ad58ff}#candidate-tooltip .base-dot::first-letter{color:#fff}
#candidate-tooltip .top{font-weight:1000!important;color:#ff4f54!important}
@media(max-width:520px){.related-list{grid-template-columns:repeat(4,1fr)}.related-card{height:104px;min-height:104px}.related-card img{width:62px!important;height:76px!important;flex-basis:76px!important}.related-card .related-usage{top:52px;font-size:13px}.result-cards .card-result,.result-cards .card-result img{width:62px!important;height:78px!important}.rarity-group{grid-template-columns:repeat(4,1fr)}.pick{width:100%!important;height:100px!important}.pick img{width:62px!important;height:78px!important;flex-basis:78px!important}}

.panel-caption{margin:-6px 0 12px;color:#7082a3;font-size:11px}.expand-toggle{border:0;border-radius:999px;background:#e8efff;color:#2446b8;font-weight:900;padding:7px 12px;cursor:pointer}.card-usage-board{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.card-usage-item{position:relative;display:flex;align-items:center;gap:6px;min-width:0;padding:7px;border:1px solid #d9e2f2;border-radius:10px;background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(230,239,255,.88));overflow:hidden}.card-usage-item img{width:43px;height:55px;object-fit:contain;flex:0 0 43px}.card-usage-rank{position:absolute;right:6px;top:4px;color:#8090ad;font-size:10px;font-weight:1000}.card-usage-info{min-width:0;display:flex;flex-direction:column}.card-usage-info strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-usage-info b{font-size:17px;line-height:1.05;color:#d58212}.card-usage-info small{font-size:9px;color:#71809b;white-space:nowrap}@media(max-width:900px){.card-usage-board{grid-template-columns:repeat(4,1fr)}}@media(max-width:600px){.card-usage-board{grid-template-columns:repeat(3,1fr);gap:4px}.card-usage-item{padding:4px;gap:2px;display:block;text-align:center}.card-usage-item img{width:56px;height:66px;margin:auto}.card-usage-info strong{display:block;font-size:9px}.card-usage-info b{font-size:15px}.card-usage-info small{font-size:8px}}
.simple-leftover{margin-top:18px;padding-top:14px;border-top:1px solid rgba(116,137,178,.28)}.simple-leftover h3{margin:0 0 10px;color:#1c335f;font-size:15px}.simple-leftover h3 span{color:#738096;font-size:12px;font-weight:700}.simple-leftover-list{margin-top:0}.simple-leftover-card small,.simple-supplement-card small{display:block;color:#526785;font-size:10px;font-weight:700;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.simple-leftover-empty{margin-top:18px;padding-top:14px;border-top:1px solid rgba(116,137,178,.28);color:#526785;font-weight:700}
.builder-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.builder-tools button{border:0;border-radius:999px;background:linear-gradient(180deg,#477dff,#2446b8);color:#fff;font-weight:900;padding:8px 12px;cursor:pointer;box-shadow:0 4px 0 #142967}.updated-at{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:18px;color:#dbe9ff;font-size:12px}.updated-at nav{display:flex;gap:6px}.updated-at nav button{border:1px solid rgba(255,255,255,.65);border-radius:999px;background:rgba(255,255,255,.14);color:#fff;padding:5px 10px;cursor:pointer;font-size:11px}.updated-at nav button:hover{background:rgba(255,216,74,.9);color:#132e6b}
#candidate-tooltip{width:max-content;max-width:min(230px,calc(100vw - 20px));white-space:normal!important;display:none;flex-direction:column!important;align-items:stretch;gap:3px!important;line-height:1.3;overflow-wrap:anywhere}
#candidate-tooltip.show{display:flex!important}
#candidate-tooltip .tooltip-line{display:block;white-space:nowrap;min-width:0}

/* Keep the usage tile footprint stable while giving its card art more of the
   existing box. The image remains contain-sized, so no card is distorted. */
.card-usage-item{height:72px;padding:3px 5px;gap:4px}
.card-usage-item img{width:57px;height:68px;flex:0 0 57px}

/* SmartisanForge: restrained technical wordmark, readable without neon glow. */
.top h1#brand-title{position:relative;display:inline-block;margin:0;padding:3px 14px 5px 0;color:#fff;text-shadow:none;font-size:clamp(24px,3vw,36px);font-weight:900;letter-spacing:.1em;line-height:1}
.top h1#brand-title::before{content:"";position:absolute;left:0;right:17px;bottom:0;height:2px;background:#ffd84a;transform:skewX(-28deg);transform-origin:left center}
.top h1#brand-title::after{content:"//";position:absolute;right:-1px;top:-2px;color:#ffd84a;font-size:.42em;font-weight:700;letter-spacing:.05em}
#language-switcher button{text-transform:none}
@media(max-width:600px){.card-usage-item{height:92px;padding:3px 2px}.card-usage-item img{width:68px;height:72px;flex-basis:68px}.top h1#brand-title{font-size:22px;letter-spacing:.07em;padding-right:10px}.top h1#brand-title::before{right:12px}.top h1#brand-title::after{right:-2px}}

/* Expert results use the full content width: one complete A/B/C/D section per row. */
.results{display:flex!important;flex-direction:column!important;gap:14px!important;margin-top:14px}
.result{width:100%;padding:16px 18px!important}
.result-cards{display:flex!important;flex-wrap:nowrap!important;gap:10px!important;overflow-x:auto;overflow-y:hidden;padding:3px 2px 7px}
.result-cards .card-result,.result-cards .card-result img{width:104px!important;height:132px!important;flex:0 0 104px!important}
.result-cards .card-result img{object-fit:contain}
.related-title{margin-top:7px!important;font-size:13px!important}
.related-list{display:flex!important;flex-wrap:wrap!important;gap:3px!important;margin-top:6px}
.related-card{width:78px!important;min-width:78px!important;height:116px!important;min-height:116px!important;flex:0 0 78px!important}
.related-card img{width:72px!important;height:88px!important;flex:0 0 88px!important}
.builder-actions{min-height:34px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.result-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex:0 0 auto}
.result-actions button{font-size:11px!important;padding:7px 10px!important;white-space:nowrap}
.search-debug[hidden]{display:none!important}
@media(max-width:900px){.result-cards .card-result,.result-cards .card-result img{width:92px!important;height:118px!important;flex-basis:92px!important}}
@media(max-width:520px){.result{padding:12px 10px!important}.result-cards{gap:6px!important}.result-cards .card-result,.result-cards .card-result img{width:82px!important;height:106px!important;flex-basis:82px!important}.related-card{width:74px!important;min-width:74px!important;flex-basis:74px!important}.related-card img{width:68px!important;height:82px!important;flex-basis:82px!important}.builder-actions{align-items:flex-start}.result-actions{gap:4px}.result-actions button{padding:6px 8px!important;font-size:10px!important}}

/* Give each primary recommendation its own dark, high-contrast stage. The
   lighter inset below remains visually separate for supplemental picks. */
.results .result{
  --result-edge:#f5c74a;
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,rgba(8,19,43,.98),rgba(19,44,78,.96))!important;
  border:1px solid rgba(245,199,74,.72)!important;
  border-top:4px solid var(--result-edge)!important;
  box-shadow:0 14px 30px rgba(4,10,28,.34),inset 0 1px 0 rgba(255,255,255,.12)!important;
}
.results .result:nth-child(2){--result-edge:#aebcff;background:linear-gradient(135deg,rgba(21,22,61,.98),rgba(50,42,88,.96))!important;border-color:rgba(174,188,255,.72)!important}
.results .result:nth-child(3){--result-edge:#6ee1db;background:linear-gradient(135deg,rgba(7,39,49,.98),rgba(28,75,82,.96))!important;border-color:rgba(110,225,219,.72)!important}
.results .result:nth-child(4){--result-edge:#f0a2d4;background:linear-gradient(135deg,rgba(47,19,44,.98),rgba(89,44,84,.96))!important;border-color:rgba(240,162,212,.72)!important}
.results .result::after{content:attr(data-group);position:absolute;right:20px;top:3px;color:var(--result-edge);font-size:52px;font-weight:1000;line-height:1;opacity:.12;pointer-events:none}
.results .result>b{position:relative;z-index:1;display:block;color:#f4f7ff;font-size:16px;letter-spacing:.02em}
.results .result>p{position:relative;z-index:1;color:#c9d7f3}
.results .result-cards{position:relative;z-index:1;background:rgba(3,10,25,.42)!important;border:1px solid rgba(255,255,255,.14);border-radius:14px;box-shadow:inset 0 1px 0 rgba(255,255,255,.08);padding:10px 10px 12px!important}
.results .related-title{position:relative;z-index:1;margin-top:14px!important;padding-top:10px;border-top:1px solid rgba(255,255,255,.22);color:#dce7ff!important;letter-spacing:.03em}
.results .related-list{position:relative;z-index:1;padding:9px!important;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(242,247,255,.93)!important}
.results .related-empty{color:#c9d7f3}

/* Popular decks only: this link is intentionally absent from A/B/C/D results. */
.deck .copy-deck{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 9px;border-radius:9px;background:#edf1ff;color:#2446b8;font-size:11px;font-weight:900;text-align:center;text-decoration:none;white-space:nowrap}
.deck .copy-deck{min-width:0;max-width:100%;border:2px solid #fff;border-radius:999px;background:linear-gradient(180deg,#ffdb58,#f1a91b);color:#132e6b;box-shadow:0 3px 0 #9a5a08,0 6px 12px rgba(0,0,0,.16);letter-spacing:.01em;transition:transform .12s ease,filter .12s ease,box-shadow .12s ease}
.deck .copy-deck:hover{background:linear-gradient(180deg,#ffe47a,#f4b52b);color:#132e6b;filter:brightness(1.06);transform:translateY(-1px)}
.deck .copy-deck:active{transform:translateY(2px);box-shadow:0 1px 0 #9a5a08,0 3px 7px rgba(0,0,0,.14)}
@media(max-width:520px){.deck .copy-deck{font-size:10px;padding:6px 7px;white-space:normal}}

#special-help-tooltip{position:fixed;z-index:160;display:none;max-width:min(300px,calc(100vw - 20px));padding:9px 12px;border:1px solid rgba(255,216,74,.62);border-radius:10px;background:rgba(19,42,91,.96);color:#f7fbff;box-shadow:0 8px 22px rgba(5,16,48,.28);font-size:12px;line-height:1.45;pointer-events:none}
#special-help-tooltip.show{display:block}
.usage-help{margin:0 0 24px;padding:0 14px;border:1px solid rgba(255,255,255,.38);border-radius:12px;background:rgba(7,22,60,.4);color:#fff;box-shadow:0 7px 18px rgba(4,20,67,.12)}
.usage-help summary{padding:9px 2px;color:#fff;cursor:pointer;font-weight:900;font-size:13px;list-style:none}
.usage-help summary::-webkit-details-marker{display:none}
.usage-help summary::before{content:'?';display:inline-grid;place-items:center;width:18px;height:18px;margin-right:7px;border:1px solid rgba(255,216,74,.8);border-radius:50%;color:#ffd84a;font-size:11px}
.usage-help[open]{padding-bottom:13px;background:rgba(7,22,60,.78)}
.usage-help #help-content{padding:0 7px;color:#e7efff;font-size:12px;line-height:1.65}
.usage-help h3,.usage-help h4{margin:8px 0 2px;color:#ffd84a;font-size:13px}
.usage-help p{margin:3px 0;color:#e7efff}.usage-help ul{margin:4px 0 4px 20px;padding:0}.usage-help li{margin:2px 0}

/* Keep DEBUG as a quiet bottom-right drawer; it must never consume result space. */
.debug-row{position:fixed!important;right:12px;top:calc(100vh - 30px);bottom:auto!important;z-index:110;width:auto!important;margin:0!important;display:flex;flex-direction:column-reverse;align-items:flex-end;pointer-events:none}
.debug-toggle{pointer-events:auto!important;position:relative;z-index:2}
.debug-row .search-debug:not([hidden]){pointer-events:auto;position:fixed;right:12px;top:max(12px,calc(100vh - min(70vh,520px) - 44px));bottom:auto;width:min(720px,calc(100vw - 24px));max-height:70vh;overflow:auto;margin:0;background:rgba(245,248,255,.97);box-shadow:0 10px 28px rgba(4,20,67,.24)}

/* Popular decks: keep the card strip, compact metrics, and copy action on one
   desktop row.  The three metrics are intentionally stacked beside the art. */
.deck{grid-template-columns:minmax(0,1fr) 124px 118px!important;align-items:center;column-gap:10px!important;row-gap:0!important;padding:10px 0!important}
.deck>.cards{grid-column:1!important;grid-row:1!important;min-width:0;align-items:center;gap:4px!important;overflow-x:auto;overflow-y:hidden}
.deck>.cards img{width:76px!important;height:96px!important;flex:0 0 76px!important}
.deck>.deck-info{grid-column:2!important;grid-row:1!important;display:flex;flex-direction:column;gap:3px;min-width:0}
.deck>.deck-info .rank{align-self:flex-start;font-size:11px;line-height:1}
.deck>.deck-info .metric{display:flex;align-items:baseline;justify-content:space-between;gap:6px;min-width:0;line-height:1.05}
.deck>.deck-info .metric b{font-size:13px!important;white-space:nowrap}
.deck>.deck-info .metric.usage b,.deck>.deck-info .metric.rate b{font-size:22px!important}
.deck>.deck-info .metric small{font-size:10px;white-space:nowrap}
.deck>.copy-deck{grid-column:3!important;grid-row:1!important;justify-self:stretch;align-self:center;min-width:0;font-size:10px;line-height:1.15;padding:7px 8px;white-space:normal}
@media(max-width:850px){.deck{grid-template-columns:minmax(0,1fr) 104px 102px!important;gap:7px!important}.deck>.cards{grid-column:1!important;grid-row:1!important}.deck>.cards img{width:62px!important;height:78px!important;flex-basis:62px!important}.deck>.deck-info{grid-column:2!important;grid-row:1!important}.deck>.copy-deck{grid-column:3!important;grid-row:1!important}}
@media(max-width:520px){.deck{grid-template-columns:minmax(0,1fr) 92px!important;gap:6px!important;padding:8px 0!important}.deck>.cards{grid-column:1/-1!important;grid-row:1!important}.deck>.cards img{width:48px!important;height:60px!important;flex-basis:48px!important}.deck>.deck-info{grid-column:1!important;grid-row:2!important}.deck>.copy-deck{grid-column:2!important;grid-row:2!important;font-size:9px;padding:6px 5px}.deck>.deck-info .metric.usage b,.deck>.deck-info .metric.rate b{font-size:18px!important}.deck>.deck-info .metric small{font-size:9px}}
