/* The account menu in the header, members' profile pages and the settings
   page. Built on the site's own design tokens (site.css); the few rules the
   header slot needs before this file arrives travel inline with it. */

/* ---- the account menu */
.c-acct__btn:hover, .c-acct__btn[aria-expanded="true"]{ color: #fff; background: rgba(41,170,225,.14); }
.c-acct__btn:focus-visible{ outline: 2px solid var(--cyan); outline-offset: 2px; }
.c-acct__pic{
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  font: 700 .8rem/1 var(--display); color: #fff; background: var(--electric);
}
.c-acct__name{ overflow: hidden; text-overflow: ellipsis; }
.c-acct__dot{
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font: 700 .66rem/18px var(--display); text-align: center; color: #fff; background: #d6336c; pointer-events: none;
}
.c-acct__menu{
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 90; width: 260px; max-width: calc(100vw - 32px);
  padding: 6px 0; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: 0 24px 48px rgba(0,0,0,.55);
}
.c-acct__menu[hidden]{ display: none; }
.c-acct__head{ display: flex; gap: 10px; align-items: center; padding: 10px 14px 12px; border-bottom: 1px solid var(--line); }
.c-acct__head .c-acct__pic{ width: 36px; height: 36px; font-size: 1rem; }
.c-acct__head strong{ display: block; color: var(--text); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-acct__head div span{ display: block; color: var(--text-dim); font-size: .8rem; }
.c-acct__menu a, .c-acct__menu button{
  display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 14px;
  background: none; border: 0; color: var(--text-body); font: inherit; font-size: .9rem; text-align: left; text-decoration: none; cursor: pointer;
}
.c-acct__menu a:hover, .c-acct__menu button:hover, .c-acct__menu a:focus-visible, .c-acct__menu button:focus-visible{ color: #fff; background: rgba(41,170,225,.12); outline: none; }
.c-acct__menu hr{ margin: 6px 0; border: 0; border-top: 1px solid var(--line); }
.c-acct__count{ min-width: 20px; padding: 1px 6px; border-radius: 10px; font: 700 .7rem/16px var(--display); text-align: center; color: #fff; background: #d6336c; }
.c-acct__note{ margin: 0; padding: 8px 14px 4px; color: var(--text-dim); font-size: .8rem; line-height: 1.45; }
.c-acct__providers{ display: grid; gap: 8px; padding: 8px 14px 10px; }
.c-acct__providers a{ justify-content: center; border: 1px solid var(--line-strong); }
@media (max-width: 760px){
  .c-acct__btn .c-acct__pic{ width: 26px; height: 26px; }
  .c-acct__name{ display: none; }
  .c-acct__menu{ position: fixed; top: 60px; right: 16px; left: auto; }
}

/* ---- profile pages */
.cpf{ margin: 8px 0 40px; }
.cpf-head{ display: grid; grid-template-columns: auto 1fr; gap: 18px 22px; align-items: start; padding: 22px 24px; background: var(--panel); border: 1px solid var(--line); }
.cpf-avatar{
  display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  font: 700 2.4rem/1 var(--display); color: #fff; background: var(--electric);
}
.cpf-name{ margin: 0; font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.1; overflow-wrap: anywhere; }
.cpf-handle{ margin: 4px 0 10px; color: var(--text-dim); }
.cpf-badges{ display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; color: var(--text-dim); font-size: .86rem; }
.cpf-badges .gr-badge{ margin-left: 0; }
.cpf-role{ padding: 1px 7px; font: 600 .64rem/1.6 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--blue); }
.cpf-bio{ margin: 0 0 12px; max-width: 62ch; color: var(--text-body); line-height: 1.55; overflow-wrap: anywhere; }
.cpf-favs{ display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .86rem; }
.cpf-favs__label{ color: var(--text-faint); }
.cpf-favs ul{ display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cpf-favs a{ display: inline-block; padding: 3px 10px; border: 1px solid var(--line-strong); color: var(--text-body); text-decoration: none; }
.cpf-favs a:hover{ color: #fff; border-color: var(--cyan); }
.cpf-live{ grid-column: 1 / -1; }
.cpf-live:empty{ display: none; }
.cpf-you{ display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0; padding: 10px 14px; border-left: 2px solid var(--cyan); background: rgba(41,170,225,.08); color: var(--text-body); font-size: .9rem; }
.cpf-pending{ margin-top: 12px; }
.cpf-pending h2{ margin: 0 0 6px; font-size: 1rem; }
.cpf-pending p{ margin: 0 0 8px; color: var(--text-dim); font-size: .85rem; }
.cpf-pending li{ margin: 0 0 6px; }
.cpf-status{ display: inline-block; margin-left: 6px; padding: 0 6px; font: 600 .66rem/1.7 var(--display); letter-spacing: .1em; text-transform: uppercase; color: #ffd27a; border: 1px solid rgba(255,210,122,.45); }
.cpf-stats{ display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin: 16px 0 0; background: var(--line); border: 1px solid var(--line); }
.cpf-stats div{ padding: 12px 14px; background: var(--panel); }
.cpf-stats dt{ color: var(--text-faint); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.cpf-stats dd{ margin: 4px 0 0; font: 700 1.4rem/1 var(--display); }
.cpf-stats a{ color: var(--text); text-decoration: none; }
.cpf-stats a:hover{ color: var(--cyan); }
.cpf-tabs{ display: flex; gap: 2px; margin: 24px 0 0; border-bottom: 1px solid var(--line-strong); overflow-x: auto; scrollbar-width: none; }
.cpf-tabs a{ flex: none; padding: 10px 16px; color: var(--text-dim); font: 600 .82rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid transparent; }
.cpf-tabs a:hover{ color: var(--text); }
.cpf-tabs a[aria-current="true"]{ color: #fff; border-bottom-color: var(--cyan); }
/* one panel at a time, the one the address names (else the first), with
   or without the script; the script only keeps the address and the tabs
   in step without jumping the page, so hydrating moves nothing */
.cpf-panel{ padding: 18px 0 0; scroll-margin-top: 80px; }
.cpf-panel > h2{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cpf-panels > .cpf-panel{ display: none; }
.cpf-panels > .cpf-panel:target{ display: block; }
.cpf-panels:not(:has(> .cpf-panel:target)) > .cpf-panel:first-child{ display: block; }
.cpf--tabbed .cpf-panels > .cpf-panel{ display: none; }
.cpf--tabbed .cpf-panels > .cpf-panel.is-active{ display: block; }
@supports not selector(:has(*)){
  .cpf-panels > .cpf-panel{ display: block; }
  .cpf-panel > h2{ position: static; width: auto; height: auto; clip-path: none; margin: 0 0 14px; font-size: 1.15rem; }
}
.cpf-empty{ color: var(--text-dim); }
.cpf-more{ color: var(--text-faint); font-size: .85rem; }
.cpf-review{ margin: 0 0 18px; }
.cpf-review__game{ margin: 0 0 6px; font: 600 .95rem/1.3 var(--display); }
.cpf-review__game a{ color: var(--cyan); text-decoration: none; }
.cpf-review__game a:hover{ text-decoration: underline; }
.cpf-list{ margin: 0 0 18px; padding: 0; list-style: none; }
.cpf-list li{ padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-body); line-height: 1.5; }
.cpf-list time, .cpf-meta{ color: var(--text-faint); font-size: .8rem; white-space: nowrap; }
.cpf-edit__field{ color: var(--text-dim); }
.cpf-edit__summary{ color: var(--text-body); font-style: italic; }
.cpf-activity__what{ display: inline-block; min-width: 0; margin-right: 6px; color: var(--text-dim); font-size: .85rem; }
.cpf-media{ display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cpf-media figure{ margin: 0; }
.cpf-media img{ display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.cpf-media figcaption{ display: grid; gap: 2px; padding: 6px 2px; font-size: .8rem; color: var(--text-dim); }
.cpf--gone{ max-width: 640px; margin: 40px 0 80px; }
.cpf--gone h1{ font-family: var(--display); }
@media (max-width: 760px){
  .cpf-head{ grid-template-columns: 1fr; padding: 18px 16px; }
  .cpf-avatar{ width: 72px; height: 72px; font-size: 1.8rem; }
  .cpf-stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cpf-stats div:last-child{ grid-column: 1 / -1; }
  .cpf-tabs a{ padding: 10px 12px; }
}

/* ---- settings */
.cst{ margin: 8px 0 60px; }
.cst-nav{ display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.cst-nav a{ padding: 6px 12px; border: 1px solid var(--line-strong); color: var(--text-body); font-size: .84rem; text-decoration: none; }
.cst-nav a:hover{ color: #fff; border-color: var(--cyan); }
.cst-wait{ color: var(--text-dim); }
.cst-card{ margin: 0 0 18px; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); scroll-margin-top: 80px; }
.cst-card > h2{ margin: 0 0 6px; font-size: 1.15rem; }
.cst-card > p.cst-lede{ margin: 0 0 14px; color: var(--text-dim); font-size: .9rem; }
.cst-field{ display: grid; gap: 6px; margin: 0 0 14px; max-width: 560px; }
.cst-field > span{ color: var(--text); font-weight: 600; font-size: .9rem; }
.cst-field small, .cst-hint{ color: var(--text-faint); font-size: .8rem; line-height: 1.45; }
.cst input[type="text"], .cst textarea{
  width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: .95rem;
}
.cst textarea{ min-height: 96px; resize: vertical; }
.cst input:focus, .cst textarea:focus{ outline: 2px solid var(--cyan); outline-offset: 1px; }
.cst input:disabled{ opacity: .6; }
.cst-check{ display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; color: var(--text-body); font-size: .92rem; line-height: 1.45; }
.cst-check input{ margin-top: 3px; accent-color: var(--cyan); }
.cst-chips{ display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.cst-chips label{ display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line-strong); color: var(--text-body); font-size: .84rem; cursor: pointer; }
.cst-chips input{ accent-color: var(--cyan); }
.cst-chips label:has(input:checked){ color: #fff; border-color: var(--cyan); background: rgba(41,170,225,.12); }
.cst-favs{ margin: 0 0 14px; }
.cst-favs summary{ cursor: pointer; color: var(--text); font-weight: 600; font-size: .9rem; }
.cst-favs summary small{ color: var(--text-faint); font-weight: 400; }
.cst-actions{ display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.cst-btn{ padding: 9px 14px; background: none; border: 1px solid var(--line-strong); color: var(--text-body); font: 600 .8rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.cst-btn:hover{ color: #fff; border-color: var(--cyan); }
.cst-btn:disabled{ opacity: .5; cursor: default; }
.cst-btn--danger{ border-color: rgba(214,51,108,.6); color: #ff8fb4; }
.cst-btn--danger:hover{ border-color: #d6336c; color: #fff; background: rgba(214,51,108,.2); }
.cst-msg{ margin: 10px 0 0; font-size: .88rem; }
.cst-msg.is-ok{ color: #7ee2a8; }
.cst-msg.is-err{ color: #ff8fb4; }
.cst-pic{ display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cst-rows{ margin: 0 0 12px; padding: 0; list-style: none; }
.cst-rows li{ display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-body); }
.cst-rows li small{ color: var(--text-faint); }
.cst-notice{ display: grid; gap: 4px; }
.cst-danger{ margin-top: 12px; padding: 14px 16px; border: 1px solid rgba(214,51,108,.45); background: rgba(214,51,108,.06); }
.cst-danger ul{ margin: 6px 0 12px 18px; padding: 0; color: var(--text-body); font-size: .9rem; line-height: 1.5; }
.cst-danger[hidden]{ display: none; }
@media (max-width: 760px){
  .cst-card{ padding: 16px; }
  .cst-rows li{ flex-wrap: wrap; }
}

/* a member's profile: the Message button other members see */
.cpf-actions{ margin: 12px 0 0; }
.c-acct__count[hidden]{ display: none; }
