/* Account Hub — settings profile card redesign */
#settings-profile-card.cs-ah {
  padding: 14px 16px 16px;
  border-radius: 20px;
  background:
    linear-gradient(165deg, rgba(207, 179, 120, 0.14) 0%, transparent 42%),
    var(--card-bg);
}

.cs-ah-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cs-ah-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.cs-ah-avatar.profile-avatar-wrapper {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.cs-ah-avatar .profile-avatar {
  width: 64px;
  height: 64px;
}

.cs-ah-avatar .profile-avatar-icon-default {
  font-size: 1.55rem;
}

.cs-ah-identity-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.cs-ah .profile-nickname-row {
  justify-content: flex-start;
}

.cs-ah .profile-nickname {
  max-width: 180px;
  text-align: left;
  font-size: 1.05rem;
}

.cs-ah-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cs-ah .profile-email {
  display: inline-block;
  max-width: 200px;
  text-align: left;
  color: #9a9a9a;
}

.cs-ah-adfree-slot:empty {
  display: none;
}

/* Metrics strip */
.cs-ah-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(207, 179, 120, 0.22);
  background: rgba(255, 255, 255, 0.45);
  overflow: hidden;
}

.cs-ah-metric {
  padding: 12px 8px;
  text-align: center;
  position: relative;
}

.cs-ah-metric + .cs-ah-metric::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: rgba(0, 0, 0, 0.06);
}

.cs-ah-metric__value {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary-color, #333);
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.cs-ah-metric__label {
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  color: #9a9a9a;
  letter-spacing: 0.02em;
}

.cs-ah-metric--warn .cs-ah-metric__value {
  color: #c0392b;
}

.cs-ah-metric--warn {
  background: rgba(220, 53, 69, 0.06);
}

/* Cloud status */
.cs-ah-cloud {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 28px;
}

.cs-ah-cloud-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  flex: 1;
}

.cs-ah-cloud-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.cs-ah-cloud-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.cs-ah-cloud-chip--off {
  background: rgba(0, 0, 0, 0.05);
  color: #999;
}

.cs-ah-cloud-chip--on {
  background: rgba(52, 168, 83, 0.12);
  color: #2e7d32;
  border: 1px solid rgba(52, 168, 83, 0.25);
}

.cs-ah-cloud-sync {
  font-size: 0.72rem;
  color: #aaa;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cs-ah-cloud-refresh {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: #9a7a30;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cs-ah-cloud-refresh:hover {
  background: rgba(207, 179, 120, 0.12);
  color: #7a5c20;
}

/* Toast host in profile card: no layout space (toast is fixed floating) */
#settings-profile-card.cs-ah .profile-toast-wrap {
  padding: 0;
  margin: 0;
  min-height: 0;
  height: 0;
  overflow: visible;
}

#settings-profile-card.cs-ah .cs-ah-actions.profile-action-row {
  margin-top: 4px;
}

/* Floating toast above bottom nav */
#crSyncToast.gd-toast,
#crSyncToast {
  position: fixed;
  left: 50%;
  bottom: calc(148px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 2100;
  width: max-content;
  max-width: min(92vw, 420px);
  margin: 0;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(16, 21, 29, 0.18);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  animation: cr-toast-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: rgba(25, 135, 84, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
#crSyncToast.d-none {
  display: none !important;
}
#crSyncToast.gd-toast--error,
#crSyncToast.gd-toast--warn {
  background: rgba(185, 28, 28, 0.94);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}
#crSyncToast.gd-toast--info {
  background: rgba(28, 28, 28, 0.92);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}
@keyframes cr-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Legacy inline gd-toast (if any remain outside #crSyncToast) */
.gd-toast:not(#crSyncToast) {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 600;
  background: rgba(25, 135, 84, 0.1);
  color: #198754;
  border: 1px solid rgba(25, 135, 84, 0.2);
  text-align: center;
  box-sizing: border-box;
}
.gd-toast:not(#crSyncToast).gd-toast--error,
.gd-toast:not(#crSyncToast).gd-toast--warn {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border-color: rgba(220, 53, 69, 0.2);
}
.gd-toast:not(#crSyncToast).gd-toast--info {
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  border-color: rgba(13, 110, 253, 0.2);
}
html.dark-mode #crSyncToast.gd-toast,
html.dark-mode #crSyncToast {
  background: rgba(32, 201, 151, 0.94);
  color: #0b1a16;
  border-color: rgba(255, 255, 255, 0.2);
}
html.dark-mode #crSyncToast.gd-toast--error,
html.dark-mode #crSyncToast.gd-toast--warn {
  background: rgba(255, 107, 122, 0.94);
  color: #1a0a0c;
}
html.dark-mode #crSyncToast.gd-toast--info {
  background: rgba(40, 44, 52, 0.94);
  color: #f3f4f6;
}

/* Actions */
.cs-ah-actions.profile-action-row {
  padding: 0;
  margin: 0;
  gap: 8px;
  align-items: stretch;
}

.cs-ah-cta {
  width: auto;
  flex: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-profile-devices.cs-ah-cta-secondary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  min-width: 108px;
  border-radius: 14px;
  border: 1.5px solid rgba(207, 179, 120, 0.45);
  background: rgba(255, 255, 255, 0.75);
  color: #8a6d1f;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-profile-devices.cs-ah-cta-secondary:hover {
  background: rgba(207, 179, 120, 0.14);
}

.btn-profile-devices.cs-ah-cta-secondary:active {
  transform: scale(0.98);
}

.cs-ah-cta:active {
  transform: scale(0.98);
}

.cs-ah-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 2px;
  margin-top: 12px;
  padding-top: 2px;
}

.cs-ah-link {
  border: none;
  background: none;
  padding: 4px 6px;
  font-size: 0.74rem;
  color: #9a7a30;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.cs-ah-link:hover {
  color: #7a5c20;
  text-decoration: underline;
}

.cs-ah-dot {
  color: #ccc;
  font-size: 0.7rem;
  user-select: none;
}

/* Login modal alignment */
.cs-ah-login-lead {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.55;
}

.cs-ah-login-sub {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 18px;
  line-height: 1.5;
}

.cs-ah-login-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}

.cs-ah-link-btn {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cs-ah-link-btn:hover {
  background: rgba(207, 179, 120, 0.1);
  border-color: rgba(207, 179, 120, 0.35);
}

.cs-ah-link-btn--muted {
  border: none;
  background: transparent;
  color: #999;
  font-weight: 500;
}

.cs-ah-gis {
  margin-top: 4px;
}

/* Hide legacy duplicate status mount spacing when empty */
#cs-sponsor-status-card:empty {
  display: none;
}

/* Dark theme */
html.dark-mode #settings-profile-card.cs-ah {
  background:
    linear-gradient(165deg, rgba(207, 179, 120, 0.1) 0%, transparent 42%),
    #1e1e1e;
}

html.dark-mode .cs-ah-metrics {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(207, 179, 120, 0.18);
}

html.dark-mode .cs-ah-metric + .cs-ah-metric::before {
  background: rgba(255, 255, 255, 0.08);
}

html.dark-mode .cs-ah-metric__value {
  color: #e8e8e8;
}

html.dark-mode .cs-ah-metric__label {
  color: #777;
}

html.dark-mode .cs-ah-cloud-chip--off {
  background: rgba(255, 255, 255, 0.06);
  color: #777;
}

html.dark-mode .cs-ah-link {
  color: #d4b87a;
}

html.dark-mode .cs-ah-login-lead {
  color: #ccc;
}

html.dark-mode .cs-ah-link-btn {
  background: #252525;
  border-color: rgba(255, 255, 255, 0.1);
  color: #ddd;
}

@media (prefers-reduced-motion: reduce) {
  .cs-ah-cta {
    transition: none;
  }
}

/* Profile CTA: title + subtitle + 需贊助 badge */
.cs-ah-cta-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.cs-ah-cta-text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  line-height: 1.2;
}

#profileSignInBtnText {
  font-size: 0.92rem;
  font-weight: 700;
}

.cs-ah-cta-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cs-ah-need-sponsor {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* Standalone Google login modal */
.cs-login-modal {
  border: none;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(66, 133, 244, 0.16), transparent 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(207, 179, 120, 0.18), transparent 50%),
    var(--card-bg, #fff);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.cs-login-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.cs-login-modal__body {
  position: relative;
  padding: 36px 24px 28px;
  text-align: center;
}

.cs-login-modal__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.12);
}

.cs-login-modal__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-color, #222);
  margin: 0 0 8px;
}

.cs-login-modal__lead {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.55;
  margin: 0 0 6px;
}

.cs-login-modal__hint {
  font-size: 0.76rem;
  color: #999;
  line-height: 1.45;
  margin: 0 0 20px;
}

.cs-login-modal__gis {
  margin: 4px 0 14px;
}

.cs-login-modal__msg {
  min-height: 1.2em;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
}

.cs-login-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-login-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.cs-login-modal__btn:active {
  transform: scale(0.98);
}

.cs-login-modal__btn--primary {
  border: 1px solid rgba(207, 179, 120, 0.45);
  background: linear-gradient(135deg, rgba(207, 179, 120, 0.18), rgba(232, 213, 163, 0.12));
  color: #8a6d1f;
}

.cs-login-modal__btn--primary:hover {
  background: linear-gradient(135deg, rgba(207, 179, 120, 0.28), rgba(232, 213, 163, 0.18));
}

.cs-login-modal__btn--ghost {
  border: none;
  background: transparent;
  color: #888;
  font-weight: 600;
}

.cs-login-modal__btn--ghost:hover {
  color: #9a7a30;
  background: rgba(207, 179, 120, 0.08);
}

.cs-report-modal {
  border-radius: 20px;
  border: none;
  overflow: hidden;
}

.cs-report-modal__header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 16px 20px;
}

.cs-report-modal__sub {
  font-size: 0.76rem;
  color: #999;
  margin-top: 4px;
}

html.dark-mode .cs-login-modal {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(66, 133, 244, 0.2), transparent 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(207, 179, 120, 0.12), transparent 50%),
    #1e1e1e;
}

html.dark-mode .cs-login-modal__icon {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark-mode .cs-login-modal__title {
  color: #f0f0f0;
}

html.dark-mode .cs-login-modal__lead {
  color: #ccc;
}

html.dark-mode .cs-login-modal__btn--primary {
  color: #e8d5a3;
}

html.dark-mode .cs-ah-cloud-refresh {
  color: #d4b87a;
}

html.dark-mode .btn-profile-devices.cs-ah-cta-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(207, 179, 120, 0.35);
  color: #e8d5a3;
}

/* Device manager cards */
.cs-dev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cs-dev-head__count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #8a6d1f;
  background: linear-gradient(135deg, rgba(207, 179, 120, 0.22), rgba(232, 213, 163, 0.12));
  border: 1px solid rgba(207, 179, 120, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.cs-dev-head__count::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.cs-dev-reload {
  border: none;
  background: rgba(0, 0, 0, 0.04);
  color: #666;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.cs-dev-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-dev-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(250, 247, 240, 0.9));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.cs-dev-card--current {
  border-color: rgba(207, 179, 120, 0.45);
  background: linear-gradient(165deg, rgba(207, 179, 120, 0.14), rgba(255, 255, 255, 0.95));
}

.cs-dev-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(207, 179, 120, 0.16);
  color: #8a6d1f;
  font-size: 1.05rem;
}

.cs-dev-card__body {
  flex: 1;
  min-width: 0;
}

.cs-dev-card__title-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  min-width: 0;
}

.cs-dev-card__name {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-color, #222);
  white-space: nowrap;
  overflow: hidden;
  mask-image: linear-gradient(90deg, #000 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent 100%);
}

.cs-dev-card__meta {
  font-size: 0.74rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  mask-image: linear-gradient(90deg, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent 100%);
}

.cs-dev-card__edit {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}

.cs-dev-card__edit[hidden] {
  display: none !important;
}

.cs-dev-card__input {
  flex: 1;
  min-width: 140px;
  min-height: 38px !important;
  padding: 8px 10px !important;
}

.cs-dev-card__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  align-self: center;
}

.cs-dev-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cs-dev-icon-btn:hover {
  background: rgba(207, 179, 120, 0.12);
  color: #8a6d1f;
  border-color: rgba(207, 179, 120, 0.35);
}

.cs-dev-icon-btn--danger:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #c0392b;
  border-color: rgba(220, 53, 69, 0.28);
}

html.dark-mode .cs-dev-card {
  background: #252525;
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark-mode .cs-dev-card--current {
  background: linear-gradient(165deg, rgba(207, 179, 120, 0.12), #252525);
}

html.dark-mode .cs-dev-card__name {
  color: #eee;
}

html.dark-mode .cs-dev-icon-btn {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.1);
  color: #bbb;
}

html.dark-mode .cs-dev-reload {
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
}

html.dark-mode .cs-dev-head__count {
  color: #e8d5a3;
  background: linear-gradient(135deg, rgba(207, 179, 120, 0.2), rgba(207, 179, 120, 0.08));
  border-color: rgba(207, 179, 120, 0.35);
  box-shadow: none;
}

/* Device manager shared helpers (aligned with CardSwitch sponsor UI) */
.cs-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.cs-badge--success {
  background: #16a34a;
}
.cs-btn {
  min-height: 44px;
  min-width: 44px;
  border-radius: 12px;
  border: none;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cs-btn--gold {
  background: linear-gradient(135deg, #CFB378, #b8963e);
  color: #fff;
}
.cs-btn--subtle {
  background: rgba(0, 0, 0, 0.04);
  color: #555;
}
.cs-btn--sm {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.82rem;
}
.cs-muted {
  color: #8a94a6;
  font-size: 0.82rem;
  line-height: 1.5;
}
.cs-banner-warn,
.cs-banner-ok {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  margin: 8px 0;
}
.cs-banner-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}
.cs-banner-ok {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}
.cs-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--card-bg, #fff);
  color: inherit;
}
.cs-empty {
  text-align: center;
  color: #8a94a6;
  padding: 24px 12px;
}
html.dark-mode .cs-btn--subtle {
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
}
html.dark-mode .cs-muted,
html.dark-mode .cs-empty {
  color: #9aa3b2;
}
html.dark-mode .cs-input {
  border-color: rgba(255, 255, 255, 0.12);
  background: #1e1e1e;
}
html.dark-mode .cs-banner-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

/* ---- from style.css (profile / forms / tiers) ---- */
.gd-info-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

html.dark-mode .gd-info-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.gd-info-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.gd-info-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285F4, #34A853);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.gd-info-icon--lock { background: linear-gradient(135deg, #f09819, #edde5d); }
.gd-info-icon--shield { background: linear-gradient(135deg, #11998e, #38ef7d); }
.gd-info-icon--envelope { background: linear-gradient(135deg, #667eea, #764ba2); }
.gd-info-icon--server { background: linear-gradient(135deg, #8e2de2, #4a00e0); }

.gd-info-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-color);
    flex: 1;
}

.gd-info-body {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

html.dark-mode .gd-info-body { color: #aaa; }
html.dark-mode .gd-info-title { color: #e8e8e8; }

.gd-info-body code {
    background: rgba(66, 133, 244, 0.1);
    color: #4285F4;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.78rem;
}

/* 表單卡片 */
.gd-form-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

html.dark-mode .gd-form-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

/* 登入狀態列 */
.gd-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gd-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 4px;
}

.gd-status-chip--off {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.gd-status-chip--on {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

html.dark-mode .gd-status-chip--off {
    background: rgba(255, 107, 122, 0.15);
    color: #ff6b7a;
}

html.dark-mode .gd-status-chip--on {
    background: rgba(32, 201, 151, 0.15);
    color: #20c997;
}

.gd-email-label {
    font-size: 0.8rem;
    color: #888;
    word-break: break-all;
}

html.dark-mode .gd-email-label { color: #aaa; }

/* 登入按鈕 */
.btn-gd-login {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
}


#settings-profile-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1.5px solid rgba(207, 179, 120, 0.22);
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.07), 0 2px 8px -2px rgba(207, 179, 120, 0.1);
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

/* Banner strip (contains header-actions + avatar) */
.profile-banner {
    position: relative;
    height: 96px;
    background: linear-gradient(135deg, rgba(207,179,120,0.28) 0%, rgba(232,213,163,0.12) 60%, rgba(207,179,120,0.06) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px 0;
}

/* Header actions row (info + logout inside the banner) */
.profile-header-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Info button (ⓘ) — top-left of the banner */
.profile-info-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.55);
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.18s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.profile-info-btn:hover {
    background: rgba(66, 133, 244, 0.12);
    border-color: rgba(66, 133, 244, 0.3);
    color: #4285F4;
    transform: scale(1.08);
}

/* Logout button — small pill, top-right of the banner */

.btn-profile-logout {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1.5px solid rgba(220, 53, 69, 0.28);
    background: rgba(255, 255, 255, 0.55);
    color: #dc3545;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.01em;
}
.btn-profile-logout:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.45);
}

/* Avatar wrapper (centered, overflows below the banner) */
.profile-avatar-wrapper {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    cursor: pointer;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    z-index: 2;
}
.profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CFB378 0%, #d9c186 50%, #e8d5a3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 3px solid var(--card-bg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Default person icon */
.profile-avatar-icon-default {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1;
}

.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.88rem;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.profile-avatar-wrapper:hover .profile-avatar-overlay {
    opacity: 1;
}
.profile-avatar-wrapper:hover .profile-avatar {
    box-shadow: 0 8px 24px rgba(207, 179, 120, 0.45);
}
/* 普通等級：不可更換大頭照，取消點擊與 hover 效果 */
.profile-avatar-wrapper--locked {
    cursor: default;
    pointer-events: none;
}
.profile-avatar-wrapper--locked .profile-avatar-overlay {
    display: none;
}

/* Identity center — below the banner (centered column) */
.profile-identity-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 50px 20px 16px;   /* top padding accounts for avatar overlap */
    text-align: center;
}
.profile-nickname-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.profile-nickname {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
    text-align: center;
}
.profile-nickname-input {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--primary-color);
    border: none;
    outline: none;
    background: transparent;
    border-bottom: 2px solid var(--accent-color);
    max-width: 160px;
    padding: 0 2px;
    text-align: center;
}
.profile-edit-btn {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: none;
    background: rgba(207, 179, 120, 0.12);
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.profile-edit-btn:hover {
    background: rgba(207, 179, 120, 0.25);
}

/* Badge */
.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    width: fit-content;
}
.profile-badge.normal {
    background: rgba(0, 0, 0, 0.05);
    color: #999;
}
.profile-badge.sponsored {
    background: linear-gradient(135deg, rgba(207,179,120,0.22), rgba(207,179,120,0.1));
    color: #9a7a30;
    border: 1px solid rgba(207, 179, 120, 0.4);
}
.profile-badge.sponsored-plus {
    background: linear-gradient(135deg, rgba(66,133,244,0.18), rgba(52,168,83,0.12));
    color: #2b7de9;
    border: 1px solid rgba(66,133,244,0.35);
}
.profile-badge.vip {
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(139,92,246,0.1));
    color: #6366f1;
    border: 1px solid rgba(99,102,241,0.35);
}
.profile-badge.vvip {
    background: linear-gradient(135deg, rgba(234,179,8,0.22), rgba(251,146,60,0.12));
    color: #b45309;
    border: 1px solid rgba(234,179,8,0.4);
}
.profile-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.profile-email {
    font-size: 0.74rem;
    color: #bbb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Sync section — only holds hidden inputs, no visual frame */
.profile-sync-section {
    margin: 0;
    padding: 0;
    border: none;
    min-height: 0;
    height: 0;
    overflow: hidden;
}

/* Toast wrapper — toast is fixed floating; keep host collapsed */
.profile-toast-wrap {
    padding: 0;
    margin: 0;
    min-height: 0;
    height: 0;
    overflow: visible;
}
.profile-toast-wrap .gd-toast {
    margin: 0;
}
.profile-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.profile-toggle-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.profile-toggle-title {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--primary-color);
}
.profile-toggle-desc {
    font-size: 0.74rem;
    color: #aaa;
    line-height: 1.35;
}
.profile-last-sync {
    font-size: 0.75rem;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 20px 16px;
}

/* Action buttons row */
.profile-action-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding: 0 20px 16px;
}
.google-icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn-profile-login {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 11px 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.28);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}
.btn-profile-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.38);
}
.btn-profile-login:active {
    transform: translateY(0);
}
.btn-profile-sync {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #CFB378 0%, #d9c186 60%, #e8d5a3 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(207, 179, 120, 0.35);
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.btn-profile-sync:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(207, 179, 120, 0.45);
}
.btn-profile-sync:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Dark mode — profile card */
html.dark-mode #settings-profile-card {
    background: #1e1e1e;
    border-color: rgba(207, 179, 120, 0.2);
    box-shadow: 0 8px 32px -4px rgba(0,0,0,0.3);
}
html.dark-mode .profile-banner {
    background: linear-gradient(135deg, rgba(207,179,120,0.18) 0%, rgba(207,179,120,0.06) 100%);
}
html.dark-mode .profile-info-btn {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
    color: #666;
}
html.dark-mode .profile-info-btn:hover {
    background: rgba(66,133,244,0.15);
    color: #4285F4;
}
html.dark-mode .btn-profile-logout {
    background: rgba(30,30,30,0.6);
    border-color: rgba(220,53,69,0.3);
}
html.dark-mode .btn-profile-logout:hover {
    background: rgba(220,53,69,0.12);
}
html.dark-mode .profile-badge.normal {
    background: rgba(255,255,255,0.07);
    color: #666;
}
html.dark-mode .profile-nickname,
html.dark-mode .profile-toggle-title {
    color: #e0e0e0;
}
html.dark-mode .profile-sync-section {
    border-color: rgba(255,255,255,0.06);
}
html.dark-mode .profile-avatar {
    border-color: #1e1e1e;
}
html.dark-mode .profile-edit-btn {
    background: rgba(207,179,120,0.1);
}
html.dark-mode .profile-last-sync {
    color: #555;
}

/* =====================================================================
   MODAL A — Google Drive 服務說明 (#gdInfoModal)
   MODAL B — 贊助流程 (#gdSponsorModal)
   ===================================================================== */

#gdInfoModal .modal-content,
#crGdInfoModal .modal-content,
#gdSponsorModal .modal-content {
    border-radius: 24px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
#gdInfoModal .modal-header,
#crGdInfoModal .modal-header,
#gdSponsorModal .modal-header {
    border-bottom: none;
    padding: 22px 22px 8px;
}
#gdInfoModal .modal-footer,
#crGdInfoModal .modal-footer {
    border-top: none;
    padding: 8px 22px 22px;
}

/* Step control */
.sponsor-step {
    display: none;
    animation: sponsor-step-in 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.sponsor-step.active {
    display: block;
}
@keyframes sponsor-step-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}
.sponsor-step-back {
    animation-direction: reverse;
}

/* Sponsor charge highlight card */
.sponsor-charge-card {
    background: linear-gradient(135deg, rgba(207,179,120,0.15) 0%, rgba(207,179,120,0.06) 100%);
    border: 1.5px solid rgba(207,179,120,0.35);
    border-radius: 16px;
    padding: 16px;
}
.sponsor-charge-card .gd-info-icon {
    background: linear-gradient(135deg, #CFB378, #e8d5a3) !important;
}

/* Sponsor option cards (Step 2) */
.sponsor-option-card {
    border: 2px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}
/* Sponsor option cards hover */
.sponsor-option-card:hover {
    border-color: rgba(207, 179, 120, 0.5);
    box-shadow: 0 4px 16px rgba(207, 179, 120, 0.15);
    transform: translateY(-1px);
}

/* ===== 贊助表單欄位 ===== */
.sponsor-form-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 6px;
}
.sponsor-form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    font-size: 0.88rem;
    background: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}
.sponsor-form-input:focus { border-color: #CFB378; box-shadow: 0 0 0 3px rgba(207,179,120,0.15); }
.sponsor-form-hint { font-size: 0.76rem; color: #aaa; margin-top: 5px; line-height: 1.5; }
.sponsor-form-error {
    padding: 10px 14px;
    background: rgba(245,87,108,0.08);
    border: 1px solid rgba(245,87,108,0.25);
    border-radius: 10px;
    font-size: 0.83rem;
    color: #e53935;
}
html.dark-mode .sponsor-form-label { color: #bbb; }
html.dark-mode .sponsor-form-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #e8e8e8;
}
html.dark-mode .sponsor-form-hint { color: #777; }

.sponsor-file-drop {
    border: 2px dashed rgba(0,0,0,0.14);
    border-radius: 12px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.sponsor-file-drop:hover { border-color: #CFB378; background: rgba(207,179,120,0.05); }
.sponsor-file-drop.drag-over { border-color: #CFB378; background: rgba(207,179,120,0.1); }
html.dark-mode .sponsor-file-drop {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.03);
}

.cs-report-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(240, 147, 251, 0.3);
}
.cs-report-submit-btn:hover { filter: brightness(1.03); color: #fff; }

/* Hide profile card on settings subpages (CardSwitch) */
.settings-container:has(.settings-subpage.active) #settings-profile-card {
    display: none !important;
}

/* CarRecord: 2 metrics only */
#settings-profile-card .cs-ah-metrics {
    grid-template-columns: 1fr 1fr;
}

/* 小額贊助子頁 — sponsor-v2（自 CardSwitch style.css） */
.sponsor-v2 { display: grid; gap: 14px; }
.sponsor-v2-hero { padding: 8px 4px 4px; }
.sponsor-v2-hero-icon {
    width: 56px; height: 56px; margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.18), rgba(245, 87, 108, 0.14));
    color: #f5576c; font-size: 1.6rem;
}
.sponsor-v2-hero-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; color: #0f172a; }
.sponsor-v2-hero-lead { font-size: 0.92rem; color: #64748b; margin: 0; line-height: 1.6; }
.sponsor-v2-section-title {
    font-size: 1rem; font-weight: 700; color: #b8963e; margin-bottom: 8px;
}
.sponsor-v2-section-desc { font-size: 0.88rem; color: #64748b; margin: 0 0 12px; line-height: 1.55; }
.sponsor-v2-flow,
.sponsor-v2-perk,
.sponsor-v2-tiers,
.sponsor-v2-details { padding: 16px; border-radius: 14px; }
.sponsor-v2-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.sponsor-v2-step { display: flex; gap: 12px; align-items: flex-start; }
.sponsor-v2-step-num {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.82rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #f093fb, #f5576c);
}
.sponsor-v2-step-body { flex: 1; min-width: 0; }
.sponsor-v2-step-body strong { display: block; font-size: 0.96rem; color: #0f172a; margin-bottom: 4px; }
.sponsor-v2-step-body p { font-size: 0.88rem; color: #64748b; margin: 0 0 10px; line-height: 1.55; }
.sponsor-v2-qr-wrap { text-align: center; margin-bottom: 8px; }
.sponsor-v2-qr {
    max-width: 240px; width: 100%; border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}
.sponsor-v2-pay-note { font-size: 0.82rem !important; color: #94a3b8 !important; margin-bottom: 0 !important; }
.sponsor-v2-cta-btn {
    width: 100%; padding: 12px; border: none; border-radius: 12px;
    font-size: 0.9rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    box-shadow: 0 3px 12px rgba(240, 147, 251, 0.28);
}
.sponsor-v2-cta-btn:hover { filter: brightness(1.03); color: #fff; }
.sponsor-v2-tier-grid { display: grid; gap: 10px; }
.sponsor-v2-tier-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px; padding: 12px 14px;
    background: rgba(255, 255, 255, 0.72);
}
.sponsor-v2-tier-card.is-muted { opacity: 0.92; }
.sponsor-v2-tier-card.is-gold {
    border-color: rgba(207, 179, 120, 0.45);
    background: linear-gradient(145deg, rgba(255,252,245,0.95), rgba(255,255,255,0.8));
}
.sponsor-v2-tier-card.is-indigo {
    border-color: rgba(99, 102, 241, 0.28);
    background: linear-gradient(145deg, rgba(238,242,255,0.9), rgba(255,255,255,0.8));
}
.sponsor-v2-tier-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 10px; margin-bottom: 8px;
}
.sponsor-v2-tier-name { display: block; font-size: 0.96rem; color: #0f172a; }
.sponsor-v2-tier-price { display: block; font-size: 0.84rem; color: #b8963e; font-weight: 600; margin-top: 2px; }
.sponsor-v2-tier-devices {
    flex-shrink: 0; font-size: 0.78rem; font-weight: 600; color: #64748b;
    padding: 3px 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.14);
}
.sponsor-v2-tier-includes {
    display: flex; align-items: center; gap: 6px;
    margin: 0 0 8px; padding: 6px 10px;
    font-size: 0.82rem; font-weight: 600; color: #9a7a30;
    background: rgba(207, 179, 120, 0.12); border-radius: 8px;
}
.sponsor-v2-tier-includes i { font-size: 0.72rem; opacity: 0.85; }
.sponsor-v2-tier-list {
    list-style: none; margin: 0; padding: 0; display: grid; gap: 6px;
}
.sponsor-v2-tier-list li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.86rem; color: #475569; line-height: 1.45;
}
.sponsor-v2-tier-list li i { color: #06c755; margin-top: 3px; font-size: 0.68rem; }
.sponsor-v2-details-title {
    font-size: 0.92rem; font-weight: 700; color: #9a7a30;
    margin: 0 0 10px;
}
.sponsor-v2-details-body { margin-top: 0; }
.sponsor-v2-note-list {
    margin: 0; padding-left: 1.1rem;
    font-size: 0.88rem; color: #64748b; line-height: 1.65;
}
.sponsor-v2-note-list li + li { margin-top: 6px; }
.sponsor-v2-disclaimer { color: #94a3b8 !important; font-size: 0.84rem !important; }
.sponsor-v2-footer p {
    font-size: 0.86rem; color: #94a3b8; margin: 4px 0 0;
}

html.dark-mode .sponsor-v2-hero-title { color: #e2e8f0; }
html.dark-mode .sponsor-v2-hero-lead,
html.dark-mode .sponsor-v2-section-desc,
html.dark-mode .sponsor-v2-step-body p,
html.dark-mode .sponsor-v2-pay-note,
html.dark-mode .sponsor-v2-note-list { color: #94a3b8; }
html.dark-mode .sponsor-v2-step-body strong,
html.dark-mode .sponsor-v2-tier-name { color: #e2e8f0; }
html.dark-mode .sponsor-v2-tier-card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
html.dark-mode .sponsor-v2-tier-card.is-gold,
html.dark-mode .sponsor-v2-tier-card.is-indigo { background: rgba(255, 255, 255, 0.05); }
html.dark-mode .sponsor-v2-tier-list li { color: #94a3b8; }
html.dark-mode .sponsor-v2-tier-devices { background: rgba(255, 255, 255, 0.08); color: #94a3b8; }
html.dark-mode .sponsor-v2-tier-includes {
    color: #e8d5a3; background: rgba(207, 179, 120, 0.12);
}
html.dark-mode .sponsor-v2-details-title { color: #e8d5a3; }
html.dark-mode .sponsor-v2-footer p { color: #64748b; }

/* Settings nav — CardSwitch slide pattern (override inline display:none) */
#settings-section .settings-container {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 120px);
    width: 100%;
    box-sizing: border-box;
}
#settings-section .settings-main-menu {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    min-height: calc(100vh - 200px);
    animation: none;
}
#settings-section .settings-main-menu.hidden {
    display: block;
    transform: translateX(-22%);
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}
#settings-section .settings-subpage {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    background: var(--bg-color);
    overflow-y: hidden;
    min-height: 100%;
    animation: none;
    padding-bottom: 16px;
}
#settings-section .settings-subpage.active {
    display: block;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    animation: none;
}
#settings-section .settings-subpage.move-left {
    display: block;
    transform: translateX(-30%);
    opacity: 0;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    #settings-section .settings-main-menu,
    #settings-section .settings-subpage {
        transition: none;
    }
}


/* Donate page — notify perk block */
.sponsor-v2-perk {
  overflow: hidden;
  box-sizing: border-box;
}
.sponsor-v2-perk-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.sponsor-v2-perk-head-text {
  flex: 1;
  min-width: 0;
}
.sponsor-v2-perk-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: #0f766e;
  line-height: 1.35;
}
.sponsor-v2-perk-lead {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #64748b;
}
.sponsor-v2-perk-grid {
  display: grid;
  gap: 8px;
}
.sponsor-v2-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.1);
  box-sizing: border-box;
  min-width: 0;
}
.sponsor-v2-perk-item > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.sponsor-v2-perk-item strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}
.sponsor-v2-perk-desc {
  display: block;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
}
.sponsor-v2-perk-badge,
.sponsor-v2-perk-ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  font-size: 0.95rem;
  line-height: 1;
  box-sizing: border-box;
}
.sponsor-v2-perk-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0f766e, #14b8a6);
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.25);
}
.sponsor-v2-perk-badge i,
.sponsor-v2-perk-ico i {
  color: #fff !important;
  opacity: 1 !important;
  font-size: inherit;
  line-height: 1;
  width: 1em;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sponsor-v2-perk-ico.is-teal {
  background: linear-gradient(145deg, #0f766e, #14b8a6);
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.22);
}
.sponsor-v2-perk-ico.is-amber {
  background: linear-gradient(145deg, #b45309, #f59e0b);
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.22);
}
.sponsor-v2-perk-ico.is-sky {
  background: linear-gradient(145deg, #0369a1, #38bdf8);
  box-shadow: 0 4px 10px rgba(3, 105, 161, 0.22);
}
html.dark-mode .sponsor-v2-perk-title { color: #5eead4; }
html.dark-mode .sponsor-v2-perk-lead,
html.dark-mode .sponsor-v2-perk-desc { color: #94a3b8; }
html.dark-mode .sponsor-v2-perk-item {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(94, 234, 212, 0.14);
}
html.dark-mode .sponsor-v2-perk-item strong { color: #e2e8f0; }

