:root {
  --profile-ink: #171126;
  --profile-muted: #777184;
  --profile-purple: #6d28d9;
  --profile-violet: #a78bfa;
  --profile-lime: #b7f34b;
  --profile-white: #fff;
}

.profile-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(167, 139, 250, .24), transparent 22rem),
    linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 100%) fixed;
  color: var(--profile-white);
}

.profile-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 100% 36px;
}

.profile-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px 28px;
}

.profile-header {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .16em;
}
.profile-brand img { width: 82px; height: auto; object-fit: contain; }
.header-icon-button {
  width: 42px;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: white;
  font-size: 1.25rem;
}

.identity-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  color: var(--profile-ink);
  box-shadow: 0 18px 42px rgba(11, 4, 24, .22);
}
.profile-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, #2d1b4e, #8b5cf6);
  color: white;
  font-size: 1.75rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.18);
}
.identity-copy { min-width: 0; flex: 1 1 auto; }
.identity-copy h1 {
  margin: 2px 0 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  line-height: 1;
  letter-spacing: -.04em;
}
.identity-copy p { margin: 0; }
.gender-kicker {
  color: var(--profile-purple);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .12em;
}
#profile-class-line {
  color: var(--profile-muted);
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.balance-block {
  min-width: 76px;
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  padding-left: 12px;
  border-left: 1px solid #ebe7f2;
  color: var(--profile-muted);
  text-decoration: none;
  font-size: .7rem;
}
.balance-block strong { color: var(--profile-ink); font-size: 1.35rem; }
.coin-label { color: #8d62e9; font-size: 1.05rem; line-height: 1; }
.coin-unit { color: var(--profile-muted); }
.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(167, 139, 250, .46);
  border-radius: 14px;
  background: rgba(109, 40, 217, .24);
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}
.notification-bell:hover { background: rgba(109, 40, 217, .35); }
.bell-icon { position: relative; z-index: 1; }
.notification-bell:has(.notification-count:not([hidden])) .bell-icon {
  animation: bell-ring 1.4s ease-in-out infinite;
  transform-origin: 50% 10%;
}
@keyframes bell-ring {
  0%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(-16deg); }
  20%, 40%, 60% { transform: rotate(16deg); }
  70% { transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .notification-bell:has(.notification-count:not([hidden])) .bell-icon { animation: none; }
}
.notification-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  font-size: .75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.notification-count[hidden] { display: none; }

.poll-status-card {
  min-height: 78px;
  margin-top: 10px;
  padding: 12px 12px 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(167, 139, 250, .46);
  border-radius: 16px;
  background: rgba(109, 40, 217, .24);
  box-shadow: 0 0 0 0 rgba(167, 139, 250, .38);
  animation: poll-purple-pulse 2.4s ease-out infinite;
}
.poll-status-card.cooldown {
  background: rgba(255,255,255,.08);
  animation-duration: 3.2s;
}
.poll-status-copy { display: grid; gap: 2px; min-width: 0; }
.poll-status-eyebrow {
  color: var(--profile-violet);
  font-size: .62rem;
  font-weight: 950;
  letter-spacing: .16em;
}
.poll-status-copy strong { font-size: .92rem; }
#poll-status-detail {
  color: rgba(255,255,255,.72);
  font-size: .68rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}
#poll-status-detail.is-changing { opacity: 0; transform: translateY(3px); }
.poll-status-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
#poll-vote-button {
  min-height: 44px;
  border-radius: 12px;
  background: var(--profile-lime);
  color: #20300c;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  padding: 0 16px;
}
.poll-countdown {
  min-width: 86px;
  text-align: right;
  color: var(--profile-violet);
  font-size: .68rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
@keyframes poll-purple-pulse {
  0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, .42); }
  70% { box-shadow: 0 0 0 8px rgba(167, 139, 250, 0); }
  100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0); }
}

.god-mode-card {
  min-height: 66px;
  margin-top: 10px;
  padding: 10px 10px 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(183, 243, 75, .22);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
}
.god-mode-card div { display: grid; }
.god-mode-copy { gap: 2px; }
.god-mode-copy strong { font-size: .86rem; }
.god-mode-copy #god-mode-status { color: rgba(255,255,255,.7); font-size: .68rem; }
.god-eyebrow { color: var(--profile-lime); font-size: .62rem; font-weight: 950; letter-spacing: .16em; }
#god-mode-button {
  min-height: 44px;
  border-radius: 12px;
  background: var(--profile-lime);
  color: #20300c;
  font-size: .76rem;
}
.boost-card {
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(167, 139, 250, .2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.boost-button {
  width: 100%;
  min-height: 56px;
  border: 3px solid #B7F34B;
  border-radius: 999px;
  background: #B7F34B;
  color: #1A1A1A;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(163, 230, 53, 0.45);
}
.boost-button:disabled { opacity: .55; cursor: not-allowed; }
.boost-caption {
  margin: 0;
  color: var(--profile-muted);
  font-size: .85rem;
  text-align: center;
}
.boost-caption strong { color: var(--profile-ink); }
.boost-caption-short {
  color: #fff;
  animation: boost-caption-flicker 2.8s ease-in-out infinite;
}
.boost-caption-short strong { color: var(--profile-lime); }
@keyframes boost-caption-flicker {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 rgba(183, 243, 75, 0); }
  48% { opacity: .78; text-shadow: 0 0 10px rgba(183, 243, 75, .28); }
  56% { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .boost-caption-short { animation: none; }
}
.home-boost-sheet {
  position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(calc(100% - 28px), 520px); max-width: 100%;
  max-height: min(88dvh, 760px); margin: 0; padding: 28px 22px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto; border: 1px solid rgba(196,181,253,.28); border-radius: 26px;
  background: #150A2E; color: #fff; box-shadow: 0 -18px 60px rgba(0,0,0,.42);
}
.home-boost-sheet::backdrop { background: rgba(8,3,18,.68); backdrop-filter: blur(5px); }
.boost-sheet-close { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.4rem; }
.boost-sheet-state { display: flex; flex-direction: column; align-items: stretch; gap: 12px; text-align: center; }
.boost-sheet-state[hidden] { display: none; }
.boost-sheet-state h2 { margin: 0; color: #fff; font-size: clamp(1.35rem, 6vw, 1.8rem); line-height: 1.12; }
.boost-sheet-state p { margin: 0; color: #C4B5FD; line-height: 1.45; }
.boost-sheet-flame { font-size: 2.7rem; filter: drop-shadow(0 0 18px rgba(255,120,30,.55)); }
.boost-sheet-eyebrow { color: #A3E635!important; font-size: .68rem; font-weight: 950; letter-spacing: .15em; }
.boost-sheet-preview { display: flex; justify-content: center; align-items: center; gap: 10px; color: #FFD700; font-size: 2.4rem; font-weight: 950; }
.boost-sheet-preview span { font-variant-numeric: tabular-nums; }
.boost-sheet-cost { padding: 12px; border: 1px solid rgba(196,181,253,.2); border-radius: 14px; background: rgba(255,255,255,.06); color: #fff!important; font-size: .88rem; }
.boost-sheet-primary { width: 100%; min-height: 54px; border: 0; border-radius: 16px; background: #A3E635; color: #111; font-weight: 950; font-size: .98rem; box-shadow: 0 0 22px rgba(163,230,53,.2); }
.boost-sheet-primary:disabled { opacity: .6; }
.boost-sheet-secondary { min-height: 42px; border: 0; background: transparent; color: #C4B5FD; font-weight: 750; }
.boost-sheet-progress-copy { display: flex; justify-content: space-between; color: #C4B5FD; font-size: .8rem; font-weight: 800; }
#boost-sheet-progress { width: 100%; height: 12px; accent-color: #A3E635; }
.boost-short-offer { display: grid; gap: 9px; padding: 14px; border: 1px solid rgba(168,85,247,.38); border-radius: 18px; background: #2A154D; text-align: left; }
.boost-short-offer strong { color: #fff; font-size: .84rem; }
.boost-short-offer small { color: #C4B5FD; text-align: center; }
.boost-missing { color: #A3E635; }
.boost-sheet-earn { display: block; padding: 11px; border: 1px solid rgba(196,181,253,.48); border-radius: 14px; color: #fff; font-weight: 850; text-decoration: none; }
.boost-success-flame { font-size: 3rem; animation: boost-success-pop .6s ease-out both; }
.boost-success-timer { color: #FFD700; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
@keyframes boost-success-pop { 0% { transform: scale(.6); opacity: .4; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boost-success-flame { animation: none; } }
.inbox-summary-carousel {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, .34);
  border-radius: 18px;
  background: linear-gradient(115deg, #2b1452, #3b1b70 68%, #28134d);
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 4, 24, .18);
}
.inbox-summary-stage {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-left: 4px solid var(--profile-lime);
}
.inbox-summary-copy { min-width: 0; display: grid; gap: 5px; }
.inbox-summary-copy > span {
  color: #d9c6ff;
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.inbox-summary-copy > strong { font-size: clamp(1rem, 4vw, 1.28rem); line-height: 1.15; transition: opacity 150ms ease; }
#inbox-summary-count.is-changing { opacity: 0; }
.inbox-summary-dots { display: flex; align-items: center; gap: 5px; min-height: 8px; }
.inbox-summary-dots span { width: 6px; height: 6px; border-radius: 50%; background: #8a8195; }
.inbox-summary-dots span.is-active { background: var(--profile-lime); box-shadow: 0 0 7px rgba(183,243,75,.55); }
.inbox-summary-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.9);
  background: transparent;
  color: #fff;
  font-size: .74rem;
  font-weight: 950;
  text-decoration: none;
}
.inbox-summary-link:focus-visible { outline: 3px solid white; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .inbox-summary-copy > strong { transition: none; }
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 14px 0 10px;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.profile-tab {
  min-height: 52px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(255,255,255,.58);
  box-shadow: none;
  font-size: .76rem;
}
.profile-tab span { display: block; font-size: 1rem; margin-bottom: 3px; }
.profile-tab.active {
  border-bottom-color: var(--profile-lime);
  color: white;
}

.profile-loading {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: rgba(255,255,255,.75);
}
.profile-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,.18);
  border-top-color: var(--profile-lime);
  border-radius: 50%;
  animation: profile-spin .8s linear infinite;
}
@keyframes profile-spin { to { transform: rotate(360deg); } }
.profile-error {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #fff0f0;
  color: #9f1239;
}

.profile-panel {
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.97);
  color: var(--profile-ink);
  box-shadow: 0 18px 42px rgba(11, 4, 24, .18);
}
.panel-heading {
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.panel-heading h2 { margin: 2px 0 0; font-size: 1.18rem; letter-spacing: -.03em; }
.panel-kicker { margin: 0; color: var(--profile-purple); font-size: .62rem; font-weight: 950; letter-spacing: .14em; }

.flames-list { display: grid; gap: 8px; }
.flame-card {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid #eeeaf4;
  border-radius: 14px;
}
.flame-card.locked { background: #faf9fc; }
.flame-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #fff1e8;
  font-size: 1.35rem;
}
.flame-copy { min-width: 0; }
.flame-copy strong { display: block; font-size: .82rem; }
.flame-copy span { color: var(--profile-muted); font-size: .72rem; }
.vote-entry-list { margin-top: 8px; display: grid; gap: 4px; }
.vote-entry {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--profile-muted);
  font-size: .68rem;
}
.reveal-button {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--profile-purple);
  font-size: .68rem;
}
.reveal-button.available { background: #221534; }
.reveal-button:disabled { background: #e8e4ef; color: #777184; opacity: 1; }

.heart-send-card {
  padding: 12px;
  border-radius: 14px;
  background: #faf8fd;
  border: 1px solid #eeeaf4;
}
.heart-send-card label { margin: 0 0 7px; font-size: .76rem; }
.heart-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.heart-input-row input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #ddd7e8;
  border-radius: 11px;
  padding: 10px 12px;
}
.heart-input-row button { min-height: 44px; border-radius: 11px; background: var(--profile-purple); font-size: .76rem; }
.action-status { min-height: 18px; margin: 8px 0 0; color: var(--profile-muted); font-size: .72rem; }
.empty-panel {
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--profile-muted);
}
.empty-panel span { font-size: 2rem; }
.empty-panel p { margin: 5px 0 0; font-size: .82rem; }

.empty-activity-card {
  width: 100%;
  min-height: 170px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 18px 14px;
  border: 1px solid rgba(167, 139, 250, .32);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  text-align: center;
  color: #374151;
  box-shadow: 0 0 28px rgba(139,92,246,.12);
}
.empty-activity-icon { font-size: 1.8rem; }
.empty-activity-card strong { font-size: .88rem; line-height: 1.35; color: #111827; }
.empty-activity-card p {
  margin: 0;
  color: #6b7280;
  font-size: .76rem;
}
.empty-boost-button {
  width: min(100%, 360px);
  min-height: 44px;
  margin-top: 5px;
  border-radius: 12px;
  background: var(--profile-violet);
  color: #24143a;
  font-size: .76rem;
  font-weight: 900;
}
.empty-state .empty-activity-card { box-shadow: 0 0 34px rgba(139,92,246,.18); }
.shoutout-card.empty-state {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.shoutout-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #eeeaf4;
}
.shoutout-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #f0ebff; }
.shoutout-card strong { font-size: .88rem; }
.shoutout-card p { margin: 4px 0 0; color: var(--profile-muted); font-size: .76rem; }
.chat-unlock-button { width: 100%; margin-top: 10px; min-height: 44px; border-radius: 12px; background: #221534; }

.profile-footer { display: flex; justify-content: center; padding-top: 16px; }
.profile-footer button { min-height: 38px; background: transparent; color: rgba(255,255,255,.68); font-size: .72rem; }

.profile-toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(calc(100% - 32px), 420px);
  transform: translateX(-50%);
  padding: 12px 14px;
  border-radius: 12px;
  background: #21142f;
  color: white;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  font-size: .78rem;
  text-align: center;
}

@media (min-width: 700px) {
  .profile-shell { padding-top: 22px; }
  .profile-panel { min-height: 430px; }
}

@media (max-width: 520px) {
  .identity-card { gap: 9px; padding: 12px; }
  .profile-avatar { width: 64px; height: 64px; border-radius: 18px; }
  .profile-brand img { width: 70px; }
  .panel-heading { align-items: center; }
  .flame-card { grid-template-columns: 42px minmax(0,1fr) auto; }
}

/* Shared bottom navigation stays available on phone, tablet, and laptop. */
.bottom-nav {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  width: min(680px, calc(100% - 28px));
  min-height: 76px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(48, 25, 85, .08);
  border-radius: 25px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 36px rgba(12,4,28,.28);
  backdrop-filter: blur(14px);
}
.bottom-nav-item {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 4px 2px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #756d83;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
}
.bottom-nav-item.active { color: #4c19a5; font-weight: 900; }
.bottom-nav-item.placeholder { opacity: .62; cursor: default; }
.bottom-nav-item:focus-visible { outline: 3px solid var(--profile-lime); outline-offset: 3px; }
.profile-shell { padding-bottom: max(112px, calc(88px + env(safe-area-inset-bottom))); }

/* Polls profile refresh */
.profile-shell { width: min(100%, 680px); }
.identity-card { margin-top: 8px; }
.identity-copy h1 { font-size: clamp(1.55rem, 6vw, 2rem); }

.poll-status-card {
  min-height: 120px;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(183, 143, 255, .22);
  border-radius: 24px;
  background: linear-gradient(145deg, #32116c 0%, #28105c 55%, #210b50 100%);
  box-shadow: 0 20px 44px rgba(13, 3, 31, .28);
  animation: none;
}
.poll-status-card.cooldown { background: linear-gradient(145deg, #32116c 0%, #28105c 55%, #210b50 100%); }
.poll-status-copy { gap: 5px; }
.poll-status-eyebrow { color: #d0a5ff; font-size: .78rem; letter-spacing: .12em; }
.poll-status-copy strong { font-size: clamp(1.15rem, 4.6vw, 1.6rem); line-height: 1.15; }
#poll-status-detail { color: rgba(255,255,255,.72); font-size: .76rem; }
.poll-status-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.poll-countdown { order: -1; min-width: 0; color: white; font-size: clamp(1.4rem, 6vw, 2.2rem); letter-spacing: -.05em; text-align: left; }
#poll-see-who-button, #poll-vote-button { min-height: 54px; padding: 0 22px; border-radius: 14px; font-size: .95rem; font-weight: 900; }
#poll-see-who-button { border: 0; background: white; color: #29105d; }
#poll-vote-button { background: var(--profile-lime); color: #20300c; }

.profile-tabs {
  overflow: hidden;
  margin: 18px 0 12px;
  border: 0;
  border-radius: 17px;
  background: rgba(231, 223, 250, .86);
}
.profile-tab {
  min-height: 62px;
  border-bottom: 4px solid transparent;
  color: #655b7a;
  font-size: clamp(.72rem, 3.2vw, .9rem);
  font-weight: 800;
}
.profile-tab span { display: inline; margin: 0 4px 0 0; font-size: 1.05rem; }
.profile-tab.active { border-bottom-color: #6d28d9; background: #fff; color: #6d28d9; }
.profile-tab:focus-visible, .new-result-button:focus-visible, .empty-boost-button:focus-visible { outline: 3px solid var(--profile-lime); outline-offset: 2px; }
.profile-panel { min-height: 300px; padding: clamp(16px, 4vw, 24px); border-radius: 24px; }
.panel-heading { min-height: 72px; }
.panel-heading h2 { font-size: clamp(1.3rem, 5vw, 1.8rem); }
.panel-kicker { font-size: .78rem; }

.new-result-card {
  display: grid;
  gap: 14px;
  min-height: 150px;
  align-content: center;
  padding: clamp(14px, 4vw, 24px);
  border: 1px solid rgba(109, 40, 217, .18);
  border-radius: 22px;
  background: linear-gradient(145deg, #28105c, #351274 62%, #4a1da0);
  color: white;
  box-shadow: 0 16px 32px rgba(47, 17, 95, .18);
}
.new-result-eyebrow { color: #d4b4ff; font-size: .72rem; font-weight: 950; letter-spacing: .14em; }
.new-result-card > strong { font-size: clamp(1.2rem, 5vw, 1.7rem); line-height: 1.2; }
.new-result-button {
  width: 100%;
  min-height: 58px;
  padding: 12px 18px;
  border: 0;
  border-radius: 15px;
  background: #fff;
  color: #32116c;
  font-size: clamp(.95rem, 4vw, 1.12rem);
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(13, 3, 31, .18);
}
.result-boost-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.2);
}
.result-boost-card > span { color: rgba(255,255,255,.76); font-size: .76rem; }
.result-boost-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 11px;
  background: var(--profile-violet);
  color: #24143a;
  font-size: .72rem;
  font-weight: 950;
}
.result-boost-button:disabled { background: #d8cdf8; color: #44366a; opacity: 1; }
.flames-list { margin-top: 14px; scroll-margin-top: 16px; }
.flame-card { grid-template-columns: 44px minmax(0,1fr); align-items: start; padding: 10px; border-radius: 16px; }
.flame-card .reveal-button { grid-column: 2; justify-self: start; min-width: 130px; }
.flame-icon { background: #f2e8ff; }
.flame-copy strong { margin-bottom: 5px; font-size: .9rem; }
.flame-copy > span { color: #635b70; font-size: .78rem; }

.empty-activity-card {
  min-height: 260px;
  gap: 10px;
  padding: 18px 14px;
  border: 1px solid rgba(139, 92, 246, .2);
  border-radius: 22px;
  background: linear-gradient(155deg, #f4edff, #ffffff 65%);
  color: var(--profile-ink);
  box-shadow: inset 0 0 26px rgba(139, 92, 246, .08), 0 14px 28px rgba(41, 16, 93, .09);
}
.empty-activity-icon { font-size: 3.1rem; line-height: 1; }
.empty-activity-card > strong { color: var(--profile-ink); font-size: clamp(1.2rem, 5vw, 1.55rem); }
.empty-activity-card > p { max-width: 34ch; color: #766a88; font-size: .9rem; }
.empty-boost-card {
  width: min(100%, 460px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(167, 139, 250, .45);
  border-radius: 17px;
  background: linear-gradient(135deg, #31206e, #5b43b2);
  color: white;
  box-shadow: 0 12px 24px rgba(49, 32, 110, .24);
  text-align: left;
}
.empty-boost-copy { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; }
.empty-boost-copy > span { grid-row: span 2; font-size: 1.8rem; }
.empty-boost-copy strong { font-size: .86rem; line-height: 1.25; }
.empty-boost-copy small { color: rgba(255,255,255,.72); font-size: .72rem; }
.empty-boost-button { width: auto; min-width: 116px; min-height: 44px; margin: 0; padding: 8px 12px; border: 0; border-radius: 12px; background: #a78bfa; color: #231044; font-weight: 950; white-space: nowrap; }
.empty-boost-button:disabled { background: #d8cdf8; color: #44366a; opacity: 1; }
.empty-activity-card > .earn-hint { margin-top: 4px; font-size: .72rem; }

.heart-send-card { margin-top: 18px; }
.heart-history { display: grid; gap: 8px; margin-top: 14px; scroll-margin-top: 16px; }
.heart-result-card { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px; border: 1px solid #eee7f8; border-radius: 14px; background: #faf8fd; }
.heart-result-card > span { font-size: 1.4rem; }
.heart-result-card strong { font-size: .84rem; }
.heart-result-card time { color: var(--profile-muted); font-size: .7rem; }
.shoutout-card { margin-top: 14px; scroll-margin-top: 16px; border-radius: 16px; background: #faf8fd; }

@media (max-width: 520px) {
  .profile-shell {
    width: 100%;
    padding: max(10px, env(safe-area-inset-top)) 12px calc(108px + env(safe-area-inset-bottom));
  }
  .profile-header { height: 44px; }
  .identity-card { min-height: 92px; gap: 8px; padding: 10px; }
  .profile-avatar { width: 54px; height: 54px; border-radius: 16px; font-size: 1.45rem; }
  .identity-copy h1 { font-size: clamp(1.2rem, 6vw, 1.6rem); }
  .balance-block { min-width: 62px; padding-left: 7px; }
  .balance-block strong { font-size: 1.15rem; }
  .poll-status-card { flex-direction: column; min-height: 0; gap: 12px; margin-top: 8px; padding: 12px; }
  .poll-status-copy { gap: 5px; }
  .poll-status-eyebrow { font-size: .7rem; }
  .poll-status-copy strong { font-size: clamp(1.1rem, 5vw, 1.35rem); }
  #poll-status-detail { font-size: .72rem; line-height: 1.35; }
  .poll-status-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: stretch; gap: 8px; width: 100%; }
  .poll-countdown { grid-column: 1; grid-row: 1; order: 0; min-width: 0; font-size: clamp(1.55rem, 8vw, 2.2rem); text-align: left; }
  #poll-see-who-button, #poll-vote-button { grid-column: 2; grid-row: 1; min-height: 46px; padding: 0 13px; font-size: .82rem; white-space: nowrap; }
  .profile-tabs { margin: 14px 0 10px; }
  .profile-tab { min-height: 54px; padding: 6px 2px; font-size: clamp(.66rem, 3.1vw, .78rem); }
  .profile-tab span { margin-right: 2px; font-size: .95rem; }
  .profile-panel { min-height: 0; padding: 14px; border-radius: 20px; }
  .panel-heading { min-height: 64px; }
  .empty-activity-card { min-height: 220px; }
  .heart-input-row { grid-template-columns: minmax(0, 1fr); }
  .heart-input-row button { width: 100%; }
  .bottom-nav {
    position: fixed;
    z-index: 15;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(680px, calc(100% - 24px));
    min-height: 78px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    padding: 8px 6px;
    border: 1px solid rgba(48, 25, 85, .08);
    border-radius: 26px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 12px 36px rgba(12, 4, 28, .28);
    backdrop-filter: blur(14px);
  }
  .bottom-nav-item {
    min-width: 0;
    min-height: 60px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    padding: 4px 2px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: #756d83;
    font-size: .72rem;
    font-weight: 650;
    box-shadow: none;
  }
  .bottom-nav-item.active { color: #4c19a5; font-weight: 900; }
  .bottom-nav-item:disabled { opacity: .7; }
  .bottom-nav-icon { min-height: 27px; display: grid; place-items: center; font-size: 1.55rem; line-height: 1; }
  .polls-nav-icon { font-size: 1.35rem; letter-spacing: -5px; padding-right: 5px; }
  .chat-nav-icon { width: 27px; height: 23px; border: 2px solid currentColor; border-radius: 50%; font-size: .56rem; letter-spacing: 1px; }
  .profile-nav-icon { width: 23px; height: 23px; border: 2px solid currentColor; border-radius: 50%; font-size: 0; position: relative; }
  .profile-nav-icon::before { content: ""; position: absolute; top: 4px; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; }
  .profile-nav-icon::after { content: ""; position: absolute; bottom: 3px; width: 12px; height: 6px; border: 1.5px solid currentColor; border-radius: 8px 8px 5px 5px; }
  .empty-boost-card { padding: 12px; }
  .result-boost-card { align-items: flex-start; }
  .result-boost-card > span { max-width: 17ch; }
  .empty-boost-copy strong { font-size: .77rem; }
  .empty-boost-button { min-width: 98px; font-size: .76rem; }
  .heart-result-card { grid-template-columns: 34px 1fr; }
  .heart-result-card time { grid-column: 2; }
}

/* Active polls are the profile's single primary action. */
.poll-status-card:not(.cooldown) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 124px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 215, 0, .68);
  background: linear-gradient(110deg, #FFD700 0%, #FFB000 58%, #FF8A00 100%);
  box-shadow: 0 14px 34px rgba(255, 138, 0, .24), 0 0 26px rgba(255, 215, 0, .14);
  cursor: pointer;
}
.poll-status-card:not(.cooldown)::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(ellipse at 86% 10%, rgba(255,255,255,.32), transparent 34%), radial-gradient(ellipse at 8% 100%, rgba(255,255,255,.22), transparent 38%);
  content: "";
  pointer-events: none;
}
.poll-status-card:not(.cooldown) .poll-status-copy,
.poll-status-card:not(.cooldown) .poll-status-actions { position: relative; z-index: 1; }
.poll-status-card:not(.cooldown) .poll-status-eyebrow { color: #241900; font-size: .74rem; font-weight: 950; letter-spacing: .1em; }
.poll-status-card:not(.cooldown) .poll-status-copy strong { color: #17130a; font-size: clamp(1.2rem, 4.6vw, 1.65rem); font-weight: 950; }
.poll-status-card:not(.cooldown) #poll-status-detail { color: #2b210a; font-size: .86rem; font-weight: 650; }
.poll-status-card:not(.cooldown) #poll-vote-button {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid #111;
  border-radius: 14px;
  background: #111;
  color: #fff;
  font-size: .88rem;
  font-weight: 900;
  white-space: nowrap;
}
.poll-status-card:not(.cooldown):focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 520px) {
  .poll-status-card:not(.cooldown) { flex-direction: row; align-items: center; gap: 8px; padding: 13px 11px; }
  .poll-status-card:not(.cooldown) .poll-status-copy { flex: 1 1 auto; gap: 4px; }
  .poll-status-card:not(.cooldown) .poll-status-copy strong { font-size: clamp(1rem, 4.8vw, 1.25rem); }
  .poll-status-card:not(.cooldown) #poll-status-detail { font-size: .72rem; }
  .poll-status-card:not(.cooldown) .poll-status-actions { display: flex; width: auto; flex: 0 0 auto; }
  .poll-status-card:not(.cooldown) #poll-vote-button { grid-column: auto; grid-row: auto; min-height: 44px; padding: 0 11px; font-size: .76rem; }
}

.poll-countdown-wrap { order: -1; display: grid; justify-items: start; gap: 1px; min-width: 0; }
.poll-countdown-wrap[hidden] { display: none !important; }
.poll-countdown { order: 0; color: #fff; font-size: clamp(1.7rem, 7vw, 2.35rem); font-weight: 950; line-height: 1; letter-spacing: -.035em; }
.poll-countdown-caption { color: rgba(255,255,255,.76); font-size: .68rem; font-weight: 650; white-space: nowrap; }
.poll-status-card.cooldown { min-height: 152px; }
.poll-status-card.cooldown .poll-status-eyebrow { color: #FFD76A; }
.poll-status-card.cooldown .poll-countdown-wrap { grid-column: 1; grid-row: 1; }

#profile-content.cooldown-mode { display: flex; flex-direction: column; }
#profile-content.cooldown-mode #inbox-summary-carousel { order: -1; }
#profile-content.cooldown-mode #boost-card { order: 1; }
.inbox-summary-carousel.cooldown-hero {
  border: 1px solid #FFD700;
  background: linear-gradient(115deg, #352451 0%, #403018 56%, #533900 100%);
  box-shadow: 0 12px 30px rgba(255, 194, 0, .2), 0 0 0 1px rgba(255, 215, 0, .12);
}
.inbox-summary-carousel.cooldown-hero .inbox-summary-stage { border-left-color: #FFD700; }
.inbox-summary-carousel.cooldown-hero .inbox-summary-copy > span { color: #FFE27A; }
.inbox-summary-carousel.cooldown-hero .inbox-summary-copy > strong { color: #fff; }
.inbox-summary-carousel.cooldown-hero .inbox-summary-dots span { background: rgba(255,255,255,.55); }
.inbox-summary-carousel.cooldown-hero .inbox-summary-dots span.is-active { background: #FFD700; box-shadow: 0 0 7px rgba(255,215,0,.6); }
.inbox-summary-carousel.cooldown-hero .inbox-summary-link { border-color: #FFD700; background: #FFD700; color: #17120a; }
