/**
 * ============================================================================
 * EXHIBITIONS DESIGN SYSTEM & THEME TOKENS
 * ============================================================================
 * Brand Colors: Primary Amber/Orange (#f69400), Secondary Azure/Blue (#04a2ff)
 * Supports automatic prefers-color-scheme: dark and optional data-theme attributes.
 * All color combinations strictly comply with WCAG AA contrast standards.
 */

/* ----------------------------------------------------------------------------
 * LIGHT MODE (DEFAULT TOKENS)
 * ---------------------------------------------------------------------------- */
:root,
:root[data-theme="light"] {
  /* Color Scheme Indicator for Browsers */
  color-scheme: light;

  /* Brand Palette & Shaded Variations */
  --color-brand-orange: #f69400;
  --color-brand-orange-hover: #e08600;
  --color-brand-orange-active: #c77600;
  --color-brand-orange-subtle: rgba(246, 148, 0, 0.1);
  --color-brand-orange-text: #b86900; /* Contrast >= 4.5:1 on light backgrounds */

  --color-brand-blue: #04a2ff;
  --color-brand-blue-hover: #008ae6;
  --color-brand-blue-active: #0073c2;
  --color-brand-blue-subtle: rgba(4, 162, 255, 0.1);
  --color-brand-blue-text: #0072c6; /* Contrast >= 4.5:1 on light backgrounds */

  --color-brand-gradient: linear-gradient(135deg, #f69400 0%, #04a2ff 100%);
  --color-brand-gradient-subtle: linear-gradient(135deg, rgba(246, 148, 0, 0.08) 0%, rgba(4, 162, 255, 0.08) 100%);

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc; /* Slate 50 */
  --bg-tertiary: #f1f5f9;  /* Slate 100 */
  --bg-subtle: #e2e8f0;    /* Slate 200 */
  --bg-overlay: rgba(15, 23, 42, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.85);

  /* Surface & Card Colors */
  --surface-card: #ffffff;
  --surface-card-hover: #f8fafc;
  --surface-elevated: #ffffff;
  --surface-modal: #ffffff;
  --surface-input: #ffffff;
  --surface-input-hover: #f8fafc;
  --surface-input-focus: #ffffff;

  /* Typography & Text Colors (WCAG AA Compliant) */
  --text-primary: #0f172a;    /* Slate 900 - Contrast 15.6:1 */
  --text-secondary: #334155;  /* Slate 700 - Contrast 9.5:1 */
  --text-tertiary: #475569;   /* Slate 600 - Contrast 7.0:1 */
  --text-muted: #64748b;      /* Slate 500 - Contrast 4.6:1 */
  --text-inverse: #ffffff;    /* Contrast 15.6:1 on dark surfaces */
  --text-brand-primary: var(--color-brand-orange-text);
  --text-brand-secondary: var(--color-brand-blue-text);
  --text-link: #0072c6;
  --text-link-hover: #00508c;

  /* Border & Divider Tokens */
  --border-color: #e2e8f0;         /* Slate 200 */
  --border-color-subtle: #f1f5f9;  /* Slate 100 */
  --border-color-hover: #cbd5e1;   /* Slate 300 */
  --border-color-focus: #04a2ff;
  --border-color-brand: rgba(246, 148, 0, 0.4);

  /* Shadow Tokens */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  --shadow-glow-brand: 0 0 20px rgba(246, 148, 0, 0.25);
  --shadow-glow-blue: 0 0 20px rgba(4, 162, 255, 0.25);

  /* Border Radii Tokens */
  --radius-none: 0px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Typography System */
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;     /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-md: 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-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.2;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;

  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0em;
  --letter-spacing-wide: 0.025em;

  /* Animation & Transition Timings */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Status Colors */
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-error: #ef4444;
  --color-error-bg: #fef2f2;
  --color-info: #04a2ff;
  --color-info-bg: #f0f9ff;
}

/* ----------------------------------------------------------------------------
 * DARK MODE INVERSION (SLATE / NAVY PALETTE)
 * Triggered automatically by prefers-color-scheme or manually via [data-theme="dark"]
 * ---------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    /* Brand Palette - Adjusted for Dark Surfaces */
    --color-brand-orange: #f69400;
    --color-brand-orange-hover: #ffaa2c;
    --color-brand-orange-active: #ffb74d;
    --color-brand-orange-subtle: rgba(246, 148, 0, 0.18);
    --color-brand-orange-text: #f69400; /* Contrast >= 7.2:1 on dark slate */

    --color-brand-blue: #04a2ff;
    --color-brand-blue-hover: #38bdf8;
    --color-brand-blue-active: #7dd3fc;
    --color-brand-blue-subtle: rgba(4, 162, 255, 0.18);
    --color-brand-blue-text: #38bdf8; /* Contrast >= 9.1:1 on dark slate */

    --color-brand-gradient: linear-gradient(135deg, #f69400 0%, #04a2ff 100%);
    --color-brand-gradient-subtle: linear-gradient(135deg, rgba(246, 148, 0, 0.15) 0%, rgba(4, 162, 255, 0.15) 100%);

    /* Background Colors (Deep Slate / Navy Palette) */
    --bg-primary: #0f172a;    /* Slate 900 */
    --bg-secondary: #0b0f19;  /* Navy Deep */
    --bg-tertiary: #1e293b;   /* Slate 800 */
    --bg-subtle: #334155;     /* Slate 700 */
    --bg-overlay: rgba(0, 0, 0, 0.75);
    --bg-glass: rgba(15, 23, 42, 0.85);

    /* Surface & Card Colors */
    --surface-card: #1e293b;         /* Slate 800 */
    --surface-card-hover: #273549;   /* Slate 750 */
    --surface-elevated: #334155;     /* Slate 700 */
    --surface-modal: #1e293b;        /* Slate 800 */
    --surface-input: #0f172a;        /* Slate 900 */
    --surface-input-hover: #1e293b;  /* Slate 800 */
    --surface-input-focus: #1e293b;

    /* Typography & Text Colors (WCAG AA Compliant on Dark Backgrounds) */
    --text-primary: #f8fafc;    /* Slate 50 - Contrast 15.8:1 */
    --text-secondary: #cbd5e1;  /* Slate 300 - Contrast 9.9:1 */
    --text-tertiary: #94a3b8;   /* Slate 400 - Contrast 5.4:1 */
    --text-muted: #94a3b8;      /* Slate 400 - Contrast 5.4:1 */
    --text-inverse: #0f172a;    /* Contrast 15.8:1 on light text elements */
    --text-brand-primary: var(--color-brand-orange-text);
    --text-brand-secondary: var(--color-brand-blue-text);
    --text-link: #38bdf8;
    --text-link-hover: #7dd3fc;

    /* Border & Divider Tokens */
    --border-color: #334155;         /* Slate 700 */
    --border-color-subtle: #1e293b;  /* Slate 800 */
    --border-color-hover: #475569;   /* Slate 600 */
    --border-color-focus: #04a2ff;
    --border-color-brand: rgba(246, 148, 0, 0.5);

    /* Shadow Tokens (Dark Mode Depth & Vibrant Glows) */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
    --shadow-glow-brand: 0 0 25px rgba(246, 148, 0, 0.35);
    --shadow-glow-blue: 0 0 25px rgba(4, 162, 255, 0.35);

    /* Status Backgrounds in Dark Mode */
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-warning-bg: rgba(245, 158, 11, 0.15);
    --color-error-bg: rgba(239, 68, 68, 0.15);
    --color-info-bg: rgba(4, 162, 255, 0.15);
  }
}

/* Explicit data-theme="dark" attribute support (Override for manual toggle) */
:root[data-theme="dark"] {
  color-scheme: dark;

  --color-brand-orange: #f69400;
  --color-brand-orange-hover: #ffaa2c;
  --color-brand-orange-active: #ffb74d;
  --color-brand-orange-subtle: rgba(246, 148, 0, 0.18);
  --color-brand-orange-text: #f69400;

  --color-brand-blue: #04a2ff;
  --color-brand-blue-hover: #38bdf8;
  --color-brand-blue-active: #7dd3fc;
  --color-brand-blue-subtle: rgba(4, 162, 255, 0.18);
  --color-brand-blue-text: #38bdf8;

  --color-brand-gradient: linear-gradient(135deg, #f69400 0%, #04a2ff 100%);
  --color-brand-gradient-subtle: linear-gradient(135deg, rgba(246, 148, 0, 0.15) 0%, rgba(4, 162, 255, 0.15) 100%);

  --bg-primary: #0f172a;
  --bg-secondary: #0b0f19;
  --bg-tertiary: #1e293b;
  --bg-subtle: #334155;
  --bg-overlay: rgba(0, 0, 0, 0.75);
  --bg-glass: rgba(15, 23, 42, 0.85);

  --surface-card: #1e293b;
  --surface-card-hover: #273549;
  --surface-elevated: #334155;
  --surface-modal: #1e293b;
  --surface-input: #0f172a;
  --surface-input-hover: #1e293b;
  --surface-input-focus: #1e293b;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  --text-brand-primary: var(--color-brand-orange-text);
  --text-brand-secondary: var(--color-brand-blue-text);
  --text-link: #38bdf8;
  --text-link-hover: #7dd3fc;

  --border-color: #334155;
  --border-color-subtle: #1e293b;
  --border-color-hover: #475569;
  --border-color-focus: #04a2ff;
  --border-color-brand: rgba(246, 148, 0, 0.5);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  --shadow-glow-brand: 0 0 25px rgba(246, 148, 0, 0.35);
  --shadow-glow-blue: 0 0 25px rgba(4, 162, 255, 0.35);

  --color-success-bg: rgba(16, 185, 129, 0.15);
  --color-warning-bg: rgba(245, 158, 11, 0.15);
  --color-error-bg: rgba(239, 68, 68, 0.15);
  --color-info-bg: rgba(4, 162, 255, 0.15);
}

/* ----------------------------------------------------------------------------
 * BASE GLOBAL STYLES & UTILITY CLASSES
 * ---------------------------------------------------------------------------- */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.theme-card {
  background-color: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.theme-card:hover {
  background-color: var(--surface-card-hover);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-lg);
}

.theme-text-brand-gradient {
  background: var(--color-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html,
body {
  margin: 0;
  height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

#can {
  width: 100%;
  height: 100%;
  display: block;
}

#menuPanel {
  position: absolute;
  background-color: var(--bg-glass);
  backdrop-filter: blur(8px);
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 420ms ease;
  z-index: 1000;
}

#menuPanel.is-exiting {
  opacity: 0;
  pointer-events: none;
}

#menuContent {
  position: relative;
  top: 57%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  width: min(92vw, 900px);
  flex-direction: column;
  gap: 22px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#menuStatus {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  transition: opacity 240ms ease, transform 240ms ease;
}

#menuStatus p {
  margin: 0;
}

.menuSpinner {
  width: 48px;
  height: 48px;
  border: 6px solid var(--border-color);
  border-top-color: var(--color-brand-orange);
  border-radius: var(--radius-full);
  animation: exh-spin 1s linear infinite;
}

#exhibitionTitle {
  max-width: min(86vw, 860px);
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: clamp(30px, 6vw, 64px);
  line-height: 1.08;
  font-weight: var(--font-weight-bold);
  overflow-wrap: anywhere;
  text-shadow: 0 2px 12px var(--shadow-xs);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms ease, transform 420ms ease;
}

#exhibitionTitle.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#menuActions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 420ms ease, transform 420ms ease;
}

#menuPanel.is-ready #menuActions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#menuPanel.is-ready #menuStatus {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

#menuPanel.is-action-started #menuActions {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

#menuActions button {
  height: 50px;
  min-width: 220px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

#menuActions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

#menuActions button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

#menuActions button:not(:disabled):active {
  transform: translateY(0);
}

#menuActions button:focus {
  outline: 3px solid var(--color-brand-blue-subtle);
  outline-offset: 3px;
}

#startButton.primaryAction {
  background-color: var(--color-brand-orange);
  color: #ffffff;
  border-color: var(--color-brand-orange);
}

#startButton.primaryAction:not(:disabled):hover {
  background: var(--color-brand-gradient);
  border-color: transparent;
}

#guidedTourButton.secondaryAction {
  background-color: var(--surface-card);
  color: var(--text-brand-secondary);
  border-color: var(--color-brand-blue);
}

#guidedTourButton.secondaryAction:not(:disabled):hover {
  background-color: var(--color-brand-blue);
  color: #ffffff;
}

#artworkNavigationControls {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1001;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
}

#artworkNavigationControls[hidden] {
  display: none;
}

#artworkNavigationControls button {
  height: 44px;
  min-width: 110px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-brand-blue);
  background-color: var(--surface-card);
  color: var(--text-brand-secondary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

#artworkNavigationControls button:not(:disabled):hover {
  background-color: var(--color-brand-blue);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

#artworkNavigationControls button:focus {
  outline: 3px solid var(--color-brand-blue-subtle);
  outline-offset: 2px;
}

#artworkNavigationControls button.artworkInfoBtn {
  border-color: var(--color-brand-orange, #f69400);
  color: var(--color-brand-orange-text, #f69400);
}

#artworkNavigationControls button.artworkInfoBtn:not(:disabled):hover {
  background-color: var(--color-brand-orange, #f69400);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(246, 148, 0, 0.35);
}

@media (max-width: 520px) {
  #artworkNavigationControls {
    bottom: 16px;
    width: calc(100vw - 20px);
    gap: 6px;
    padding: 0;
  }

  #artworkNavigationControls button {
    flex: 1 1 0px;
    min-width: 0;
    height: 42px;
    padding: 0 6px;
    font-size: 13px;
    gap: 4px;
  }

  #artworkNavigationControls button .navBtnIcon {
    font-size: 14px;
  }
}

#guidedTourControls {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

#guidedTourControls[hidden] {
  display: none;
}

#guidedTourControls button {
  height: 44px;
  min-width: 130px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-brand-blue);
  background-color: var(--surface-card);
  color: var(--text-brand-secondary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

#guidedTourControls button:not(:disabled):hover {
  background-color: var(--color-brand-blue);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

#guidedTourControls button:focus {
  outline: 3px solid var(--color-brand-blue-subtle);
  outline-offset: 3px;
}

@keyframes exh-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.viewerTopControls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1001;
  display: flex;
  gap: 10px;
  align-items: center;
}

.viewerIconButton {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--surface-card);
  color: var(--text-primary);
  font-size: 21px;
  font-weight: var(--font-weight-bold);
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.viewerIconButton:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.viewerIconButton:not(:disabled):hover {
  background-color: var(--color-brand-blue);
  border-color: var(--color-brand-blue);
  color: #ffffff;
}

.viewerIconButton:focus {
  outline: 3px solid var(--color-brand-blue-subtle);
  outline-offset: 2px;
}

.exhibitionInfoModal {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 72px 16px 16px;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
}

.exhibitionInfoModal[hidden] {
  display: none;
}

.exhibitionInfoModal__panel {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background-color: var(--surface-modal);
  color: var(--text-primary);
  box-shadow: var(--shadow-2xl);
  padding: 22px;
}

.exhibitionInfoModal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.exhibitionInfoModal__close:hover,
.exhibitionInfoModal__close:focus {
  background-color: var(--color-brand-blue-subtle);
  outline: none;
}

.exhibitionInfoModal__artist {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-right: 42px;
  margin-bottom: 18px;
}

.exhibitionInfoModal__portrait {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg-tertiary);
}

.exhibitionInfoModal__eyebrow {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.exhibitionInfoModal__artistName {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.exhibitionInfoModal__title {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.exhibitionInfoModal__description {
  color: var(--text-secondary);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
}

#exhibition-progress-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-2xl);
}

.exhibition-progress-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  color: var(--text-primary);
}

.artwork-info-tooltip {
  position: fixed;
  z-index: 2000;
  display: none;
  pointer-events: none;
  max-width: 320px;
  padding: 12px;
  border-radius: var(--radius-md);
  background-color: var(--surface-modal);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  box-shadow: var(--shadow-xl);
}

/* Premium Responsive Artwork Info Modal Dialog */
.artworkInfoModal {
  position: fixed;
  inset: 0;
  z-index: 1010;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
  animation: artworkModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.artworkInfoModal[hidden] {
  display: none;
}

.artworkInfoModal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 26, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.artworkInfoModal__panel {
  position: relative;
  z-index: 1;
  width: min(500px, calc(100vw - 24px));
  max-height: min(85vh, 680px);
  overflow-y: auto;
  border-radius: var(--radius-xl, 16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(26, 34, 52, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  color: #f8fafc;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(246, 148, 0, 0.15);
  padding: 24px;
  box-sizing: border-box;
  animation: artworkModalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes artworkModalScaleUp {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.artworkInfoModal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.artworkInfoModal__close:hover,
.artworkInfoModal__close:focus {
  background: rgba(246, 148, 0, 0.2);
  color: #ffffff;
  border-color: rgba(246, 148, 0, 0.5);
  outline: none;
}

.artworkInfoModal__topRow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-right: 36px;
}

.artworkInfoModal__thumbContainer {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.artworkInfoModal__thumbContainer[hidden] {
  display: none;
}

.artworkInfoModal__thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.artworkInfoModal__headerText {
  flex: 1;
  min-width: 0;
}

.artworkModal__titleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.artworkModal__likeBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.artworkModal__likeBtn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  transform: scale(1.08);
}

.artworkModal__likeBtn.is-liked,
.artworkModal__likeBtn.ldbtn {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.artworkModal__likeBtn.is-liked .artworkModal__likeIcon,
.artworkModal__likeBtn.ldbtn .artworkModal__likeIcon {
  fill: #ef4444;
  stroke: #ef4444;
}

.artworkInfoModal__badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(246, 148, 0, 0.15);
  color: #f69400;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.artworkInfoModal__badge[hidden] {
  display: none;
}

.artworkInfoModal__title {
  margin: 0;
  font-family: var(--font-heading, inherit);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.artworkInfoModal__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.artworkInfoModal__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.artworkInfoModal__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
}

.artworkInfoModal__value {
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
  word-break: break-word;
}

.artworkInfoModal__value.artworkInfoModal__price {
  font-weight: 700;
  color: #38bdf8;
  font-size: 15px;
}

.artworkInfoModal__descriptionSection {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.artworkInfoModal__description {
  font-size: 14px;
  line-height: 1.65;
  color: #cbd5e1;
  white-space: pre-line;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom subtle scrollbar for description and modal panel */
.artworkInfoModal__description::-webkit-scrollbar,
.artworkInfoModal__panel::-webkit-scrollbar {
  width: 6px;
}

.artworkInfoModal__description::-webkit-scrollbar-track,
.artworkInfoModal__panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.artworkInfoModal__description::-webkit-scrollbar-thumb,
.artworkInfoModal__panel::-webkit-scrollbar-thumb {
  background: rgba(246, 148, 0, 0.35);
  border-radius: 3px;
}

.artworkInfoModal__description::-webkit-scrollbar-thumb:hover,
.artworkInfoModal__panel::-webkit-scrollbar-thumb:hover {
  background: rgba(246, 148, 0, 0.6);
}

@media (max-width: 480px) {
  .artworkInfoModal__panel {
    padding: 18px;
  }
  .artworkInfoModal__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .artworkInfoModal__title {
    font-size: 18px;
  }
  .artworkInfoModal__thumbContainer {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
  }
}

/* Navigation Guide Modal Container */
.navigation-guide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  font-family: var(--font-sans);
  padding: 20px;
  box-sizing: border-box;
}

.navigation-guide[hidden] {
  display: none !important;
}

/* Glassmorphism Backdrop Overlay */
.navigation-guide__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 29, 0.78);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  z-index: -1;
  animation: navGuideFadeIn 0.3s ease-out forwards;
}

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

/* Main Content Panel */
.navigation-guide__content {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
  color: var(--text-primary, #f8fafc);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-2xl, 24px);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(246, 148, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  width: 100%;
  max-width: 860px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 36px;
  z-index: 10001;
  animation: navGuidePopUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
}

/* Custom Scrollbar */
.navigation-guide__content::-webkit-scrollbar {
  width: 6px;
}
.navigation-guide__content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}
.navigation-guide__content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.navigation-guide__content::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand-orange, #f69400);
}

@keyframes navGuidePopUp {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Top Close Cross Button */
.navigation-guide__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  padding: 0;
}

.navigation-guide__close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg) scale(1.08);
}

.navigation-guide__close:focus-visible {
  box-shadow: 0 0 0 2px var(--color-brand-blue, #04a2ff);
}

/* Header Section */
.navigation-guide__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

.navigation-guide__badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(246, 148, 0, 0.2) 0%, rgba(4, 162, 255, 0.2) 100%);
  border: 1px solid rgba(246, 148, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-orange, #f69400);
  margin-bottom: 12px;
  box-shadow: 0 0 20px rgba(246, 148, 0, 0.2);
}

.navigation-guide__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* Grid Layout for Cards */
.navigation-guide__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* Individual Feature Card */
.navigation-guide__card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl, 16px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navigation-guide__card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(246, 148, 0, 0.3);
  transform: translateY(-3px);
  box-shadow: 
    0 12px 24px -8px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(246, 148, 0, 0.1);
}

/* Card Header */
.navigation-guide__card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navigation-guide__card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(246, 148, 0, 0.12);
  border: 1px solid rgba(246, 148, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-orange, #f69400);
  flex-shrink: 0;
}

#desktop-keyboard-card .navigation-guide__card-icon {
  background: rgba(4, 162, 255, 0.12);
  border-color: rgba(4, 162, 255, 0.25);
  color: var(--color-brand-blue, #04a2ff);
}

.navigation-guide__heading {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

/* List & Items Inside Card */
.navigation-guide__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.navigation-guide__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.navigation-guide__item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
  margin-top: 1px;
}

.navigation-guide__key-badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Styled KBD elements */
.nav-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  box-sizing: border-box;
}

.navigation-guide__item-body {
  color: #cbd5e1;
}

.navigation-guide__item-body strong {
  display: inline-block;
  color: #f8fafc;
  font-weight: 600;
  margin-right: 4px;
}

/* Action Button */
.navigation-guide__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.navigation-guide__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 40px;
  border-radius: var(--radius-full, 9999px);
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  outline: none;
}

.navigation-guide__btn--primary {
  background: linear-gradient(135deg, #f69400 0%, #ff7300 50%, #04a2ff 100%);
  background-size: 200% 100%;
  color: #ffffff;
  box-shadow: 
    0 4px 20px rgba(246, 148, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.navigation-guide__btn--primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 8px 25px rgba(246, 148, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.navigation-guide__btn-arrow {
  transition: transform 0.2s ease;
}

.navigation-guide__btn--primary:hover .navigation-guide__btn-arrow {
  transform: translateX(4px);
}

.navigation-guide__btn:focus-visible {
  outline: 3px solid var(--color-brand-blue, #04a2ff);
  outline-offset: 3px;
}

.navigation-guide__btn--primary:active {
  transform: translateY(0) scale(0.98);
}

/* Responsive Styles */
@media (max-width: 820px), (pointer: coarse) {
  #desktop-mouse-card,
  #desktop-keyboard-card {
    display: none !important;
  }

  .navigation-guide__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .navigation-guide__content {
    padding: 28px 20px;
    max-height: 90vh;
  }

  .navigation-guide__title {
    font-size: 1.4rem;
  }
  
  .navigation-guide__badge-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
  }

  .navigation-guide__btn {
    width: 100%;
    padding: 14px 24px;
  }
}

@media (max-width: 480px) {
  .navigation-guide {
    padding: 12px;
  }

  .navigation-guide__content {
    border-radius: var(--radius-xl, 16px);
    padding: 24px 16px;
  }

  .navigation-guide__card {
    padding: 16px;
  }

  .navigation-guide__item {
    font-size: 0.8rem;
  }
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
}

.cookie-consent__inner {
  pointer-events: auto;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 14px 16px;
  max-width: 980px;
  width: calc(100% - 40px);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas: "text text" "links actions";
  gap: 12px;
  align-items: center;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.cookie-consent__text {
  grid-area: text;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  line-height: var(--line-height-normal);
}

.cookie-consent__links {
  grid-area: links;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-consent__link {
  color: var(--text-link);
  text-decoration: underline;
  font-size: var(--font-size-xs);
  transition: color var(--transition-fast);
}

.cookie-consent__link:hover {
  color: var(--text-link-hover);
}

.cookie-consent__manage {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--font-size-xs);
  transition: color var(--transition-fast);
}

.cookie-consent__manage:hover {
  color: var(--text-primary);
}

.cookie-consent__actions {
  grid-area: actions;
  display: flex;
  gap: 8px;
  justify-self: end;
  align-self: center;
}

.cookie-consent__btn {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  font-family: var(--font-sans);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.cookie-consent__btn--primary {
  background-color: var(--color-brand-orange);
  color: #ffffff;
}

.cookie-consent__btn--primary:hover {
  background-color: var(--color-brand-orange-hover);
}

.cookie-consent__btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.cookie-consent__btn--ghost:hover {
  background-color: var(--bg-tertiary);
}

/* Modal */
.cookie-consent__modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: 1100;
  pointer-events: auto;
}

.cookie-consent__modal-inner {
  background-color: var(--surface-modal);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 640px;
  width: calc(100% - 40px);
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-consent__legal {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-top: 12px;
}

.cookie-consent__notice {
  margin-top: 20px;
  padding: 12px;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
}

.cookie-consent__pref {
  margin: 14px 0;
}

.cookie-consent__pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cookie-consent__pref-title {
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.cookie-consent__modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 600px) {
  .cookie-consent {
    top: auto;
    bottom: 18px;
    transform: none;
  }
  .cookie-consent__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "text" "links" "actions";
  }
  .cookie-consent__actions {
    justify-self: start;
  }
}

.cookie-consent[hidden],
.cookie-consent__modal[hidden] {
  display: none !important;
  pointer-events: none !important;
}

body.cookie-modal-open {
  overflow: hidden;
}

