/* ==========================================================================
   SpeedCube PRO — Speedcuber Account Station & Athlete Dossier Styles
   Optical Liquid Glass Obsidian Architecture:
   1. Design Tokens & Ambient Caustic Backdrop
   2. Dynamic Island Topbar Profile Pill
   3. Station Modal Container & Specular Refraction Frame
   4. Station Header & Segmented Capsule Navigation
   5. Tab 1: Hero Athlete Dossier, 4 Bento KPIs & GitHub Heatmap
   6. Tab 2: WCA Records Matrix & Hardware Locker (Cube Arsenal)
   7. Tab 3: AES-256 Cloud Vault, Auth & Multi-Profile Switcher
   8. Mobile & Responsive Layouts
   ========================================================================== */

/* ==========================================================================
   1. AMBIENT GLOW ON MAIN TIMER ARENA
   ========================================================================== */
#arena::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  width: min(560px, 84vw);
  height: min(340px, 48vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.13) 0%, rgba(var(--accent-rgb), 0.03) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.35s ease;
}

/* ==========================================================================
   2. TOPBAR PROFILE PILL (#btn-open-account)
   ========================================================================== */
.account-pill,
.account-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.16) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.22s var(--ease-apple);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.account-pill:hover,
.account-profile-pill:hover {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.26) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.account-avatar-mini,
.account-pill-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.account-name-mini,
.account-pill-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-rank-mini,
.account-pill-sub {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--accent-light);
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  white-space: nowrap;
}

.bento-gear-pill.is-unset {
  opacity: 0.72;
  border-style: dashed;
}

/* ==========================================================================
   3. SPEEDCUBER ACCOUNT STATION MODAL SHELL
   ========================================================================== */
#account-modal.acct-station-modal {
  max-width: 580px;
  width: min(580px, calc(100vw - 32px));
  border-radius: 26px;
  overflow: visible;
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  background: transparent;
  padding: 0;
}

#account-modal.acct-station-modal::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
}

#account-modal .modal-card.acct-modal-card {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  gap: 0 !important;
  /* Fixed frame shared with Settings: tabs never resize the window */
  height: min(780px, calc(100dvh - 56px)) !important;
  min-height: 0 !important;
  background: var(--glass-sheet-fill) !important;
  backdrop-filter: var(--glass-blur-lg) !important;
  -webkit-backdrop-filter: var(--glass-blur-lg) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 36px 90px -10px rgba(0, 0, 0, 0.96), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  border-radius: 26px !important;
  position: relative !important;
  overflow: hidden !important;
}

#account-modal .modal-card.acct-modal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 26px;
  padding: 1px;
  background: var(--liquid-rim-refraction);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Ambient dynamic accent orb inside the modal card */
#account-modal .modal-card.acct-modal-card::after {
  content: '';
  position: absolute;
  top: -90px;
  right: 12%;
  width: 420px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18) 0%, transparent 70%);
  filter: blur(52px);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   4. STATION HEADER & CAPSULE NAVIGATION
   ========================================================================== */
.acct-modal-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand close"
    "tabs tabs";
  gap: 12px;
  align-items: center;
  padding: 16px 18px 12px;
  background: rgba(12, 14, 18, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  box-sizing: border-box;
}

.acct-brand-header {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.acct-modal-header #account-modal-close {
  grid-area: close;
  justify-self: end;
}

.acct-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.2);
}

.acct-brand-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.acct-modal-header .modal-eyebrow {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.acct-modal-header .player-modal-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 1px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

/* 3-Tab Segmented Capsule Track */
.acct-tabs-nav {
  grid-area: tabs;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  box-sizing: border-box;
}

.acct-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-apple);
  white-space: nowrap;
  min-width: 0;
  box-sizing: border-box;
}

.acct-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.acct-tab-btn.active {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.24) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.acct-tab-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-apple);
}

.acct-tab-text-short {
  display: none;
}

.acct-tab-text-full {
  display: inline;
}

.acct-tab-btn svg {
  opacity: 0.85;
}

.acct-tab-btn.active svg {
  opacity: 1;
  color: var(--accent-light);
}

#account-modal-body {
  position: relative;
  z-index: 5;
  flex: 1;
  min-height: 0;
  padding: 18px 22px 22px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

#account-modal-body::-webkit-scrollbar {
  width: 5px;
}

#account-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

#account-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

#account-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.acct-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   5. TAB 1: HERO ATHLETE DOSSIER CARD
   ========================================================================== */
.athlete-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 16px 20px;
  background: var(--glass-capsule-fill);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--liquid-shadow-md);
}

.athlete-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: var(--liquid-rim-refraction);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.athlete-ambient-glow {
  position: absolute;
  top: -70px;
  left: -40px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
  z-index: 0;
}

.athlete-hero-main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.athlete-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 58px;
  height: 58px;
}

.athlete-avatar-lg {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.athlete-avatar-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #30D158;
  border: 2px solid #08090C;
  box-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
  box-sizing: border-box;
}

.athlete-hero-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1 1 280px;
}

.athlete-primary-line {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.athlete-display-name {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.athlete-tier-pill {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.athlete-method-pill {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.09);
  letter-spacing: 0.03em;
}

.athlete-secondary-line {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.athlete-handle-tag {
  font-size: 0.77rem;
  color: var(--text-secondary);
}

.athlete-vault-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.16s ease;
}

.athlete-vault-pill:hover {
  opacity: 0.85;
}

.athlete-vault-pill.is-locked {
  background: rgba(48, 209, 88, 0.12);
  color: #30D158;
  border: 1px solid rgba(48, 209, 88, 0.28);
}

.athlete-vault-pill.is-unlocked {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.athlete-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.athlete-edit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s var(--ease-apple);
}

.athlete-edit-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.athlete-swatches-capsule {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.swatches-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.glow-swatches-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.glow-swatch-dot {
  width: 22px;
  height: 22px;
  padding: 2px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.18s var(--ease-apple);
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow-swatch-dot:hover {
  transform: scale(1.18);
}

.glow-swatch-dot.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
  transform: scale(1.12);
}

.glow-swatch-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Inline Edit Panel */
.acct-inline-edit-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acct-form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.acct-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.acct-field span {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.acct-field input,
.acct-field select {
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.acct-field input:focus,
.acct-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.22);
}

.acct-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ==========================================================================
   6. 4 HERO BENTO KPI CARDS (Matches Lower Bento Deck)
   ========================================================================== */
.passport-kpi-deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.acct-kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--glass-capsule-fill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--liquid-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  transition: transform 0.2s var(--ease-apple), border-color 0.2s ease;
}

.acct-kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: var(--liquid-rim-refraction);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.acct-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.acct-kpi-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.acct-kpi-icon {
  font-size: 0.95rem;
}

.acct-kpi-tag {
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.acct-kpi-val {
  font-size: 1.62rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 2px 0;
}

.acct-kpi-sub {
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-kpi-card.is-pb-hero {
  border-color: rgba(48, 209, 88, 0.28);
  background: linear-gradient(180deg, rgba(48, 209, 88, 0.08) 0%, rgba(8, 9, 12, 0.9) 100%);
}

.acct-kpi-card.is-pb-hero .acct-kpi-val {
  color: #30D158;
  text-shadow: 0 0 16px rgba(48, 209, 88, 0.35);
}

.acct-kpi-card.is-streak-card .acct-kpi-val {
  color: #FF9F0A;
}

.kpi-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

/* ==========================================================================
   7. GITHUB ACTIVITY HEATMAP BENTO CARD
   ========================================================================== */
.github-heatmap-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 16px 20px 14px;
  background: var(--glass-capsule-fill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--liquid-shadow-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.github-heatmap-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: var(--liquid-rim-refraction);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.gh-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gh-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.gh-card-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.gh-card-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.gh-streak-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gh-stat-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.gh-stat-pill strong {
  color: var(--text-primary);
  font-weight: 800;
}

.gh-stat-pill.is-accent {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.28);
  color: var(--accent-light);
}

.gh-heatmap-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.gh-heatmap-scroll::-webkit-scrollbar {
  height: 4px;
}

.gh-heatmap-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.gh-heatmap-inner {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  min-width: 100%;
}

.gh-months-row {
  position: relative;
  height: 16px;
  margin-left: 26px;
}

.gh-month-tag {
  position: absolute;
  top: 0;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-tertiary);
  transform: translateX(-50%);
  white-space: nowrap;
}

.gh-body-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gh-weekdays-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 102px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-tertiary);
  width: 18px;
  text-align: right;
  user-select: none;
}

.gh-weeks-grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 4px;
  flex: 1;
}

.gh-week-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gh-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-width: 11px;
  min-height: 11px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.gh-cell:hover {
  transform: scale(1.3);
  z-index: 5;
  filter: brightness(1.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.gh-cell.is-future {
  opacity: 0.12;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
}

.gh-cell.lvl-0 {
  background: rgba(255, 255, 255, 0.03);
}

.gh-cell.lvl-1 {
  background: rgba(var(--accent-rgb), 0.28);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.gh-cell.lvl-2 {
  background: rgba(var(--accent-rgb), 0.52);
  border-color: rgba(var(--accent-rgb), 0.65);
}

.gh-cell.lvl-3 {
  background: rgba(var(--accent-rgb), 0.78);
  border-color: rgba(var(--accent-rgb), 0.9);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.35);
}

.gh-cell.lvl-4 {
  background: var(--accent);
  border-color: #FFFFFF;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7);
}

.gh-cell.is-today {
  outline: 2px solid #FFFFFF;
  outline-offset: 1px;
}

.gh-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.gh-hover-readout {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.gh-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.64rem;
  color: var(--text-tertiary);
}

.gh-legend .gh-cell {
  width: 11px;
  height: 11px;
  pointer-events: none;
}

.gh-empty-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px dashed rgba(var(--accent-rgb), 0.3);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   8. TAB 2: WCA RECORDS MATRIX & HARDWARE LOCKER
   ========================================================================== */
.records-gear-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.acct-section-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 16px 18px;
  background: var(--glass-capsule-fill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--liquid-shadow-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acct-section-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: var(--liquid-rim-refraction);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.acct-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.acct-section-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.acct-section-sub {
  margin: 1px 0 0;
  font-size: 0.69rem;
  color: var(--text-tertiary);
}

.records-discipline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.record-discipline-card {
  border-radius: 14px;
  padding: 11px 13px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.18s ease;
}

.record-discipline-card:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}

.record-discipline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.record-ev-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.record-ev-icon {
  color: var(--accent-light);
  display: flex;
  align-items: center;
}

.record-ev-badge {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent-light);
  font-size: 0.68rem;
  font-weight: 800;
}

.record-ev-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.record-ev-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-ev-cube-tag {
  font-size: 0.68rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.record-ev-count-pill {
  font-size: 0.66rem;
  color: var(--text-tertiary);
}

.record-metrics-deck {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.record-metric-box {
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.record-metric-box em {
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.record-metric-box b {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.record-metric-box.is-pb {
  background: rgba(48, 209, 88, 0.1);
  border-color: rgba(48, 209, 88, 0.3);
}

.record-metric-box.is-pb b {
  color: #30D158;
}

/* Hardware Locker */
.arsenal-cubes-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.arsenal-cube-item {
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  transition: all 0.18s ease;
}

.arsenal-cube-item:hover {
  background: rgba(0, 0, 0, 0.48);
  border-color: rgba(255, 255, 255, 0.12);
}

.arsenal-cube-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 160px;
}

.gear-cube-glyph {
  font-size: 1.25rem;
}

.arsenal-cube-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.arsenal-cube-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.arsenal-cube-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gear-ev-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--accent-light);
}

.arsenal-cube-sub {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arsenal-cube-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.gear-preset-select {
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-family: inherit;
  outline: none;
  max-width: 175px;
}

.arsenal-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.18s ease;
}

.arsenal-remove-btn:hover {
  background: rgba(255, 69, 58, 0.18);
  border-color: rgba(255, 69, 58, 0.4);
  color: #FF453A;
}

.quick-arsenal-chips-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quick-chips-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quick-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-arsenal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-secondary);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.quick-arsenal-chip:hover {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.38);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.chip-ev-tag {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--accent-light);
  background: rgba(var(--accent-rgb), 0.16);
  padding: 1px 5px;
  border-radius: 4px;
}

.gear-custom-inline {
  width: 100%;
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.gear-custom-input {
  flex: 1;
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  font-size: 0.75rem;
}

.arsenal-empty-card {
  padding: 24px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.arsenal-empty-icon {
  font-size: 1.8rem;
}

.arsenal-add-drawer {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.arsenal-drawer-head {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.arsenal-add-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
}

.arsenal-add-custom-wrap input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  font-size: 0.76rem;
  box-sizing: border-box;
}

.arsenal-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

/* ==========================================================================
   9. TAB 3: AES-256 CLOUD VAULT, AUTH & MULTI-PROFILES
   ========================================================================= */
.cloud-status-card {
  gap: 12px;
}

.status-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-user-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.status-shield-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.status-shield-icon.is-online {
  background: rgba(48, 209, 88, 0.14);
  border: 1px solid rgba(48, 209, 88, 0.35);
  color: #30D158;
}

.status-shield-icon.is-local {
  background: rgba(255, 159, 10, 0.14);
  border: 1px solid rgba(255, 159, 10, 0.35);
  color: #FF9F0A;
}

.status-pulse-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #08090C;
  box-sizing: border-box;
}

.status-shield-icon.is-online .status-pulse-dot {
  background: #30D158;
  box-shadow: 0 0 8px rgba(48, 209, 88, 0.8);
}

.status-shield-icon.is-local .status-pulse-dot {
  background: #FF9F0A;
}

.status-user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.status-user-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.status-user-title span {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.status-user-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

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

.security-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

/* 2-Mode Clean Auth Card */
.auth-clean-card {
  gap: 12px;
}

.auth-clean-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-mode-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-seg-btn {
  height: 30px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s var(--ease-apple);
}

.auth-seg-btn:hover {
  color: var(--text-primary);
}

.auth-seg-btn.active {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.28) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.25);
}

.auth-clean-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.auth-clean-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.auth-clean-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-clean-hint {
  font-size: 0.69rem;
  color: var(--text-tertiary);
  flex: 1 1 180px;
}

/* The app's one primary-button look (white, like "Create" in the session sheet), not a
   gradient of its own */
.auth-action-btn {
  height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #F5F5F7;
  color: #000000;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease-apple), transform 0.15s var(--ease-apple);
}

.auth-action-btn:hover {
  background: #FFFFFF;
}

.auth-action-btn:active {
  transform: scale(0.96);
}

/* Saved Profiles Bento */
.saved-profiles-card {
  gap: 10px;
}

.saved-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saved-acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.18s ease;
}

.saved-acct-row:hover {
  background: rgba(0, 0, 0, 0.48);
  border-color: rgba(255, 255, 255, 0.12);
}

.saved-acct-row.is-active {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
}

.saved-acct-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.saved-acct-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #FFFFFF;
  flex-shrink: 0;
}

.saved-acct-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.saved-acct-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.saved-acct-name strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-acct-name span {
  font-size: 0.69rem;
  color: var(--text-tertiary);
}

.saved-acct-sub {
  font-size: 0.66rem;
  color: var(--text-secondary);
}

.saved-acct-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.saved-acct-active-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #30D158;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.28);
}

.saved-acct-del {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-tertiary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.saved-acct-del:hover {
  color: #FF453A;
  border-color: rgba(255, 69, 58, 0.35);
  background: rgba(255, 69, 58, 0.1);
}

/* ==========================================================================
   10. BUTTONS & SHARED CONTROLS
   ========================================================================== */
.acct-pill-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s var(--ease-apple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.acct-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.acct-pill-btn.accent-pill {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.38);
  color: var(--accent-light);
}

.acct-pill-btn.accent-pill:hover {
  background: rgba(var(--accent-rgb), 0.28);
  border-color: rgba(var(--accent-rgb), 0.55);
  color: #FFFFFF;
}

#account-modal select option,
.gear-preset-select option {
  background: #0D0E13;
  color: #FFFFFF;
}

/* ==========================================================================
   11. RESPONSIVENESS (TABLETS & MOBILE)
   ========================================================================== */
@media (max-width: 860px) {
  #account-modal.acct-station-modal {
    width: calc(100vw - 20px);
  }

  .passport-kpi-deck {
    grid-template-columns: repeat(2, 1fr);
  }

  .records-gear-grid,
  .security-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #account-modal.acct-station-modal {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 26px 26px 0 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  #account-modal .modal-card.acct-modal-card {
    border-radius: 26px 26px 0 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 88dvh !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .acct-modal-header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "brand close"
      "tabs tabs" !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 12px 14px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .acct-brand-header {
    grid-area: brand !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .acct-modal-header #account-modal-close {
    grid-area: close !important;
    flex-shrink: 0 !important;
  }

  .acct-tabs-nav {
    grid-area: tabs !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 3px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .acct-tab-btn {
    padding: 0 4px !important;
    height: 35px !important;
    min-width: 0 !important;
    justify-content: center !important;
    gap: 5px !important;
    box-sizing: border-box !important;
  }

  .acct-tab-btn svg {
    flex-shrink: 0;
    width: 13px;
    height: 13px;
  }

  .acct-tab-text-full {
    display: none !important;
  }

  .acct-tab-text-short {
    display: inline !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }

  #account-modal-body {
    padding: 12px 12px 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .athlete-hero-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* In a column the 280px flex-basis turned into 280px of empty height */
  .athlete-hero-info {
    flex: 0 0 auto;
    width: 100%;
  }

  .acct-form-grid-3,
  .arsenal-add-grid,
  .auth-clean-grid-2 {
    grid-template-columns: 1fr;
  }

  .passport-kpi-deck {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .acct-kpi-val {
    font-size: 1.35rem;
  }
}

/* No glass-inside-glass in the profile sheet: inner cards get a soft rim-light
   (top edge only) instead of a second refractive border. */
.athlete-hero-card::before,
.acct-kpi-card::before,
.github-heatmap-card::before,
.acct-section-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 40%, rgba(255, 255, 255, 0.03) 100%);
}

.athlete-hero-card,
.acct-kpi-card,
.github-heatmap-card,
.acct-section-card {
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}

/* 2×2 KPI grid at every width: four columns truncated every caption */
.passport-kpi-deck {
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

/* ==========================================================================
   PROFILE · OVERVIEW (v12.3): identity + four numbers, an aligned activity
   grid and one quiet appearance row. Flat inner plates, no nested glass.
   ========================================================================== */
#account-modal .modal-eyebrow:empty {
  display: none;
}

.pp-pane {
  gap: 14px;
}

.pp-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Identity */
.pp-hero {
  padding: 20px;
}

.pp-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.pp-avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px -8px rgba(var(--accent-rgb), 0.6);
}

.pp-id-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pp-name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.pp-dot {
  color: var(--text-tertiary);
}

.pp-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  border: 1px solid;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.pp-edit-btn {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s var(--ease-apple), border-color 0.16s var(--ease-apple);
}

.pp-edit-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Four headline numbers in one row */
.pp-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.pp-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 0 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.pp-stat:first-child {
  padding-left: 0;
  border-left: none;
}

.pp-stat-label {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.pp-stat-val {
  font-family: var(--font-display);
  font-feature-settings: "tnum" 1;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.pp-stat-val small {
  margin-left: 3px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-tertiary);
}

.pp-stat-val.is-pb { color: var(--green); }
.pp-stat-val.is-streak { color: var(--amber); }
.pp-stat-val.is-empty { color: rgba(245, 245, 247, 0.32); }

/* Activity */
.pp-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pp-card-title {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.pp-card-sub {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.pp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 159, 10, 0.1);
  border: 1px solid rgba(255, 159, 10, 0.26);
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.pp-hm-wrap {
  position: relative;
  margin-top: 14px;
}

.pp-hm-grid {
  display: grid;
  grid-template-columns: 24px repeat(24, minmax(0, 1fr));
  grid-template-rows: 16px;
  grid-auto-rows: auto;
  gap: 3px;
}

.pp-hm-month {
  grid-row: 1;
  align-self: end;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.pp-hm-weekday {
  grid-column: 1;
  align-self: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-tertiary);
  line-height: 1;
}

.pp-hm-cell {
  display: block;
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

.pp-hm-cell.lvl-1 { background: rgba(var(--accent-rgb), 0.32); }
.pp-hm-cell.lvl-2 { background: rgba(var(--accent-rgb), 0.55); }
.pp-hm-cell.lvl-3 { background: rgba(var(--accent-rgb), 0.8); }
.pp-hm-cell.lvl-4 { background: var(--accent-light); }

/* Today: an inner ring that stays inside the cell */
.pp-hm-cell.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}

.pp-hm-cell.is-future {
  background: transparent;
  cursor: default;
}

.pp-hm-cell[data-tip]:hover {
  filter: brightness(1.35);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6);
}

.pp-activity.is-empty .pp-hm-grid {
  opacity: 0.4;
}

.pp-hm-empty {
  position: absolute;
  inset: 16px 0 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  background: radial-gradient(60% 70% at 50% 50%, rgba(10, 11, 15, 0.85) 0%, rgba(10, 11, 15, 0) 100%);
}

.pp-hm-empty strong {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text-primary);
}

.pp-hm-empty span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.pp-ghost-btn {
  margin-top: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent-light);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.pp-ghost-btn:hover {
  background: rgba(var(--accent-rgb), 0.24);
}

.pp-hm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pp-hm-readout {
  min-width: 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-hm-legend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

.pp-hm-legend .pp-hm-cell {
  width: 10px;
  cursor: default;
}

.pp-hm-legend .pp-hm-cell:first-of-type { margin-left: 3px; }
.pp-hm-legend .pp-hm-cell:last-of-type { margin-right: 3px; }

/* Appearance row */
.pp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pp-row-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pp-row-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

/* Phones */
@media (max-width: 560px) {
  .pp-hero {
    padding: 16px;
  }
  .pp-card {
    padding: 16px;
  }
  .pp-edit-btn span {
    display: none;
  }
  .pp-edit-btn {
    width: 34px;
    padding: 0;
    justify-content: center;
  }
  .pp-stats {
    grid-template-columns: 1fr 1fr;
    row-gap: 14px;
  }
  .pp-stat:nth-child(3) {
    padding-left: 0;
    border-left: none;
  }
  .pp-stat-val {
    font-size: 1.4rem;
  }
  .pp-hm-grid {
    grid-template-columns: 20px repeat(24, minmax(0, 1fr));
    gap: 2px;
  }
  .pp-hm-empty {
    inset: 16px 0 0 20px;
  }
  .pp-hm-legend {
    display: none;
  }
  .pp-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ==========================================================================
   PROFILE · RECORDS & ACCOUNT (v12.3): sentence-case section titles, flat
   rows separated by hairlines, no cards inside cards.
   ========================================================================== */
.acct-section-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: none !important;
}

.acct-section-card::before {
  display: none !important;
}

.acct-section-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  color: var(--text-primary) !important;
}

.acct-section-sub {
  font-size: 0.78rem !important;
  color: var(--text-tertiary) !important;
}

/* Records list */
.records-discipline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rec-row {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rec-row:first-child {
  border-top: none;
  padding-top: 4px;
}

.rec-row:last-child {
  padding-bottom: 0;
}

.rec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rec-icon {
  display: inline-flex;
  color: var(--accent-light);
}

.rec-icon svg {
  width: 16px;
  height: 16px;
}

.rec-name {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text-primary);
  white-space: nowrap;
}

.rec-cube {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

.rec-count {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.74rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.rec-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 10px;
}

.rec-m {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.rec-m:first-child {
  padding-left: 0;
  border-left: none;
}

.rec-m em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.rec-m b {
  font-family: var(--font-display);
  font-feature-settings: "tnum" 1;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.rec-m.is-best b {
  color: var(--green);
}

.rec-row.is-empty .rec-m b,
.rec-row.is-empty .rec-name {
  color: var(--text-tertiary);
}

/* Account status */
.acct-status-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 14px;
}

/* Sign-in sits right under the status that points to it; data tools last */
.acct-list-card {
  order: 5;
}

.acct-status-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.acct-status-icon.is-on {
  color: var(--green);
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.3);
}

.acct-status-icon.is-off {
  color: var(--amber);
  background: rgba(255, 159, 10, 0.1);
  border: 1px solid rgba(255, 159, 10, 0.28);
}

.acct-status-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.acct-status-copy strong {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text-primary);
}

.acct-status-copy span {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-tertiary);
}

/* Data actions as a grouped list */
.acct-list {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.acct-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s var(--ease-apple);
}

.acct-list-row + .acct-list-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.acct-list-row svg {
  color: var(--accent-light);
}

.acct-list-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.acct-list-row:disabled {
  opacity: 0.6;
  cursor: progress;
}

.acct-list-row.is-quiet,
.acct-list-row.is-quiet svg {
  color: var(--text-secondary);
}

@media (max-width: 560px) {
  .rec-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 10px;
  }
  .rec-m:nth-child(4) {
    padding-left: 0;
    border-left: none;
  }
  .rec-cube {
    display: none;
  }
}
