/**
 * Greybox account (css/auth.css) — /signup + /login full-screen view
 * (js/auth.js) and the Settings -> Account tab details.
 *
 * THEME: everything is built from css/tokens.css — the SAME charcoal
 * surfaces, off-white text and GOLD accent (--gx-accent: #d0a24f dark /
 * #a8802f light) the rest of the site uses. No violet, no foreign
 * palette: the card is a glass panel over the poster mosaic, the CTA is
 * the site gold, and every color follows the active theme (dark/AMOLED/
 * light) automatically.
 *
 * CASCADE NOTE: tailwind.min.css loads first in index.html and provides
 * the global `.hidden{display:none}` utility. Every rule here that styles
 * a class JS toggles with `.hidden` is written as `:not(.hidden)` so the
 * utility always wins when both classes are present.
 *
 * Account ENTRY lives in Settings only (product decision) — there are no
 * navbar/dock account controls, so nothing here styles any.
 */

/* ---------------- view shell ---------------- */

body.gx-auth-mode { background: var(--gx-bg-0, #0b0d12); }
/* Full-screen reference view: the site footer would sit on top of the
   fixed mosaic — hide it while auth owns the page (settings keeps it). */
body.gx-auth-mode #site-footer { display: none; }

.gxauth-page {
  position: relative;
  min-height: 100vh;
  animation: gxauth-rise .4s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes gxauth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- poster mosaic backdrop ---------------- */

.gxauth-mosaic {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  display: flex;
  justify-content: center;
  gap: clamp(6px, 1vw, 14px);
  /* Gradient base: also the full fallback when TMDB posters are slow/off.
     Gold-tinted charcoal, matching the site atmosphere. */
  background:
    radial-gradient(1200px 600px at 22% 12%, rgba(208, 162, 79, .12), transparent 60%),
    radial-gradient(1000px 700px at 85% 85%, rgba(255, 255, 255, .05), transparent 55%),
    linear-gradient(160deg, #14161d 0%, #0b0d12 55%, #101218 100%);
  pointer-events: none;
}

.gxauth-col {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vw, 14px);
  flex: 0 1 min(16vw, 210px);
  min-width: 110px;
  animation: gxauth-drift 34s ease-in-out infinite alternate;
  animation-delay: var(--gxauth-shift, 0s);
  will-change: transform;
}

.gxauth-col:nth-child(even) { animation-direction: alternate-reverse; }

@keyframes gxauth-drift {
  from { transform: translateY(-4%); }
  to { transform: translateY(-24%); }
}

.gxauth-tile {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  opacity: .88;
  background: rgba(255, 255, 255, .05);
}

.gxauth-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 9, 12, .86) 0%, rgba(8, 9, 12, .62) 42%, rgba(8, 9, 12, .9) 100%);
}

html[data-theme="light"] .gxauth-veil {
  background:
    linear-gradient(180deg, rgba(241, 242, 244, .82) 0%, rgba(241, 242, 244, .55) 42%, rgba(241, 242, 244, .88) 100%);
}

/* ---------------- centered panel + card ---------------- */

.gxauth-panel {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 116px 20px 64px;
  box-sizing: border-box;
}

.gxauth-card {
  position: relative;
  width: min(430px, 100%);
  /* Glass panel in the site's charcoal surface (opaque fallback first). */
  background: var(--gx-surface, #262b33);
  background: color-mix(in srgb, var(--gx-surface, #262b33) 86%, transparent);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  color: var(--gx-text, #f4f3ee);
  border: 1px solid var(--gx-border-strong, rgba(255, 255, 255, .12));
  border-radius: 18px;
  padding: 30px 28px 26px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .5);
  animation: gxauth-card-in .38s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes gxauth-card-in {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.gxauth-title {
  margin: 0 0 6px;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--gx-text, #f4f3ee);
}

.gxauth-sub {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gx-text-dim, #a8a8b4);
}

.gxauth-label {
  display: block;
  margin: 14px 0 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--gx-text-dim, #a8a8b4);
}

.gxauth-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--gx-border-strong, rgba(255, 255, 255, .12));
  background: var(--gx-card-bg, rgba(255, 255, 255, .04));
  color: var(--gx-text, #f4f3ee);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.gxauth-input::placeholder { color: var(--gx-text-faint, #6e6e7a); }

.gxauth-input:focus {
  border-color: var(--gx-accent, #d0a24f);
  background: var(--gx-card-bg, rgba(255, 255, 255, .04));
  box-shadow: 0 0 0 3px var(--gx-accent-soft, rgba(208, 162, 79, .13));
}

.gxauth-input-key {
  font-family: 'DM Mono', ui-monospace, monospace;
  letter-spacing: .16em;
  font-size: 16px;
}

.gxauth-err:not(.hidden) {
  display: block;
  margin-top: 5px;
  min-height: 15px;
  font-size: 12.5px;
  line-height: 1.35;
  color: #fb7185;
}

.gxauth-err-banner:not(.hidden) {
  display: block;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(225, 29, 72, .1);
  border: 1px solid rgba(225, 29, 72, .32);
  color: #fb7185;
  font-size: 13px;
  line-height: 1.45;
}

.gxauth-captcha:not(:empty) { margin-top: 14px; }

/* Primary CTA = the site gold (tokens --gx-accent*), dark text on gold. */
.gxauth-submit {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #15161a;
  background: linear-gradient(135deg, var(--gx-accent-strong, #e2ba6b), var(--gx-accent, #d0a24f));
  box-shadow: 0 12px 28px rgba(208, 162, 79, .22);
  transition: filter .15s ease, transform .1s ease, box-shadow .15s ease;
}

.gxauth-submit:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 14px 32px rgba(208, 162, 79, .3);
}

.gxauth-submit:active:not(:disabled) { transform: translateY(1px); }

.gxauth-submit:disabled { opacity: .72; cursor: default; }

.gxauth-switch {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--gx-text-dim, #a8a8b4);
}

/* Under the login key field: the Account ID / account key distinction that
   sent a real user to login with their Settings ID (matches design intent —
   public_id must never grant access — so the copy does the separating). */
.gxauth-hint {
  margin: -2px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--gx-text-faint, #6e6e7a);
}

.gxauth-switch a {
  color: var(--gx-accent, #d0a24f);
  font-weight: 700;
  text-decoration: none;
}

.gxauth-switch a:hover { text-decoration: underline; }

.gxauth-legal {
  margin: 0;
  max-width: 430px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .55);
}

html[data-theme="light"] .gxauth-legal { color: rgba(21, 22, 27, .55); }

/* ---------------- step 2: one-time account key modal ---------------- */

.gxauth-card-key {
  background: var(--gx-surface, #262b33);
  background: color-mix(in srgb, var(--gx-surface, #262b33) 94%, transparent);
}

.gxauth-x {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--gx-text-faint, #6e6e7a);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}

.gxauth-x:hover { background: var(--gx-card-bg, rgba(255, 255, 255, .04)); color: var(--gx-text, #f4f3ee); }

.gxauth-check {
  width: 66px;
  height: 66px;
  margin: 8px auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 12px 34px rgba(16, 185, 129, .35);
  animation: gxauth-pop .4s cubic-bezier(.34, 1.56, .64, 1) both;
}

.gxauth-check svg { width: 30px; height: 30px; color: #fff; }

@keyframes gxauth-pop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.gxauth-done {
  margin: 0 0 4px;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gx-text, #f4f3ee);
}

.gxauth-sub2 {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--gx-text-dim, #a8a8b4);
}

.gxauth-keybox {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--gx-border, rgba(255, 255, 255, .08));
  border-radius: 12px;
  padding: 14px;
}

html[data-theme="light"] .gxauth-keybox { background: var(--gx-card-bg, rgba(0, 0, 0, .04)); }

.gxauth-keycode {
  flex: 1;
  font-family: 'DM Mono', ui-monospace, monospace;
  /* 19 chars (16 digits + 3 gaps) must fit ONE line beside Copy at every
     width — 17px max + .1em tracking keeps ~226px inside the ~268px slot. */
  font-size: clamp(13.5px, 3.4vw, 17px);
  letter-spacing: .1em;
  white-space: nowrap;
  color: var(--gx-text, #f4f3ee);
  -webkit-user-select: all;
  user-select: all;
}

.gxauth-copy {
  flex: none;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid var(--gx-border-strong, rgba(255, 255, 255, .12));
  background: var(--gx-card-bg, rgba(255, 255, 255, .04));
  color: var(--gx-text, #f4f3ee);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}

.gxauth-copy:hover { background: var(--gx-surface-2, #2e343d); }

.gxauth-copy.is-done {
  background: #10b981;
  border-color: transparent;
  color: #fff;
}

.gxauth-warn {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 14px 0 18px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(208, 162, 79, .1);
  border: 1px solid var(--gx-accent-border, rgba(208, 162, 79, .32));
  color: var(--gx-accent-strong, #e2ba6b);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

html[data-theme="light"] .gxauth-warn { color: #8a6620; }

.gxauth-warn-ico { flex: none; font-size: 15px; line-height: 1.3; }

/* Confirm = the site gold, same language as the submit CTA. */
.gxauth-saved {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 11px;
  color: #15161a;
  background: linear-gradient(135deg, var(--gx-accent-strong, #e2ba6b), var(--gx-accent, #d0a24f));
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s ease, filter .15s ease;
}

.gxauth-saved:hover { filter: brightness(1.06); }
.gxauth-saved:active { transform: translateY(1px); }

/* ---------------- responsive: keep the card comfortable ---------------- */

@media (max-width: 760px) {
  .gxauth-col:nth-child(n + 4) { display: none; }
  /* Narrower columns hold fewer pixels of height: shorten the drift so the
     bottom edge never slides past the column content. */
  .gxauth-col { animation-name: gxauth-drift-sm; }
  .gxauth-panel { padding: 104px 16px 48px; }
  .gxauth-card { padding: 26px 20px 22px; }
}

@keyframes gxauth-drift-sm {
  from { transform: translateY(-4%); }
  to { transform: translateY(-14%); }
}

@media (max-width: 480px) {
  .gxauth-col:nth-child(n + 3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gxauth-col { animation: none; }
  .gxauth-page, .gxauth-card, .gxauth-check { animation: none; }
}

/* =====================================================================
 * Settings -> Account tab (#gxset-account). Reuses css/settings.css
 * tokens (.gxset-row/.gxset-meta/.gxset-btn) and adds the account bits:
 * id mask+reveal, avatar presets, panels, export/sign-out/delete rows,
 * coming-soon badges. Everything gold/charcoal — no violet anywhere.
 * ===================================================================== */

/* Shared avatar disc (profile row, CTA). Presets below are a small
   whitelist stored on the account (validateAvatarInput), never a URL. */
.gxa-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  flex: none;
  user-select: none;
}

/* Default/first preset = the SITE GOLD; the rest are user identity colors. */
.av-gold { background: linear-gradient(135deg, var(--gx-accent-strong), var(--gx-accent)); color: #15161a; }
.av-violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.av-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.av-emerald { background: linear-gradient(135deg, #10b981, #047857); }
.av-rose { background: linear-gradient(135deg, #f43f5e, #be123c); }
.av-sky { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.av-orange { background: linear-gradient(135deg, #f97316, #c2410c); }

.gxa-av-lg { width: 46px; height: 46px; font-size: 18px; }

/* transient status line ("Signed out.", "Account ID copied.") */
.gxa-note:not(.hidden) {
  display: block;
  margin: 0;
  padding: 0 16px 10px;
  font-size: 12.5px;
  color: #34d399;
}

/* ---- signed-out CTA ---- */

.gxa-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  flex-wrap: wrap;
}

/* The CTA disc carries the site gold (not an avatar preset). */
.gxa-cta-av {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--gx-accent-strong, #e2ba6b), var(--gx-accent, #d0a24f));
}

.gxa-cta-av svg { width: 22px; height: 22px; color: #15161a; }

.gxa-cta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 190px;
}

.gxa-cta-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--gxset-hi, #eceef2);
}

.gxa-cta-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--gxset-dim, #9aa1ad);
}

.gxa-cta-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Gold fill on top of the settings ghost-button base. */
.gxset-btn.is-primary {
  background: linear-gradient(135deg, var(--gx-accent-strong, #e2ba6b), var(--gx-accent, #d0a24f));
  border-color: transparent;
  color: #15161a;
}

.gxset-btn.is-primary:hover {
  background: linear-gradient(135deg, var(--gx-accent-strong, #e2ba6b), var(--gx-accent, #d0a24f));
  filter: brightness(1.06);
}

/* ---- ACCOUNT ID row ---- */

.gxa-id { display: flex; align-items: center; gap: 8px; }

.gxa-id-val {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 13.5px;
  letter-spacing: .1em;
  color: var(--gxset-hi, #eceef2);
  background: var(--gxset-wash-2, rgba(255, 255, 255, .05));
  border: 1px solid var(--gxset-line, rgba(255, 255, 255, .1));
  padding: 9px 12px;
  border-radius: 9px;
  white-space: nowrap;
}

.gxa-id-val.is-masked { color: var(--gxset-dim, #9aa1ad); letter-spacing: .04em; }

.gxa-iconbtn {
  width: 35px;
  height: 35px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--gxset-line, rgba(255, 255, 255, .1));
  background: var(--gxset-wash-2, rgba(255, 255, 255, .05));
  color: var(--gxset-hi, #eceef2);
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.gxa-iconbtn svg { width: 16px; height: 16px; }

.gxa-iconbtn:hover { background: var(--gxset-wash-3, rgba(255, 255, 255, .1)); }
.gxa-iconbtn:active { transform: translateY(1px); }

/* ---- PROFILE row ---- */

.gxa-profile { display: flex; align-items: center; gap: 13px; min-width: 0; }

.gxa-dim { color: var(--gxset-dim, #9aa1ad); font-weight: 500; }

.gxa-email {
  display: block;
  margin-top: 3px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--gxset-dim, #9aa1ad);
  letter-spacing: .04em;
}

.gxa-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---- inline edit panels (avatar swatches / rename / delete confirm) ---- */

.gxa-subrow:not(.hidden) {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 2px 16px 16px;
}

.gxa-delete-panel:not(.hidden) { flex-direction: column; align-items: stretch; }

.gxa-delete-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #f87171;
}

.gxa-swatches { display: flex; gap: 9px; flex-wrap: wrap; }

.gxa-swatch {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  border: 2px solid transparent;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.gxa-swatch:hover { transform: scale(1.08); }

.gxa-swatch.av-gold { color: #15161a; }

.gxa-swatch[data-active="1"] {
  border-color: var(--gxset-hi, #eceef2);
  box-shadow: 0 0 0 2px var(--gx-accent, #d0a24f);
}

/* The auth inputs are token-driven, but inside the dark settings page
   they flip to the local wash tokens. */
#gxset-account .gxauth-input {
  background: var(--gxset-wash-2, rgba(255, 255, 255, .05));
  border-color: var(--gxset-line, rgba(255, 255, 255, .1));
  color: var(--gxset-hi, #eceef2);
}

#gxset-account .gxauth-input::placeholder { color: var(--gxset-dim, #9aa1ad); }

#gxset-account .gxauth-input:focus {
  background: var(--gxset-wash-3, rgba(255, 255, 255, .08));
  border-color: var(--gx-accent, #d0a24f);
  box-shadow: 0 0 0 3px var(--gx-accent-soft, rgba(208, 162, 79, .13));
}

#gxset-account .gxauth-input-key { font-size: 15px; }

.gxa-name-input { max-width: 280px; }

#gxset-account .gxauth-err:not(.hidden) {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 16px 12px;
  font-size: 12.5px;
  color: #fb7185;
}

/* delete confirm panel keeps its own inline error tight */
.gxa-delete-panel .gxauth-err:not(.hidden) { padding: 0; margin-top: 6px; }

.gxset-title.is-danger { color: #f87171; }

/* ---- coming-soon rows (Trakt/Simkl) ---- */

.gxa-soon { opacity: .72; }

.gxa-badge {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--gxset-dim, #9aa1ad);
  background: var(--gxset-wash-2, rgba(255, 255, 255, .05));
  border: 1px solid var(--gxset-line, rgba(255, 255, 255, .1));
}

/* ---- mobile: id row + actions wrap under their meta ---- */

@media (max-width: 640px) {
  .gxa-subrow:not(.hidden) { padding: 0 14px 14px; }
  .gxa-id { flex-wrap: wrap; }
  .gxa-id-val { font-size: 12.5px; }
}


/* ---- tracker connections (Trakt/Simkl, js/connections.js) ----
 * The block sits inside the Account tab's .gxset-list: it continues the
 * sibling-separator chain with its own top border, and its inner rows are
 * real .gxset-row elements so they inherit the same paddings/wraps. No
 * animation is added anywhere here (prefers-reduced-motion stays honored
 * by construction); the only moving part is the countdown TEXT, which the
 * module swaps once a second. */
.gxc-block {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--gxset-line, rgba(255, 255, 255, .1));
}

.gxc-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* "Connected as @user" hint under the row description */
.gxc-conn {
  font-size: 12px;
  font-weight: 600;
  color: var(--gxset-hi, #e8eaee);
}

/* honest dead-end when the operator hasn't put credentials on the server */
.gxc-off {
  font-size: 12px;
  color: var(--gxset-dim, #9aa1ad);
  white-space: nowrap;
}

/* one-shot sync result line under the block heading */
.gxc-note {
  font-size: 12.5px;
  color: var(--gxset-mid, #b6bcc6);
}

/* footnote: what sync actually does (and doesn't) � always visible */
.gxc-foot {
  padding: 12px 0 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gxset-dim, #9aa1ad);
}

/* device-code pairing panel under its row */
.gxc-pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--gxset-line, rgba(255, 255, 255, .1));
  border-radius: 12px;
  background: var(--gxset-wash-2, rgba(255, 255, 255, .04));
  margin: 0 0 16px;
}

/* a row that follows the panel keeps its separator (the panel is not a
 * .gxset-row, so the adjacent-sibling rule wouldn't fire on its own) */
.gxc-pair + .gxset-row { border-top: 1px solid var(--gxset-line, rgba(255, 255, 255, .1)); }

.gxc-pair-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gxc-pair-title {
  font-size: .85rem;
  color: var(--gxset-hi, #e8eaee);
}

.gxc-pair-title a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* the code: big, monospace — a real button, tap to copy (hint confirms) */
.gxc-code {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  margin: 0;
  padding: 2px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-family: ui-monospace, "Cascadia Mono", "JetBrains Mono", monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--gxset-hi, #f2f4f7);
  user-select: all;
  cursor: pointer;
}
.gxc-code:hover { background: rgba(255, 255, 255, .06); }
.gxc-code:focus-visible { outline: 2px solid var(--gxset-hi, #f2f4f7); outline-offset: 2px; }

.gxc-copyhint {
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--gxset-mid, #b6bcc6);
}
.gxc-copyhint[data-copied] { color: var(--gxset-hi, #f2f4f7); font-weight: 600; }

.gxc-wait {
  font-size: 12px;
  color: var(--gxset-mid, #b6bcc6);
}

@media (max-width: 640px) {
  .gxc-pair { flex-direction: column; align-items: flex-start; }
  .gxc-code { font-size: 1.35rem; }
}

/* ---- avatar picker (cast photos grouped by show) ----
 * Opened from the Account tab's "Avatar" button. A backdrop dialog with a
 * search box, a "use my initial" reset, then every show's cast as round
 * photos (js/avatars.js / window.GXAvatars). No animations anywhere —
 * the dialog appears and disappears instantly. */

/* a picked cast photo fills the (existing) avatar circle */
.gxa-av-img {
  overflow: hidden;
  background: var(--gxset-wash-2, rgba(255, 255, 255, .06));
}
.gxa-av-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gxa-pv-backdrop {
  position: fixed;
  inset: 0;
  z-index: 96; /* above the settings sheet, below auth-route overlays */
  background: rgba(0, 0, 0, .62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.gxa-pv {
  width: 100%;
  max-width: 560px;
  max-height: min(84vh, 700px);
  display: flex;
  flex-direction: column;
  background: var(--gxset-sheet, #121417);
  border: 1px solid var(--gxset-line, rgba(255, 255, 255, .1));
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
  overflow: hidden;
}

.gxa-pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 6px;
}
.gxa-pv-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--gxset-hi, #e8eaee);
}
.gxa-pv-x {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--gxset-wash-2, rgba(255, 255, 255, .07));
  color: var(--gxset-mid, #b6bcc6);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.gxa-pv-x:hover { color: var(--gxset-hi, #e8eaee); }
.gxa-pv-x:focus-visible,
.gxa-pv-av:focus-visible { outline: 2px solid var(--gxset-hi, #e8eaee); outline-offset: 2px; }

.gxa-pv-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 16px 4px;
  padding: 9px 12px;
  border: 1px solid var(--gxset-line, rgba(255, 255, 255, .1));
  border-radius: 10px;
  background: var(--gxset-wash-2, rgba(255, 255, 255, .05));
  color: var(--gxset-mid, #b6bcc6);
}
.gxa-pv-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--gxset-hi, #e8eaee);
  font-size: .88rem;
}
.gxa-pv-search input::placeholder { color: var(--gxset-mid, #8a919c); }

.gxa-pv-body {
  overflow-y: auto;
  overscroll-behavior: contain; /* wheel inside the dialog never scrolls the page */
  padding: 4px 16px 18px;
  scrollbar-width: thin;
}

.gxa-pv-h {
  margin: 16px 0 9px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gxset-mid, #8a919c);
}

.gxa-pv-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.gxa-pv-av {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--gxset-wash-2, rgba(255, 255, 255, .07));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: visible;
}
.gxa-pv-av:hover { border-color: rgba(255, 255, 255, .35); }
/* the "use my initial" letter circle fills its button like a photo does */
.gxa-pv-av .gxa-av { width: 100%; height: 100%; font-size: 1.15rem; }
.gxa-pv-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* selected = light ring + a small check badge, bottom-right */
.gxa-pv-av[data-active] { border-color: var(--gxset-hi, #e8eaee); }
.gxa-pv-ck {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gxset-sheet, #121417);
  border-radius: 50%;
  background: #fff;
  color: #14161a;
  display: none;
  align-items: center;
  justify-content: center;
}
.gxa-pv-av[data-active] .gxa-pv-ck { display: inline-flex; }

.gxa-pv-none {
  padding: 20px 2px;
  font-size: .86rem;
  color: var(--gxset-mid, #8a919c);
}

/* search filtering hides buttons/sections with .hidden — these components
 * set their own display values, so scope a decisive override to the dialog */
.gxa-pv .hidden { display: none !important; }

@media (max-width: 480px) {
  .gxa-pv-backdrop { padding: 10px; }
  .gxa-pv { max-height: 88vh; }
  .gxa-pv-av { width: 50px; height: 50px; }
}
