/* Factions screen faction profile (owner, 2026-10-31): the right-hand column shows each civilization's flavor, its
   strengths and weaknesses, three signature cards, its passive and its hero appearances. The roster is chosen on Play,
   so "Your roster" and its slots appear only while a custom room's roster is edited here (.is-picking, client.mjs).
   Art: the owner's gold rule (ornaments), the gold/green checkmarks and the accepted card frames; nothing is drawn.
   Doubled ids outrank the older panel rules (dialogue-collection, dialogue-faction-draft, account-ui), some !important. */
#wb-lobby#wb-lobby .wb-explorer-roster:not(.is-picking)>h2,#wb-lobby#wb-lobby .wb-explorer-roster:not(.is-picking) #wb-faction-slots{display:none!important}
#wb-lobby#wb-lobby .wb-explorer-roster:not(.is-picking) #wb-faction-detail{padding-top:2px!important}
/* The profile takes the room the window gives it: no 1480px cap on the Factions page, and a column that grows to 620px. */
@media(min-width:1101px){
 #wb-lobby#wb-lobby #wb-selector-factions-panel#wb-selector-factions-panel{max-width:none;grid-template-columns:minmax(0,1fr) clamp(348px,36%,620px)}
}
/* Ultrawide windows (owner, 2026-10-31: 21:9 and 32:9 felt "weirdly spread out"). The interface is drawn at fixed sizes,
   so the page's comfortable width follows the window's height: about 1.6 times it, never under 1640px and never over
   2240px, centred. A 1920x1080 or narrower window never reaches the cap and is unchanged; 2560x1080 keeps about the
   1920 composition, and 3440x1440 or 5120x1440 stays one grouped page instead of stretching to the edges. */
@media(min-width:1101px){
 #wb-lobby#wb-lobby #wb-selector-factions-panel#wb-selector-factions-panel{max-width:max(1640px,min(2240px,160vh))}
}
/* A wide catalog adds columns of about the usual tile width instead of spreading five tiles across the column; under
   1180px (every 16:9 window up to 1920 wide) it keeps its five. */
#wb-lobby#wb-lobby #wb-selector-factions-panel .wb-explorer-collection{container:wb-catalog/inline-size}
@container wb-catalog (min-width:1180px){
 #wb-lobby#wb-lobby #wb-factions{grid-template-columns:repeat(auto-fill,minmax(196px,1fr))!important}
}
#wb-lobby#wb-lobby #wb-faction-detail{container:wb-profile/inline-size;scrollbar-width:thin;scrollbar-color:#846c47 transparent}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile{gap:14px;padding:0 4px 8px 0}

/* Heading: crest, name and leader, then the one-line identity and the faction level. */
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-detail-heading{gap:14px}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-detail-heading>.wb-faction-crest{width:58px;height:58px}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-detail-heading h2{margin:0 0 3px;font:26px/1.08 WarbandFriz,Georgia,serif!important;color:#ffd100;text-shadow:0 1px 2px #000,0 0 8px #000}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile.wb-faction-account-locked .wb-draft-detail-heading h2{color:#b9ad95!important}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-detail-heading span{font:12px/1.3 Arial,sans-serif!important;color:#b7a582}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-identity{margin:-4px 0 0;font:italic 14px/1.45 Georgia,'Times New Roman',serif;color:#d9c49a;text-shadow:0 1px 1px #000}

/* One heading style for every section: Friz gold on the owner's gold rule. */
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile :is(.wb-profile-unlock,.wb-profile-list,.wb-profile-showcase,.wb-draft-passive,.wb-hero-skins)>h3{
 position:relative;margin:0 0 9px;padding:0 0 7px;font:14px/1.2 WarbandFriz,Georgia,serif!important;letter-spacing:.02em;text-transform:none;color:#f0c75e;text-shadow:0 1px 2px #000}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile :is(.wb-profile-unlock,.wb-profile-list,.wb-profile-showcase,.wb-draft-passive,.wb-hero-skins)>h3::after{
 content:'';position:absolute;left:0;right:0;bottom:0;height:6px;background:url('./skin/ornaments/line-gold.png') left center/100% 100% no-repeat;opacity:.75}

/* A faction the account does not own leads with its unlock, in place of its level (no bar of any kind): a warm,
   gold-edged block with the shared one-line Valor and Warcoin unlock links, or the lock's own condition. A lock icon
   sits beside the faction name. */
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock{position:relative;padding:12px 14px 14px;border:1px solid #c9a24f73;border-radius:2px;
 background:radial-gradient(ellipse 90% 70% at 50% 0,#e2b45a2b,#e2b45a00 70%),linear-gradient(#1d160fd9,#120d09e6);box-shadow:inset 0 0 0 1px #000a,0 0 22px #e2b45a1f}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock>h3{color:#ffd100}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock :is(.wb-faction-access-note,.wb-faction-access){margin:0!important}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock .wb-faction-unlock-links{flex-wrap:nowrap;margin-top:0}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock .wb-faction-access+.wb-faction-unlock-links{margin-top:10px!important}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock .wb-unlock-link,#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock .wb-unlock-link span{white-space:nowrap}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock-row .wb-faction-access-note{flex:1;min-width:0}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-unlock-row .wb-profile-queue{flex:none;width:auto;margin:0!important;padding-inline:16px!important;white-space:nowrap}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-detail-heading h2{display:flex;align-items:center;gap:9px}
/* The heading's old image frame (border, radius, shadow) is for the crest only; the lock shows bare. */
#wb-lobby#wb-lobby #wb-faction-detail .wb-draft-detail-heading img.wb-profile-lock{width:22px;height:22px;flex:none;border:0;border-radius:0;box-shadow:none;object-fit:contain;filter:drop-shadow(0 1px 2px #000)}

/* Strengths and weaknesses: plain lines; a green check for each strength, a dim red mark for each weakness. */
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-traits{display:flex;flex-direction:column;gap:14px}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-list ul{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-list li{position:relative;padding:0 0 0 24px;font:13.5px/1.4 Arial,sans-serif;color:#e6dcc8;text-shadow:0 1px 1px #000}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-strengths li::before{content:'';position:absolute;left:1px;top:2px;width:16px;height:14px;background:url('./skin/checkmarks/check-green.png?art=checks-v1') center/contain no-repeat}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-weaknesses li{color:#cfc3ad}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-weaknesses li::before{content:'';position:absolute;left:5px;top:6px;width:7px;height:7px;background:#b4472f;box-shadow:0 0 0 1px #000,0 0 6px #b4472f80;transform:rotate(45deg)}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-weaknesses h3{color:#d9a27a}

/* Three signature cards in the accepted card frames, at a third of the column. */
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-showcase{container-type:inline-size}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-cards{--wb-card-w:min(150px,calc((100cqw - 24px) / 3));display:grid;grid-template-columns:repeat(3,var(--wb-card-w));justify-content:space-evenly;gap:8px;margin:0;padding:2px 0 0;list-style:none}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-cards>li{display:flex;justify-content:center;filter:drop-shadow(0 4px 6px #000a)}
#wb-lobby#wb-lobby #wb-faction-detail .wb-profile-cards .wb-card{pointer-events:none}

/* Cards & Enchantments is the red owner button at its own width, a little taller than the default. */
#wb-lobby#wb-lobby#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-view-cards.wb-owner-button--ready{--rb-h:50px;align-self:flex-start;width:auto;justify-content:center;padding-inline:26px!important;font-size:15px!important}

/* The passive keeps its full text at reading size. */
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-passive{flex:none;min-height:0;overflow:visible}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-passive .wb-passive{font:13px/1.55 Arial,sans-serif!important;color:#ddd3c0}

/* Hero appearances: a quiet list. No boxes; the worn look carries a gold edge, a warm wash and the gold tick. */
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skins{gap:0}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skins>h3{margin-bottom:4px}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skin-list{gap:0}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin{
 display:grid;grid-template-columns:30px minmax(0,1fr) max-content;align-items:center;gap:10px;width:100%;min-height:44px;margin:0;padding:5px 8px 5px 6px!important;
 border:0!important;border-bottom:1px solid #f3d08a17!important;border-radius:0;background:none!important;box-shadow:none!important;text-align:left}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skin-crest{width:30px;height:30px}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skin-name strong{font:13px/1.2 WarbandFriz,Georgia,serif!important;color:#e9d6a4}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skin-name small{font:11px/1.2 Arial,sans-serif!important;color:#9d8f75}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin.is-equipped{background:linear-gradient(90deg,#e2b45a2e,#e2b45a0d 65%,#0000)!important;box-shadow:inset 2px 0 #e2b45a!important}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin.is-equipped .wb-hero-skin-name strong{color:#ffd100}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin:not(.is-equipped):is(:hover,:focus-visible){background:linear-gradient(90deg,#f3d08a1c,#0000)!important;outline:0}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin:focus-visible{outline:1px solid #ffd100!important;outline-offset:-1px}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin-locked .wb-hero-skin-name strong{color:#b8aa8c}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin-locked .wb-hero-skin-crest{filter:grayscale(.65) brightness(.8)}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin-locked .wb-hero-skin-unlock{min-height:0!important;color:#d8b25a!important;font:11px/1.2 WarbandFriz,Georgia,serif!important;letter-spacing:.02em}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin-locked:is(:hover,:focus-visible) .wb-hero-skin-unlock{outline:0;text-decoration:none;color:#ffe08a!important}
#wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile button.wb-hero-skin-locked:is(:hover,:focus-visible) .wb-hero-skin-name strong{color:#e9d6a4}

/* A wide column (owner, 2026-10-31: use the whole space): strengths beside weaknesses, larger cards and the hero
   appearances in two columns. */
@container wb-profile (min-width:470px){
 #wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile{gap:18px}
 #wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-detail-heading>.wb-faction-crest{width:72px;height:72px}
 #wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-draft-detail-heading h2{font-size:31px!important}
 #wb-lobby#wb-lobby #wb-faction-detail .wb-profile-identity{font-size:15px}
 #wb-lobby#wb-lobby #wb-faction-detail .wb-profile-traits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
 #wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skins{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px}
 #wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skins>h3{grid-column:1/-1}
 #wb-lobby#wb-lobby #wb-faction-detail .wb-faction-profile .wb-hero-skin-list{display:contents}
}
