/* clubs-overlay.css - the club overlay (GDD s9, Clans v2; docs/mocks/clubs-v2.html is the approved design).
   Every rule is scoped under #cgc so nothing here can touch the page it opens over, and no rule of the
   site's can restyle it. Candy pill buttons, the card over an opaque backdrop, content-fit, BACK top-left. */
#cgc { --ink: #12082b; --panel: #1b0f3a; --panel2: #2a1658; --line: rgba(63,216,255,.55); position: fixed; inset: 64px 0 0 0; z-index: 90; font-family: var(--font-body); color: #fff; }
#cgc[hidden] { display: none !important; }
#cgc .scrim { position: absolute; inset: 0; background: rgba(8,4,20,.9); }
#cgc .scrim.soft { background: rgba(8,4,20,.6); }
#cgc .cc-wrap { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: 14px 16px 24px; overflow-y: auto; }
#cgc .cc { position: relative; left: auto; top: auto; transform: none; width: min(var(--cw, 760px), 100%); max-height: none; margin: auto 0; animation: cc-in .28s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes cc-in { from { opacity: 0; transform: scale(.92) translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #cgc .cc { animation: none; } }
#cgc .cc-head { display: flex; align-items: center; gap: 12px; min-height: 44px; }
#cgc .cc-title { font-family: Bangers, sans-serif; letter-spacing: .05em; font-size: 2rem; color: var(--corn); text-shadow: 0 3px 0 rgba(0,0,0,.45); flex: 1; line-height: 1; }
#cgc .cc-title small { display: block; font: 600 .9rem/1.3 var(--font-body); letter-spacing: 0; color: var(--text-dim); text-shadow: none; margin-top: 4px; }
#cgc .cc-body { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
#cgc .cc p { font-size: 1.05rem; color: var(--text-dim); line-height: 1.4; }
#cgc .cc .big { font-size: 1.2rem; color: #fff; }
#cgc .cc-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
#cgc .cb { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  font: 800 1.05rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.4); white-space: nowrap;
  background: var(--b1); box-shadow: 0 5px 0 var(--b2), 0 9px 16px rgba(0,0,0,.45); }
#cgc .cb::before { content: ''; position: absolute; left: 14px; top: 5px; width: 26px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.55); filter: blur(.5px); transform: rotate(-12deg); }
#cgc .cb.g { --b1: linear-gradient(180deg,#8cff6a,#2fbf3c 55%,#1f9a2e); --b2: #0e6a1c; }
#cgc .cb.c { --b1: linear-gradient(180deg,#78e0ff,#2a9bff 55%,#1c6fdd); --b2: #124a9a; }
#cgc .cb.r { --b1: linear-gradient(180deg,#ff7a8a,#e6264a 55%,#b3153a); --b2: #760a25; }
#cgc .cb.a { --b1: linear-gradient(180deg,#ffe36b,#ffb11f 55%,#f08a00); --b2: #9a5200; color: #3a1c00; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
#cgc .cb.x { --b1: linear-gradient(180deg,#8d8aa0,#6c6985 55%,#585572); --b2: #3a3850; color: #d9d6ea; cursor: not-allowed; }
#cgc .cb.x::before { opacity: .25; }
#cgc .cb.s { min-height: 40px; padding: 0 16px; font-size: .88rem; box-shadow: 0 4px 0 var(--b2), 0 7px 12px rgba(0,0,0,.4); }
#cgc .cb.s::before { left: 10px; top: 4px; width: 18px; height: 8px; }
#cgc .back { --b1: linear-gradient(180deg,#78e0ff,#2a9bff 55%,#1c6fdd); --b2: #124a9a; }
#cgc .cb.back { min-height: 40px; padding: 0 18px 0 12px; font-size: .9rem; }
#cgc .cb.close { min-height: 40px; width: 40px; padding: 0; font-size: 1.2rem; --b1: linear-gradient(180deg,#8d8aa0,#6c6985); --b2: #3a3850; }
#cgc .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #ff2d78; color: #fff; font: 800 .8rem/1 var(--font-body); box-shadow: 0 0 0 2px #12082b; }
#cgc .field { display: flex; flex-direction: column; gap: 5px; }
#cgc .field label { font-size: .85rem; font-weight: 800; letter-spacing: .08em; color: var(--sky); text-transform: uppercase; }
#cgc .field .in { background: #0b0620; border: 2px solid rgba(255,255,255,.28); border-radius: 12px; padding: 11px 14px; font: 600 1.15rem/1.2 var(--font-body); color: #fff; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#cgc .field .in.focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(63,216,255,.25); }
#cgc .field .in.bad { border-color: #ff5a78; box-shadow: 0 0 0 3px rgba(255,90,120,.22); }
#cgc .field .hint { font-size: .86rem; color: rgba(255,255,255,.68); }
#cgc .field .err { font-size: .92rem; color: #ff8aa0; font-weight: 700; }
#cgc .field .count { font-size: .85rem; color: rgba(255,255,255,.55); font-weight: 700; }
#cgc .seg { display: flex; gap: 8px; }
#cgc .seg > div { flex: 1; text-align: center; padding: 9px 8px; border-radius: 14px; border: 2px solid rgba(255,255,255,.25); background: #170c33; font-weight: 800; letter-spacing: .05em; font-size: .95rem; color: var(--text-dim); }
#cgc .seg > div small { display: block; font-weight: 600; letter-spacing: 0; font-size: .78rem; color: rgba(255,255,255,.6); margin-top: 3px; }
#cgc .seg > div.on { border-color: var(--lime); background: rgba(77,255,176,.14); color: #fff; box-shadow: 0 0 12px rgba(77,255,176,.35); }
#cgc .crest { position: relative; flex: none; display: inline-block; }
#cgc .crest svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }
#cgc .pick { display: grid; gap: 8px; }
#cgc .pick.em { grid-template-columns: repeat(6, 1fr); }
#cgc .pick.co { grid-template-columns: repeat(8, 1fr); }
#cgc .pick > div { aspect-ratio: 1; border-radius: 12px; border: 2px solid rgba(255,255,255,.2); background: #170c33; display: grid; place-items: center; font-size: 1.5rem; color: #fff; }
#cgc .pick > div.on { border-color: var(--corn); box-shadow: 0 0 12px rgba(255,210,63,.55); }
#cgc .pick.co > div { border-radius: 50%; border-width: 3px; }
#cgc .club { display: flex; gap: 12px; align-items: center; background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04)); border: 2px solid rgba(255,255,255,.22); border-radius: 16px; padding: 10px 12px; }
#cgc .club.mine { border-color: var(--corn); box-shadow: 0 0 14px rgba(255,210,63,.35); }
#cgc .club .nm { font-family: Bangers, sans-serif; letter-spacing: .04em; font-size: 1.35rem; color: #fff; line-height: 1.05; }
#cgc .club .nm i { font-style: normal; color: var(--sky); }
#cgc .club .mt { font-size: .86rem; color: rgba(255,255,255,.72); margin-top: 3px; }
#cgc .club .mt b { color: var(--corn); }
#cgc .club .grow { flex: 1; min-width: 0; }
#cgc .club .act { flex: none; }
#cgc .cards { display: grid; gap: 10px; }
#cgc .cards.c2 { grid-template-columns: 1fr 1fr; }
#cgc .cards.c3 { grid-template-columns: 1fr 1fr 1fr; }
#cgc .carousel { display: flex; gap: 12px; overflow: hidden; }
#cgc .carousel .club { flex: none; width: 250px; flex-direction: column; text-align: center; padding: 14px; }
#cgc .search { display: flex; gap: 10px; align-items: center; background: #0b0620; border: 2px solid var(--sky); border-radius: 999px; padding: 8px 16px; min-height: 48px; font-weight: 600; font-size: 1.1rem; }
#cgc .search span { color: rgba(255,255,255,.5); }
#cgc .stats { display: flex; gap: 10px; }
#cgc .stat { flex: 1; text-align: center; background: rgba(0,0,0,.28); border: 2px solid rgba(255,255,255,.16); border-radius: 14px; padding: 8px 6px; }
#cgc .stat b { display: block; font-family: Bangers, sans-serif; letter-spacing: .03em; font-size: 1.7rem; color: var(--corn); font-weight: 400; line-height: 1.05; }
#cgc .stat span { font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: rgba(255,255,255,.7); }
#cgc .roster { display: flex; flex-direction: column; gap: 6px; }
#cgc .rrow { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border-radius: 12px; padding: 6px 10px; min-height: 52px; }
#cgc .rrow.you { outline: 2px solid var(--corn); }
#cgc .rrow .n { width: 22px; text-align: right; font-weight: 800; color: rgba(255,255,255,.55); }
#cgc .face { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(63,216,255,.7); background: #2c1b57 center / cover no-repeat; display: grid; place-items: center; font-weight: 800; color: var(--sky); overflow: hidden; }
#cgc .rrow .who { flex: 1; min-width: 0; font-weight: 800; font-size: 1.05rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cgc .rrow .who small { display: block; font-weight: 600; font-size: .8rem; color: rgba(255,255,255,.62); }
#cgc .rrow .pt { font-weight: 800; color: var(--corn); font-size: 1.05rem; }
#cgc .role { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; background: var(--corn); color: #3a2400; margin-left: 6px; vertical-align: middle; }
#cgc .star { color: var(--corn); margin-right: 3px; }
#cgc .msgs { display: flex; flex-direction: column; gap: 8px; background: rgba(0,0,0,.28); border-radius: 14px; padding: 10px; }
#cgc .msg { display: flex; gap: 8px; align-items: flex-end; }
#cgc .msg .bub { background: #fff; color: #1b0f3a; border-radius: 16px 16px 16px 4px; padding: 6px 12px; font-weight: 800; letter-spacing: .03em; font-size: 1rem; }
#cgc .msg .bub small { display: block; font-size: .7rem; color: #6b5a9a; letter-spacing: .06em; }
#cgc .msg.me { flex-direction: row-reverse; }
#cgc .msg.me .bub { background: var(--lime); border-radius: 16px 16px 4px 16px; }
#cgc .tray { display: flex; flex-wrap: wrap; gap: 8px; }
#cgc .tray .ph { background: linear-gradient(180deg,#78e0ff,#2a9bff); color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 800; letter-spacing: .04em; font-size: .92rem; box-shadow: 0 3px 0 #124a9a; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
#cgc .tray .grp { width: 100%; font-size: .74rem; font-weight: 800; letter-spacing: .12em; color: var(--sky); }
#cgc .pinned { display: flex; align-items: center; gap: 10px; background: rgba(255,210,63,.14); border: 2px solid var(--corn); border-radius: 14px; padding: 8px 12px; }
#cgc .banner { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: .92rem; letter-spacing: .03em; }
#cgc .banner.off { background: #3a2a00; border: 2px solid var(--tangerine); color: #ffd9a0; }
#cgc .banner.warn { background: #3b1020; border: 2px solid #ff5a78; color: #ffc0cc; }
#cgc .banner.ok { background: #0d3a2a; border: 2px solid var(--lime); color: #c8ffe8; }
#cgc .banner.info { background: #12304a; border: 2px solid var(--sky); color: #cdefff; }
#cgc .toast { display: inline-block; max-width: calc(100vw - 32px); box-sizing: border-box; text-align: center; background: #0b0620; border: 2px solid var(--corn); color: var(--corn); border-radius: 22px; padding: 8px 18px; font-weight: 800; letter-spacing: .08em; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
#cgc .cele { position: relative; text-align: center; padding: 14px 0 4px; }
#cgc .cele .crest { width: 120px; height: 138px; animation: none; transform: scale(1.12); }
#cgc .cele .rain { position: absolute; inset: -10px -10px 40px; pointer-events: none; font-size: 22px; letter-spacing: 18px; line-height: 2.2; color: var(--corn); opacity: .85; overflow: hidden; text-align: center; }
#cgc .pick > div { aspect-ratio: auto; height: 46px; }
#cgc .pick.co > div { height: 40px; aspect-ratio: 1; margin: 0 auto; }
#cgc .cc-body { position: relative; }
#cgc .cc-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
#cgc .club { flex-wrap: wrap; }
#cgc .club .grow { min-width: 150px; }
#cgc .rrow.ask { flex-wrap: wrap; row-gap: 6px; }
#cgc .rrow.ask .who { min-width: 150px; white-space: normal; }
#cgc .rrow.ask .btns { display: flex; gap: 8px; margin-left: auto; }
#cgc .stat span { white-space: nowrap; letter-spacing: .05em; font-size: .72rem; }
#cgc .cc { background: linear-gradient(180deg, var(--panel2), var(--panel) 40%, var(--ink)); border: 3px solid var(--line); border-radius: 22px; box-shadow: 0 0 0 4px rgba(0,0,0,.35), 0 18px 50px rgba(0,0,0,.65), inset 0 2px 2px rgba(255,255,255,.18); padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
#cgc button { font-family: inherit; }
#cgc .cb:disabled { cursor: not-allowed; }
#cgc .cb.busy { opacity: .7; }
#cgc input.inp { width: 100%; background: transparent; border: 0; outline: 0; color: #fff; font: 600 1.15rem/1.2 var(--font-body); padding: 0; min-width: 0; }
#cgc .field .in.tagin input.inp { letter-spacing: .4em; font-family: Bangers, sans-serif; font-weight: 400; font-size: 1.6rem; text-transform: uppercase; }
#cgc .search input.inp { flex: 1; }
#cgc .pick > button, #cgc .seg > button { font: inherit; color: inherit; cursor: pointer; }
#cgc .pick > button { aspect-ratio: auto; height: 46px; border-radius: 12px; border: 2px solid rgba(255,255,255,.2); background: #170c33; font-size: 1.5rem; color: #fff; }
#cgc .pick > button.on { border-color: var(--corn); box-shadow: 0 0 12px rgba(255,210,63,.55); }
#cgc .pick.co > button { border-radius: 50%; border-width: 3px; height: 40px; width: 40px; margin: 0 auto; }
#cgc .seg > button { flex: 1; text-align: center; padding: 9px 8px; border-radius: 14px; border: 2px solid rgba(255,255,255,.25); background: #170c33; font-weight: 800; letter-spacing: .05em; font-size: .95rem; color: var(--text-dim); }
#cgc .seg > button small { display: block; font-weight: 600; letter-spacing: 0; font-size: .78rem; color: rgba(255,255,255,.6); margin-top: 3px; }
#cgc .seg > button.on { border-color: var(--lime); background: rgba(77,255,176,.14); color: #fff; box-shadow: 0 0 12px rgba(77,255,176,.35); }
#cgc a.club-link { color: inherit; text-decoration: none; }
#cgc .club { cursor: pointer; }
#cgc .club .nm { color: #fff; }
#cgc .roster .rrow a { color: inherit; text-decoration: none; }
#cgc .flagimg { width: 1.25em; height: .85em; object-fit: cover; vertical-align: -0.08em; margin-right: .25em; border-radius: 2px; }
#cgc .toast-host { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 410; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#cgc .cele .rain span { position: absolute; top: -20px; font-size: 22px; animation: cc-fall 1.8s ease-in forwards; }
@keyframes cc-fall { to { transform: translateY(360px) rotate(240deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #cgc .cele .rain span { animation: none; display: none; } }
@media (max-width: 720px) {
  #cgc { inset: 58px 0 0 0; }
  #cgc .cc-wrap { padding: 10px 10px 18px; }
  #cgc .cc { padding: 14px 14px 16px; }
  #cgc .cc-title { font-size: 1.6rem; }
  #cgc .cards.c3 { grid-template-columns: 1fr; }
  #cgc .cards.c3 .club { flex-direction: row; text-align: left; }
  #cgc .stats .stat b { font-size: 1.35rem; }
  /* The live crest preview sits beside its name on a phone, not in a tall column of its own (create and edit). */
  #cgc #cg-prev { width: 100% !important; display: flex; align-items: center; gap: 12px; text-align: left !important; }
  #cgc #cg-prev .crest { width: 56px !important; height: 64px !important; }
  #cgc #cg-prev .nm { margin-top: 0 !important; }
}
/* Eight colour dots always fit their row: a dot is at most its grid cell (it overflowed the card at 390). */
#cgc .pick.co > button { width: min(40px, 100%); height: auto; aspect-ratio: 1; }
#cgc .field .count { white-space: nowrap; letter-spacing: 0; font-family: var(--font-body); font-size: .85rem; }
#cgc .field .in.tagin { font-size: 1rem; }
/* Edit your club (FEAT-2026-1128-0133): the tag is shown, fixed, never an input. */
#cgc .field .in.tagin.fixed { border-style: dashed; opacity: .78; }
#cgc .field .in.tagin.fixed .tagv { letter-spacing: .4em; font-family: Bangers, sans-serif; font-size: 1.6rem; }
/* An invitation's two answers stay together: on a phone they wrap under the club as one row, never ACCEPT beside and DECLINE alone below. */
#cgc .club .btns { display: flex; gap: 8px; margin-left: auto; }
