/* Gangs in the companies shell (see docs/UI-DESIGN-STANDARD.md). Loaded after gang.css and responsive.css, so the page chrome here overrides them. */
#cx .gang-page{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;display:grid;gap:12px;background:none!important;min-width:0;animation:cx-rise .35s ease both}
#cx .gx-head[hidden]{display:none!important}
#cx .cx-head h1{font-family:inherit!important;font-size:22px!important;font-weight:900!important;text-transform:none!important;letter-spacing:-.01em!important}
#cx .gang-headquarters{display:grid;gap:12px;min-width:0}
#cx .gang-hq-layout{display:block!important}
#cx .gang-tab-content{min-width:0}

/* section tabs in the sidebar */
.gx .cx-side{overflow-y:auto}
.gx .cx-nav .gang-tab-button{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:1px solid transparent;border-radius:9px;background:none;color:#9ba6b5;font:inherit;font-size:13px;font-weight:600;text-align:left;cursor:pointer;min-height:0}
.gx .cx-nav .gang-tab-button:hover{background:rgba(255,255,255,.06);color:#f4f6f8}
.gx .cx-nav .gang-tab-button.is-active{background:rgba(224,184,76,.12);border-color:rgba(224,184,76,.25);color:var(--cx-lime-soft)}
.gx .cx-nav .gang-tab-button__icon{display:grid;place-items:center;width:20px;height:20px;flex:0 0 20px}
.gx .cx-nav .gang-tab-button__icon img{width:100%;height:100%;object-fit:contain}
.gx .cx-nav .gang-tab-button strong{font-weight:600;font-size:13px}
.gx .cx-nav .gang-tab-button em{margin-left:auto;font-style:normal;font-family:var(--font-mono);font-size:11px;padding:0 6px;border-radius:999px;background:rgba(240,109,114,.2);color:#f59a9e}

/* narrow screens: the sections sit above the page */
@media (max-width:1000px){
.gx .cx-side{display:block;position:static;height:auto;width:auto;flex:none;padding:10px 12px;border-right:0;border-bottom:1px solid var(--cx-line)}
.gx .cx-brand{display:none}
.gx .cx-nav{margin-top:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.gx .cx-nav .gang-tab-button,.gx .cx-nav>a{padding:6px 10px;font-size:12px;border-color:var(--cx-line)}
}

/* compact headquarters banner and thin metric strip */
#cx .gang-hq-banner{min-height:0!important;padding:10px 14px!important;border-radius:10px!important;gap:12px!important;align-items:center}
#cx .gang-hq-banner__signal{display:none!important}
#cx .gang-hq-banner__identity{gap:12px!important;align-items:center}
#cx .gang-hq-banner .gang-emblem--large{width:44px!important;height:44px!important;font-size:15px!important;border-radius:11px!important}
#cx .gang-hq-banner__copy h2{font-size:20px!important;margin:0!important;line-height:1.15}
#cx .gang-hq-banner__copy p{margin:1px 0 4px!important;font-size:12px!important}
#cx .gang-hq-banner__copy .gang-kicker{font-size:10px!important}
#cx .gang-hq-banner__meta{gap:12px!important;font-size:12px!important}
#cx .gang-hq-banner__rank{padding:6px 12px!important;min-width:0!important}
#cx .gang-hq-banner__rank strong{font-size:14px!important}
#cx .gang-dashboard-metrics{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
#cx .gang-dashboard-metrics .gang-hq-metric{display:flex!important;align-items:center;gap:10px;padding:6px 12px!important;min-height:0!important;border-radius:10px!important}
#cx .gang-hq-metric .gang-metric-card__icon{width:28px!important;height:28px!important;flex:0 0 28px}
#cx .gang-hq-metric .gang-metric-card__icon svg,#cx .gang-hq-metric .gang-metric-card__icon img{width:100%;height:100%}
#cx .gang-hq-metric__copy{display:grid;gap:0;min-width:0}
#cx .gang-hq-metric__copy span{font-size:10px!important;letter-spacing:.12em;text-transform:uppercase}
#cx .gang-hq-metric__copy strong{font-size:15px!important;line-height:1.2}
#cx .gang-hq-metric__copy small{font-size:11px!important}
#cx .gang-hq-metric__progress{height:4px!important;margin-top:3px!important}
@media (max-width:900px){#cx .gang-dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}#cx .gang-hq-banner{flex-wrap:wrap}}
#cx .gang-profile-page .gang-profile-backbar{display:none}

/* public gang profile: compact identity banner, thin stat strip */
#cx .gang-profile-identity{padding:10px 14px!important;border-radius:10px!important;min-height:0!important}
#cx .gang-profile-identity__content{gap:10px!important;padding:0!important}
#cx .gang-profile-identity h1{font-family:inherit!important;font-size:22px!important;font-weight:900!important;margin:0!important;line-height:1.15}
#cx .gang-profile-identity .gang-emblem{width:48px!important;height:48px!important;font-size:15px!important;border-radius:12px!important}
#cx .gang-profile-identity p{margin:2px 0!important;font-size:12px!important}
#cx .gang-profile-metrics{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))!important;gap:6px!important}
#cx .gang-profile-metrics>*{padding:5px 12px!important;min-height:0!important;border-radius:9px!important;display:flex!important;align-items:baseline;justify-content:space-between;gap:8px}
#cx .gang-profile-metrics strong{font-size:15px!important}
#cx .gang-profile-metrics span,#cx .gang-profile-metrics small{font-size:10px!important}
#cx .gang-profile-page .gang-panel{border-radius:10px!important}

/* thin directory rows */
#cx .gang-directory-list{display:grid!important;gap:5px!important}
#cx .gang-directory-row{display:flex!important;align-items:center!important;gap:10px!important;padding:3px 10px!important;min-height:0!important;border:1px solid var(--cx-line)!important;border-radius:9px!important;background:rgba(255,255,255,.02)!important;box-shadow:none!important}
#cx .gang-directory-row__identity{display:flex!important;align-items:center;gap:8px!important;flex:1 1 0;min-width:0}
#cx .gang-directory-row__emblem{width:26px!important;height:26px!important;flex:0 0 26px;font-size:10px!important;border-radius:7px!important}
#cx .gang-directory-row__identity>div:last-child{display:flex;align-items:baseline;gap:8px;min-width:0;flex-wrap:nowrap}
#cx .gang-directory-row h3{margin:0!important;font-size:14px!important;white-space:nowrap}
#cx .gang-directory-row p{margin:0!important;font-size:11px!important;color:var(--cx-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#cx .gang-directory-row small{font-size:11px!important;white-space:nowrap;color:var(--cx-muted)}
#cx .gang-directory-row .gang-recruitment-pill{padding:0 8px!important;font-size:10px!important;line-height:18px;min-height:0!important}
#cx .gang-directory-row__metrics{display:flex!important;gap:12px!important;margin:0!important;padding:0!important}
#cx .gang-directory-row__metrics>div{display:flex;align-items:baseline;gap:4px;padding:0!important;border:0!important;background:none!important}
#cx .gang-directory-row__metrics dt{font-size:10px!important;letter-spacing:.1em;text-transform:uppercase;color:var(--cx-muted);margin:0}
#cx .gang-directory-row__metrics dd{font-size:13px!important;margin:0!important;font-family:var(--font-mono)}
#cx .gang-directory-row__action{min-height:0!important;padding:4px 12px!important;font-size:12px!important;white-space:nowrap;flex:0 0 auto}
@media (max-width:1100px){
#cx .gang-directory-row{flex-wrap:wrap!important;gap:3px 8px!important}
#cx .gang-directory-row__identity{flex:1 1 100%}
#cx .gang-directory-row__identity>div:last-child{flex-wrap:wrap;gap:0 8px}
#cx .gang-directory-row__metrics{flex:1 1 0;min-width:0;gap:8px!important;flex-wrap:wrap}
#cx .gang-directory-row__metrics dt{font-size:9px!important}
}

/* ===== match the standard layout: panels, headings, strips, buttons, fields ===== */
#cx .gang-panel{border:1px solid var(--cx-line)!important;border-radius:10px!important;background:linear-gradient(165deg,var(--cx-panel),var(--cx-panel2))!important;box-shadow:none!important;padding:10px 14px!important}
#cx .gang-panel::before,#cx .gang-panel::after{display:none!important}
#cx .gang-panel:hover{transform:none!important;box-shadow:none!important}
#cx .gang-kicker{display:none!important}
#cx .gang-panel__heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-10px -14px 10px!important;padding:7px 14px!important;border-bottom:1px solid var(--cx-line)}
#cx .gang-panel__heading h2,#cx .gang-panel__heading h3,#cx .gang-panel h3{margin:0!important;font-family:inherit!important;font-size:12px!important;font-weight:700!important;letter-spacing:.14em!important;text-transform:uppercase!important;color:#d5dbe3!important}
#cx .gang-heading-icon,#cx .gang-panel__heading>span:not(.gang-count-badge){font-size:14px!important}
#cx .gang-tab-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px!important;padding:0!important;border:0!important;background:none!important}
#cx .gang-tab-heading h2{margin:0!important;font-family:inherit!important;font-size:22px!important;font-weight:900!important;letter-spacing:-.01em!important;text-transform:none!important}
#cx .gang-tab-heading p{display:none!important}
#cx .gang-rank-chip{padding:1px 8px!important;font-size:10px!important;letter-spacing:.08em;text-transform:uppercase;border-radius:5px!important}
#cx .gang-announcement-strip,#cx .gang-chain-strip{padding:6px 12px!important;border-radius:10px!important;gap:10px!important;min-height:0!important}
#cx .gang-announcement-strip p,#cx .gang-announcement-strip strong{font-size:13px!important;margin:0!important}
#cx .gang-announcement-strip__icon,#cx .gang-chain-strip__icon{font-size:15px!important;width:auto!important;height:auto!important}
#cx .gang-empty-announcement{padding:6px 12px!important;font-size:13px!important;border-radius:10px!important;min-height:0!important}
#cx .gang-btn{min-height:0!important;padding:8px 14px!important;font-size:13px!important;font-weight:700!important;border-radius:8px!important}
#cx .gang-btn--small,#cx .gang-btn--sm,#cx .gang-text-btn{padding:5px 10px!important;font-size:12px!important}
#cx .gang-form label>span{font-size:10px!important;font-weight:700!important;letter-spacing:.16em!important;text-transform:uppercase!important;color:var(--cx-muted)!important}
#cx .gang-form input,#cx .gang-form select,#cx .gang-form textarea,#cx .gang-search-field input{min-height:36px;padding:7px 11px!important;border:1px solid #232c38!important;border-radius:8px!important;background:rgba(0,0,0,.3)!important;color:var(--cx-text)!important;font-size:14px!important}
#cx .gang-form textarea{min-height:70px}
#cx .gang-form input:focus,#cx .gang-form select:focus,#cx .gang-form textarea:focus{outline:none;border-color:rgba(224,184,76,.55)!important;box-shadow:0 0 0 3px rgba(224,184,76,.12)!important}
#cx .gang-form small{font-size:11px!important}
#cx .gang-form--stacked{display:grid;gap:10px}

/* found-a-gang and applications screens */
#cx .gang-create-panel{max-width:620px}
#cx .gang-outsider-visual{display:none!important}
#cx .gang-creation-price{padding:8px 12px!important;border-radius:10px!important;margin:0 0 10px!important}
#cx .gang-creation-price strong{font-size:18px!important}
#cx .gang-creation-price p{font-size:12px!important;margin:2px 0!important}
#cx .gang-status-card{max-width:620px;display:flex;align-items:center;gap:12px}
#cx .gang-status-card h3{font-size:13px!important}
#cx .gang-status-card p{font-size:12px!important;margin:2px 0 0!important;color:var(--cx-muted)}
#cx .gang-invitation-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 10px!important;border:1px solid var(--cx-line);border-radius:9px;background:rgba(255,255,255,.02)}
#cx .gang-invitation-list{display:grid;gap:5px}
#cx .gang-directory-section .gang-section-heading{margin-bottom:8px}
#cx .gang-directory-section h2{font-family:inherit!important;font-size:12px!important;font-weight:700!important;letter-spacing:.14em;text-transform:uppercase;color:#d5dbe3}
#cx .gang-search-field{min-height:36px;border-radius:8px!important;padding:0 10px!important}

/* nothing scrolls sideways: fold wide grids and tables down */
#cx .gang-tab-heading{flex-wrap:wrap}
#cx .gang-vault-history-grid,#cx .gang-vault-grid,#cx .gang-overview-grid{grid-template-columns:minmax(0,1fr)!important}
@media (min-width:1101px){#cx .gang-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
#cx .gang-member-table-wrap,#cx .ec-table-shell{max-width:100%;overflow-x:hidden}
@media (max-width:1100px){
#cx .gang-member-table th:nth-child(4),#cx .gang-member-table td:nth-child(4),
#cx .gang-member-table th:nth-child(5),#cx .gang-member-table td:nth-child(5),
#cx .gang-member-table th:nth-child(6),#cx .gang-member-table td:nth-child(6){display:none}
#cx .gang-member-table{width:100%!important;table-layout:auto}
}
#cx .gang-page,#cx .gang-headquarters,#cx #gangApp{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}
#cx .gang-tab-content,#cx .gang-tab-content>*{min-width:0;max-width:100%}

/* gang emblem: a fixed square that fits up to five letters */
#cx .gang-hq-banner .gang-emblem--large,#cx .gang-profile-identity .gang-emblem{width:48px!important;height:48px!important;min-width:48px!important;flex:0 0 48px!important;aspect-ratio:1/1;padding:0!important;display:grid!important;place-items:center;font-size:11px!important;letter-spacing:0!important;line-height:1!important;overflow:hidden;text-align:center}
#cx .gang-directory-row__emblem{aspect-ratio:1/1;min-width:26px!important;padding:0!important;display:grid;place-items:center;font-size:9px!important;letter-spacing:0!important;overflow:hidden}

/* headquarters and members in the companies layout */
#cx .gang-hq-head .cx-head h1,#cx .gang-hq-head h1{align-items:center}
#cx .gang-hq-emblem{width:48px;height:48px;flex:0 0 48px;font-size:11px;font-weight:800;letter-spacing:0;color:var(--cx-lime-soft);border-color:rgba(224,184,76,.4)!important;background:rgba(224,184,76,.1)!important;overflow:hidden}
#cx .gang-pair{margin-bottom:0}
#cx .gang-lost{color:var(--cx-muted);font-weight:400;font-family:inherit}
#cx .gang-membership-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 14px;font-size:13px;color:var(--cx-muted)}
#cx .cx-section.is-flush>.gang-activity-feed{padding:8px 14px;display:grid;gap:5px}
#cx .cx-section.is-flush>div:not([class]){padding:8px 14px}
#cx .cx-section>header .gang-search-field{min-height:30px;padding:0 8px!important;max-width:240px}
#cx .cx-section>header .gang-search-field input{min-height:0;padding:3px 6px!important;border:0!important;background:none!important;font-size:13px!important}
#cx .gang-member-table .gang-member-identity{display:flex;align-items:center;gap:8px;text-decoration:none;color:inherit}
#cx .gang-member-table .gang-member-identity strong{font-size:14px;color:#f4f6f8;display:block}
#cx .gang-member-table .gang-member-identity small{font-size:11px;color:var(--cx-muted);display:block}
#cx .gang-member-table .gang-avatar-wrap{width:26px;height:26px;flex:0 0 26px;border-radius:7px;overflow:hidden}
#cx .gang-member-table .gang-avatar-wrap img{width:100%;height:100%;object-fit:cover}
#cx .gang-member-table .gang-table-note{display:block;font-size:11px;color:var(--cx-muted)}
#cx .gang-member-table .gang-table-actions{display:inline-flex;gap:4px}
@media (min-width:1101px){#cx .gang-member-table th.cx-m-hide,#cx .gang-member-table td.cx-m-hide{display:table-cell!important}}

/* member avatar: small picture with a corner presence dot */
#cx .gang-member-table .gang-avatar-wrap{position:relative;width:28px!important;height:28px!important;flex:0 0 28px!important;overflow:visible!important;border-radius:0!important}
#cx .gang-member-table .gang-avatar-wrap img{width:28px!important;height:28px!important;border-radius:8px!important;object-fit:cover;display:block}
#cx .gang-member-table .gang-avatar-wrap::after{width:8px!important;height:8px!important;right:-3px!important;bottom:-3px!important;border:2px solid var(--cx-panel)!important;box-sizing:content-box}
#cx .gang-member-table .gang-avatar-wrap img{min-width:0!important;max-width:28px!important;min-height:0!important;flex:0 0 28px!important}

/* thin roster rows */
#cx .gang-member-table td{padding-top:2px;padding-bottom:2px}
#cx .gang-member-table .gang-rank-badge,#cx .gang-member-table .gang-member-status{min-height:20px;padding:0 8px;font-size:11px;line-height:1}
#cx .gang-member-table .gang-avatar-wrap,#cx .gang-member-table .gang-avatar-wrap img{width:24px!important;height:24px!important;flex-basis:24px!important;max-width:24px!important}
#cx .gang-member-table .cx-btn{min-height:24px;height:24px;min-width:0;padding:0 8px;font-size:12px;line-height:1.3}

/* roster action buttons: gold for roles, red for removal */
#cx .gang-member-table .gang-table-actions{gap:6px;align-items:center}
#cx .gang-member-table .gang-icon-btn{display:inline-grid;place-items:center;width:30px;min-width:30px;height:24px;min-height:24px;padding:0!important;border:1px solid rgba(224,184,76,.4);border-radius:7px;background:rgba(224,184,76,.1);color:#ffe083;font-size:16px;line-height:1;transition:background .15s,border-color .15s,color .15s}
#cx .gang-member-table .gang-icon-btn .ec-ui-icon{width:15px;height:15px;margin:0;stroke:currentColor}
#cx .gang-member-table .gang-icon-btn:hover{transform:none;background:rgba(224,184,76,.24);border-color:#e0b84c;color:#fff}
#cx .gang-member-table .gang-icon-btn--reject{border-color:rgba(255,98,111,.4);background:rgba(255,98,111,.1);color:#ff9aa2}
#cx .gang-member-table .gang-icon-btn--reject:hover{background:rgba(255,98,111,.26);border-color:#ff626f;color:#fff}
#cx .gang-member-table .gang-icon-btn:focus-visible{outline:2px solid #e0b84c;outline-offset:2px}
@media (max-width:640px){
#cx .gang-member-table th,#cx .gang-member-table td{padding-left:4px;padding-right:4px;white-space:nowrap}
#cx .gang-member-table th{font-size:9px;letter-spacing:.05em}
#cx .gang-member-table .cx-plate{min-width:0;max-width:none;padding:0 6px}
#cx .gang-member-table .cx-plate b{font-size:11px;white-space:nowrap}
#cx .gang-member-table .gang-rank-badge{min-height:18px;padding:0 6px;font-size:10px;white-space:nowrap}
#cx .gang-member-table .gang-table-actions{gap:4px}
#cx .gang-member-table .gang-icon-btn{width:26px!important;min-width:26px!important;height:22px!important;min-height:22px!important;border-radius:6px}
#cx .gang-member-table .gang-icon-btn .ec-ui-icon{width:13px;height:13px}
}

/* headquarters card: title bar with Infamy, details on the left and the gang banner on the right */
#cx .gang-hq-card>header{padding:8px 14px}
#cx .gang-hq-card>header h2{font-size:14px!important}
#cx .gang-hq-infamy{display:inline-flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:14px;font-weight:700;color:var(--cx-lime-soft)}
#cx .gang-hq-infamy__icon{display:inline-grid;place-items:center;width:20px;height:20px}
#cx .gang-hq-infamy__icon svg,#cx .gang-hq-infamy__icon img{width:100%;height:100%}
#cx .cx-section.is-flush>.gang-hq-card__body{display:flex;gap:16px;align-items:stretch;padding:12px 14px}
#cx .gang-hq-card__list{margin:0;display:grid;gap:3px;align-content:start;flex:0 0 230px;font-size:13px}
#cx .gang-hq-card__list>div{display:flex;gap:6px;align-items:baseline}
#cx .gang-hq-card__list dt{margin:0;color:var(--cx-muted);flex:0 0 auto}
#cx .gang-hq-card__list dt::after{content:":"}
#cx .gang-hq-card__list dd{margin:0;font-weight:600;color:#f4f6f8;min-width:0;overflow:hidden;text-overflow:ellipsis}
#cx .gang-hq-card__banner{flex:1 1 0;min-height:120px;border:1px solid var(--cx-line);border-radius:8px;background-size:cover;background-position:center;display:grid;place-items:center;overflow:hidden}
#cx .gang-hq-card__crest{font-size:28px;font-weight:900;letter-spacing:.06em;color:var(--cx-lime-soft);text-shadow:0 2px 12px rgba(0,0,0,.6)}
@media (max-width:760px){#cx .cx-section.is-flush>.gang-hq-card__body{flex-direction:column}#cx .gang-hq-card__list{flex-basis:auto}#cx .gang-hq-card__banner{min-height:90px}}

/* organised crimes: thin expandable rows */
#cx .oc-list{padding:8px 14px}
#cx .oc-item{--rar:#e0b84c}
#cx .oc-item.is-ready{--rar:#4fd786}
#cx .oc-item>summary{list-style:none;cursor:pointer;border:0;border-radius:0;background:transparent;padding:3px 10px;gap:10px}
#cx .oc-item>summary::-webkit-details-marker{display:none}
#cx .oc-item>summary:hover{background:rgba(255,255,255,.035)}
#cx .oc-item .cx-jobrow__who{flex:1 1 auto;min-width:0}
#cx .oc-chevron{flex:0 0 10px;width:10px;height:10px;border-right:2px solid var(--cx-muted);border-bottom:2px solid var(--cx-muted);transform:rotate(45deg);margin:0 4px 3px}
#cx .oc-item[open]>summary .oc-chevron{transform:rotate(-135deg);margin-bottom:-3px}
#cx .oc-body{display:grid;gap:10px;padding:8px 14px 12px;border-top:1px solid var(--cx-line)}
#cx .oc-body p{margin:0;font-size:13px;color:var(--cx-muted)}
#cx .oc-roles{display:flex;flex-wrap:wrap;gap:5px}
#cx .oc-note{font-size:12px;color:var(--cx-muted)}
#cx .oc-bar{height:5px;border-radius:3px;background:rgba(255,255,255,.08);overflow:hidden}
#cx .oc-bar i{display:block;height:100%;background-image:linear-gradient(90deg,#f06d72,#e0b84c,#4fd786);background-repeat:no-repeat;transition:width .4s ease}
#cx .oc-rolelist{display:grid;gap:6px}
#cx .oc-role{border:1px solid var(--cx-line);border-radius:9px;background:rgba(255,255,255,.02)}
#cx .oc-role.is-required{border-color:rgba(224,184,76,.3)}
#cx .oc-role.is-ready{border-color:rgba(79,215,134,.4)}
#cx .oc-role__head{border:0;background:transparent;padding:3px 10px}
#cx .oc-members{display:flex;flex-wrap:wrap;gap:6px;padding:0 10px 8px}
#cx .oc-member{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border:1px solid var(--cx-line);border-radius:8px;font-size:12px}
#cx .oc-member b{color:#f4f6f8}#cx .oc-member small{color:var(--cx-muted);font-size:11px}
#cx .oc-member img{width:20px!important;height:20px!important;border-radius:6px;object-fit:cover;min-width:0!important}
#cx .oc-member.is-unavailable{opacity:.55}
#cx .oc-member.is-open{color:var(--cx-muted);border-style:dashed}
#cx .oc-assignment{border:1px solid rgba(224,184,76,.3);background:rgba(224,184,76,.05);gap:10px}
#cx .oc-history{--rar:#8a8f98}
#cx .oc-history.oc-history--completed{--rar:#4fd786}
#cx .oc-history.oc-history--failed{--rar:#f06d72}
#cx .oc-history>summary{align-items:center}
#cx .oc-history .cx-jobrow__who{flex:1 1 auto;min-width:0}
#cx .oc-history .cx-jobrow__who b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
#cx .oc-history .oc-status{display:grid;place-items:center;width:22px;height:22px;border-radius:6px;background:rgba(255,255,255,.06);font-weight:700}
#cx .oc-history--completed .oc-status{background:rgba(79,215,134,.18);color:#4fd786}
#cx .oc-history--failed .oc-status{background:rgba(240,109,114,.18);color:#f06d72}
#cx .oc-when{font-size:11px;color:var(--cx-muted);white-space:nowrap}
#cx .gang-head-icon{display:inline-grid;place-items:center;width:24px;height:24px}
#cx .gang-head-icon svg,#cx .gang-head-icon img{width:100%;height:100%}
@media (max-width:900px){
#cx .oc-item>summary{flex-wrap:wrap;gap:3px 8px;padding:4px 8px}
#cx .oc-item>summary .cx-jobrow__who{flex:1 1 100%}
#cx .oc-item>summary .cx-jobrow__meta{flex:1 1 0;justify-content:flex-start}
#cx .oc-list{padding:8px 10px}
#cx .oc-history>summary{flex-wrap:nowrap}
#cx .oc-history>summary .cx-jobrow__who{flex:1 1 auto}
#cx .oc-when{display:none}
}

/* vault */
#cx .cx-section.is-flush>.gv-body{padding:10px 14px}
#cx .gv-form{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;padding:10px 12px;border:1px solid var(--cx-line);border-radius:10px;background:rgba(255,255,255,.025)}
#cx .gv-field{flex:1 1 160px;min-width:0;max-width:280px;margin:0}
#cx .gv-wide{flex:2 1 260px;max-width:none}
#cx .gv-form .cx-btn{min-height:36px;padding:0 20px}
#cx .gv-money{display:flex;align-items:center;gap:6px}
#cx .gv-money b{color:var(--cx-muted)}
#cx .gv-note{display:block;margin-top:6px;font-size:12px;color:var(--cx-muted)}
#cx .gv-moves{padding:8px 14px}
#cx .gv-move{gap:10px;padding:3px 10px}
#cx .gv-move .cx-jobrow__who{flex:1 1 auto;min-width:0}
#cx .gv-sign{display:grid;place-items:center;width:22px;height:22px;border-radius:6px;font-weight:700;background:rgba(255,255,255,.06)}
#cx .gv-sign.is-in{background:rgba(79,215,134,.18);color:#4fd786}#cx .gv-sign.is-out{background:rgba(240,109,114,.18);color:#f06d72}
#cx .gv-in{color:#4fd786!important}#cx .gv-out{color:#f06d72!important}
#cx .gang-pair.cx-quick{max-width:none}
@media (max-width:900px){#cx .gv-field{max-width:none}#cx .gv-moves{padding:8px 10px}}

/* territories */
#cx .gt-list{padding:8px 14px}
#cx .gt-row{border-left:3px solid var(--territory-colour,#c69b49);gap:10px;padding:3px 10px}
#cx .gt-row .cx-jobrow__who{flex:1 1 auto;min-width:0}
#cx .gt-row .cx-tile{border-color:color-mix(in srgb,var(--territory-colour,#c69b49) 55%,#333);background:color-mix(in srgb,var(--territory-colour,#c69b49) 14%,transparent)}
#cx .gt-war{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px 14px}
#cx .gt-war__side{display:grid;gap:0;min-width:0;flex:1 1 140px}
#cx .gt-war__side small{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--cx-muted)}
#cx .gt-war__side b{font-size:14px;color:#f4f6f8}
#cx .gt-war__side--right{text-align:right}
#cx .gt-war__score{font-size:20px;color:var(--cx-lime-soft)}
#cx .gt-bonuses{padding:8px 14px}
#cx .gt-bonuses .gang-territory-bonus-list{display:grid;gap:4px}
#cx .gt-bonuses .gang-territory-bonus-list>span{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 10px;border:1px solid var(--cx-line);border-radius:8px;background:rgba(255,255,255,.02);font-size:13px}
#cx .gt-bonuses .gang-territory-bonus-label{display:inline-flex;align-items:center;gap:6px;color:var(--cx-muted)}
#cx .gt-bonuses .gang-territory-bonus-list b,#cx .gt-bonuses .gang-territory-bonus-list strong{color:#4fd786;font-family:var(--font-mono)}
@media (max-width:900px){#cx .gt-list,#cx .gt-bonuses{padding:8px 10px}#cx .gt-row{flex-wrap:wrap}}

/* upgrades */
#cx .gu-list{padding:8px 14px}
#cx .gu-block{border:1px solid var(--cx-line);border-radius:10px;background:rgba(255,255,255,.02);overflow:hidden}
#cx .gu-block.is-maxed{border-color:rgba(79,215,134,.4)}
#cx .gu-block.is-locked{opacity:.8}
#cx .gu-row{border:0;background:transparent;border-radius:0;gap:10px;padding:3px 10px}
#cx .gu-row .cx-jobrow__who{flex:1 1 auto;min-width:0}
#cx .gu-row .cx-jobrow__who small{white-space:normal}
#cx .gu-row .cx-tile img{width:100%;height:100%;object-fit:contain}
#cx .gu-bar{flex:0 0 70px;height:5px;border-radius:3px;background:rgba(255,255,255,.08);overflow:hidden}
#cx .gu-bar i{display:block;height:100%;background-image:linear-gradient(90deg,#f06d72,#e0b84c,#4fd786);background-repeat:no-repeat}
#cx .gu-redeem{padding:6px 14px}
#cx .gu-block .pr-reasons{display:flex;flex-wrap:wrap;gap:2px 12px;padding:0 12px 6px 48px;font-size:11px;color:var(--cx-muted)}
#cx .gang-head-icon img{width:100%;height:100%;object-fit:contain}
@media (max-width:900px){#cx .gu-list{padding:8px 10px}#cx .gu-row{flex-wrap:wrap;gap:3px 8px}#cx .gu-row .cx-jobrow__who{flex:1 1 100%}#cx .gu-row .cx-jobrow__meta{flex:1 1 0;justify-content:flex-start}#cx .gu-bar{display:none}#cx .gu-block .pr-reasons{padding-left:12px}}
#cx .gu-row .cx-btn{white-space:nowrap;min-height:0!important;padding:4px 12px!important;font-size:12px!important;flex:0 0 auto}
#cx .gu-row .sx-price{font-size:12px;white-space:nowrap;flex:0 0 auto}
@media (max-width:1100px){#cx .gu-bar{display:none}}

/* roles and permissions */
#cx .gr-form{display:grid;gap:12px}
#cx .cx-section.is-flush>.gr-body{padding:10px 14px;display:grid;gap:10px}
#cx .gr-hierarchy{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
#cx .gr-arrow{color:var(--cx-muted)}
#cx .gr-name{max-width:320px}
#cx .gr-perms{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:5px}
#cx .gr-perm{display:flex;align-items:flex-start;gap:8px;padding:5px 10px;border:1px solid var(--cx-line);border-radius:8px;background:rgba(255,255,255,.02);cursor:pointer}
#cx .gr-perm:hover{border-color:rgba(224,184,76,.35)}
#cx .gr-perm input{margin-top:3px;accent-color:#e0b84c;flex:0 0 auto}
#cx .gr-perm:has(input:checked){border-color:rgba(79,215,134,.4);background:rgba(79,215,134,.06)}
#cx .gr-perm__icon{flex:0 0 18px;font-size:14px}
#cx .gr-perm b{display:block;font-size:13px;color:#f4f6f8}
#cx .gr-perm small{display:block;font-size:11px;color:var(--cx-muted);line-height:1.3}
#cx .gr-perm input[type=checkbox]{position:static!important;opacity:1!important;width:16px!important;height:16px!important;min-height:0!important;margin:3px 0 0!important;appearance:auto!important}
#cx .gr-perm{min-width:0}
#cx .gr-perm>span:last-child{min-width:0}

/* thinner permission rows: one line each, description trails the name */
#cx .gr-perms{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:4px}
#cx .gr-perm{align-items:center;padding:2px 10px;gap:8px}
#cx .gr-perm input[type=checkbox]{margin:0!important}
#cx .gr-perm>span:last-child{display:flex;align-items:baseline;gap:8px;min-width:0;flex-wrap:nowrap}
#cx .gr-perm b{display:inline;font-size:13px;white-space:nowrap;flex:0 0 auto}
#cx .gr-perm small{display:block;flex:1 1 0;min-width:0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:760px){#cx .gr-perms{grid-template-columns:minmax(0,1fr)}}

/* thin log rows */
#cx .gl-list{padding:8px 14px}
#cx .gl-row{gap:8px;padding:2px 10px}
#cx .gl-icon{width:22px!important;height:22px!important;flex:0 0 22px!important;font-size:12px}
#cx .gl-icon svg,#cx .gl-icon img{width:14px;height:14px}
#cx .gl-text{display:flex;align-items:baseline;gap:8px;flex:1 1 0;min-width:0}
#cx .gl-text b{font-size:13px;color:#f4f6f8;white-space:nowrap;flex:0 0 auto}
#cx .gl-text small{font-size:12px;color:var(--cx-muted);flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:900px){#cx .gl-list{padding:8px 10px}#cx .gl-row{flex-wrap:wrap}#cx .gl-text{flex:1 1 100%;flex-wrap:wrap}#cx .gl-text small{white-space:normal}#cx .gl-row .oc-when{display:block;flex:1 1 100%;margin-left:30px}}

/* settings */
#cx .gs-form{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
#cx .gs-form .gv-field{max-width:none}
#cx .gs-full{flex:1 1 100%;max-width:none}
#cx .gs-form textarea.cx-input{min-height:60px;resize:vertical}
#cx .gs-action{gap:10px;padding:4px 10px}
#cx .gs-action .cx-jobrow__who{flex:1 1 auto;min-width:0}
#cx .gs-form .gr-perm{margin:0}

/* gang description */
#cx .cx-section.is-flush>.gang-desc-card__body{padding:14px 18px;text-align:center;font-size:13px;line-height:1.5;color:#d9c2f0;white-space:pre-wrap;overflow-wrap:anywhere}

/* rich description */
#cx .cx-section.is-flush>.gang-desc-card__body{color:#d5dae1}
#cx .gang-rt-align--center,#cx .gang-rt-align--left,#cx .gang-rt-align--right{display:block}
.gang-rt-align--left{text-align:left}.gang-rt-align--center{text-align:center}.gang-rt-align--right{text-align:right}
.gang-rt-quote{margin:6px 0;padding:4px 12px;border-left:3px solid #e0b84c;background:rgba(255,255,255,.04);color:#c5ccd6;text-align:left}
.gang-rte{margin-top:6px;border:1px solid var(--cx-line);border-radius:10px;background:rgba(255,255,255,.025)}
.gang-rte__bar{border-radius:10px 10px 0 0;display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:4px 6px;background:rgba(255,255,255,.05);position:relative}
.gang-rte__bar>button,.gang-rte__colour>button{min-width:32px;height:30px;padding:0 6px;border:0;border-radius:6px;background:transparent;color:#c5ccd6;font-size:15px;cursor:pointer}
.gang-rte__bar>button:hover,.gang-rte__colour>button:hover{background:rgba(255,255,255,.1);color:#fff}
.gang-rte__colour{position:relative;display:inline-flex}
.gang-rte__colour>button{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.gang-rte__A{font-weight:700;line-height:1}
.gang-rte__bar-swatch{display:block;width:14px;height:3px;border-radius:2px;background:linear-gradient(90deg,#ef4444,#facc15,#22c55e,#3b82f6,#a855f7)}
.gang-rte__palette{position:absolute;left:0;bottom:36px;z-index:20;display:grid;grid-template-columns:repeat(7,26px);gap:6px;padding:10px;border-radius:10px;background:#1c2128;border:1px solid var(--cx-line);box-shadow:0 8px 24px rgba(0,0,0,.55)}
.gang-rte__palette[hidden]{display:none}
.gang-rte__palette button{width:26px;height:26px;padding:0;border-radius:50%;border:2px solid rgba(255,255,255,.18);background:var(--c);cursor:pointer}
.gang-rte__palette button:hover{border-color:#fff}
.gang-rte__palette button.is-clear{background:transparent;color:#c5ccd6;font-size:12px;line-height:1}
.gang-rte__count{margin-left:auto;font-size:11px;color:var(--cx-muted);padding-right:4px}
.gang-rte__bar>button.is-on{background:rgba(224,184,76,.22);color:#e0b84c}
.gang-rte__edit{min-height:120px;max-height:320px;overflow:auto;padding:10px 14px;border-top:1px solid var(--cx-line);font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:#d5dae1;outline:none;background:rgba(0,0,0,.25);border-radius:0 0 10px 10px}
.gang-rte__edit:empty::before{content:attr(data-placeholder);color:var(--cx-muted)}
.gang-rte__edit blockquote{margin:6px 0;padding:4px 12px;border-left:3px solid #e0b84c;background:rgba(255,255,255,.04);color:#c5ccd6;text-align:left}

/* colour palette polish */
#cx .gang-rte__palette{grid-template-columns:repeat(8,28px)!important;gap:8px!important;padding:12px!important;border-radius:12px!important;background:#171b21!important;border:1px solid rgba(255,255,255,.12)!important;box-shadow:0 14px 34px rgba(0,0,0,.6)!important}
#cx .gang-rte__palette button{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;max-width:28px!important;padding:0!important;border-radius:50%!important;border:2px solid rgba(255,255,255,.14)!important;box-shadow:inset 0 -3px 5px rgba(0,0,0,.25),inset 0 2px 3px rgba(255,255,255,.25);transition:transform .12s,border-color .12s}
#cx .gang-rte__palette button:hover{transform:scale(1.18);border-color:#fff!important}
#cx .gang-rte__palette button.is-clear{background:transparent!important;box-shadow:none;color:#aeb6c2;font-size:13px;display:grid;place-items:center}

/* armoury */
#cx .ga-item{--rar:#e0b84c}
#cx .ga-item .cx-tile{border-color:color-mix(in srgb,var(--rar) 55%,#333)}
#cx .ga-item>summary .cx-jobrow__who small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cx .ga-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:2px 24px}
#cx .ga-loan{padding:0;border:0;background:none}
#cx .oc-body .cx-actions{justify-content:flex-start}
@media (max-width:900px){#cx .ga-item>summary .cx-jobrow__meta{flex-wrap:wrap}}
#cx .ga-item .cx-tile{width:38px!important;height:38px!important;min-width:38px!important;padding:2px}
#cx .ga-item .cx-tile img{width:100%!important;height:100%!important;object-fit:contain}

/* attack activity */
#cx .gat-row{gap:10px;padding:3px 10px}
#cx .gat-row .cx-jobrow__who{flex:1 1 auto;min-width:0}
#cx .gat-vs{color:var(--cx-muted);font-weight:400}
#cx .gat-rewards{font-size:12px;color:var(--cx-muted);white-space:nowrap}
#cx .gat-rewards-m{display:none}
@media (max-width:900px){#cx .gat-rewards-m{display:inline}}

/* keep the floating chat dock clear of the last row */
#cx .cx-main{padding-bottom:84px}

#cx .gang-hq-card__banner{background-color:rgba(255,255,255,.03)}

/* public profile header */
#cx .gang-hq-card__side{flex:0 0 260px;display:grid;gap:10px;align-content:start}
#cx .gang-hq-card__side .gang-hq-card__list{flex:none}
#cx .gang-hq-card__actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#cx .gang-hq-card__list dd a{color:#e0b84c;text-decoration:none}
@media (max-width:760px){#cx .gang-hq-card__side{flex-basis:auto}}
#cx .cx-section.is-flush>header .gang-hq-card__actions{margin-left:auto;margin-right:12px;justify-content:flex-end}
#cx .gang-hq-card__actions .cx-btn,#cx .gang-hq-card__actions .gang-btn{min-height:28px;padding:0 12px;font-size:12px}
#cx .gang-hq-card__actions .gang-recruitment-pill{padding:3px 10px;font-size:12px}
@media (max-width:760px){#cx .cx-section.is-flush>header:has(.gang-hq-card__actions){flex-wrap:wrap}#cx .cx-section.is-flush>header .gang-hq-card__actions{order:3;flex:1 1 100%;margin:4px 0 0;justify-content:flex-start}}
#cx .gang-profile-grid--summary{grid-template-columns:minmax(0,1fr)!important}
#cx .gp-wars{padding:8px 14px}
#cx .gang-profile-grid--details{grid-template-columns:minmax(0,1fr)!important}
#cx .gp-reqs{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
#cx .gp-apply{padding:8px 14px}
#cx .gp-apply:empty{display:none}
#cx .gp-apply p,#cx .gp-apply .gang-permission-note{margin:0;font-size:13px;color:var(--cx-muted)}
#cx [data-gp-view]{display:grid;gap:14px;align-content:start}
#cx [data-gp-view][hidden]{display:none}
#cx [data-gp-view]>section{margin:0}
#cx .gang-profile-grid{margin:0}
#cx .cx-brand__name[title]{display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:uppercase}

/* recruitment */
#cx .gra-list{padding:8px 14px}
#cx .gra-item .gang-avatar-wrap{position:relative;width:28px!important;height:28px!important;flex:0 0 28px!important;overflow:hidden;border-radius:8px}
#cx .gra-item .gang-avatar-wrap img{width:28px!important;height:28px!important;object-fit:cover;display:block}
#cx .gra-item .oc-body .cx-actions{justify-content:flex-start}
#cx .cx-nav a em{margin-left:auto;font-style:normal;font-size:12px;color:var(--cx-muted)}
#cx .cx-body:has(#districtPeopleList){display:grid;gap:14px;align-content:start;padding-top:18px}
#cx .cx-body:has(#districtPeopleList)>*{margin:0}

/* gang banner: framed picture with crisp square corners */
#cx .gang-hq-card__banner{border:1px solid #2a3340!important;border-radius:2px!important;margin:8px;box-shadow:0 0 0 1px rgba(0,0,0,.5)}
#cx #gangHqHeader{display:grid;gap:12px;min-width:0}
/* image on the left, details on the right (desktop) */
@media (min-width:761px){#cx .cx-section.is-flush>.gang-hq-card__body{flex-direction:row-reverse}}
/* gang picture: square, framed, whole; the Boss changes it here */
#cx .gang-hq-card__pic{position:relative;display:block;margin:8px;padding:0;min-height:0;overflow:hidden;background:#11161c;border:1px solid #2a3340!important;border-radius:0!important;box-shadow:0 0 0 1px rgba(0,0,0,.5)}
#cx .gang-hq-card__pic img{display:block;width:100%;height:auto;max-height:150px;object-fit:cover}
#cx .gang-hq-card__pic .gang-hq-card__crest{display:grid;place-items:center;height:104px}
#cx .gang-hq-card__edit{position:absolute;left:6px;bottom:6px;display:flex;gap:4px}
#cx .gang-hq-card__edit .cx-btn{padding:2px 8px;font-size:11px;min-height:0;line-height:1.4;cursor:pointer}

/* Gang Chain strip: one thin line on a phone */
@media (max-width:640px){
#cx .gang-chain-strip{flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;padding:4px 10px!important;gap:8px!important;margin-top:8px!important}
#cx .gang-chain-strip__copy span{display:none!important}
#cx .gang-chain-strip__copy strong{font-size:.8rem!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cx .gang-chain-strip__timer{padding:2px 9px!important;font-size:.7rem!important;margin:0!important}
#cx .gang-chain-strip__icon{font-size:13px!important}
}

/* Pictures linked from other sites ([img]https://…[/img]) and the editor's "add an image" popover. */
.gang-rt-img,.gang-rte__edit img{display:inline-block;max-width:100%;max-height:360px;height:auto;border-radius:8px;vertical-align:middle}
.gang-rte__edit img{cursor:pointer}
.gang-rte__image{position:relative;display:inline-flex}
.gang-rte__image>button{min-width:32px;height:30px;padding:0 6px;border:0;border-radius:6px;background:transparent;color:#c5ccd6;font-size:15px;cursor:pointer}
.gang-rte__image>button:hover{background:rgba(255,255,255,.1);color:#fff}
.gang-rte__imgpop{position:absolute;right:0;bottom:36px;z-index:20;display:grid;gap:8px;width:min(300px,86vw);padding:12px;border-radius:12px;background:#171b21;border:1px solid rgba(255,255,255,.12);box-shadow:0 14px 34px rgba(0,0,0,.6)}
.gang-rte__imgpop[hidden],.gang-rte__imgnote[hidden]{display:none}
.gang-rte__imgpop label{font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8b94a3}
.gang-rte__imgrow{display:flex;align-items:stretch;border:1px solid rgba(255,255,255,.14);border-radius:8px;overflow:hidden;background:rgba(0,0,0,.35)}
.gang-rte__imgrow>span{display:grid;place-items:center;padding:0 8px;background:rgba(255,255,255,.06);color:#aab3bf;font-size:.78rem}
.gang-rte__imgrow input{flex:1;min-width:0;padding:7px 8px;border:0;outline:0;background:transparent;color:#eef1f6;font-size:.82rem}
.gang-rte__imgnote{margin:0;color:#ff7a85;font-size:.74rem}
.gang-rte__imgpop>button{padding:6px 12px;border:0;border-radius:8px;background:#e0b84c;color:#1a1405;font-weight:800;font-size:.78rem;cursor:pointer}

/* Organised crimes: the Begin planning / Join / Prepare buttons, compact and polished. */
#cx .oc-item .cx-actions { display: flex; gap: 8px; margin-top: 10px; }
#cx .oc-item .cx-actions .cx-btn {
    min-height: 0; height: auto; padding: 7px 16px; border-radius: 8px;
    font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
#cx .oc-item .cx-actions .cx-btn--lime {
    color: #1a1405; border: 1px solid #f0d07a;
    background: linear-gradient(180deg, #f4d77e 0%, #e0b84c 55%, #c9a03a 100%);
    box-shadow: 0 6px 16px rgba(224,184,76,.28), inset 0 1px 0 rgba(255,255,255,.45);
}
#cx .oc-item .cx-actions .cx-btn--lime::after { content: "→"; font-size: 1em; transition: transform .15s ease; }
#cx .oc-item .cx-actions .cx-btn--lime:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 9px 20px rgba(224,184,76,.4), inset 0 1px 0 rgba(255,255,255,.5); }
#cx .oc-item .cx-actions .cx-btn--lime:hover:not(:disabled)::after { transform: translateX(3px); }
#cx .oc-item .cx-actions .cx-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
#cx .oc-item .cx-actions .cx-btn:disabled::after { content: none; }

/* The Wall */
#cx .gw{display:grid;gap:8px;padding:8px 14px 12px}
#cx .gw-stats{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:var(--cx-muted)}
#cx .gw-stats b{color:#f4f6f8;font-size:13px}
#cx .gw-slots{display:grid;gap:4px;margin:0;padding:0;list-style:none;max-height:340px;overflow-y:auto}
#cx .gw-slot{display:flex;align-items:center;gap:8px;padding:6px 12px;border:1px solid var(--cx-line);border-radius:8px;font-size:13px;min-width:0}
#cx .gw-slot__no{flex:none;width:22px;color:var(--cx-muted);font-family:var(--font-mono,monospace);font-size:11px}
#cx .gw-slot__name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cx .gw-slot__name small{color:var(--cx-muted)}
#cx .gw-slot--open{border-style:dashed;opacity:.7}
#cx .gw-actions{display:flex;flex-wrap:wrap;gap:8px}

/* The Wall: green = your gang, red = the enemy */
#cx .gw-bar{height:12px;border-radius:6px;overflow:hidden;background:rgba(240,109,114,.55)}
#cx .gw-bar--def{background:rgba(79,215,134,.5)}
#cx .gw-bar__fill{position:relative;height:100%;width:0;background:#4fd786;transition:width .9s linear;overflow:hidden}
#cx .gw-bar--def .gw-bar__fill{background:#f06d72}


#cx .gw-up{color:#f06d72;font-weight:800}
#cx .gw-down{color:#4fd786;font-weight:800}
#cx .gw-slot--ally{background:rgba(79,215,134,.14);border-color:rgba(79,215,134,.5)}
#cx .gw-slot--foe{background:rgba(240,109,114,.14);border-color:rgba(240,109,114,.5)}


/* The Wall: attackers' rows drift right (pushing the bar up), defenders' rows drift left (pulling it back) */
#cx .gw-slot--push,#cx .gw-slot--pull{position:relative;overflow:hidden}
#cx .gw-slot--push>*,#cx .gw-slot--pull>*{position:relative;z-index:1}
@media (prefers-reduced-motion:reduce){#cx .gw-slot--push::before,#cx .gw-slot--pull::before{animation:none!important}}
#cx .gw-slot{min-height:34px;flex-shrink:0}
#cx .gw-slots{grid-auto-rows:min-content}

/* Shine sweep: attackers' rows glint left to right, defenders' rows right to left */

/* Wall animations v2: a bright streak with a soft trail, staggered per row, plus a breathing edge glow */
#cx .gw-slot--push::before,#cx .gw-slot--pull::before{content:"";position:absolute;top:0;bottom:0;left:0;width:55%;pointer-events:none;opacity:0;will-change:transform,opacity}
#cx .gw-slot--ally::before{--gw-tint:79,215,134}
#cx .gw-slot--foe::before{--gw-tint:240,109,114}
#cx .gw-slot--push::before{background:linear-gradient(100deg,transparent 0,rgba(var(--gw-tint),.0) 20%,rgba(var(--gw-tint),.28) 70%,rgba(255,255,255,.7) 92%,transparent 100%);animation:gwsweep-right 2.6s cubic-bezier(.45,.05,.35,1) infinite}
#cx .gw-slot--pull::before{background:linear-gradient(260deg,transparent 0,rgba(var(--gw-tint),.0) 20%,rgba(var(--gw-tint),.28) 70%,rgba(255,255,255,.7) 92%,transparent 100%);animation:gwsweep-left 2.6s cubic-bezier(.45,.05,.35,1) infinite}
@keyframes gwsweep-right{0%{transform:translateX(-110%);opacity:0}12%{opacity:1}78%{opacity:1}100%{transform:translateX(190%);opacity:0}}
@keyframes gwsweep-left{0%{transform:translateX(190%);opacity:0}12%{opacity:1}78%{opacity:1}100%{transform:translateX(-110%);opacity:0}}
#cx .gw-slot--push:nth-child(3n+1)::before,#cx .gw-slot--pull:nth-child(3n+1)::before{animation-delay:0s}
#cx .gw-slot--push:nth-child(3n+2)::before,#cx .gw-slot--pull:nth-child(3n+2)::before{animation-delay:.35s}
#cx .gw-slot--push:nth-child(3n)::before,#cx .gw-slot--pull:nth-child(3n)::before{animation-delay:.7s}
/* A still glow: animating a box-shadow and border colour on every row repainted the whole list each frame and made the Wall lag. The streaks above (transform and opacity) are cheap, so they stay. */
#cx .gw-slot--ally{box-shadow:0 0 8px rgba(79,215,134,.16)}
#cx .gw-slot--foe{box-shadow:0 0 8px rgba(240,109,114,.16)}
@media (prefers-reduced-motion:reduce){#cx .gw-slot--push::before,#cx .gw-slot--pull::before{animation:none!important}}
#cx .gw-slot__link{color:inherit;text-decoration:none;font-weight:700}
#cx .gw-slot__link:hover,#cx .gw-slot__link:focus-visible{text-decoration:underline}
#cx .gw-slot__atk{flex:none;padding:0 6px;height:18px;line-height:16px;border:1px solid rgba(240,109,114,.7);border-radius:4px;background:rgba(240,109,114,.2);color:#ffb3b6;font-size:9px;font-weight:800;text-transform:uppercase;cursor:pointer}
#cx .gw-slot__atk:hover:not(:disabled){background:rgba(240,109,114,.4);color:#fff}
#cx .gw-slot__atk:disabled{opacity:.5;cursor:default}
#cx .gw-slot .gw-slot__atk{min-height:0;min-width:0;height:18px;padding:0 6px;margin:0;line-height:16px}

/* The bar: whichever side is winning gets the motion. Score rising -> the green/attacker fill flows right; falling -> the defenders' remainder flows left. */
#cx .gw-bar{position:relative;--gw-fill:0%;--gw-tint:79,215,134}
#cx .gw-bar--def{--gw-tint:240,109,114}
#cx .gw-bar__fill{position:relative;z-index:1}
#cx .gw-bar::before,#cx .gw-bar::after,#cx .gw-bar__fill::before,#cx .gw-bar__fill::after{content:"";position:absolute;top:0;bottom:0;pointer-events:none;opacity:0}
/* rising: motion on the fill */
#cx .gw-bar__fill::after,#cx .gw-bar__fill::before{left:0;right:0}
#cx .gw-bar__fill::after{background:repeating-linear-gradient(120deg,rgba(255,255,255,.22) 0 7px,transparent 7px 18px);background-size:25px 100%}
#cx .gw-bar__fill::before{background:linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent) no-repeat;background-size:28% 100%;z-index:1}
#cx .gw-bar--up .gw-bar__fill::after{opacity:1;animation:gwstripe-right .6s linear infinite}
#cx .gw-bar--up .gw-bar__fill::before{opacity:1;animation:gwglint-right 1.8s cubic-bezier(.4,0,.2,1) infinite}
#cx .gw-bar--up .gw-bar__fill{box-shadow:3px 0 12px 1px rgba(var(--gw-tint),.9)}
/* falling: motion on the remainder (the part right of the fill) */
#cx .gw-bar::after,#cx .gw-bar::before{left:var(--gw-fill);right:0;transition:left .9s linear}
#cx .gw-bar::after{background:repeating-linear-gradient(60deg,rgba(255,255,255,.2) 0 7px,transparent 7px 18px);background-size:25px 100%}
#cx .gw-bar::before{background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent) no-repeat;background-size:22% 100%;z-index:0}
#cx .gw-bar--down::after{opacity:1;animation:gwstripe-left .6s linear infinite}
#cx .gw-bar--down::before{opacity:1;animation:gwglint-left 2.2s cubic-bezier(.4,0,.2,1) infinite}
#cx .gw-bar--down .gw-bar__fill{box-shadow:none}
@keyframes gwstripe-right{to{background-position:25px 0}}
@keyframes gwstripe-left{to{background-position:-25px 0}}
@keyframes gwglint-right{0%{background-position:-40% 0}100%{background-position:150% 0}}
@keyframes gwglint-left{0%{background-position:150% 0}100%{background-position:-40% 0}}
@media (prefers-reduced-motion:reduce){#cx .gw-bar::before,#cx .gw-bar::after,#cx .gw-bar__fill::before,#cx .gw-bar__fill::after{animation:none!important}}

/* Open slots are the join button */
#cx .gw-slot--takeable{cursor:pointer;border-color:rgba(224,184,76,.55);opacity:1;transition:background .15s,border-color .15s}
#cx .gw-slot--takeable:hover,#cx .gw-slot--takeable:focus-visible{background:rgba(224,184,76,.14);border-color:#e0b84c;outline:none}
#cx .gw-slot__take{flex:none;font-size:11px;font-weight:800;color:#e0b84c;text-transform:uppercase;letter-spacing:.04em}
#cx .gw-hint{font-size:12px;color:var(--cx-muted)}
#cx .gw-slot__name .cx-plate{display:inline-flex;vertical-align:middle;min-width:90px;max-width:170px;height:22px;margin-right:6px;padding:0 4px}
#cx .gw-slot__name .cx-plate b{font-size:11px}

/* Wall rows stay thin on phones: the global touch-target sizing must not stretch them */
@media (max-width:760px){
  #cx .gw-slot{min-height:30px;padding:4px 8px;gap:6px}
  #cx .gw-slot .gw-slot__atk{min-height:0!important;height:18px!important;padding:0 6px!important;font-size:9px!important}
  #cx .gw-slot__name .cx-plate{height:20px;min-width:80px}
  #cx .gw-slot--takeable{min-height:30px}
}

/* Gang directory: columns line up from row to row. Name over motto on the left; status, level, infamy and members in fixed columns. */
#cx .gang-directory-row__identity>div:last-child{display:grid;gap:1px;align-items:start}
#cx .gang-directory-row__identity>div:last-child h3{overflow:hidden;text-overflow:ellipsis}
#cx .gang-directory-row__emblem{width:34px!important;height:34px!important;min-width:34px!important;flex:0 0 34px;font-size:11px!important;border-radius:9px!important;border:1px solid rgba(224,184,76,.45);background:linear-gradient(180deg,rgba(224,184,76,.14),rgba(224,184,76,.04))}
#cx .gang-directory-row__metrics>div{display:grid;gap:1px;justify-items:center;text-align:center}
#cx .gang-directory-row__metrics dd{font-weight:700;color:#f4f6f8}
@media (min-width:1101px){
    #cx .gang-directory-row{display:grid!important;grid-template-columns:minmax(0,1fr) 92px 56px 92px 72px 132px;align-items:center;gap:0 14px!important;padding:7px 12px!important}
    #cx .gang-directory-row__metrics{display:contents!important}
    #cx .gang-directory-row .gang-recruitment-pill{justify-self:center;grid-column:2;grid-row:1;min-width:76px;text-align:center}
    #cx .gang-directory-row__metrics>div:nth-child(1){grid-column:3}
    #cx .gang-directory-row__metrics>div:nth-child(2){grid-column:4}
    #cx .gang-directory-row__metrics>div:nth-child(3){grid-column:5}
    #cx .gang-directory-row__metrics>div{grid-row:1}
    #cx .gang-directory-row__action{grid-column:6;grid-row:1;text-align:center}
}
/* District population: the name plate with its small marks beside it. */
#cx .district-person{display:flex;align-items:center;gap:8px;min-width:0}
#cx .district-person .cx-plate{flex:0 1 190px}
#cx .district-person__mark{color:#f0c35b}

/* A territory war in the Gang: a red strip on the headquarters and a flashing red light on the Territories tab. Only opacity and size animate. */
#cx .gang-war-strip{border-color:rgba(240,109,114,.55)!important;background:linear-gradient(90deg,rgba(240,109,114,.16),rgba(240,109,114,.04))!important;box-shadow:inset 3px 0 #f06d72}
#cx .gang-war-strip strong{color:#ffb3b6}
#cx .gang-war-dot{position:relative;display:inline-block;flex:0 0 auto;width:9px;height:9px;margin-left:auto;border-radius:50%;background:#f06d72;animation:gangWarFlash 1.1s ease-in-out infinite}
#cx .gang-war-dot::after{content:"";position:absolute;inset:0;border-radius:50%;background:#f06d72;animation:gangWarRing 1.1s ease-out infinite}
#cx .gang-war-dot--large{margin-left:0;width:12px;height:12px}
@keyframes gangWarFlash{0%,100%{opacity:1}50%{opacity:.35}}
@keyframes gangWarRing{0%{transform:scale(1);opacity:.65}100%{transform:scale(2.6);opacity:0}}
@media (prefers-reduced-motion:reduce){#cx .gang-war-dot,#cx .gang-war-dot::after{animation:none}#cx .gang-war-dot::after{display:none}}

/* The Wall bar is plain: no diagonal stripes, just the fill (the soft glint that sweeps along it stays). */
#cx .gw-bar::after,#cx .gw-bar__fill::after{display:none!important;animation:none!important}

/* Thin directory rows: about the height of the Members list. */
#cx .gang-directory-row__emblem{width:24px!important;height:24px!important;min-width:24px!important;flex:0 0 24px;border-radius:7px!important;font-size:9px!important}
#cx .gang-directory-row__identity>div:last-child{display:flex;align-items:baseline;gap:8px}
#cx .gang-directory-row__metrics>div{display:flex;align-items:baseline;gap:4px;justify-items:start;text-align:left}
@media (min-width:1101px){#cx .gang-directory-row{padding:2px 12px!important}}
#cx .gang-directory-row__action.gang-btn,#cx .gang-directory-row .gang-btn{min-height:24px!important;height:24px;padding:0 12px!important;line-height:1}
