/**
 * Error Boundary Styles
 * Consistent error UI across the application
 */

.error-boundary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: var(--space-8);
  background: var(--bg-surface);
}

.error-boundary-content {
  max-width: 500px;
  text-align: center;
  animation: fadeIn var(--duration-300) var(--ease-out);
}

.error-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
  color: var(--color-error-500);
  animation: bounce var(--duration-500) var(--ease-out);
}

.error-title {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.error-message {
  margin: 0 0 var(--space-6);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
}

/* Error Details (Development) */
.error-details {
  margin: var(--space-6) 0;
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  text-align: left;
}

.error-details summary {
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  user-select: none;
  transition: color var(--duration-200) var(--ease-out);
}

.error-details summary:hover {
  color: var(--text-primary);
}

.error-details[open] summary {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-primary);
}

.error-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.error-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.error-field strong {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.error-field code {
  padding: var(--space-1) var(--space-2);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  word-break: break-all;
}

.error-stack,
.component-stack {
  margin: 0;
  padding: var(--space-3);
  background: var(--color-neutral-900);
  border-radius: var(--radius-md);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-relaxed);
  color: var(--color-neutral-100);
  overflow-x: auto;
  white-space: pre;
}

/* Error Actions */
.error-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

.error-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  cursor: pointer;
  transition: all var(--duration-200) var(--ease-out);
  user-select: none;
}

.error-button:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.error-button-primary {
  background: var(--interactive-primary);
  color: white;
}

.error-button-primary:hover {
  background: var(--interactive-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.error-button-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.error-button-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.error-button-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-secondary);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Dark mode adjustments */
[data-theme='dark'] .error-stack,
[data-theme='dark'] .component-stack {
  background: var(--color-neutral-800);
  color: var(--color-neutral-200);
}

/* Responsive */
@media (max-width: 480px) {
  .error-boundary {
    padding: var(--space-4);
  }

  .error-boundary-content {
    max-width: 100%;
  }

  .error-actions {
    flex-direction: column;
    width: 100%;
  }

  .error-button {
    width: 100%;
  }
}

/* Print styles */
@media print {
  .error-boundary {
    background: white;
    color: black;
  }

  .error-button {
    display: none;
  }
}
@font-face {
  font-family: 'HeyGorgeous';
  src: url('/fonts/HeyGorgeous.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --loading-bg: #fff8f3;
  --loading-ink: #251d21;
  --loading-muted: #6b5f64;
  --loading-line: rgba(99, 58, 70, 0.12);
  --loading-line-strong: rgba(99, 58, 70, 0.2);
  --loading-card: rgba(255, 255, 255, 0.76);
  --loading-card-strong: rgba(255, 255, 255, 0.92);
  --loading-card-shadow: 0 24px 90px rgba(112, 54, 69, 0.14);
  --loading-accent: #e4577b;
  --loading-accent-soft: rgba(228, 87, 123, 0.16);
  --loading-accent-strong: #c93f67;
  --loading-success: #277460;
  --loading-title-font: var(
    --font-display,
    'Urbanist',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif
  );
  --loading-script-font: 'HeyGorgeous', cursive;
  --loading-body-font: var(
    --font-primary,
    'Urbanist',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif
  );
}

.loading-screen {
  position: fixed;
  inset: 0;
  width: var(--rally-stage-width);
  height: var(--rally-stage-height);
  z-index: 9999;
  overflow: hidden;
  background: #fff;
  color: var(--loading-ink);
  font-family: var(--loading-body-font);
}

.loading-backdrop {
  position: absolute;
  inset: 0;
  background: #fff;
  pointer-events: none;
}

.loading-runtime-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.loading-runtime-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  border: 1px solid var(--loading-line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 246, 247, 0.85) 100%);
  box-shadow: var(--loading-card-shadow);
  backdrop-filter: blur(22px);
}

.loading-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(228, 87, 123, 0.2);
  background: rgba(255, 243, 246, 0.88);
  color: var(--loading-accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loading-runtime-header h1 {
  margin-top: 12px;
  font-family: var(--loading-title-font);
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--loading-ink);
}

.loading-runtime-header p {
  margin-top: 12px;
  max-width: 620px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--loading-muted);
}

.loading-runtime-quiet-status {
  margin-top: 10px;
  max-width: 360px;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--loading-accent-strong);
}

.loading-runtime-subdetail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--loading-accent-strong);
  font-size: 0.88rem;
  font-weight: 600;
}

.loading-runtime-subdetail span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 243, 246, 0.82);
  border: 1px solid rgba(228, 87, 123, 0.16);
}

.loading-runtime-diagnostics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.loading-diagnostic-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(37, 29, 33, 0.06);
  border: 1px solid var(--loading-line);
  color: var(--loading-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.loading-diagnostic-chip.ready {
  border-color: rgba(39, 116, 96, 0.24);
  background: rgba(39, 116, 96, 0.12);
  color: var(--loading-success);
}

.loading-diagnostic-chip.error {
  border-color: rgba(201, 63, 103, 0.24);
  background: rgba(201, 63, 103, 0.12);
  color: var(--loading-accent-strong);
}

.loading-diagnostic-chip.wide {
  max-width: 100%;
  border-radius: 16px;
}

.loading-runtime-screen {
  --loading-ink: #fff;
  --loading-muted: rgba(255, 255, 255, 0.74);
  --loading-line: rgba(255, 255, 255, 0.12);
  --loading-line-strong: rgba(255, 255, 255, 0.2);
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
  background: #000;
}

.loading-runtime-screen .loading-backdrop {
  background: #000;
}

.loading-runtime-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: none;
  border-radius: 0;
  background: #000;
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
}

.loading-runtime-shell::before,
.loading-runtime-shell::after {
  content: none;
}

.loading-runtime-brand {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loading-runtime-brand-mark {
  font-family: var(--loading-title-font);
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--loading-ink);
  -webkit-text-fill-color: currentColor;
  text-fill-color: currentColor;
}

.loading-runtime-brand-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.loading-compat-warning {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 3;
  width: min(430px, calc(100% - 44px));
  padding: 14px 16px 13px;
  border-left: 3px solid rgba(255, 127, 171, 0.9);
  background: rgba(16, 10, 14, 0.76);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  text-shadow: none;
}

.loading-compat-warning.unsupported {
  border-left-color: #ff6f95;
}

.loading-compat-warning.limited {
  border-left-color: #ff9bbe;
}

.loading-compat-copy {
  display: grid;
  gap: 5px;
}

.loading-compat-title {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.15;
  font-weight: 700;
}

.loading-compat-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  line-height: 1.35;
}

.loading-compat-list {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.loading-compat-list li {
  position: relative;
  padding-left: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.76rem;
  line-height: 1.35;
}

.loading-compat-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--loading-accent-strong);
}

.loading-compat-detected {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
  line-height: 1.3;
}

.loading-runtime-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.loading-runtime-image {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center bottom;
  opacity: 1;
  filter: none;
  transform: scale(1.035);
  transform-origin: center bottom;
}

.loading-runtime-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 34px 24px 22px;
  background: transparent;
  pointer-events: none;
}

.loading-runtime-copy {
  max-width: none;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
}

.loading-runtime-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
}

.loading-runtime-title {
  margin-top: 4px;
  font-family: var(--loading-title-font);
  font-size: clamp(2.4rem, 4.6vw, 4.3rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--loading-ink);
  -webkit-text-fill-color: currentColor;
  text-fill-color: currentColor;
}

.loading-runtime-mode-line {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.loading-runtime-lede {
  margin-top: 10px;
  max-width: min(860px, 100%);
  font-family: var(--loading-script-font);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  line-height: 1.08;
  -webkit-text-fill-color: currentColor;
  text-fill-color: currentColor;
}

.loading-runtime-progress-block {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.loading-runtime-progress-stack {
  display: grid;
  justify-items: end;
  gap: 5px;
  margin-left: auto;
  width: min(290px, 58vw);
}

.loading-runtime-progress-state {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  justify-content: end;
  gap: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loading-runtime-progress-state-label {
  font-weight: 800;
}

.loading-runtime-progress-state-status {
  color: rgba(255, 255, 255, 0.56);
}

.loading-runtime-progress-state-percent {
  font-weight: 800;
}

.loading-runtime-progress-state.active {
  color: rgba(255, 255, 255, 0.94);
}

.loading-runtime-progress-state.active .loading-runtime-progress-state-status {
  color: rgba(255, 255, 255, 0.82);
}

.loading-runtime-progress-state.ready,
.loading-runtime-progress-state.cached {
  color: rgba(101, 214, 183, 0.92);
}

.loading-runtime-progress-state.ready .loading-runtime-progress-state-status,
.loading-runtime-progress-state.cached .loading-runtime-progress-state-status {
  color: rgba(101, 214, 183, 0.78);
}

.loading-runtime-progress-state.error {
  color: var(--loading-accent-strong);
}

.loading-runtime-progress-state.error .loading-runtime-progress-state-status {
  color: rgba(255, 149, 182, 0.82);
}

.loading-runtime-progress-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
}

.loading-runtime-progress-track {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.24);
}

.loading-runtime-progress-fill {
  height: 100%;
  background: var(--loading-accent-strong);
  transition: width 0.24s ease-out;
}

.loading-runtime-progress-number {
  flex: none;
  min-width: 48px;
  text-align: right;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
}

.loading-runtime-footer {
  margin-top: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
}

.loading-runtime-meta-block {
  display: grid;
  gap: 4px;
}

.loading-runtime-meta {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
  line-height: 1.5;
}

.loading-runtime-note {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  line-height: 1.45;
}

.loading-runtime-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  pointer-events: auto;
}

.loading-action-button {
  appearance: none;
  min-height: auto;
  width: auto;
  padding: 0 0 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--loading-body-font);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.loading-action-button.primary {
  color: var(--loading-accent-strong);
  border-bottom: 1px solid rgba(201, 63, 103, 0.34);
}

.loading-action-button.secondary {
  color: var(--loading-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.loading-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  font-weight: 600;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}

.loading-toggle-inline {
  justify-content: flex-end;
}

.loading-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.loading-toggle-box {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.loading-toggle-box::after {
  content: '♥';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.68rem;
  transform: scale(0.35);
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.loading-toggle-input:checked + .loading-toggle-box {
  border-color: rgba(255, 177, 205, 0.84);
  background: linear-gradient(135deg, #ff7fab 0%, #ff5f95 100%);
  box-shadow:
    0 0 0 4px rgba(255, 127, 171, 0.18),
    0 12px 24px rgba(255, 95, 149, 0.3);
}

.loading-toggle-input:checked + .loading-toggle-box::after {
  color: #fff;
  transform: scale(0.92);
}

.loading-toggle-input:focus-visible + .loading-toggle-box {
  outline: 2px solid rgba(255, 177, 205, 0.84);
  outline-offset: 3px;
}

.loading-toggle-label {
  color: inherit;
  line-height: 1.2;
}

@media (max-width: 920px) {
  .loading-runtime-shell {
    overflow: auto;
  }

  .loading-runtime-stage {
    min-height: 100%;
  }

  .loading-runtime-progress-stack {
    width: min(240px, 72vw);
  }

  .loading-runtime-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .loading-runtime-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .loading-runtime-brand {
    top: 16px;
    left: 16px;
  }

  .loading-compat-warning {
    top: 70px;
    right: 16px;
    left: 16px;
    width: auto;
    padding: 12px 13px;
  }

  .loading-compat-title {
    font-size: 0.84rem;
  }

  .loading-compat-copy p,
  .loading-compat-list li {
    font-size: 0.72rem;
  }

  .loading-runtime-shell {
    overflow: auto;
  }

  .loading-runtime-stage {
    min-height: 100%;
  }

  .loading-runtime-progress-stack {
    width: min(210px, 82vw);
  }

  .loading-runtime-progress-state {
    font-size: 0.68rem;
    gap: 6px;
  }

  .loading-runtime-title {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .loading-runtime-mode-line {
    font-size: 0.74rem;
  }

  .loading-runtime-lede {
    font-size: clamp(1.08rem, 5vw, 1.42rem);
    line-height: 1.02;
  }

  .loading-runtime-overlay {
    padding: 20px 16px 16px;
  }

  .loading-runtime-task-line {
    gap: 8px 12px;
  }

  .loading-runtime-progress-row {
    gap: 10px;
  }

  .loading-runtime-progress-number {
    min-width: 40px;
    font-size: 0.84rem;
  }

  .loading-runtime-actions {
    gap: 10px;
  }

  .loading-action-button {
    font-size: 0.84rem;
  }

  .loading-toggle {
    font-size: 0.8rem;
  }
}
.mode-access-dock {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 10010;
  pointer-events: auto;
}

body.chat-dock-active .mode-access-dock,
body.date-vn-active .mode-access-dock {
  display: none;
}

.mode-access-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(12px);
  color: var(--theme-text-primary, #251d21);
  cursor: pointer;
  transform: none;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.mode-access-trigger:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.34);
  border: 0;
  box-shadow: none;
  transform: none;
}

.mode-access-trigger:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
  border: 0;
  box-shadow: none;
  transform: none;
}

.mode-access-trigger:focus,
.mode-access-trigger:focus-visible {
  border: 0;
  box-shadow: none;
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
  transform: none;
}

.mode-access-trigger:disabled {
  cursor: wait;
  opacity: 0.78;
}

.mode-access-trigger-label {
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .mode-access-dock {
    top: 18px;
    right: 18px;
  }

  .mode-access-trigger {
    min-width: 78px;
    min-height: 40px;
    padding: 0 15px;
  }
}
/*
 * App shell CSS imports
 * Keeps the startup shell light; Local Mode styles load from the LocalModeApp boundary.
 */

/* Theme Variables - Single source of truth for colors */

/**
 * Pink Theme Variables
 * Centralized color system for the Rally app
 * All colors are defined as CSS variables for easy theming
 */

:root {
  /* Rally Pink Palette */
  --color-pink-primary: rgb(248, 165, 194); /* Primary pink (audio toggle, affection, etc.) */
  --color-pink-secondary: #f4b3ef; /* Secondary pink (wallet strip, sidebar Start/New buttons) */
  /* Primary Pink Colors */
  /* Primary brand color (login/sidebar surfaces) */
  --theme-primary: var(--color-pink-primary);
  --theme-primary-dark: #e79de4; /* Slightly deeper for hover accents */
  --theme-primary-darker: #d66bd0; /* Darker companion */
  --theme-primary-muted: #cfa7c8; /* Muted companion */

  /* Secondary brand color (sidebar/wallet/buttons) */
  --theme-secondary: var(--color-pink-secondary);

  /* Background Colors */
  --theme-bg-main: rgb(246, 198, 220); /* Main pink background */
  --theme-bg-overlay-light: rgba(255, 255, 255, 0.1); /* Light overlay */
  --theme-bg-overlay-medium: rgba(255, 255, 255, 0.15); /* Medium overlay */
  --theme-bg-overlay-heavy: rgba(255, 255, 255, 0.2); /* Heavy overlay */
  --theme-bg-overlay-solid: rgba(255, 255, 255, 0.3); /* More solid overlay */

  /* Border Colors */
  --theme-border-light: rgba(255, 105, 180, 0.1); /* Very light border */
  --theme-border-medium: rgba(255, 105, 180, 0.15); /* Medium border */
  --theme-border-normal: rgba(255, 105, 180, 0.2); /* Normal border */
  --theme-border-strong: rgba(255, 105, 180, 0.3); /* Strong border */
  --theme-border-solid: #ff69b4; /* Solid pink border */

  /* Text Colors */
  --theme-text-primary: #374151; /* Main text color */
  --theme-text-secondary: #7f3651; /* Secondary text (pink tinted) */
  --theme-text-muted: #a67689; /* Muted text */
  --theme-text-accent: #d1477a; /* Accent text */
  --theme-text-white: #ffffff; /* White text */

  /* Interactive States */
  --theme-hover-bg: rgba(255, 255, 255, 0.1); /* Hover background */
  --theme-hover-border: #ff6b9d; /* Hover border */
  --theme-focus-shadow: rgba(255, 105, 180, 0.1); /* Focus shadow */
  --theme-active-bg: rgba(255, 107, 157, 0.12); /* Active state background */

  /* Component Specific */
  /* Primary surfaces use brand primary */
  --theme-button-primary-bg: var(--theme-primary);
  --theme-button-primary-hover: var(--theme-primary-dark);
  --theme-button-danger-bg: rgba(239, 68, 68, 0.1);
  --theme-button-danger-border: rgba(239, 68, 68, 0.3);
  --theme-button-danger-text: #dc2626;
  --theme-button-danger-hover: rgba(239, 68, 68, 0.2);

  /* Toggle/Switch Colors */
  --theme-toggle-bg: rgba(255, 255, 255, 0.2);
  --theme-toggle-border: rgba(255, 107, 157, 0.3);
  --theme-toggle-active-bg: #ff6b9d;
  --theme-toggle-thumb: #ffffff;

  /* Input/Select Colors */
  --theme-input-bg: rgba(255, 255, 255, 0.1);
  --theme-input-border: rgba(255, 105, 180, 0.2);
  --theme-input-hover-bg: rgba(255, 255, 255, 0.15);
  --theme-input-hover-border: #ff6b9d;
  --theme-input-focus-border: #ff6b9d;
  --theme-input-focus-shadow: 0 0 0 2px rgba(255, 105, 180, 0.1);

  /* Sidebar Specific */
  /* Sidebar surfaces match the main Rally canvas */
  --theme-sidebar-surface: #ffffff;
  --theme-sidebar-bg: var(--theme-sidebar-surface);
  --theme-sidebar-header-bg: var(--theme-sidebar-surface);
  --theme-sidebar-wallet-bg: var(--theme-sidebar-surface);
  --theme-sidebar-wallet-avatar-bg: #fff4f6;

  /* Section Headers */
  --theme-section-title-color: #ff6b9d;
  --theme-section-title-size: 0.875rem;
  --theme-section-title-weight: 600;
  --theme-section-title-transform: uppercase;
  --theme-section-title-spacing: 0.05em;
  --theme-section-divider: 1px solid rgba(255, 105, 180, 0.15);

  /* Transitions */
  --theme-transition-fast: 0.15s ease;
  --theme-transition-normal: 0.2s ease;
  --theme-transition-slow: 0.3s ease;

  /* Spacing */
  --theme-spacing-xs: 0.25rem;
  --theme-spacing-sm: 0.5rem;
  --theme-spacing-md: 0.75rem;
  --theme-spacing-lg: 1rem;
  --theme-spacing-xl: 1.5rem;
  --theme-spacing-2xl: 2rem;

  /* Border Radius */
  --theme-radius-sm: 0.25rem;
  --theme-radius-md: 0.375rem;
  --theme-radius-lg: 0.5rem;
  --theme-radius-xl: 0.75rem;
  --theme-radius-full: 9999px;

  /* Shadows */
  --theme-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --theme-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --theme-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --theme-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --theme-shadow-pink-sm: 0 1px 3px rgba(255, 107, 157, 0.2);
  --theme-shadow-pink-md: 0 4px 12px rgba(255, 182, 193, 0.3);

  /* Gradients */
  --theme-gradient-primary: linear-gradient(135deg, #ff5a8b 0%, #b83e5a 100%);
  --theme-gradient-bg: linear-gradient(135deg, #fff6f9 0%, #f0e6ff 100%);
}

/* Dark mode overrides (if needed in future) */

@media (prefers-color-scheme: dark) {
  :root {
    /* Can override variables here for dark mode */
  }
}

/* Design System (includes all design tokens) */

/**
 * Design System - CSS Custom Properties
 * Centralized design tokens for consistent theming and maintainability
 */

:root {
  /* =============================================================================
     Color Palette - Semantic Colors
     ============================================================================= */

  /* Primary Brand Colors */
  --color-primary-50: #fef7f7;
  --color-primary-100: #fef2f2;
  --color-primary-200: #fecaca;
  --color-primary-300: #fca5a5;
  --color-primary-400: #f87171;
  --color-primary-500: #ef4444;
  --color-primary-600: #dc2626;
  --color-primary-700: #b91c1c;
  --color-primary-800: #991b1b;
  --color-primary-900: #7f1d1d;

  /* Accent Colors */
  --color-accent-50: #fdf4ff;
  --color-accent-100: #fae8ff;
  --color-accent-200: #f5d0fe;
  --color-accent-300: #f0abfc;
  --color-accent-400: #e879f9;
  --color-accent-500: #d946ef;
  --color-accent-600: #c026d3;
  --color-accent-700: #a21caf;
  --color-accent-800: #86198f;
  --color-accent-900: #701a75;

  /* Neutral Grays */
  --color-neutral-50: #f9fafb;
  --color-neutral-100: #f3f4f6;
  --color-neutral-200: #e5e7eb;
  --color-neutral-300: #d1d5db;
  --color-neutral-400: #9ca3af;
  --color-neutral-500: #6b7280;
  --color-neutral-600: #4b5563;
  --color-neutral-700: #374151;
  --color-neutral-800: #1f2937;
  --color-neutral-900: #111827;

  /* Success Colors */
  --color-success-50: #f0fdf4;
  --color-success-100: #dcfce7;
  --color-success-200: #bbf7d0;
  --color-success-300: #86efac;
  --color-success-400: #4ade80;
  --color-success-500: #22c55e;
  --color-success-600: #16a34a;
  --color-success-700: #15803d;
  --color-success-800: #166534;
  --color-success-900: #14532d;

  /* Warning Colors */
  --color-warning-50: #fffbeb;
  --color-warning-100: #fef3c7;
  --color-warning-200: #fde68a;
  --color-warning-300: #fcd34d;
  --color-warning-400: #fbbf24;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;
  --color-warning-700: #b45309;
  --color-warning-800: #92400e;
  --color-warning-900: #78350f;

  /* Error Colors */
  --color-error-50: #fef2f2;
  --color-error-100: #fee2e2;
  --color-error-200: #fecaca;
  --color-error-300: #fca5a5;
  --color-error-400: #f87171;
  --color-error-500: #ef4444;
  --color-error-600: #dc2626;
  --color-error-700: #b91c1c;
  --color-error-800: #991b1b;
  --color-error-900: #7f1d1d;

  /* Info Colors */
  --color-info-50: #eff6ff;
  --color-info-100: #dbeafe;
  --color-info-200: #bfdbfe;
  --color-info-300: #93c5fd;
  --color-info-400: #60a5fa;
  --color-info-500: #3b82f6;
  --color-info-600: #2563eb;
  --color-info-700: #1d4ed8;
  --color-info-800: #1e40af;
  --color-info-900: #1e3a8a;

  /* =============================================================================
     Typography
     ============================================================================= */

  /* Font Families */
  --font-family-sans:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  --font-family-mono:
    'JetBrains Mono', 'Fira Code', 'Roboto Mono', 'Monaco', 'Cascadia Code', 'Ubuntu Mono',
    monospace;
  --font-family-display: 'Cal Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font Weights */
  --font-weight-thin: 100;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Font Sizes */
  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem; /* 36px */
  --font-size-5xl: 3rem; /* 48px */
  --font-size-6xl: 3.75rem; /* 60px */
  --font-size-7xl: 4.5rem; /* 72px */
  --font-size-8xl: 6rem; /* 96px */
  --font-size-9xl: 8rem; /* 128px */

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* =============================================================================
     Spacing & Layout
     ============================================================================= */

  /* Spacing Scale */
  --space-0: 0;
  --space-px: 1px;
  --space-0_5: 0.125rem; /* 2px */
  --space-1: 0.25rem; /* 4px */
  --space-1_5: 0.375rem; /* 6px */
  --space-2: 0.5rem; /* 8px */
  --space-2_5: 0.625rem; /* 10px */
  --space-3: 0.75rem; /* 12px */
  --space-3_5: 0.875rem; /* 14px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-7: 1.75rem; /* 28px */
  --space-8: 2rem; /* 32px */
  --space-9: 2.25rem; /* 36px */
  --space-10: 2.5rem; /* 40px */
  --space-11: 2.75rem; /* 44px */
  --space-12: 3rem; /* 48px */
  --space-14: 3.5rem; /* 56px */
  --space-16: 4rem; /* 64px */
  --space-20: 5rem; /* 80px */
  --space-24: 6rem; /* 96px */
  --space-28: 7rem; /* 112px */
  --space-32: 8rem; /* 128px */
  --space-36: 9rem; /* 144px */
  --space-40: 10rem; /* 160px */
  --space-44: 11rem; /* 176px */
  --space-48: 12rem; /* 192px */
  --space-52: 13rem; /* 208px */
  --space-56: 14rem; /* 224px */
  --space-60: 15rem; /* 240px */
  --space-64: 16rem; /* 256px */
  --space-72: 18rem; /* 288px */
  --space-80: 20rem; /* 320px */
  --space-96: 24rem; /* 384px */

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem; /* 2px */
  --radius-base: 0.25rem; /* 4px */
  --radius-md: 0.375rem; /* 6px */
  --radius-lg: 0.5rem; /* 8px */
  --radius-xl: 0.75rem; /* 12px */
  --radius-2xl: 1rem; /* 16px */
  --radius-3xl: 1.5rem; /* 24px */
  --radius-full: 9999px;

  /* =============================================================================
     Shadows & Effects
     ============================================================================= */

  /* Box Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --shadow-none: 0 0 rgba(0, 0, 0, 0);

  /* Colored Shadows */
  --shadow-primary: 0 4px 14px 0 rgba(239, 68, 68, 0.15);
  --shadow-accent: 0 4px 14px 0 rgba(217, 70, 239, 0.15);
  --shadow-success: 0 4px 14px 0 rgba(34, 197, 94, 0.15);
  --shadow-warning: 0 4px 14px 0 rgba(245, 158, 11, 0.15);
  --shadow-error: 0 4px 14px 0 rgba(239, 68, 68, 0.15);

  /* =============================================================================
     Transitions & Animations
     ============================================================================= */

  /* Transition Durations */
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;

  /* Transition Timing Functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Common Transitions */
  --transition-fast: all var(--duration-150) var(--ease-out);
  --transition-base: all var(--duration-200) var(--ease-out);
  --transition-slow: all var(--duration-300) var(--ease-out);
  --transition-color:
    color var(--duration-150) var(--ease-out), background-color var(--duration-150) var(--ease-out),
    border-color var(--duration-150) var(--ease-out);
  --transition-transform: transform var(--duration-200) var(--ease-out);
  --transition-opacity: opacity var(--duration-200) var(--ease-out);

  /* =============================================================================
     Z-Index Layers
     ============================================================================= */

  --z-base: 0;
  --z-content: 10;
  --z-header: 100;
  --z-overlay: 1000;
  --z-modal: 2000;
  --z-popover: 3000;
  --z-tooltip: 4000;
  --z-toast: 5000;

  /* =============================================================================
     Breakpoints (for JavaScript usage)
     ============================================================================= */

  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* =============================================================================
     Component-Specific Variables
     ============================================================================= */

  /* Button Variables */
  --button-height-sm: 2rem;
  --button-height-md: 2.5rem;
  --button-height-lg: 3rem;
  --button-padding-x-sm: var(--space-3);
  --button-padding-x-md: var(--space-4);
  --button-padding-x-lg: var(--space-6);

  /* Input Variables */
  --input-height-sm: 2rem;
  --input-height-md: 2.5rem;
  --input-height-lg: 3rem;
  --input-padding-x: var(--space-3);
  --input-border-width: 1px;

  /* Card Variables */
  --card-padding: var(--space-6);
  --card-radius: var(--radius-lg);
  --card-border-width: 1px;

  /* Modal Variables */
  --modal-backdrop: rgba(0, 0, 0, 0.5);
  --modal-max-width: 32rem;
  --modal-padding: var(--space-6);
  --modal-radius: var(--radius-lg);

  /* =============================================================================
     Semantic Theme Variables (Light Mode)
     ============================================================================= */

  /* Background Colors */
  --bg-page: var(--color-neutral-50);
  --bg-surface: white;
  --bg-surface-elevated: white;
  --bg-surface-hover: var(--color-neutral-100);
  --bg-surface-active: var(--color-neutral-200);

  /* Text Colors */
  --text-primary: var(--color-neutral-900);
  --text-secondary: var(--color-neutral-600);
  --text-tertiary: var(--color-neutral-500);
  --text-inverse: white;
  --text-link: var(--color-primary-600);
  --text-link-hover: var(--color-primary-700);

  /* Border Colors */
  --border-primary: var(--color-neutral-200);
  --border-secondary: var(--color-neutral-300);
  --border-focus: var(--color-primary-500);
  --border-error: var(--color-error-500);
  --border-success: var(--color-success-500);

  /* Interactive Colors */
  --interactive-primary: var(--color-primary-600);
  --interactive-primary-hover: var(--color-primary-700);
  --interactive-primary-active: var(--color-primary-800);
  --interactive-secondary: var(--color-neutral-600);
  --interactive-secondary-hover: var(--color-neutral-700);
  --interactive-secondary-active: var(--color-neutral-800);
}

/* =============================================================================
   Dark Mode Theme
   ============================================================================= */

[data-theme='dark'] {
  /* Background Colors */
  --bg-page: var(--color-neutral-900);
  --bg-surface: var(--color-neutral-800);
  --bg-surface-elevated: var(--color-neutral-700);
  --bg-surface-hover: var(--color-neutral-700);
  --bg-surface-active: var(--color-neutral-600);

  /* Text Colors */
  --text-primary: var(--color-neutral-100);
  --text-secondary: var(--color-neutral-300);
  --text-tertiary: var(--color-neutral-400);
  --text-inverse: var(--color-neutral-900);
  --text-link: var(--color-primary-400);
  --text-link-hover: var(--color-primary-300);

  /* Border Colors */
  --border-primary: var(--color-neutral-700);
  --border-secondary: var(--color-neutral-600);
  --border-focus: var(--color-primary-500);
  --border-error: var(--color-error-500);
  --border-success: var(--color-success-500);

  /* Interactive Colors */
  --interactive-primary: var(--color-primary-500);
  --interactive-primary-hover: var(--color-primary-400);
  --interactive-primary-active: var(--color-primary-300);
  --interactive-secondary: var(--color-neutral-400);
  --interactive-secondary-hover: var(--color-neutral-300);
  --interactive-secondary-active: var(--color-neutral-200);

  /* Shadows (adjusted for dark mode) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

/* =============================================================================
   High Contrast Mode
   ============================================================================= */

[data-theme='high-contrast'] {
  /* Background Colors */
  --bg-page: black;
  --bg-surface: black;
  --bg-surface-elevated: #1a1a1a;
  --bg-surface-hover: #333333;
  --bg-surface-active: #4d4d4d;

  /* Text Colors */
  --text-primary: white;
  --text-secondary: #e6e6e6;
  --text-tertiary: #cccccc;
  --text-inverse: black;
  --text-link: #66b3ff;
  --text-link-hover: #99ccff;

  /* Border Colors */
  --border-primary: #666666;
  --border-secondary: #999999;
  --border-focus: #ffff00;
  --border-error: #ff6666;
  --border-success: #66ff66;

  /* Interactive Colors */
  --interactive-primary: #0066cc;
  --interactive-primary-hover: #0080ff;
  --interactive-primary-active: #0099ff;
  --interactive-secondary: #666666;
  --interactive-secondary-hover: #808080;
  --interactive-secondary-active: #999999;
}

/* =============================================================================
   Reduced Motion
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-75: 0ms;
    --duration-100: 0ms;
    --duration-150: 0ms;
    --duration-200: 0ms;
    --duration-300: 0ms;
    --duration-500: 0ms;
    --duration-700: 0ms;
    --duration-1000: 0ms;

    --transition-fast: none;
    --transition-base: none;
    --transition-slow: none;
    --transition-color: none;
    --transition-transform: none;
    --transition-opacity: none;
  }
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
  :root {
    /* Optimize colors for print */
    --text-primary: black;
    --text-secondary: #333333;
    --text-tertiary: #666666;
    --bg-page: white;
    --bg-surface: white;
    --border-primary: #cccccc;

    /* Remove shadows for print */
    --shadow-sm: none;
    --shadow-base: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
    --shadow-2xl: none;
  }
}

/* Variables and Base Styles */

/*
 * Rally design system variables.
 * Shared colors, typography, spacing, and component tokens.
 */

:root {
  /* Font System */
  --font-primary:
    'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Maple Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  --font-display: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Font Sizes */
  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem; /* 36px */

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;

  /* Color Palette - Rally Theme */
  --color-primary-50: #fef7ff;
  --color-primary-100: #fce8ff;
  --color-primary-200: #f9d1ff;
  --color-primary-300: #f5a9ff;
  --color-primary-400: #ee70ff;
  --color-primary-500: #e338ff;
  --color-primary-600: #d016e8;
  --color-primary-700: #b00cc4;
  --color-primary-800: #8f0a9f;
  --color-primary-900: #760a82;

  /* Secondary Color - Purple */
  --color-secondary-50: #f3f0ff;
  --color-secondary-100: #e9e3ff;
  --color-secondary-200: #d5ccff;
  --color-secondary-300: #b8a5ff;
  --color-secondary-400: #9674ff;
  --color-secondary-500: #7c3aed;
  --color-secondary-600: #6d28d9;
  --color-secondary-700: #5b21b6;
  --color-secondary-800: #4c1d95;
  --color-secondary-900: #3c1a78;

  /* Accent Color - Pink */
  --color-accent-50: #fff0f6;
  --color-accent-100: #ffe3ee;
  --color-accent-200: #ffccd7;
  --color-accent-300: #ffa0b4;
  --color-accent-400: rgb(248, 165, 194);
  --color-accent-500: #ff1f7a;
  --color-accent-600: #e60965;
  --color-accent-700: #c2024e;
  --color-accent-800: #a10043;
  --color-accent-900: #8a003d;

  /* Neutral Colors */
  --color-neutral-50: #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;
  --color-neutral-900: #0f172a;

  /* Success, Warning, Error Colors */
  --color-success-50: #f0fdf4;
  --color-success-500: #22c55e;
  --color-success-600: #16a34a;

  --color-warning-50: #fffbeb;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;

  --color-error-50: #fef2f2;
  --color-error-500: #ef4444;
  --color-error-600: #dc2626;

  /* Semantic Color Assignments */
  --color-background: var(--color-neutral-50);
  --color-background-secondary: var(--color-neutral-100);
  --color-surface: #ffffff;
  --color-surface-secondary: var(--color-neutral-50);

  --color-text-primary: var(--color-neutral-900);
  --color-text-secondary: var(--color-neutral-600);
  --color-text-tertiary: var(--color-neutral-500);
  --color-text-inverse: #ffffff;

  --color-border-light: var(--color-neutral-200);
  --color-border-medium: var(--color-neutral-300);
  --color-border-strong: var(--color-neutral-400);

  /* Interactive States */
  --color-interactive-primary: var(--color-accent-500);
  --color-interactive-primary-hover: var(--color-accent-600);
  --color-interactive-primary-active: var(--color-accent-700);
  --color-interactive-primary-disabled: var(--color-neutral-300);

  --color-interactive-secondary: var(--color-neutral-500);
  --color-interactive-secondary-hover: var(--color-neutral-600);
  --color-interactive-secondary-active: var(--color-neutral-700);

  /* Theme-specific hover states */
  --color-hover-light: var(--color-accent-50);
  --color-hover-medium: var(--color-accent-100);
  --color-hover-strong: var(--color-accent-200);
  --color-hover-text: var(--color-accent-700);

  /* Button Specific Colors */
  --color-button-primary-bg: var(--color-accent-500);
  --color-button-primary-hover: var(--color-accent-600);
  --color-button-primary-active: var(--color-accent-700);
  --color-button-primary-disabled: var(--color-neutral-300);
  --color-button-primary-text: var(--color-text-inverse);

  --color-button-secondary-bg: var(--color-neutral-200);
  --color-button-secondary-hover: var(--color-neutral-300);
  --color-button-secondary-active: var(--color-neutral-400);
  --color-button-secondary-text: var(--color-text-primary);

  /* Responsive Breakpoints */
  --breakpoint-xs: 360px;
  --breakpoint-sm: 480px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1440px;

  /* Spacing Scale */
  --space-0: 0;
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-8: 2rem; /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px */
  --space-16: 4rem; /* 64px */
  --space-20: 5rem; /* 80px */
  --space-24: 6rem; /* 96px */

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem; /* 2px */
  --radius-base: 0.25rem; /* 4px */
  --radius-md: 0.375rem; /* 6px */
  --radius-lg: 0.5rem; /* 8px */
  --radius-xl: 0.75rem; /* 12px */
  --radius-2xl: 1rem; /* 16px */
  --radius-3xl: 1.5rem; /* 24px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Colored Shadows */
  --shadow-primary: 0 4px 16px rgba(255, 107, 157, 0.3);
  --shadow-primary-lg: 0 8px 32px rgba(255, 107, 157, 0.4);
  --shadow-secondary: 0 4px 16px rgba(124, 58, 237, 0.3);
  --shadow-accent: 0 4px 16px rgba(255, 31, 122, 0.3);

  /* Z-Index Scale - Systematic layering */
  --z-background: -1;
  --z-base: 0;
  --z-content: 1;
  --z-header: 10;
  --z-overlay: 100;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  --z-debug: 9999;

  /* Component-specific z-indexes */
  --z-wallet: var(--z-header);
  --z-chat-input: calc(var(--z-header) + 1);
  --z-affection: var(--z-header);
  --z-actions-menu: calc(var(--z-header) + 2);
  --z-visual-novel: var(--z-overlay);
  --z-message-overlay: calc(var(--z-overlay) + 1);
  --z-settings-panel: var(--z-modal);

  /* Live2D positioning */
  --live2d-translate-y: -14%;

  /* Affection theme colors */
  --color-affection-outline: rgb(248, 165, 194);
  --color-gift-red: #ef4444; /* gift icon red */

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-all: all var(--transition-base);

  /* Common Transforms */
  --transform-scale-sm: scale(0.95);
  --transform-scale-base: scale(1);
  --transform-scale-md: scale(1.05);
  --transform-scale-lg: scale(1.1);
  --transform-lift-sm: translateY(-1px);
  --transform-lift-md: translateY(-2px);
  --transform-lift-lg: translateY(-4px);

  /* Layout System - Fixed Element Coordination */
  --layout-header-height: 60px;
  --layout-wallet-width: 200px;
  --layout-sidebar-width: 560px;
  --layout-sidebar-width-half: 280px;
  --layout-chat-input-height: 80px;
  --layout-affection-width: 120px;

  /* Safe areas to prevent overlap */
  --safe-area-top: calc(var(--layout-header-height) + var(--space-2));
  --safe-area-right: calc(var(--layout-wallet-width) + var(--space-3));
  --safe-area-bottom: calc(var(--layout-chat-input-height) + var(--space-2));
  --safe-area-left: calc(var(--layout-affection-width) + var(--space-3));

  /* Component Specific Variables */
  --input-height: 2.75rem;
  --button-height: 2.75rem;
  --button-height-sm: 2.25rem;
  --button-height-lg: 3rem;

  /* Chat Interface Specific */
  --chat-input-bg: rgba(255, 255, 255, 0.65);
  --chat-input-border: rgba(255, 255, 255, 0.4);
  --chat-bubble-user: var(--color-neutral-200);
  --chat-bubble-assistant: var(--color-accent-200);

  /* Panel Colors */
  --panel-bg: rgba(255, 255, 255, 0.95);
  --panel-border: rgba(255, 182, 193, 0.3);
  --panel-shadow: var(--shadow-primary);

  /* Glass Morphism Effects */
  --glass-bg-light: rgba(255, 255, 255, 0.14);
  --glass-bg-medium: rgba(255, 255, 255, 0.22);
  --glass-bg-strong: rgba(255, 255, 255, 0.82);
  --glass-bg-ultra: rgba(255, 255, 255, 0.08);
  --glass-blur-light: blur(10px);
  --glass-blur-medium: blur(16px);
  --glass-blur-strong: blur(24px);
  --glass-border-light: rgba(255, 255, 255, 0.18);
  --glass-border-medium: rgba(255, 255, 255, 0.32);
  --glass-border-strong: rgba(255, 255, 255, 0.5);
  --glass-border-inner: rgba(255, 255, 255, 0.35);
  --glass-highlight: rgba(255, 255, 255, 0.28);
  --glass-shadow: rgba(0, 0, 0, 0.14);
  --glass-sheen: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.06) 100%
  );

  /* Dropdown Theming */
  --dropdown-bg: var(--color-surface);
  --dropdown-border: var(--color-border-light);
  --dropdown-shadow: var(--shadow-lg);
  --dropdown-item-hover: var(--color-hover-light);
  --dropdown-item-hover-text: var(--color-hover-text);
  --dropdown-divider: var(--color-border-light);

  /* Danger/Logout States */
  --color-danger-bg: var(--color-error-50);
  --color-danger-hover: #fef2f2;
  --color-danger-text: var(--color-error-500);
  --color-danger-text-hover: var(--color-error-600);

  /* Common Shadows */
  --shadow-button: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-button-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-glass: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-pink-sm: 0 2px 8px rgba(255, 107, 157, 0.3);
  --shadow-pink-md: 0 4px 12px rgba(255, 182, 193, 0.2);

  /* Common Gradients */
  --gradient-background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --gradient-pink: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
  --gradient-accent: linear-gradient(
    135deg,
    var(--color-accent-100) 0%,
    var(--color-accent-200) 100%
  );

  /* Global Font Assignment */
  font-family: var(--font-primary);
  color-scheme: light;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Legacy Support - Keep for backwards compatibility */
  --background-color: var(--color-background);
  --text-color: var(--color-text-primary);
  --primary-color: var(--color-accent-500);
  --secondary-color: var(--color-secondary-500);
  --accent-color: var(--color-accent-300);
  --border-light: var(--color-border-light);
  --border-medium: var(--color-border-medium);
  --border-dark: var(--color-border-strong);
  --button-background: var(--color-button-primary-bg);
  --button-text-color: var(--color-button-primary-text);
  --button-hover-bg: var(--color-button-primary-hover);
  --button-active-bg: var(--color-button-primary-active);
  --drop-shadow: var(--shadow-primary);
  --subtle-shadow: var(--shadow-sm);

  /* Additional legacy variables */
  --border-radius: var(--radius-xl);
  --button-radius: var(--radius-full);
  --card-radius: var(--radius-2xl);
  --card-padding: var(--space-6);
  --content-max-width: 1200px;
  --content-padding: var(--space-8);
}

/* Reusable Animations */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Global styles */

:root {
  --rally-stage-width: 1920px;
  --rally-stage-height: 1080px;
  --rally-stage-scale: 1;
  --rally-stage-left: 0px;
  --rally-stage-top: 0px;
  --rally-experience-scale: var(--rally-stage-scale);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll */
  overflow-y: hidden;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh; /* Minimum height, can expand */
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #000;
  background-image: none;
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-normal);
}

/* Ensure React root doesn't constrain height */

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.app-shell-scale {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.app {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--rally-stage-width);
  height: var(--rally-stage-height);
  min-height: var(--rally-stage-height);
  transform: translate3d(var(--rally-stage-left), var(--rally-stage-top), 0)
    scale(var(--rally-stage-scale));
  transform-origin: top left;
  overflow: hidden;
  background: #000;
}

#root {
  min-height: 100vh;
  width: 100%;
  position: relative;
  background: #000;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(90deg, var(--color-accent-500), var(--color-secondary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  letter-spacing: 0.05em;
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
  letter-spacing: 0.03em;
}

h3 {
  font-size: var(--font-size-xl);
  letter-spacing: 0.02em;
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-base);
}

h6 {
  font-size: var(--font-size-sm);
}

p {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--color-accent-500);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-600);
}

/* Button styles */

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--button-radius);
  background: var(--color-button-primary-bg);
  color: var(--color-button-primary-text);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  min-height: var(--button-height);
}

button:hover,
.button:hover {
  background: var(--color-button-primary-hover);
  transform: translateY(-1px);
  box-shadow: none;
}

button:active,
.button:active {
  background: var(--color-button-primary-active);
  transform: translateY(0);
  box-shadow: none;
}

button:disabled,
.button:disabled {
  background: var(--color-button-primary-disabled);
  color: var(--color-text-tertiary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Input styles */

input,
textarea,
select {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
}

/* Monospace elements */

code,
pre,
.font-mono {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 182, 193, 0.05); /* Very subtle pink track */
  border-radius: var(--radius-base);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 182, 193, 0.15); /* Subtle pink thumb */
  border-radius: var(--radius-base);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 182, 193, 0.25); /* Slightly more visible on hover */
}

/* Firefox scrollbar */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 182, 193, 0.15) rgba(255, 182, 193, 0.05);
}

/* Layout */

/* 
 * Layout styles for landing page 
 */

/* Animated Text Background */

.animated-text-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  overflow: hidden;
  pointer-events: none;
}

.animated-text-container {
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  transform: rotate(var(--text-animation-angle));
  animation: moveTextBackground var(--text-animation-duration) linear infinite;
  overflow: visible;
}

.animated-text-line {
  position: absolute;
  white-space: nowrap;
  color: var(--text-animation-color);
  font-size: var(--text-animation-font-size);
  font-weight: 900;
  line-height: var(--text-animation-line-height);
  letter-spacing: var(--text-animation-spacing);
  text-transform: uppercase;
  width: 300%;
}

@keyframes moveTextBackground {
  0% {
    transform: rotate(var(--text-animation-angle)) translateY(0);
  }
  100% {
    transform: rotate(var(--text-animation-angle))
      translateY(calc(-1 * var(--text-animation-line-height)));
  }
}

/* Position lines for animated background */

.animated-text-line:nth-child(1) {
  top: 0%;
}

.animated-text-line:nth-child(2) {
  top: var(--text-animation-line-height);
}

.animated-text-line:nth-child(3) {
  top: calc(2 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(4) {
  top: calc(3 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(5) {
  top: calc(4 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(6) {
  top: calc(5 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(7) {
  top: calc(6 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(8) {
  top: calc(7 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(9) {
  top: calc(8 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(10) {
  top: calc(9 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(11) {
  top: calc(10 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(12) {
  top: calc(11 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(13) {
  top: calc(12 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(14) {
  top: calc(13 * var(--text-animation-line-height));
}

.animated-text-line:nth-child(15) {
  top: calc(14 * var(--text-animation-line-height));
}

/* Single page layout */

.landing-container {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    'live2d info'
    'footer footer';
  gap: 0;
  padding: 0;
  overflow-y: auto;
  max-width: 100%;
}

/* Live2D showcase */

.live2d-showcase {
  grid-area: live2d;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  position: relative;
  min-height: 550px;
  height: auto;
  box-sizing: border-box;
  overflow: visible;
}

/* Info section */

.info-section {
  grid-area: info;
  padding: var(--content-padding);
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 100vh;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

/* Navigation container */

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Navigation links */

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover:after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

.nav-link.active:after {
  width: 100%;
}

/* Content sections */

.content-section {
  display: none;
  opacity: 1;
  transition:
    opacity 0.3s ease,
    transform 0.4s ease;
}

.content-section.active {
  display: block;
}

/* Content section animations */

.content-enter {
  animation: contentEnter 0.5s ease forwards;
}

.content-exit {
  animation: contentExit 0.3s ease forwards;
}

@keyframes contentEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes contentExit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Content container for large screens */

.content-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

/* Footer */

footer {
  grid-area: footer;
  padding: 1.5rem 0;
  background-color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 70px;
}

.footer-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0 var(--content-padding);
  /* Use the same grid layout as the main container */
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 100%;
}

.footer-logo {
  height: 30px;
  grid-column: 1;
  padding-left: 1.5rem;
}

.footer-logo img {
  height: 100%;
  width: auto;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 2rem;
  grid-column: 2;
  justify-self: end;
  padding-right: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  color: #ffffff;
  opacity: 0.8;
  transition:
    opacity 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-social a img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.footer-social a:hover img {
  filter: brightness(0) invert(0.9) sepia(1) saturate(5) hue-rotate(300deg);
}

.footer-copyright {
  color: #ffffff;
  opacity: 0.7;
  font-size: 0.85rem;
}

/* For very large screens */

@media (min-width: 1921px) {
  .landing-container {
    max-width: 100%;
  }

  .live2d-showcase,
  .info-section {
    margin-left: auto;
    margin-right: auto;
  }

  .live2d-showcase {
    max-width: calc(var(--content-max-width) / 2);
  }

  .info-section {
    max-width: calc(var(--content-max-width) / 2);
  }

  footer {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .footer-content {
    max-width: 100%;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
}

/* Media queries for responsive design */

@media (max-width: 1024px) {
  .landing-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      'live2d'
      'info'
      'footer';
    height: auto;
    overflow-y: auto;
  }

  .live2d-showcase {
    height: 50vh;
    min-height: 500px;
    padding: 1rem;
  }

  .info-section {
    max-height: none;
    padding: 1.5rem 1rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    justify-content: center;
    width: 100%;
  }

  .nav-buttons {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Remove fixed height constraints for scrollable layout */
  html,
  body {
    overflow-y: auto;
    height: auto;
  }

  .landing-container {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  .live2d-showcase {
    min-height: 550px;
    height: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto 1rem;
    padding: 1rem;
    overflow: visible;
  }

  .info-section {
    padding: var(--content-padding);
    overflow-y: auto;
    height: auto;
    max-height: none;
    width: 100%;
    box-sizing: border-box;
  }

  footer {
    flex-shrink: 0;
    min-height: 70px;
    padding: 0.75rem 1rem;
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    display: flex; /* Override grid for mobile */
  }

  .footer-logo {
    padding-left: 0;
  }

  .footer-right {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-right: 0;
    justify-self: center;
  }

  .footer-social {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }

  .footer-social a {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
  }

  .footer-copyright {
    text-align: center;
    font-size: 0.75rem;
  }
}

/* Mobile optimization for one-page aesthetic */

@media (max-width: 480px) {
  .live2d-showcase {
    padding: 0.75rem;
    margin: 0.5rem auto 1rem;
    width: 100%;
    min-height: 450px;
    max-height: 550px;
    overflow: visible;
    box-sizing: border-box;
  }

  .info-section {
    padding: 1rem 0.75rem;
  }

  footer {
    min-height: 60px;
    padding: 0.5rem;
    width: 100vw; /* Ensure full width */
  }

  .footer-logo {
    height: 24px;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 1rem;
  }

  /* Make content panels more compact */
  .panel {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .panel-header {
    margin-bottom: 1rem;
  }
}

/* Landscape mode optimizations */

@media (max-width: 1024px) and (orientation: landscape) {
  .landing-container {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'live2d info'
      'footer footer';
    height: auto;
    min-height: 100vh;
  }

  .live2d-showcase {
    height: auto;
    min-height: 85vh;
    padding: 0.75rem;
    box-sizing: border-box;
    overflow: visible;
  }

  .info-section {
    max-height: none;
    padding: 1rem;
    overflow-y: auto;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .landing-container {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'live2d info'
      'footer footer';
    height: auto;
    min-height: 100vh;
    display: grid;
  }

  .live2d-showcase {
    min-height: 85vh;
    height: auto;
    margin: 0;
    padding: 0.5rem;
    box-sizing: border-box;
    overflow: visible;
  }

  .info-section {
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 1rem;
  }

  .panel {
    margin-bottom: 1rem;
  }

  footer {
    padding: 0.5rem var(--content-padding);
  }
}

/* Font Face Declarations (disabled: fall back to system fonts to avoid 404 font decode errors in dev)
   If custom fonts are needed, place files under apps/client/public/fonts and re-enable. */

/* Global styles are handled in base.css - removing duplicates */

/* Utility Classes */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus Styles */

:focus {
  outline: 2px solid var(--color-accent-300);
  outline-offset: 2px;
}

/* Selection Styles */

::selection {
  background: var(--color-accent-200);
  color: var(--color-accent-900);
}

/* Scrollbar styles are handled in base.css */

.bio-header-content {
  display: flex;
  align-items: center; /* Vertically align items in the center */
  gap: 1.5rem; /* Space between picture and text */
  margin-bottom: 1.5rem; /* Space below the header content */
}

.profile-picture {
  display: block;
  max-width: 150px; /* Reduced size */
  /* margin: 1rem auto; Remove auto margin for flex control */
  margin: 0; /* Reset margin, flex gap will handle spacing */
  border-radius: 50%;
  border: 3px solid var(--primary-color, #ff9bbe); /* Use theme color if available */
  flex-shrink: 0; /* Prevent image from shrinking */
}

/* Optional: Adjust panel-header within flex layout if needed */

.bio-header-content .panel-header {
  text-align: left; /* Align text to the left */
  flex-grow: 1; /* Allow text content to take available space */
}
