/* Crews (crews/crews.js): the crew's HQ in its colour, level and XP, members and roles, the vault, the log, top crews. */
.crewx { width: min(1100px, 100%); margin: 14px 0 110px; text-align: left; --gold: #ffd23f; }
.crewx .empty-line { color: var(--muted); font-size: 13px; padding: 14px 4px; text-align: center; grid-column: 1 / -1; list-style: none; }
.crewx .empty-line a, .cx-back a { color: #ff9ad5; }
.cx-hero, .cx-panel { border: 1px solid rgba(255, 120, 200, .22); border-radius: 18px; background: linear-gradient(180deg, rgba(30, 12, 52, .92), rgba(16, 8, 32, .92)); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.cx-hero { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 20px; align-items: center; padding: 14px 20px 14px 14px; border-color: color-mix(in srgb, var(--crew) 45%, transparent); }
.cx-hq { border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #0d0618, #1a0d2e); }
.cx-hq svg { display: block; width: 100%; height: auto; }
.cx-lit { filter: drop-shadow(0 0 3px rgba(255, 220, 140, .8)); }
.cx-neon { filter: drop-shadow(0 0 4px currentColor); animation: cx-flicker 6s infinite; }
@keyframes cx-flicker { 0%, 92%, 96%, 100% { opacity: 1; } 94% { opacity: .45; } }
.cx-flag path { transform-origin: left center; animation: cx-wave 2.6s ease-in-out infinite; transform-box: fill-box; }
@keyframes cx-wave { 50% { transform: skewY(4deg) scaleX(.94); } }
.cx-name { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 700 26px var(--head, Oswald), sans-serif; letter-spacing: 1px; color: #fff; }
.cx-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font: 700 13px var(--head, Oswald), sans-serif; letter-spacing: 1.5px; color: #14081f; background: var(--crew, #b45cff); box-shadow: 0 0 12px color-mix(in srgb, var(--crew, #b45cff) 55%, transparent); }
.cx-sub { margin: 6px 0 10px; color: var(--muted); font-size: 14px; }
.cx-sub b { color: #fff; }
.cx-xp { position: relative; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.cx-xp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--crew) 70%, #fff 0%), var(--gold)); }
.cx-xp span { position: relative; display: block; text-align: center; font: 700 11px/18px Inter, sans-serif; color: #fff; text-shadow: 0 1px 2px #000; }
.cx-hint { margin: 8px 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.cx-tabs { margin: 14px 0 10px; }
.cx-panel { padding: 14px; margin-top: 12px; }
.cx-panel h3 { margin: 0 0 10px; font: 600 14px var(--head, Oswald), sans-serif; letter-spacing: 1.6px; text-transform: uppercase; color: #ff9ad5; }
.cx-panel h4 { margin: 14px 0 8px; font: 600 13px var(--head, Oswald), sans-serif; letter-spacing: 1.4px; text-transform: uppercase; color: #fff; }
.cx-members, .cx-log, .cx-top, .cx-invites { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cx-members li, .cx-invites li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .22); font-size: 14px; }
.cx-members li.me { box-shadow: inset 0 0 0 1px var(--gold); }
.cx-members b, .cx-invites b { color: #fff; }
.cx-members em, .cx-invites em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.cx-role { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: var(--muted); background: rgba(255, 255, 255, .06); }
.cx-role.r-boss { color: var(--gold); background: rgba(255, 210, 63, .14); } .cx-role.r-officer { color: #9fe8ff; background: rgba(80, 200, 255, .12); }
.cx-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.cx-acts .sure, .cx-leave.sure { background: linear-gradient(90deg, #ff5c8a, #ff3a3a); color: #fff; }
.cx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-own { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 13px; }
.cx-leave { margin-left: auto; }
.cx-colors { display: flex; gap: 6px; }
.cx-colors button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); background: var(--c); cursor: pointer; }
.cx-colors button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--c), 0 0 12px var(--c); }
.cx-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cx-form input, .cx-scrap input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); color: #fff; font: 600 14px Inter, sans-serif; }
#cxName { flex: 1 1 200px; } #cxTag { width: 90px; text-transform: uppercase; letter-spacing: 2px; }
.cx-scrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .28); color: var(--muted); font-size: 13px; }
.cx-scrap > span { margin-right: auto; color: #fff; } .cx-scrap b { color: var(--gold); font-size: 18px; }
.cx-scrap input { width: 90px; padding: 7px 10px; margin-left: 4px; }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.cx-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: #fff; cursor: pointer; font: 600 12px Inter, sans-serif; text-align: center; }
.cx-item:disabled { cursor: default; opacity: 1; }
.cx-item.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(255, 210, 63, .4); }
.cx-item small { color: var(--muted); font-size: 11px; } .cx-item em { font-style: normal; color: var(--gold); }
.cx-art { display: grid; place-items: center; width: 56px; height: 56px; } .cx-art svg { width: 100%; height: 100%; }
.cx-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(12, 4, 22, .95); box-shadow: 0 0 0 1px var(--line); }
.cx-bar span { margin-right: auto; color: #fff; font-weight: 700; }
.cx-bar .btn-ghost:first-child { margin-right: auto; } .cx-bar .btn-ghost:first-child + span { margin-right: auto; margin-left: 0; }
.cx-log li { display: flex; gap: 8px; padding: 7px 10px; border-radius: 8px; background: rgba(0, 0, 0, .2); font-size: 13.5px; color: var(--muted); }
.cx-log b { color: #fff; } .cx-log time { margin-left: auto; font-size: 12px; white-space: nowrap; }
.cx-top a { display: grid; grid-template-columns: 54px 1fr auto 56px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .22); color: #fff; text-decoration: none; font-size: 14px; }
.cx-top a:hover { background: rgba(255, 255, 255, .06); }
.cx-top em { font-style: normal; color: var(--muted); font-size: 12.5px; } .cx-top strong { text-align: right; color: var(--gold); }
.cx-top .cx-tag { text-align: center; }
.cx-msg { text-align: center; color: var(--muted); font-size: 13px; min-height: 1em; }
.cx-back { margin-top: 12px; }
@media (max-width: 680px) {
  .cx-hero { grid-template-columns: 1fr; padding: 12px; }
  .cx-top a { grid-template-columns: 48px 1fr 48px; } .cx-top em { display: none; }
  .cx-acts { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cx-neon, .cx-flag path { animation: none; } }
