@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Manrope:wght@400;500;600;700;800&display=swap');

/* Typography & General Layout */
body {
  font-family: "Segoe UI", Roboto, sans-serif;
  background-color: #0e1117;
  color: #f1f1f1;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  font-size: 1rem;
}

h1, h2, h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

p {
  color: #d1d1d1;
}

/* Container and Hero */
main.container {
  padding: 2rem 1rem;
}

.hero-section {
  text-align: center;
  margin-bottom: 3rem;
}

/* Flow Diagram */
.flow-diagram {
  background-color: #1c1f26;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.4);
}

.flow-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 56.25rem; /* ~900px */
  margin: 0 auto;
  width: 100%;
}


.flow-item {
  background-color: #2b2f38;
  padding: 1rem 1.5rem;
  border-radius: 0.625rem;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  width: 16rem;
}

.flow-item:hover {
  background-color: #374151;
  transform: translateY(-0.2rem);
}



.flow-icon {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.flow-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.flow-description {
  font-size: 0.9rem;
  color: #ccc;
}

.flow-arrow {
  font-size: 1.5rem;
  color: #888;
}

.pipeline-container, .output-container {
  background-color: #2b2f38;
  padding: 1rem 1.5rem;
  border-radius: 0.625rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.pipeline-container:hover:not(:has(.flow-item:hover)) {
  background-color: #374151;
  transform: translateY(-0.2rem);
}

.output-container:hover:not(:has(.flow-item:hover)) {
  background-color: #374151;
  transform: translateY(-0.2rem);
}


.pipeline-label, .output-label {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #93c5fd;
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
  width: 100%;
  max-width: 56.25rem; /* ~900px */
}

/* Footer */
footer.container {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 0.0625rem solid #2a2a2a;
  text-align: center;
  font-size: 0.8rem;
  color: #999;
}

/* Input Page Custom Styles */

.input-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.method-card {
  background-color: #1f242e;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.method-card:hover {
  transform: translateY(-0.2rem);
  background-color: #2a2f3b;
}

.method-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.input-section textarea {
  background-color: #1c1f26;
  border: 1px solid #444;
  border-radius: 0.5rem;
  color: #f1f1f1;
  padding: 1rem;
  font-size: 1rem;
}

.upload-area {
  background-color: #1c1f26;
  border: 2px dashed #3b82f6;
  padding: 2rem;
  text-align: center;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.upload-area.dragover {
  background-color: #2d333d;
}

.file-types {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.demo-section {
  margin-top: 3rem;
}

.example-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.example-card {
  background-color: #1f242e;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
  color: #f1f1f1;
  font-size: 0.95rem;
  line-height: 1.4;
}

.back-button a {
  display: inline-block;
  margin-bottom: 2rem;
  color: #60a5fa;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.back-button a:hover {
  color: #93c5fd;
}

/* === INPUT PAGE STYLES === */

.input-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.method-card {
  background-color: #2b2f38;
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.method-card:hover {
  background-color: #374151;
  transform: translateY(-0.2rem);
}

.method-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.method-icon img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

/* Textarea Styling */
textarea {
  background-color: #1f2937;
  color: #f1f1f1;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.75rem;
  resize: vertical;
}

/* Upload Area */
.upload-area {
  background-color: #2b2f38;
  border: 2px dashed #4b5563;
  padding: 2rem;
  border-radius: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
  background-color: #374151;
}

.upload-area strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #f9fafb;
}

.upload-area .file-types {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* Example Inputs */
.demo-section {
  margin-top: 3rem;
}

.example-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.example-card {
  background-color: #2b2f38;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.3);
}

.example-card h4 {
  color: #93c5fd;
  margin-bottom: 0.5rem;
}

/* Back Button */
.back-button {
  margin-bottom: 1rem;
}

.back-button a.secondary {
  background-color: transparent;
  color: #60a5fa;
  border: 1px solid #60a5fa;
}

.back-button a.secondary:hover {
  background-color: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
}

/* Final Action Buttons */
main.container > div:last-of-type a {
  margin: 0.5rem 0;
}


.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-toggle {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.auth-toggle button {
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 0.5rem;
}

.auth-toggle button:not(.secondary) {
  background-color: #60a5fa;
  color: white;
  border: none;
}

.auth-status {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(15, 23, 42, 0.55);
  color: #e5eefc;
}

.auth-status[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(20, 83, 45, 0.25);
  color: #dcfce7;
}

.auth-status[data-tone="error"] {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.22);
  color: #fee2e2;
}

.forgot-password-panel {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.35);
}

.auth-actions-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}


.dashboard-container {
  display: flex;
  height: 100vh;
  background-color: #0f0f0f;
  color: white;
}

.sidebar {
  max-width: 20%;
  background-color: #111827;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar button {
  background-color: #0ea5e9;
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  text-align: left;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sidebar button:hover {
  background-color: #0284c7;
}

.chatbox {
  background-color: #374151;
  padding: 1rem;
  border-radius: 10px;
  max-width: 600px;
  margin: auto;
  color: white;
}


/* General reset and body styling */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0f0f0f;
  color: #f9fafb;
}

/* New top navigation bar styling */
.dashboard-header {
  background-color: #111827;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Logo and debug area */
.dashboard-header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #f9fafb;
}

/* Button group aligned right */
.dashboard-header .button-group {
  display: flex;
  gap: 0.75rem;
}

/* Header buttons */
.dashboard-header .button-group button {
  background-color: #0ea5e9;
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dashboard-header .button-group button:hover {
  background-color: #0284c7;
}


/* Dashboard container layout */
.dashboard-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Sidebar styling */
.sidebar {
  float: left;
  max-width: 20%; /* 256px */
  background-color: #111827;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 0 0.5rem #000;
}

/* Sidebar buttons */
.sidebar button {
  background-color: #0ea5e9;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sidebar button:hover {
  background-color: #0284c7;
}

.main-content {
  float: right;
  max-width: 80%; /* 256px */
}

/* Main content panel */
.main-panel {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #1f2937;
  gap: 1rem;
}

/* Chatbox display */
.chatbox {
  background-color: #374151;
  padding: 1.5rem;
  border-radius: 0.75rem;
  max-width: 38rem; /* 608px */
  margin: 0 auto;
  box-shadow: 0 0 0.5rem #00000066;
}

/* Input and button area */
.input-area {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.input-area input {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: #111827;
  color: #f9fafb;
  outline: none;
}

.input-area button {
  background-color: #0ea5e9;
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.input-area button:hover {
  background-color: #0284c7;
}

/* Push the debug button and user section to the right */
.dashboard-header > button:nth-of-type(1) {
  margin-left: auto;
  background: #333;
  border: 1px solid #555;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

/* Style user section */
.dashboard-header .user-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  position: relative;
}

.dashboard-header .username {
  font-weight: bold;
  font-size: 0.875rem;
}

.dashboard-header .user-avatar {
  background-color: #60a5fa;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: bold;
  font-size: 0.875rem;
}

.dashboard-header .user-dropdown {
  position: absolute;
  top: 2.5rem;
  right: 0;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10;
}

.dashboard-header .user-dropdown a {
  color: #f9fafb;
  text-decoration: none;
  font-size: 0.875rem;
}

.dashboard-header .user-dropdown a:hover {
  color: #60a5fa;
}

.welcome-message {
  text-align: center;
  margin: 2rem auto;
  max-width: 80%;
  padding: 2rem;
  background-color: #1c1f26;
  border-radius: 0.75rem;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
}

.welcome-message h2 {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 1rem;
}

.welcome-message p {
  font-size: 1rem;
  color: #d1d5db;
  margin-bottom: 2rem;
}

/* Style for the example prompt grid */
.example-prompts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* Individual prompt cards */
.example-prompt {
  background-color: #2b2f38;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.example-prompt:hover {
  background-color: #374151;
  transform: translateY(-0.2rem);
}

.example-prompt h4 {
  color: #93c5fd;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.example-prompt p {
  font-size: 0.9rem;
  color: #d1d5db;
}

.input-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 1rem;
  background-color: #1f2937;
  border-radius: 0.75rem;
  max-width: 100%;
  box-shadow: 0 0 0.5rem #00000066;
}

.input-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.attach-button {
  background-color: transparent;
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #f1f1f1;
  cursor: pointer;
  transition: background-color 0.2s ease;
  max-width: 10%;
}

.attach-button:hover {
  background-color: #374151;
}

.message-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: #111827;
  color: #f9fafb;
  outline: none;
}

.input-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-buttons button {
  background-color: #0ea5e9;
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.input-buttons button:hover {
  background-color: #0284c7;
}

.voice-button {
  min-width: 3rem;
  position: relative;
  overflow: hidden;
}

.voice-button.unavailable {
  background: linear-gradient(135deg, #475569, #334155);
  opacity: 0.78;
  cursor: not-allowed;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.voice-button.listening {
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 0 0 1px rgba(254, 202, 202, 0.24), 0 0 24px rgba(248, 113, 113, 0.35);
}

.voice-button.processing {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 0 1px rgba(253, 224, 71, 0.18), 0 0 24px rgba(245, 158, 11, 0.25);
}

.voice-button.speaking {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 0 1px rgba(167, 243, 208, 0.18), 0 0 24px rgba(16, 185, 129, 0.28);
}

.voice-button.listening::after,
.voice-button.speaking::after {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle, rgba(255,255,255,0.38), rgba(255,255,255,0));
  animation: mm-voice-button-pulse 1.8s ease-in-out infinite;
}

@keyframes mm-voice-button-pulse {
  0%, 100% { transform: scale(0.7); opacity: 0.35; }
  50% { transform: scale(1); opacity: 0.8; }
}

.page-content {
  flex-direction: row;
}

.dashboard-container {
  display: flex;
  height: 100vh;
  background-color: #0f0f0f;
}

.sidebar {
  width: 16rem; /* Fixed width */
  background-color: #111827;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 0 0.5rem #000;
  flex-shrink: 0;
}

.main-panel {
  flex: 1;
  padding: 2rem;
  background-color: #1f2937;
  display: flex;
  flex-direction: column;
}

.logo-section {
  max-width: 30%; /* Fixed width */
  flex-direction: row;
}

/* Top-level container */
.dashboard-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #0f0f0f;
}

/* Top navigation bar */
.dashboard-header {
  height: 60px;
  width: 100%;
  background-color: #111827;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

/* Below the header: sidebar + content */
.dashboard-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar on the left */
.sidebar {
  width: 16rem;
  background-color: #111827;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 0 0.5rem #000;
  flex-shrink: 0;
  overflow-y: auto;
}

/* Main content on the right */
.main-content {
  flex: 1;
  padding: 2rem;
  background-color: #1f2937;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* already have most of this */
.dashboard-header .user-dropdown {
  position: absolute;
  top: 2.5rem;
  right: 0;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.5rem;
  display: none;            /* hidden by default */
  flex-direction: column;   /* vertical */
  gap: 0.5rem;
  z-index: 10;
}


/* Optional: make each item full-width row */
.dashboard-header .user-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}
.dashboard-header .user-dropdown a:hover {
  background: #111827;
  color: #60a5fa;
}

/* --- User dropdown: CSS-only fix --- */
.dashboard-header .user-dropdown {
  /* JS flips this between none/block; when it's block, we want a menu look */
  min-width: 160px;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.25rem;
  box-shadow: 0 8px 16px rgba(0,0,0,0.35);
  z-index: 1000;
}

.dashboard-header .user-dropdown a {
  display: block;              /* stack items vertically */
  width: 100%;                 /* full row */
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #f9fafb;
  text-decoration: none;
  font-size: 0.875rem;
  white-space: nowrap;         /* keep labels on one line */
}

.dashboard-header .user-dropdown a:hover {
  background: #111827;
  color: #60a5fa;
}

/* Force vertical layout only when JS sets display:block inline */
.dashboard-header .user-section .user-dropdown[style*="display: block"] {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
}

/* Make each item a full-width row */
.dashboard-header .user-section .user-dropdown[style*="display: block"] > a {
  display: block !important;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  white-space: nowrap;
}

/* Bulletproof vertical dropdown when JS flips it to block */
#userDropdown[style*="display: block"] {
  /* make the container lay items in rows no matter what */
  display: grid !important;
  grid-auto-flow: row;
  grid-auto-rows: max-content;
  row-gap: 0.25rem;
  min-width: 160px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.25rem;
  white-space: normal !important; /* don't keep everything on one line */
  z-index: 1000;
}

#userDropdown[style*="display: block"] > a {
  display: block !important;     /* ensure each is a full row */
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #f9fafb;
  text-decoration: none;
}

#userDropdown[style*="display: block"] > a:hover {
  background: #111827;
  color: #60a5fa;
}

.welcome-message-container {
  background: none;        /* Remove the dark box background */
  border-radius: 0;        /* Remove rounded corners */
  box-shadow: none;        /* Remove any shadow */
  padding: 2rem 0;         /* Keep vertical spacing */
}

/* Remove the outer card around the welcome section */
.welcome-message {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  /* keep the spacing if you want */
  padding: 2rem 0 !important;
  margin: 2rem auto 1rem;
  text-align: center;
}

/* optional: small spacing tweak between text and the suggestion cards */
.welcome-message > p { margin-bottom: 1.25rem; }


.main-content {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 2rem 0 0 0; /* remove bottom & right padding */
}

/* Chat fills remaining vertical space */
.chat-area {
  flex: 1 1 auto;
}

/* Sticky input bar, edge-to-edge inside main-content */
.input-area {
  position: sticky;
  bottom: 0;
  z-index: 10;

  /* Full width of main-content */
  width: 100%;
  margin: 0; /* no extra gap on right or bottom */

  background-color: #1f2937;
  border-top: 1px solid #333;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.25);
  padding: 1rem;
}

.input-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.message-input {
  min-height: 1.1rem;                     /* overrides inline 20px via min-height */
  line-height: 1.4;
  padding: 0.875rem 1rem;               /* comfy padding */
  font-size: 1rem;
  resize: none;                         /* hide browser drag handle */
  flex: 1;
}

/* Divider between top buttons and conversation list */
.sidebar-divider {
  height: 1px;
  background: #243244;   /* subtle line */
  margin: 0.75rem 0 0.5rem;
  opacity: 0.6;
}

/* Conversation rows (override the blue .sidebar button styles) */
.sidebar .creation-item {
  background: transparent;         /* no highlight by default */
  color: #e5e7eb;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  text-align: left;
  box-shadow: none;
}

/* Hover state only */
.sidebar .creation-item:hover {
  background: #1f2937;             /* soft hover */
  border-color: #2a2a2a;
}

/* Remove blue hover from generic sidebar button rule for these items */
.sidebar .creation-item:hover,
.sidebar .creation-item:focus {
  background-color: #1f2937;
}

/* If you still mark the selected chat, keep it subtle (optional) */
.sidebar .creation-item.active {
  background: #16202b;
  border-color: #233144;
}

/* Chat row dropdown: keep hidden until toggled */
.chat-dropdown {
  display: none;                 /* <- important */
  position: absolute;
  right: 0.5rem;
  top: calc(100% + 6px);
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.25rem;
  min-width: 150px;
  z-index: 50;
}

/* Make each conversation row a positioning context for the dropdown */
.creation-item {
  position: relative;
}

/* --- Chat row dropdown: force vertical layout --- */
.chat-dropdown {
  display: none;                  /* hidden by default; JS flips to block */
  position: absolute;
  right: 0.5rem;
  top: calc(100% + 0.375rem);      /* 6px = 0.375rem */
  background: #1f2937;
  border: 0.0625rem solid #374151; /* 1px = 0.0625rem */
  border-radius: 0.5rem;
  padding: 0.25rem;
  min-width: 10rem;                /* 160px = 10rem */
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.35); /* 8px 16px */
  z-index: 1000;
}

/* When JS sets display:block inline, stack items vertically */
.creation-item .chat-dropdown[style*="display: block"] {
  display: grid !important;
  grid-auto-flow: row;
  grid-auto-rows: max-content;
  row-gap: 0.25rem;
}

/* Make each action a full-width row */
.chat-dropdown a {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #f9fafb;
  text-decoration: none;
  white-space: nowrap;
}

.chat-dropdown a:hover {
  background: #111827;
  color: #60a5fa;
}

/* Make the input comfortably tall even when empty */
.input-container {
  min-height: 3.25rem;   /* ensures the row isn’t cramped */
  align-items: center;
}

.message-input {
  min-height: 2.75rem;   /* readable placeholder height */
  line-height: 1.5;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  overflow: auto;        /* shows scrollbar only if needed as it grows */
}

.creation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem; /* keep some breathing room */
  box-sizing: border-box; /* ensures padding doesn't cut width */
}

.creation-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creation-item .menu-button {
  margin-left: auto; /* pushes all the way to the right */
}

.mm-gui {
  position:absolute; z-index:30; display:flex; gap:.5rem;
  background:rgba(17,24,39,.92); color:#f9fafb; padding:.5rem;
  border-radius:.5rem; backdrop-filter:blur(4px); font-family:system-ui, sans-serif;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
.mm-gui label { font-size:.75rem; opacity:.8; display:block; margin-bottom:.15rem; }
.mm-gui .row { display:flex; gap:.5rem; align-items:flex-end; }
.mm-gui input[type="text"], .mm-gui input[type="number"], .mm-gui select {
  background:#111827; border:1px solid #374151; border-radius:.375rem;
  color:#fff; padding:.3rem .45rem; font-size:.85rem; min-width:140px;
}
.mm-gui input[type="range"] { width:160px; }
.mm-gui button {
  background:#1f2937; color:#fff; border:none; border-radius:.375rem; padding:.35rem .6rem;
  cursor:pointer;
}
.mm-gui button:hover { background:#374151; }
.mm-selectbox {
  position:absolute; z-index:25; border:2px dashed #60a5fa; border-radius:.25rem;
  pointer-events:auto; /* we want to catch pointer events to avoid new text creation */
}
.mm-selectbox .mm-handle {
  position:absolute; width:12px; height:12px; border:2px solid #60a5fa; border-radius:3px;
  background:#111827; box-shadow:0 1px 6px rgba(0,0,0,.3); cursor:nwse-resize;
}
.mm-handle.br { right:-8px; bottom:-8px; } /* bottom-right handle */


/* Right-docked editor panel */
.mm-gui {
  position: absolute;
  z-index: 30;
  right: .5rem;          /* dock right */
  top: 2.6rem;           /* just below the toolbar */
  display: flex;
  gap: .5rem;
  background: rgba(17,24,39,.92);
  color: #f9fafb;
  padding: .75rem;
  border-radius: .5rem;
  backdrop-filter: blur(4px);
  font-family: system-ui, sans-serif;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  width: 320px;          /* nice, stable width */
}

.mm-gui .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.mm-gui label {
  font-size: .75rem;
  opacity: .8;
  display: block;
  margin-bottom: .2rem;
}

.mm-gui textarea,
.mm-gui input[type="number"],
.mm-gui select {
  background: #111827;
  border: 1px solid #374151;
  border-radius: .375rem;
  color: #fff;
  padding: .45rem .55rem;
  font-size: .9rem;
}

.mm-gui textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 220px;
  line-height: 1.25;
}

.mm-gui input[type="range"] { width: 100%; }

.mm-gui .row .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

.mm-gui button {
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: .375rem;
  padding: .4rem .6rem;
  cursor: pointer;
}
.mm-gui button:hover { background: #374151; }

/* Selection rectangle that sits over the text */
.mm-selectbox {
  position: absolute;
  z-index: 25;
  border: 2px dashed #60a5fa;
  border-radius: .25rem;
  pointer-events: auto; /* clicking inside selects/edits existing, not create new */
}
.mm-selectbox .mm-handle {
  position: absolute;
  width: 12px; height: 12px;
  border: 2px solid #60a5fa;
  border-radius: 3px;
  background: #111827;
  box-shadow: 0 1px 6px rgba(0,0,0,.3);
  cursor: nwse-resize;
}
.mm-handle.br { right: -8px; bottom: -8px; }

/* add after existing styles */
.mm-grab{
  position:absolute; left:-10px; top:-10px;
  width:22px; height:22px; border-radius:6px;
  background:#111827; border:2px solid #60a5fa;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; line-height:1; color:#60a5fa;
  box-shadow:0 1px 6px rgba(0,0,0,.3);
  cursor:grab; pointer-events:auto;   /* important: can receive input */
}
.mm-grab:active{ cursor:grabbing; }

.mm-rotate{
  position:absolute;
  width:20px; height:20px; border-radius:50%;
  left:50%; transform:translate(-50%, -12px);
  top:-10px;
  background:#111827; border:2px solid #60a5fa; color:#60a5fa;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; line-height:1;
  cursor:grab; pointer-events:auto;
}
.mm-rotate::before{ content:"⟳"; } /* or swap to an SVG later */
.mm-rotate:active{ cursor:grabbing; }


/* Make main column flex so chat-area grows and input-area sits at the bottom */
.main-content {
  display: flex;
  flex-direction: column;
  /* If your header is fixed, you may already have this; otherwise this helps: */
  min-height: 0; /* important so children can shrink */
}

/* Chat scrolls and takes leftover space */
.chat-area {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 120px;
}

/* Bottom input area has fixed (but adjustable) height */
.input-area {
  position: relative;
  flex: 0 0 auto;
  height: 140px;             /* default starting height */
  background: #0f172a;       /* your theme */
  border-top: 1px solid #334155;
}

/* The draggable handle sitting on the TOP edge of the input area */
.input-resizer {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;               /* grab zone */
  cursor: row-resize;
  z-index: 5;
}

/* Optional: a visible “pill” so users notice the handle */
.input-resizer::after {
  content: "";
  position: absolute;
  top: 2px; left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #64748b;
  opacity: .6;
}

/* While resizing (your JS adds .resizing) */
.input-resizer.resizing {
  background: rgba(100,116,139,.15);
}

/* sidebar layout */
.dashboard-body { display: flex; min-height: calc(100vh - 72px); }

.sidebar {
  position: relative;
  width: 280px;              /* default */
  min-width: 200px;
  max-width: 500px;
  flex: 0 0 auto;            /* so width sticks */
}

/* the draggable handle on the right edge */
.sidebar-resizer {
  position: absolute;
  top: 0; right: 0;
  width: 6px;                /* grab area */
  height: 100%;
  cursor: col-resize;
  background: transparent;
}
.sidebar-resizer:hover { background: rgba(96,165,250,.2); }
.sidebar-resizer.resizing { background: rgba(96,165,250,.35); }

[data-nav] { cursor: pointer; }

/* Layout variables */
:root {
  --header-h: 72px;      /* adjust to match your header */
  --gap: 16px;
}

/* Ensure the main body area fills the viewport under the header */
.dashboard-body {
  height: calc(100vh - var(--header-h));
  display: flex;             /* Sidebar + main-content side by side */
  column-gap: 0 !important;        /* ← no gutter between sidebar and content */
  row-gap: 0 !important;
}

/* Sidebar stays as-is; main-content becomes a 2-col grid (center+right) */
.main-content {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;   /* center = viewer, right = chat */
  grid-template-rows: 1fr auto;     /* top = content, bottom = input */
  gap: var(--gap);
  min-width: 0;                     /* allow columns to shrink */
}

/* Center column (viewer) */
.viewer-column {
  position: relative;
  min-width: 0;
}

/* The viewer container fills its cell and is the anchor for all absolute UI */
.viewer-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0f3a13;              /* fallback bg while empty */
  box-shadow: 0 8px 24px rgba(0,0,0,.25) inset;
}

/* Right column (chat) — independent scroll */
.chat-column {
  display: flex;
  min-width: 0;
  overflow: hidden;
}
.chat-area {
  flex: 1 1 auto;
  overflow: auto;
  border-radius: 12px;
}

/* Bottom input spans both columns */
.input-area {
  grid-column: 1 / -1; /* span center + right */
  position: sticky;
  bottom: 0;           /* stick to bottom of the main-content scrolling area */
  z-index: 5;
  border-radius: 12px;
}

/* Make sure viewer/chat consume space above the sticky input */
.viewer-column,
.chat-column {
  min-height: 0; /* enables child overflow scrolling in grid */
}

/* Sidebar stays as-is; main-content becomes a 2-col grid (center+right) */
.main-content {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) var(--mid-resizer-w, 8px) minmax(420px, 1fr);
  grid-template-rows: 1fr auto;     /* top = content, bottom = input */
  gap: var(--gap);
  min-width: 0;
}

/* Middle vertical resizer between viewer and chat */
.middle-resizer {
  grid-row: 1;                 /* only in the top row (content row) */
  align-self: stretch;
  width: var(--mid-resizer-w, 8px);
  cursor: col-resize;
  background: transparent;
  border-radius: 6px;
}

.middle-resizer:hover { background: rgba(96,165,250,.18); }
.middle-resizer.resizing { background: rgba(96,165,250,.32); }

/* Ensure viewer/chat cells can shrink & scroll properly */
.viewer-column,
.chat-column { min-height: 0; }

/* === GRID LAYOUT: viewer | splitter | chat (override everything above) === */
.main-content {
  /* kill legacy rules */
  float: none !important;
  max-width: none !important;
  display: grid !important;

  /* definitive grid */
  grid-template-columns: minmax(420px, 1fr) var(--mid-resizer-w, 8px) minmax(420px, 1fr);
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "viewer splitter chat"
    "input  input    input";
  gap: var(--gap);
  min-width: 0;
  overflow: hidden; /* chat scrolls independently */
  padding: 0;       /* remove stray padding that creates big left gaps */
}

.viewer-column  { grid-area: viewer;  min-width: 0; }
.middle-resizer { grid-area: splitter; width: var(--mid-resizer-w, 8px); }
.chat-column    { grid-area: chat;    min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.input-area     { grid-area: input;   position: sticky; bottom: 0; z-index: 5; }

/* keep chat scrollable */
.chat-area { flex: 1 1 auto; overflow: auto; }

.chat-column {
  position: relative;
}

.voice-mode-overlay {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  margin: 0 1rem 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    max-height 0.22s ease,
    margin 0.22s ease,
    padding 0.22s ease;
  z-index: 4;
}

.voice-mode-overlay.active {
  opacity: 1;
  transform: translateY(0);
  max-height: 220px;
  margin: 1rem 1rem 0.75rem;
}

.voice-mode-rhombus {
  position: absolute;
  width: min(22vw, 180px);
  aspect-ratio: 1;
  transform: rotate(45deg);
  border-radius: 1.4rem;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(30, 41, 59, 0.06)),
    rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.3);
  backdrop-filter: blur(18px);
  box-shadow:
    0 14px 38px rgba(8, 15, 26, 0.24),
    inset 0 0 40px rgba(125, 211, 252, 0.08);
}

.voice-mode-panel {
  position: relative;
  width: min(100%, 420px);
  padding: 1rem 1.35rem;
  text-align: center;
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(8, 15, 26, 0.48);
  box-shadow: 0 12px 30px rgba(3, 7, 18, 0.28);
  backdrop-filter: blur(10px);
}

.voice-mode-badge {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.voice-mode-title {
  margin: 0;
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 700;
}

.voice-mode-hint {
  margin: 0.45rem 0 0;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.55;
}

.voice-mode-overlay[data-state="listening"] .voice-mode-rhombus {
  animation: mm-voice-overlay-pulse 2.1s ease-in-out infinite;
}

.voice-mode-overlay[data-state="speaking"] .voice-mode-rhombus {
  animation: mm-voice-overlay-pulse 1.35s ease-in-out infinite;
}

@keyframes mm-voice-overlay-pulse {
  0%, 100% { transform: rotate(45deg) scale(0.92); opacity: 0.78; }
  50% { transform: rotate(45deg) scale(1.02); opacity: 1; }
}

@media (max-width: 900px) {
  .voice-mode-overlay.active { margin: 0.75rem 0.75rem 0.6rem; }

  .voice-mode-rhombus {
    width: min(44vw, 150px);
  }

  .voice-mode-panel {
    width: 100%;
    padding: 0.95rem 1rem;
  }
}

/* optional: make the splitter visually grabby */
.middle-resizer:hover    { background: rgba(96,165,250,.18); }
.middle-resizer.resizing { background: rgba(96,165,250,.32); }

/* --- Concept image card action UI --- */
/* --- Concept image card action UI (no overlays) --- */
.concept-card {
  position: relative;
  padding: .75rem;
  border-radius: 8px;
  max-width: 80%;
  background: #2a2a2a;
  color: white;
  align-self: flex-start;
  margin-right: auto;
  border: 1px solid #333;
}

/* Top row: title (left) + download (right) */
.concept-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
}

.concept-title {
  font-size: .9rem;
  opacity: .9;
}

/* Compact download button (top-right of image card) */
.concept-download {
  position: absolute;
  top: 8px;
  right: 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 32px;          /* square tap target */
  height: 32px;
  padding: 0;           /* remove wide padding */

  font-size: 16px;      /* icon size for "⬇" */
  line-height: 1;

  border: none;
  border-radius: 6px;
  background: rgba(17, 24, 39, .85);
  color: #e5e7eb;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.concept-download:hover { background: rgba(17, 24, 39, .92); }
.concept-download:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

/* Image sits in the middle, fully visible */
.concept-media { }
.concept-img {
  display: block;
  max-width: 520px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #444;
}

/* Bottom row: actions aligned to the right, side-by-side */
.concept-footer {
  margin-top: .5rem;
  display: flex;
  justify-content: flex-end;
}

.concept-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: nowrap;
}

.concept-actions .action-btn {
  display: inline-flex;           /* avoid full-width buttons */
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;                 /* never stretch */
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  font-size: .85rem;
  padding: .4rem .6rem;
  border-radius: .5rem;
  cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
  width: auto;                    /* explicit */
}

.concept-actions .action-btn:hover { background: #1f2937; }
.concept-actions .action-btn.primary {
  background: #0ea5e9;
  border-color: #0284c7;
  color: white;
}
.concept-actions .action-btn.primary:hover { background: #0284c7; }

.concept-actions .action-btn[disabled] {
  opacity: .65;
  cursor: not-allowed;
}

.concept-status {
  font-size: .8rem;
  color: #9ca3af;
  margin-left: .25rem;
}

/* --- Concept card icon buttons --- */
.concept-header { display:flex; justify-content:space-between; align-items:center; }
.concept-header .icon-group { display:flex; gap:6px; }

.concept-download,
.concept-fullscreen {
  width: 30px; height: 30px; min-width: 30px; min-height: 30px;
  padding: 0; border: 1px solid #2f3a4a; background: #10161d; color: #cfe3ff;
  border-radius: 6px; display:inline-flex; align-items:center; justify-content:center;
}
.concept-download:hover, .concept-fullscreen:hover { background:#13202b; }

/* --- Inpainting overlay --- */
.concept-media { position: relative; }
.inpaint-layer { position:absolute; inset:0; z-index:2; pointer-events:none; }
.inpaint-layer canvas { position:absolute; inset:0; width:100%; height:100%; }
.inpaint-layer.active { pointer-events:auto; }

/* Brush toolbar inside the image */
.inpaint-toolbar {
  position:absolute; top:8px; left:8px; z-index:3;
  display:flex; gap:6px;
}
.inpaint-toolbar button{
  padding:.25rem .5rem; font-size:.8rem; border-radius:6px;
  border:1px solid #333; background:#1a1f29; color:#eee;
}
.inpaint-toolbar .danger { background:#4d1111; border-color:#6b1a1a; }

/* --- Lightbox (fullscreen image) --- */
.mm-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.8);
  display: flex; align-items: center; justify-content: center;
}
.mm-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 12px; }
.mm-lightbox .mm-close {
  position:absolute; top:12px; right:12px;
  border:1px solid #2f3a4a; background:#10161d; color:#cfe3ff;
  width:34px; height:34px; border-radius:8px;
}
.mm-lightbox .mm-close:hover { background:#13202b; }

/* ---- Concept card header layout ---- */
.concept-card .concept-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;                    /* small breathing room */
}

.concept-card .concept-header .icon-group {
  display: flex;
  align-items: center;
  gap: 10px;                   /* space between the two icons */
}

/* Ensure both icon buttons are square and not absolutely positioned */
.concept-card .icon-group .icon-btn,
.concept-card .concept-download,
.concept-card .concept-fullscreen {
  position: static !important; /* override any old absolute rules */
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;                  /* no text-like padding */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  line-height: 1;
  cursor: pointer;
}

/* Optional: subtle hover/focus treatment */
.concept-card .icon-group .icon-btn:hover,
.concept-card .icon-group .icon-btn:focus {
  outline: none;
  background: rgba(255,255,255,0.06);
}

/* If you had any legacy absolute placement for the download button, neutralize it */
.concept-card .concept-download[style*="position:absolute"],
.concept-card .concept-download.absolute {
  position: static !important;
  right: auto !important;
  top: auto !important;
}


/* Lightbox overlay for concept card fullscreen */
.concept-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;           /* breathing room on desktop */
}

.concept-lightbox-content {
  position: relative;
  width: min(1000px, 96vw);
  max-height: 96vh;
  overflow: auto;          /* scroll if the card gets tall */
}

/* Close button at top-right of overlay */
.concept-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.concept-lightbox-toolbar {
  position: fixed;
  top: 16px;
  right: 64px;
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(12,18,28,0.72);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.concept-lightbox-toolbar .icon-btn {
  width: 32px;
  height: 32px;
}

.concept-lightbox-toolbar .icon-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.concept-lightbox-zoom-label {
  min-width: 52px;
  text-align: center;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .concept-lightbox-toolbar {
    top: 12px;
    right: 56px;
    gap: 6px;
    padding: 4px 6px;
  }

  .concept-lightbox-zoom-label {
    min-width: 44px;
    font-size: 0.85rem;
  }
}

/* When inside the lightbox, let the card grow nicely */
.concept-lightbox-content .concept-card {
  width: 100%;
  margin: 0;
}

/* Make the image area expand responsively in fullscreen */
.concept-lightbox-content .concept-media {
  max-height: calc(96vh - 180px); /* leave room for header/footer */
  overflow: hidden;
}
.concept-lightbox-content .concept-media img,
.concept-lightbox-content .concept-media canvas {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.concept-lightbox-content .concept-media[data-zoomed="true"] {
  touch-action: none;
  user-select: none;
}

.concept-lightbox-content .concept-media[data-dragging="true"] .concept-img {
  transition: none;
}

.concept-lightbox-content .concept-img {
  transform: translate(var(--concept-pan-x, 0px), var(--concept-pan-y, 0px)) scale(var(--concept-zoom-scale, 1));
  transform-origin: center center;
  transition: transform 160ms ease;
  will-change: transform;
  -webkit-user-drag: none;
}

/* Placeholder that holds the card’s original space while it’s fullscreen */
.concept-card-placeholder {
  width: 100%;
  border-radius: 8px;
  background: transparent;
}


/* Header layout: title left, icons right */
.concept-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.concept-header .icon-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Icon buttons: fixed square, never absolutely positioned */
.icon-btn {
  position: static !important;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,0.16); }

/* ---------------- Lightbox for WHOLE card ---------------- */
.concept-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.concept-lightbox-content {
  position: relative;
  width: min(1000px, 96vw);
  max-height: 96vh;
  overflow: auto;
}
.concept-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* Let the card fill nicely inside the modal */
.concept-lightbox-content .concept-card {
  width: 100%;
  margin: 0;
}
.concept-lightbox-content .concept-media {
  max-height: calc(96vh - 180px); /* reserve space for header + footer */
  overflow: hidden;
}
.concept-lightbox-content .concept-media img,
.concept-lightbox-content .concept-media canvas {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Placeholder keeps layout from jumping while the card is fullscreen */
.concept-card-placeholder {
  width: 100%;
  border-radius: 8px;
  background: transparent;
}

/* Overlay aligns to the actual <img> box (JS sets size & position) */
.concept-media { position: relative; padding: 0; }
.concept-img { display: block; margin: 0 auto; }

.inpaint-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.inpaint-layer canvas { position: absolute; } /* left/top/size set via JS */
.inpaint-layer.active { pointer-events: auto; }


/* --- Inpaint overlay: make it reliably interactive and above the image --- */
.concept-media { position: relative; }

.inpaint-layer {
  position: absolute;
  inset: 0;
  z-index: 20;              /* above the image */
  pointer-events: none;     /* disabled until editing */
}

/* When editing, enable events for the whole layer and its children */
.inpaint-layer.active,
.inpaint-layer.active * {
  pointer-events: auto;
}

.inpaint-layer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* In fullscreen, keep canvases matched to the image box height too */
.concept-lightbox-content .concept-media canvas {
  height: 100% !important;
}

/* Keep the toolbar clickable above canvases */
.inpaint-toolbar {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 25;
}

/* Make sure the lightbox content itself doesn't eat pointer events */
.concept-lightbox-content { pointer-events: auto; }

/* ==== Concept image card ================================================== */
.concept-card{
  position: relative;
  background:#2a2a2a; color:#fff;
  border:1px solid #333; border-radius:12px;
  max-width: 100%;
  overflow: hidden;             /* keep everything inside */
  align-self:flex-start;        /* match model bubbles */
}

.concept-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:.5rem; padding:.5rem .5rem .25rem .75rem;
  min-width: 0;
}
.concept-title{
  font-size:.95rem; color:#e5e7eb;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  min-width:0; max-width: 100%;
}

/* top-right icons — scrollable within the card when tight */
.concept-header .icon-group{
  display:flex; gap:.25rem;
  max-width: 60%;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-gutter: stable both-edges;
  padding-bottom:.25rem;        /* space for scrollbar if shown */
}
.concept-header .icon-group::-webkit-scrollbar{ height:6px; }
.concept-header .icon-group::-webkit-scrollbar-thumb{
  background:#3a3a3a; border-radius:8px;
}

.icon-btn{
  flex:0 0 auto;
  width:32px; height:32px;
  display:grid; place-items:center;
  background:#1f2937; color:#f3f4f6;
  border:1px solid #3b3b3b; border-radius:8px;
  cursor:pointer;
}
.icon-btn:hover{ background:#111827; }
.icon-btn:focus{ outline:2px solid #60a5fa; outline-offset:2px; }

.concept-media{
  position:relative;
  background:#0b0b0b;
  display:grid; place-items:center;
}
.concept-img{
  width:100%; height:auto;
  object-fit:contain;
  background:#0b0b0b;
}

/* bottom actions — wrap inside card; never overflow */
.concept-footer{ padding:.5rem .75rem .75rem; }
.concept-actions{
  display:flex; gap:.5rem; align-items:center; justify-content:flex-end;
  flex-wrap: wrap; max-width:100%;
  overflow: hidden;             /* no spill */
}
.action-btn{
  flex:0 0 auto;
  background:#374151; border:1px solid #4b5563; color:#f9fafb;
  border-radius:.5rem; padding:.4rem .6rem; cursor:pointer;
}
.action-btn:hover{ background:#1f2937; }
.action-btn.primary{ background:#2563eb; border-color:#2563eb; }
.action-btn.primary:hover{ background:#1e40af; }

@media (max-width: 420px){
  .icon-btn{ width:28px; height:28px; }
  .action-btn{ padding:.35rem .5rem; font-size:.9rem; }
}

/* Chat row layout: title grows, dots don't */
#sidebar [data-chat-list] .creation-item {
  justify-content: flex-start;
  gap: 8px;
}

#sidebar [data-chat-list] .creation-item .chat-title {
  flex: 1 1 auto;
  min-width: 0;
}

#sidebar [data-chat-list] .creation-item .chat-options {
  flex: 0 0 auto;         /* stop flex growing */
  margin-left: auto;      /* push to the edge */
  display: inline-flex;   /* tight box around the dots */
  align-items: center;
  min-width: 1.25rem;     /* tiny tap target safeguard */
  text-align: right;
}

.concept-media { background:#000; border-radius:8px; overflow:hidden; }
.concept-img   { display:block; width:100%; height:auto; object-fit:contain; }

/* Ensure the input bar stacks children vertically so the preview sits above the row */
.input-area {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.5rem !important;
}

/* Keep the actual controls in a row */
.input-container {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

/* The preview strip should occupy full width and never squash the row */
#composerPreviewStrip {
  width: 100%;
  flex: 0 0 auto;
}
.input-area { display:flex; flex-direction:column; align-items:stretch; gap:.5rem; }
.input-container { display:flex; align-items:center; gap:.5rem; }
#composerPreviewStrip { width:100%; flex:0 0 auto; }


/* kill any Advanced Marker container background/focus */
.gm-style .advanced-marker-layer > * { background: transparent !important; box-shadow: none !important; outline: none !important; }
.gm-style .advanced-marker,
.gm-style .advanced-marker * { background: transparent !important; box-shadow: none !important; outline: none !important; }


:root {
  --brand-blue: #60a5fa; /* tweak if you have a token already */
}

/* Base look for the brand text */
.logo-text {
  display: inline-block;
  font-weight: 800;
  font-size: 1.4rem;      /* adjust to taste */
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* Colored parts after JS wraps the text */
.logo-text .brand-memoria { color: #ffffff; }
.logo-text .brand-mind    { color: var(--brand-blue); }

/* Optional: tiny gap if there’s no space in the original text */
.logo-text .brand-memoria + .brand-mind { margin-left: 0.15ch; }

.mm-brand-logo-interactive {
  transition: transform 0.3s ease;
}

.mm-brand-logo-interactive:hover {
  transform: scale(1.1);
}


/* concept-card overlays */
.concept-card .concept-media {
  position: relative; /* ensures absolute children overlay correctly */
}

.concept-card .concept-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 18px;
  border: 1px solid #3a3a3a;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  user-select: none;
}

.concept-card .concept-nav.prev { left: 8px; }
.concept-card .concept-nav.next { right: 8px; }

.concept-card .concept-nav:hover { background: rgba(0,0,0,0.6); }

.concept-card .concept-pager {
  display: flex; gap: 6px; justify-content: center; padding: 8px 0 0;
}

.concept-card .concept-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #444; border: 0;
}
.concept-card .concept-dot[aria-selected="true"] { background: #ddd; }

/* === 3D Viewer (persistent dock + chat card) ============================== */

/* Persistent viewer dock (center column) */
#viewerDock {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0f1a;                    /* subtle deep navy */
  box-shadow: inset 0 0 0 1px #233144, 0 10px 24px rgba(0,0,0,.35);
}
#viewerDock [data-3d-stage] { position: absolute; inset: 0; }
#viewerDock canvas,
#viewerDock model-viewer {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}

/* Chat-stream 3D card */
.viewer3d-card, .model3d-card {
  position: relative;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #333;
  border-radius: 12px;
  max-width: 100%;
  overflow: hidden;
  align-self: flex-start; /* match model bubble alignment */
}
.viewer3d-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .5rem .75rem;
}
.viewer3d-stage {
  position: relative;
  width: 100%;
  height: clamp(260px, 42vh, 560px);
  background: #0b0f1a;
}
.viewer3d-stage canvas,
.viewer3d-stage model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewer3d-footer {
  display: flex; justify-content: flex-end; gap: .5rem;
  padding: .5rem .75rem .75rem;
}

/* Overlay toolbar (top-right) */
.viewer3d-toolbar {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: flex; gap: 6px;
}
.viewer3d-toolbar .icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid #2f3a4a; background: #10161d; color: #cfe3ff;
}
.viewer3d-toolbar .icon-btn:hover { background: #13202b; }

/* Small “3D / GLB” badge (bottom-left) */
.viewer3d-badge {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  background: rgba(17,24,39,.85); border: 1px solid #2f3a4a; color: #e5e7eb;
  font-size: .75rem; padding: .15rem .45rem; border-radius: .375rem;
  backdrop-filter: blur(4px);
}

/* Loading skeleton */
.viewer3d-skeleton {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 37%, rgba(255,255,255,.04) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 0 0; } 100% { background-position: 400% 0; } }

/* Error layer */
.viewer3d-error {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fca5a5; background: rgba(220,38,38,.05); border-top: 1px solid #7f1d1d;
}

/* Fullscreen */
.viewer3d-fullscreen[data-open="true"] {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.viewer3d-fullscreen[data-open="true"] .viewer3d-stage {
  width: min(96vw, 1200px);
  height: min(92vh, 820px);
  border-radius: 12px;
}
.viewer3d-fullscreen .viewer3d-close {
  position: fixed; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  border: none; background: rgba(255,255,255,.12); color: #fff;
}

/* Small screens: slightly shorter stage */
@media (max-width: 960px) {
  .viewer3d-stage { height: clamp(220px, 38vh, 480px); }
}

/* Scope and neutralize global canvas rules for the stencil card */
.stencil-card .stencil-canvas-wrap {
  position: relative;
  width: 100%;
  height: 420px;            /* or whatever height you want */
  overflow: hidden;
}

.stencil-card canvas.stencil-canvas {
  position: static !important;   /* prevent absolute/fixed overlays */
  width: 100% !important;
  height: 100% !important;
  display: block;
  max-width: 100%;
  max-height: 100%;
}


/* Unify chat card container styling */
.concept-card,
.viewer3d-card,
.model3d-card,
.stencil-card {
  position: relative;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #333;
  border-radius: 12px;
  max-width: 100%;
  overflow: hidden;
  align-self: flex-start; /* match model bubbles */
  padding: .75rem;        /* matches your concept-card padding */
}

/* Give the stencil canvas the same framed look as images */
.stencil-card .stencil-canvas-wrap {
  position: relative;
  width: 100%;
  height: clamp(260px, 42vh, 560px); /* mirrors viewer3d-stage sizing */
  background: #0b0b0b;
  border: 1px solid #444;
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
  margin: .25rem 0 .5rem; /* breathing room like concept image */
}

.stencil-card canvas.stencil-canvas {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* shared bottom action bar (used by 3D viewer + image cards + stencil cards) */
.viewer-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  width: 100%;
  min-width: 0;
}

.viewer-actions-inner {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(120,140,170,.25);
  background: rgba(30,38,48,.85);
  box-shadow: 0 2px 12px rgba(0,0,0,.25) inset, 0 8px 24px rgba(0,0,0,.25);
}

.model-card .viewer-actions-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.concept-card .concept-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.concept-card .concept-status {
  margin-left: 12px;
  font-size: 0.9rem;
  opacity: .9;
}

/* Image-card footer actions: keep a single row and scroll horizontally */
.image-card .viewer-actions-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
}

.image-card .image-card-actions-scroll,
.model-card .image-card-actions-scroll {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior-x: contain;
  padding-bottom: 4px;
  box-sizing: border-box;
}

.image-card .image-card-actions-scroll::-webkit-scrollbar,
.model-card .image-card-actions-scroll::-webkit-scrollbar {
  height: 6px;
}

.image-card .image-card-actions-scroll::-webkit-scrollbar-thumb,
.model-card .image-card-actions-scroll::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 999px;
}

.image-card .image-card-actions-row,
.model-card .image-card-actions-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
}

.image-card .image-card-actions-row .action-btn,
.model-card .image-card-actions-row .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: .4rem .65rem;
  white-space: nowrap;
}

.image-card .concept-status {
  margin-left: 0;
}

.image-card-video-panel,
.image-card-retexture-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(120,140,170,.18);
}

.image-card-video-panel[hidden],
.image-card-retexture-panel[hidden] {
  display: none !important;
}

.image-card-stencil-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(120,140,170,.18);
}

.image-card-stencil-panel[hidden] {
  display: none !important;
}

.stencil-preview-frame {
  position: relative;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(120, 140, 170, .18);
  background:
    linear-gradient(135deg, rgba(19, 27, 42, .95), rgba(12, 18, 31, .92));
  overflow: hidden;
}

.stencil-preview-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

.stencil-preview-slider-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.stencil-preview-slider-edge {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
}

.stencil-preview-slider {
  width: 100%;
  accent-color: #ef4444;
}

.stencil-preview-slider-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.stencil-preview-slider-label {
  font-size: 11px;
  color: #d1d5db;
}

.image-card-video-actions,
.image-card-retexture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-card-video-error,
.image-card-retexture-error {
  color: #fca5a5;
  font-size: 11px;
}

.image-card-video-prompt {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: .65rem .75rem;
  border-radius: .5rem;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.image-card-video-prompt::placeholder {
  color: #9ca3af;
}

.mm-tex-field {
  position: relative;
}

.mm-tex-button {
  width: 100%;
  padding: .5rem .6rem;
  border-radius: .375rem;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  cursor: pointer;
}

.mm-tex-button-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.mm-tex-chip {
  width: 28px;
  height: 28px;
  border-radius: .25rem;
  border: 1px solid #374151;
  object-fit: cover;
  background: #0b1220;
  flex: none;
}

.mm-tex-button-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-tex-pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #0f172a;
  border: 1px solid #374151;
  border-radius: .5rem;
  box-shadow: 0 14px 28px rgba(0,0,0,.45);
  max-height: 280px;
  overflow: auto;
  padding: .25rem;
  z-index: 60;
}

.mm-tex-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .45rem;
  border-radius: .375rem;
  cursor: pointer;
  font-size: 12px;
}

.mm-tex-item:hover,
.mm-tex-item[aria-selected="true"] {
  background: #1f2937;
}

.mm-tex-item img {
  width: 36px;
  height: 36px;
  border-radius: .3rem;
  border: 1px solid #374151;
  object-fit: cover;
  background: #0b1220;
}

.mm-tex-meta {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.mm-tex-title-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.mm-tex-title {
  flex: 1 1 auto;
  min-width: 0;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-tex-link {
  flex: 0 0 auto;
  color: #93c5fd;
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.mm-tex-link:hover,
.mm-tex-link:focus-visible {
  color: #bfdbfe;
  text-decoration: underline;
}

.mm-tex-caption {
  font-size: 11px;
  color: #9ca3af;
}

.mm-tex-attribution {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
}

.mm-tex-attribution-link {
  color: #93c5fd;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.mm-tex-attribution-link:hover,
.mm-tex-attribution-link:focus-visible {
  color: #bfdbfe;
  text-decoration: underline;
}

.mm-muted {
  opacity: .7;
}

.mm-tex-prompt {
  width: 100%;
  padding: .4rem .5rem;
  border-radius: .375rem;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  font-size: 12px;
}

/* === ACCESSIBILITY AND LARGE CONTROLS === */

/* Focus rings for keyboard navigation / screen readers */
*:focus-visible {
  outline: 3px solid #60a5fa !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.3) !important;
  border-radius: 4px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  text-align: center;
  background: #0ea5e9;
  color: white;
  padding: 1rem;
  z-index: 9999;
  font-weight: bold;
}
.skip-link:focus, .skip-link:active {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  overflow: visible;
}

/* Large Controls Mode */
body.large-controls {
  font-size: 1.25rem; /* 20px base */
}
body.large-controls button,
body.large-controls .action-button,
body.large-controls .danger-button,
body.large-controls input,
body.large-controls select,
body.large-controls textarea {
  font-size: 1.125rem;
  padding: 1rem 1.5rem;
  min-height: 48px; /* WCAG touch target */
}
body.large-controls .dashboard-header .logo-text {
  font-size: 1.8rem;
}
body.large-controls .profile-card h3 {
  font-size: 1.5rem;
}
body.large-controls input[type="checkbox"],
body.large-controls input[type="radio"] {
  width: 24px;
  height: 24px;
}
body.large-controls .sidebar {
  max-width: 25%;
}
body.large-controls .sidebar button {
  padding: 1rem;
  font-size: 1.1rem;
}

/* -------------------------------------------------------------------------- */
/* Marketing Redesign                                                         */
/* -------------------------------------------------------------------------- */

body.mm-marketing {
  --mm-bg: #0f1419;
  --mm-bg-soft: #16202a;
  --mm-surface: rgba(18, 25, 33, 0.74);
  --mm-surface-strong: rgba(22, 30, 40, 0.92);
  --mm-surface-light: rgba(233, 224, 213, 0.12);
  --mm-border: rgba(249, 237, 221, 0.14);
  --mm-border-strong: rgba(249, 237, 221, 0.26);
  --mm-copy: #f7f2eb;
  --mm-copy-soft: rgba(247, 242, 235, 0.72);
  --mm-copy-mute: rgba(247, 242, 235, 0.54);
  --mm-accent: #e1b577;
  --mm-accent-strong: #f3d0a3;
  --mm-emerald: #8bcab1;
  --mm-shell-width: min(1200px, calc(100vw - 40px));
  --mm-radius-xl: 34px;
  --mm-radius-lg: 24px;
  --mm-radius-md: 18px;
  --mm-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
  --mm-shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.18);
  background:
    radial-gradient(circle at top left, rgba(225, 181, 119, 0.16), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(139, 202, 177, 0.16), transparent 20%),
    linear-gradient(180deg, #0c1217 0%, #101921 44%, #0c1116 100%);
  color: var(--mm-copy);
  font-family: "Manrope", "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body.mm-marketing::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: none;
}

body.mm-marketing h1,
body.mm-marketing h2,
body.mm-marketing h3,
body.mm-marketing h4,
body.mm-marketing h5,
body.mm-marketing h6 {
  color: var(--mm-copy);
  letter-spacing: -0.035em;
}

body.mm-marketing p,
body.mm-marketing li,
body.mm-marketing small {
  color: var(--mm-copy-soft);
}

body.mm-marketing a {
  color: inherit;
}

body.mm-marketing main,
body.mm-marketing footer {
  position: relative;
  z-index: 1;
}

.mm-site-nav {
  width: var(--mm-shell-width);
  margin: 18px auto 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 999px;
  border: 1px solid var(--mm-border);
  background: rgba(8, 13, 19, 0.76);
  box-shadow: var(--mm-shadow-soft);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 16px;
  z-index: 40;
}

body.mm-about-page .mm-site-nav,
body.mm-home .mm-site-nav {
  position: fixed;
  left: 50%;
  top: 18px;
  margin: 0;
  transform: translateX(-50%);
}

.mm-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}

.mm-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

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

.mm-brand-name {
  color: var(--mm-copy);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.mm-brand-tag {
  color: var(--mm-copy-mute);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.mm-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.mm-nav-links a {
  text-decoration: none;
  color: var(--mm-copy-soft);
  font-size: 0.96rem;
  font-weight: 600;
  transition: color 160ms ease, transform 160ms ease;
}

.mm-nav-links a:hover,
.mm-nav-links a:focus-visible {
  color: var(--mm-copy);
  transform: translateY(-1px);
}

.mm-auth-slot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mm-token-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.mm-token-pill[data-state="low"] {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(120, 53, 15, 0.32);
  color: #fde68a;
}

.mm-token-pill[data-state="empty"] {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.32);
  color: #fecaca;
}

.token-balance-slot {
  margin-top: 0.25rem;
}

.token-balance-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.96)),
    rgba(15, 23, 42, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 30px rgba(2, 8, 23, 0.22);
}

.token-balance-card.is-loading,
.token-balance-card.is-empty {
  min-height: 220px;
  justify-content: center;
}

.token-balance-card.is-empty.is-compact {
  min-height: 0;
  justify-content: flex-start;
}

.token-balance-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.token-balance-eyebrow {
  color: #93c5fd;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.token-balance-total {
  color: #f8fafc;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.05;
}

.token-balance-plan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
  font-size: 0.82rem;
  font-weight: 700;
}

.token-balance-copy {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.45;
}

.token-balance-grid {
  display: grid;
  gap: 0.65rem;
}

.token-balance-stat {
  display: grid;
  gap: 0.18rem;
  padding: 0.75rem 0.8rem;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.token-balance-label {
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.token-balance-stat strong {
  color: #f8fafc;
  font-size: 1rem;
}

.token-balance-stat small {
  color: #94a3b8;
  font-size: 0.76rem;
}

.token-balance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.token-balance-action {
  flex: 1 1 8.5rem;
  min-height: 2.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.9);
  color: #e5eefc;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.token-balance-action:hover,
.token-balance-action:focus-visible {
  transform: translateY(-1px);
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(96, 165, 250, 0.38);
}

.token-balance-action.primary {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.96), rgba(37, 99, 235, 0.96));
  border-color: transparent;
  color: #eff6ff;
}

.token-balance-footnote {
  margin: 0;
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.4;
}

.token-balance-notice {
  padding: 0.8rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(30, 41, 59, 0.66);
  color: #e0f2fe;
  font-size: 0.88rem;
  line-height: 1.45;
}

.token-balance-notice[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(20, 83, 45, 0.3);
  color: #dcfce7;
}

.token-balance-notice[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(120, 53, 15, 0.3);
  color: #fde68a;
}

.token-balance-notice[data-tone="danger"] {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.3);
  color: #fee2e2;
}

.billing-prompt-host {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  width: min(24rem, calc(100vw - 2rem));
  z-index: 95;
  pointer-events: none;
}

.billing-prompt-host.is-visible {
  pointer-events: none;
}

.billing-prompt-card {
  position: relative;
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background:
    linear-gradient(165deg, rgba(15, 23, 42, 0.97), rgba(17, 24, 39, 0.98)),
    rgba(15, 23, 42, 0.98);
  box-shadow: 0 20px 45px rgba(2, 8, 23, 0.35);
  color: #e2e8f0;
  pointer-events: auto;
}

.billing-prompt-card[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.34);
}

.billing-prompt-card[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.34);
}

.billing-prompt-card[data-tone="danger"] {
  border-color: rgba(248, 113, 113, 0.34);
}

.billing-prompt-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.billing-prompt-close:hover,
.billing-prompt-close:focus-visible {
  background: rgba(51, 65, 85, 0.96);
}

.billing-prompt-eyebrow {
  color: #93c5fd;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.billing-prompt-title {
  margin: 0;
  color: #f8fafc;
  font-size: 1.15rem;
  line-height: 1.2;
}

.billing-prompt-copy {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.5;
}

.billing-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.billing-prompt-action {
  flex: 1 1 9rem;
  min-height: 2.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.9);
  color: #e5eefc;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.billing-prompt-action.primary {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.96), rgba(37, 99, 235, 0.96));
  border-color: transparent;
  color: #eff6ff;
}

.billing-prompt-link {
  justify-self: start;
  border: 0;
  background: transparent;
  color: #93c5fd;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.billing-prompt-link:hover,
.billing-prompt-link:focus-visible {
  color: #dbeafe;
}

@media (max-width: 720px) {
  .billing-prompt-host {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }
}

body.mm-marketing #auth-slot > a[role="button"] {
  margin: 0;
  border: 1px solid rgba(243, 208, 163, 0.34);
  background: linear-gradient(135deg, rgba(243, 208, 163, 0.2), rgba(225, 181, 119, 0.4));
  color: var(--mm-copy);
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.mm-marketing #auth-slot .username {
  color: var(--mm-copy);
  font-weight: 700;
}

body.mm-marketing #auth-slot .user-avatar {
  box-shadow: 0 10px 24px rgba(14, 22, 29, 0.34);
}

.mm-site-main {
  width: var(--mm-shell-width);
  margin: 0 auto;
  padding: 44px 0 90px;
}

.mm-home-main {
  width: 100%;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mm-home-hero {
  --mm-home-opening-progress: 0;
  --mm-home-opening-copy-opacity: 1;
  --mm-home-opening-copy-shift: 0px;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: clip;
}

.mm-home-opening-rail {
  position: relative;
  min-height: calc(100vh + 2200px);
}

.mm-home-opening-pin {
  position: sticky;
  top: 0;
  height: 100vh;
}

.mm-home-opening-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05080b;
  isolation: isolate;
}

.mm-home-opening-stage::before,
.mm-home-opening-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mm-home-opening-stage::before {
  background:
    linear-gradient(90deg, rgba(5, 8, 11, 0.62) 0%, rgba(5, 8, 11, 0.3) 34%, rgba(5, 8, 11, 0.1) 64%, rgba(5, 8, 11, 0.34) 100%),
    linear-gradient(180deg, rgba(5, 8, 11, 0.08) 0%, rgba(5, 8, 11, 0) 42%, rgba(5, 8, 11, 0.42) 100%);
}

.mm-home-opening-stage::after {
  inset: auto 0 0;
  height: clamp(90px, 13vh, 170px);
  background: linear-gradient(180deg, rgba(5, 8, 11, 0), rgba(5, 8, 11, 0.34));
}

.mm-home-opening-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  object-position: center top;
  transform:
    scale(calc(1 + (var(--mm-home-opening-progress) * 0.026)))
    translate3d(0, calc(var(--mm-home-opening-progress) * 0.5%), 0);
  transform-origin: center center;
  filter:
    saturate(calc(1 + (var(--mm-home-opening-progress) * 0.06)))
    contrast(calc(1 + (var(--mm-home-opening-progress) * 0.03)))
    brightness(calc(1 + (var(--mm-home-opening-progress) * 0.02)));
  transition: opacity 180ms linear;
  will-change: opacity, transform, filter;
}

.mm-home-opening-video.is-active {
  opacity: 1;
}

.mm-home-opening-shell {
  position: relative;
  z-index: 2;
  width: var(--mm-shell-width);
  height: 100%;
  margin: 0 auto;
  padding: clamp(116px, 17vh, 168px) 0 clamp(44px, 9vh, 92px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 22px;
}

.mm-home-opening-copy-stack {
  display: grid;
  width: min(47rem, 100%);
  align-self: flex-start;
  background: transparent;
}

.mm-home-opening-copy {
  grid-area: 1 / 1;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 320ms ease, transform 420ms ease;
}

.mm-home-opening-copy.is-active {
  opacity: var(--mm-home-opening-copy-opacity);
  pointer-events: auto;
  transform: translateY(var(--mm-home-opening-copy-shift));
}

.mm-page-hero,
.mm-page-section,
.mm-playlist-section {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.mm-playlist-section .mm-section-head {
  width: var(--mm-shell-width);
  margin: 0 auto 24px;
}

.mm-kicker,
.mm-section-kicker,
.mm-card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 208, 163, 0.28);
  background: rgba(243, 208, 163, 0.08);
  color: var(--mm-accent-strong);
  font-size: 0.77rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.mm-display-title,
.mm-page-title {
  margin: 20px 0 16px;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: 0.94;
}

.mm-display-title {
  font-size: clamp(3.2rem, 6.8vw, 5.35rem);
}

.mm-page-title {
  font-size: clamp(3.2rem, 7vw, 5.5rem);
}

.mm-home-copy p,
.mm-page-intro {
  max-width: 58ch;
  font-size: 1.07rem;
  line-height: 1.72;
  color: var(--mm-copy-soft);
}

.mm-home-copy {
  position: relative;
  max-width: 42rem;
  width: auto;
  margin: 0;
  padding-bottom: 8px;
  opacity: var(--mm-home-opening-copy-opacity);
  transform: translateY(var(--mm-home-opening-copy-shift));
  will-change: opacity, transform;
}

.mm-home-hero .mm-home-copy {
  max-width: 46rem;
}

.mm-home-hero .mm-kicker {
  background: rgba(5, 8, 11, 0.3);
  border-color: rgba(243, 208, 163, 0.34);
  color: rgba(248, 220, 181, 0.96);
  backdrop-filter: blur(16px);
}

.mm-home-hero .mm-display-title {
  max-width: 12ch;
  color: #fbf5ee;
  text-shadow: 0 18px 56px rgba(0, 0, 0, 0.44);
}

.mm-home-hero .mm-home-copy p {
  max-width: 58ch;
  color: rgba(249, 243, 235, 0.88);
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
}

.mm-home-hero .mm-home-opening-copy {
  animation: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  visibility: hidden;
}

.mm-home-hero .mm-home-opening-copy.is-active {
  opacity: var(--mm-home-opening-copy-opacity);
  pointer-events: auto;
  transform: translateY(var(--mm-home-opening-copy-shift));
  visibility: visible;
}

.mm-cta-row,
.mm-page-actions,
.mm-pill-row,
.mm-stat-row,
.mm-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mm-cta-row,
.mm-page-actions {
  margin-top: 28px;
}

.mm-button,
.mm-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0.92rem 1.28rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.mm-button:hover,
.mm-button:focus-visible,
.mm-card-link:hover,
.mm-card-link:focus-visible {
  transform: translateY(-2px);
}

.mm-button-primary {
  color: #11161b;
  background: linear-gradient(135deg, #f4d8b1, #d9a86b);
  box-shadow: 0 18px 40px rgba(217, 168, 107, 0.26);
}

.mm-button-secondary {
  color: var(--mm-copy);
  border-color: var(--mm-border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.mm-button-ghost {
  color: var(--mm-copy-soft);
  border-color: transparent;
  background: transparent;
  padding-left: 0;
}

.mm-pill-row {
  margin-top: 26px;
}

.mm-pill {
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 202, 177, 0.26);
  background: rgba(139, 202, 177, 0.08);
  color: rgba(225, 245, 236, 0.92);
  font-size: 0.88rem;
  font-weight: 600;
}

.mm-stat-row {
  margin-top: 30px;
}

.mm-stat-card,
.mm-mini-card,
.mm-surface,
.mm-card,
.mm-metric-card,
.mm-flow-step,
.mm-audience-card,
.mm-playlist-shell {
  border-radius: var(--mm-radius-lg);
  border: 1px solid var(--mm-border);
  background: var(--mm-surface);
  box-shadow: var(--mm-shadow-soft);
  backdrop-filter: blur(18px);
}

.mm-stat-card {
  min-width: 170px;
  padding: 18px 18px 16px;
}

.mm-stat-value {
  color: var(--mm-copy);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.mm-stat-label {
  display: block;
  margin-top: 6px;
  color: var(--mm-copy-mute);
  font-size: 0.88rem;
}

.mm-hero-stage-card {
  position: relative;
  width: var(--mm-hero-stage-width);
  min-height: clamp(460px, 62vh, 620px);
  height: var(--mm-hero-stage-height);
  margin-left: auto;
  transform: translate3d(var(--mm-hero-stage-x), var(--mm-hero-stage-y), 0);
  transform-origin: top left;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--mm-hero-stage-radius);
  border: 1px solid rgba(255, 244, 230, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 247, 236, 0.96), rgba(229, 221, 210, 0.98)),
    radial-gradient(circle at top right, rgba(225, 181, 119, 0.18), transparent 25%);
  box-shadow: var(--mm-shadow);
  will-change: width, height, transform, border-radius;
  cursor: grab;
}

.mm-hero-stage-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 28px;
  border: 1px solid rgba(82, 60, 40, 0.08);
  pointer-events: none;
}

.mm-hero-stage-card:active {
  cursor: grabbing;
}

.mm-home-hero.is-scroll-reveal .mm-hero-stage-card {
  position: absolute;
  top: 0;
  right: 0;
}

.mm-hero-stage-card.is-ready {
  box-shadow:
    0 44px 120px rgba(7, 13, 20, 0.34),
    0 18px 44px rgba(105, 82, 55, 0.18);
}

.mm-viewer-enter {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 54px;
  padding: 0.85rem 1.4rem;
  width: auto;
  max-width: calc(100% - 64px);
  border: 1px solid rgba(255, 246, 235, 0.62);
  border-radius: 999px;
  background: rgba(10, 16, 22, 0.7);
  color: #f8f3eb;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 18px 46px rgba(7, 13, 20, 0.34);
  backdrop-filter: blur(18px);
  transform: translate(-50%, calc(18px * (1 - var(--mm-hero-cta-opacity))));
  opacity: var(--mm-hero-cta-opacity);
  pointer-events: auto;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.mm-viewer-enter:hover,
.mm-viewer-enter:focus-visible {
  background: rgba(14, 22, 30, 0.82);
  border-color: rgba(255, 246, 235, 0.84);
}

.mm-home-hero[data-viewer-interactive="1"] .mm-viewer-enter {
  opacity: 0;
  pointer-events: none;
}

.mm-home-hero[data-viewer-interactive="1"] .mm-hero-stage-card {
  cursor: auto;
}

.mm-hero-scene {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: clamp(420px, 58vh, 580px);
  border-radius: calc(var(--mm-hero-stage-radius) - 4px);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(28, 36, 43, 0.08);
}

.mm-hero-scene [data-3d-stage] {
  position: absolute;
  inset: 0;
}

.mm-hero-scene canvas,
.mm-hero-scene model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.mm-hero-stage-card.is-fallback .mm-hero-scene {
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(180deg, rgba(233, 225, 214, 0.92), rgba(220, 212, 201, 0.96));
}

.mm-mini-card-grid,
.mm-card-grid,
.mm-metric-grid,
.mm-audience-grid,
.mm-process-grid,
.mm-output-grid,
.mm-contact-grid,
.mm-service-grid {
  display: grid;
  gap: 18px;
}

.mm-mini-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mm-card-grid,
.mm-output-grid,
.mm-service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mm-process-grid,
.mm-metric-grid,
.mm-audience-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mm-mini-card,
.mm-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  text-decoration: none;
}

.mm-mini-card:hover,
.mm-card:hover,
.mm-surface:hover {
  border-color: rgba(243, 208, 163, 0.28);
}

.mm-card-title {
  color: var(--mm-copy);
  font-size: 1.2rem;
  font-weight: 700;
}

.mm-card-title strong {
  color: var(--mm-copy);
}

.mm-card p,
.mm-mini-card p,
.mm-flow-step p,
.mm-audience-card p,
.mm-surface p {
  margin: 0;
}

.mm-card ul,
.mm-audience-card ul,
.mm-surface ul {
  margin: 8px 0 0;
  padding-left: 1.05rem;
}

.mm-card li,
.mm-audience-card li,
.mm-surface li {
  margin: 0.34rem 0;
}

.mm-card-icon,
.mm-mini-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(243, 208, 163, 0.12);
  color: var(--mm-accent-strong);
  font-size: 1.25rem;
}

.mm-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.mm-section-head h2,
.mm-section-head h3 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: 0.98;
}

.mm-section-head p {
  max-width: 56ch;
  margin: 0;
}

.mm-page-hero {
  padding: 42px 0 26px;
}

.mm-page-hero .mm-pill-row {
  margin-top: 18px;
}

.mm-page-section {
  margin-top: 22px;
}

.mm-about-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding-top: 0;
}

.mm-about-film {
  --mm-about-progress: 0;
  --mm-about-copy-opacity: 1;
  --mm-about-copy-shift: 0px;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: clamp(14px, 2vw, 28px);
  overflow: clip;
}

.mm-about-film::before {
  content: "";
  position: absolute;
  inset: 10% auto auto -6%;
  z-index: 1;
  width: min(48vw, 620px);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(225, 181, 119, 0.22), transparent 64%),
    radial-gradient(circle at 62% 40%, rgba(139, 202, 177, 0.18), transparent 46%);
  filter: blur(56px);
  pointer-events: none;
}

.mm-about-film-stage-rail {
  position: relative;
  min-height: calc(100vh + 2200px);
}

.mm-about-film-pin {
  position: sticky;
  top: 0;
  height: 100vh;
}

.mm-about-film-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05080b;
  isolation: isolate;
}

.mm-about-film-stage::before,
.mm-about-film-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mm-about-film-stage::before {
  background:
    linear-gradient(90deg, rgba(6, 10, 14, 0.84) 0%, rgba(6, 10, 14, 0.66) 20%, rgba(6, 10, 14, 0.28) 48%, rgba(6, 10, 14, 0.56) 100%),
    linear-gradient(180deg, rgba(5, 8, 11, 0.22) 0%, rgba(5, 8, 11, 0.1) 34%, rgba(5, 8, 11, 0.88) 100%),
    radial-gradient(circle at 72% 18%, rgba(243, 208, 163, 0.12), transparent 22%);
}

.mm-about-film-stage::after {
  inset: auto 0 0;
  height: clamp(120px, 18vh, 220px);
  background: linear-gradient(180deg, rgba(11, 17, 22, 0), rgba(11, 17, 22, 0.92));
}

.mm-about-film-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform:
    scale(calc(1 + (var(--mm-about-progress) * 0.035)))
    translate3d(0, calc(var(--mm-about-progress) * 0.6%), 0);
  transform-origin: center center;
  filter:
    saturate(calc(1.0))
    contrast(calc(1.0))
    brightness(calc(1.0));
  will-change: transform, filter;
}

.mm-about-film-shell {
  position: relative;
  z-index: 2;
  width: var(--mm-shell-width);
  height: 100%;
  margin: 0 auto;
  padding: clamp(78px, 11vh, 116px) 0 clamp(30px, 7vh, 72px);
  display: flex;
  align-items: center;
}

.mm-about-film-copy {
  width: min(62rem, 68vw);
  opacity: var(--mm-about-copy-opacity);
  transform: translate3d(0, var(--mm-about-copy-shift), 0);
  will-change: opacity, transform;
}

.mm-about-film .mm-kicker {
  background: rgba(9, 14, 18, 0.26);
  border-color: rgba(243, 208, 163, 0.36);
  backdrop-filter: blur(16px);
}

.mm-about-film-copy .mm-page-title {
  max-width: 16ch;
  margin-top: 18px;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  text-wrap: balance;
  text-shadow: 0 18px 56px rgba(0, 0, 0, 0.38);
}

.mm-home-feature-showcase {
  --mm-home-feature-progress: 0;
  --mm-home-feature-copy-opacity: 1;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -42px;
  overflow: clip;
}

.mm-home-feature-rail {
  position: relative;
  min-height: calc(100vh + 2200px);
}

.mm-home-feature-pin {
  position: sticky;
  top: 0;
  height: 100vh;
}

.mm-home-feature-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05080b;
  isolation: isolate;
}

.mm-home-feature-stage::before,
.mm-home-feature-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mm-home-feature-stage::before {
  background:
    linear-gradient(90deg, rgba(5, 8, 11, 0.5) 0%, rgba(5, 8, 11, 0.22) 34%, rgba(5, 8, 11, 0.08) 62%, rgba(5, 8, 11, 0.32) 100%),
    linear-gradient(180deg, rgba(5, 8, 11, 0) 0%, rgba(5, 8, 11, 0.04) 50%, rgba(5, 8, 11, 0.3) 100%);
}

.mm-home-feature-stage::after {
  inset: auto 0 0;
  height: clamp(80px, 12vh, 150px);
  background: linear-gradient(180deg, rgba(11, 17, 22, 0), rgba(11, 17, 22, 0.24));
}

.mm-home-feature-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform:
    scale(calc(1 + (var(--mm-home-feature-progress) * 0.035)))
    translate3d(0, calc(var(--mm-home-feature-progress) * 0.6%), 0);
  transform-origin: center center;
  filter:
    saturate(calc(1.0))
    contrast(calc(1.0))
    brightness(calc(1.0));
  will-change: transform, filter;
}

.mm-home-feature-shell {
  position: relative;
  z-index: 2;
  width: var(--mm-shell-width);
  height: 100%;
  margin: 0 auto;
  padding: clamp(86px, 13vh, 130px) 0 clamp(44px, 8vh, 82px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.66fr);
  align-content: end;
  align-items: end;
  column-gap: clamp(32px, 5vw, 72px);
  row-gap: 24px;
}

.mm-home-feature-links {
  display: grid;
  width: min(480px, 100%);
  grid-template-columns: 1fr;
  justify-self: end;
  gap: 10px;
}

.mm-home-feature-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0.78rem 0.94rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 244, 230, 0.18);
  background: rgba(11, 16, 21, 0.34);
  color: rgba(249, 243, 235, 0.94);
  text-decoration: none;
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mm-home-feature-link:hover,
.mm-home-feature-link:focus-visible {
  transform: translateX(4px);
  border-color: rgba(243, 208, 163, 0.42);
  background: rgba(11, 16, 21, 0.48);
}

.mm-home-feature-index {
  flex: 0 0 auto;
  min-width: 1.8rem;
  color: rgba(243, 208, 163, 0.86);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mm-home-feature-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 40rem;
  padding: 8px 6px 0 0;
  opacity: var(--mm-home-feature-copy-opacity);
  will-change: opacity;
}

.mm-home-feature-copy h2 {
  max-width: 15ch;
  margin: 0;
  color: #fbf5ee;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.25rem, 4.1vw, 3.45rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.mm-home-feature-copy p {
  max-width: 58ch;
  margin: 0;
  color: rgba(249, 243, 235, 0.86);
  font-size: 1rem;
  line-height: 1.68;
  text-shadow: 0 10px 24px rgba(10, 14, 18, 0.18);
}

.mm-card[id],
.mm-flow-step[id],
.mm-audience-card[id] {
  scroll-margin-top: 150px;
}

.mm-card-grid-expanded {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mm-surface {
  padding: 24px;
}

.mm-feature-list,
.mm-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mm-feature-list li,
.mm-check-list li {
  position: relative;
  padding-left: 1.3rem;
  margin: 0.45rem 0;
}

.mm-feature-list li::before,
.mm-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mm-accent);
}

.mm-metric-card {
  padding: 22px;
}

.mm-metric-value {
  display: block;
  color: var(--mm-copy);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.mm-flow-step {
  padding: 22px;
  position: relative;
}

.mm-flow-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  margin-bottom: 16px;
  background: rgba(243, 208, 163, 0.12);
  color: var(--mm-accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.mm-flow-step h3,
.mm-flow-step h4,
.mm-audience-card h3,
.mm-audience-card h4 {
  margin: 0 0 8px;
  font-size: 1.22rem;
}

.mm-audience-card {
  padding: 22px;
}

.mm-playlist-shell {
  width: var(--mm-shell-width);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
  clip-path: inset(0 round 0);
}

.mm-playlist-embed-shell {
  width: 100%;
  position: relative;
  border-radius: 0 !important;
  overflow: hidden;
  clip-path: inset(0 round 0);
}

.mm-video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
  background: rgba(0, 0, 0, 0.3);
  clip-path: inset(0 round 0);
}

.mm-playlist-fallback {
  display: block;
}

.mm-playlist-fallback-inline {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 244, 230, 0.08);
}

.mm-playlist-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  min-height: 100%;
  border-radius: 0 !important;
  border: 0;
  background: transparent;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
  clip-path: inset(0 round 0);
}

.mm-playlist-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 13, 0.08), rgba(8, 10, 13, 0.64)),
    radial-gradient(circle at top right, rgba(217, 168, 107, 0.32), transparent 36%);
  transition: opacity 180ms ease;
}

.mm-playlist-preview:hover::after,
.mm-playlist-preview:focus-visible::after {
  opacity: 0.82;
}

.mm-playlist-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 0 !important;
  object-fit: cover;
  transition: transform 220ms ease;
  clip-path: inset(0 round 0);
}

.mm-playlist-section [data-playlist-root],
.mm-playlist-section [data-playlist-fallback],
.mm-playlist-section [data-playlist-embed],
.mm-playlist-section [data-playlist-load],
.mm-playlist-section [data-playlist-load] img,
.mm-playlist-section [data-playlist-iframe] {
  border-radius: 0 !important;
}

.mm-playlist-preview:hover img,
.mm-playlist-preview:focus-visible img {
  transform: scale(1.03);
}

.mm-playlist-preview-badge,
.mm-playlist-preview-play {
  position: absolute;
  z-index: 1;
}

.mm-playlist-preview-badge {
  top: 18px;
  left: 18px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(8, 10, 13, 0.78);
  color: rgba(255, 247, 236, 0.94);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mm-playlist-preview-play {
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.72rem 1.02rem;
  border-radius: 999px;
  background: rgba(255, 247, 236, 0.9);
  color: #121821;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mm-playlist-preview-play::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.mm-playlist-copy h3 {
  margin: 10px 0 12px;
  font-size: clamp(1.9rem, 3vw, 2.45rem);
}

.mm-playlist-copy p {
  max-width: 40ch;
  color: var(--mm-copy-soft);
  line-height: 1.72;
}

.mm-cta-row-compact {
  margin-top: 18px;
}

.mm-playlist-copy .mm-button-ghost {
  padding-left: 0.2rem;
}

.mm-site-footer {
  width: var(--mm-shell-width);
  margin: 0 auto 34px;
  padding: 0;
  border: 0;
  text-align: left;
}

.mm-site-footer .mm-surface {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.mm-site-footer .mm-footer-links {
  justify-content: center;
}

.mm-footer-links a {
  color: var(--mm-copy-soft);
  text-decoration: none;
}

.mm-footer-links a:hover,
.mm-footer-links a:focus-visible {
  color: var(--mm-copy);
}

.mm-footer-meta {
  color: var(--mm-copy-soft);
  font: inherit;
  line-height: inherit;
  white-space: nowrap;
}

.mm-contact-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
}

.mm-contact-grid .contact-form,
.mm-contact-grid .contact-info,
.mm-pricing-shell,
.mm-pricing-note {
  padding: 24px;
  border-radius: var(--mm-radius-lg);
  border: 1px solid var(--mm-border);
  background: var(--mm-surface);
  box-shadow: var(--mm-shadow-soft);
  backdrop-filter: blur(18px);
}

.mm-marketing .auth-status {
  margin-top: 14px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--mm-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mm-copy-soft);
}

.mm-marketing .auth-status[data-tone="success"] {
  color: #d8f3e6;
  border-color: rgba(139, 202, 177, 0.34);
  background: rgba(139, 202, 177, 0.12);
}

.mm-marketing .auth-status[data-tone="error"] {
  color: #ffd6cd;
  border-color: rgba(217, 92, 69, 0.3);
  background: rgba(217, 92, 69, 0.12);
}

.mm-marketing label {
  color: var(--mm-copy);
  font-weight: 600;
}

.mm-marketing input,
.mm-marketing textarea,
.mm-marketing select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--mm-copy);
  padding: 0.95rem 1rem;
}

.mm-marketing input::placeholder,
.mm-marketing textarea::placeholder {
  color: rgba(247, 242, 235, 0.38);
}

.mm-marketing textarea {
  min-height: 160px;
}

.mm-marketing button,
.mm-marketing [role="button"] {
  border-radius: 999px;
}

.mm-marketing .submit-button,
.mm-marketing .download-button,
 .mm-marketing .order-button,
 .mm-marketing .generate-ai-video-button,
 .mm-marketing .google-signin,
 .mm-marketing .google-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.92rem 1.28rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #f4d8b1, #d9a86b);
  color: #11161b;
  font-weight: 700;
  text-decoration: none;
}

.mm-marketing .submit-button[aria-busy="true"] {
  opacity: 0.8;
}

.mm-auth-main {
  padding-top: 36px;
}

.mm-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 32px;
  align-items: start;
}

.mm-auth-copy {
  max-width: 42rem;
}

.mm-auth-copy .mm-page-title {
  max-width: 11ch;
}

.mm-auth-sidecard,
.mm-auth-panel {
  padding: 28px;
  border-radius: var(--mm-radius-xl);
  border: 1px solid var(--mm-border);
  box-shadow: var(--mm-shadow-soft);
  backdrop-filter: blur(18px);
}

.mm-auth-sidecard {
  margin-top: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.mm-auth-sidecard h2,
.mm-auth-panel-head h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
}

.mm-auth-panel {
  background:
    linear-gradient(180deg, rgba(12, 16, 22, 0.94), rgba(8, 10, 13, 0.9)),
    radial-gradient(circle at top right, rgba(225, 181, 119, 0.18), transparent 30%);
}

.mm-auth-panel-head p,
.mm-auth-sidecard p {
  margin: 0;
  color: var(--mm-copy-soft);
  line-height: 1.72;
}

.mm-auth-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  margin: 24px 0 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.mm-auth-tab {
  min-height: 52px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mm-copy-soft);
  font-weight: 700;
  box-shadow: none;
}

.mm-auth-tab.is-active {
  color: #11161b;
  background: linear-gradient(135deg, #f4d8b1, #d9a86b);
  box-shadow: 0 14px 32px rgba(217, 168, 107, 0.22);
}

.mm-auth-form {
  margin-top: 24px;
}

.mm-auth-form.active {
  display: block;
}

.mm-auth-form[hidden] {
  display: none !important;
}

.mm-auth-form .grid {
  gap: 16px;
}

.mm-auth-provider {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(243, 208, 163, 0.24);
  background: linear-gradient(135deg, rgba(243, 208, 163, 0.22), rgba(225, 181, 119, 0.42));
  color: var(--mm-copy);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.mm-signup-checkout-step {
  display: grid;
  gap: 16px;
}

.mm-signup-checkout-step[hidden] {
  display: none !important;
}

.mm-signup-checkout-confirmed {
  margin: 18px 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(74, 222, 128, 0.32);
  border-radius: 8px;
  background: rgba(20, 83, 45, 0.28);
  color: #dcfce7;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.mm-signup-checkout-confirmed[hidden] {
  display: none !important;
}

.mm-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--mm-copy-mute);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mm-auth-divider::before,
.mm-auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.mm-auth-divider span {
  white-space: nowrap;
}

.mm-auth-main .submit-button {
  width: 100%;
  margin-top: 10px;
}

.mm-auth-main .forgot-password {
  margin-top: 16px;
  text-align: center;
}

.mm-auth-main .forgot-password a,
.mm-auth-footnote a {
  color: var(--mm-copy-soft);
  text-decoration: none;
}

.mm-auth-main .forgot-password a:hover,
.mm-auth-main .forgot-password a:focus-visible,
.mm-auth-footnote a:hover,
.mm-auth-footnote a:focus-visible {
  color: var(--mm-copy);
}

.mm-auth-footnote {
  margin-top: 20px;
  text-align: center;
  font-size: 0.94rem;
}

.mm-auth-panel-copy {
  margin: 0 0 1rem;
  color: var(--mm-copy-soft);
}

.mm-auth-main .forgot-password-panel {
  margin-top: 20px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.mm-auth-main .auth-actions-row {
  margin-top: 16px;
}

.mm-auth-main .auth-actions-row .mm-button,
.mm-auth-main .auth-actions-row .submit-button {
  min-height: 48px;
}

.mm-auth-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin: 12px 0 18px;
}

.mm-auth-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
}

.mm-auth-check span {
  color: var(--mm-copy-soft);
  line-height: 1.6;
}

.mm-legacy-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mm-legacy-main > .back-button {
  margin: 0;
}

.mm-legacy-main > .back-button a[role="button"],
.mm-legacy-main a[role="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.9rem 1.24rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 208, 163, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mm-copy);
  text-decoration: none;
  font-weight: 700;
}

.mm-legacy-main > .back-button a.secondary {
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--mm-copy-soft);
}

.mm-legacy-main > :not(.back-button) {
  padding: 24px;
  border-radius: var(--mm-radius-lg);
  border: 1px solid var(--mm-border);
  background: var(--mm-surface);
  box-shadow: var(--mm-shadow-soft);
  backdrop-filter: blur(18px);
}

.mm-legacy-main > .hero-section {
  padding: 34px;
  border-radius: var(--mm-radius-xl);
  border: 1px solid rgba(243, 208, 163, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 247, 236, 0.08), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at top right, rgba(225, 181, 119, 0.18), transparent 28%);
}

.mm-legacy-main .hero-section h1 {
  margin: 0 0 12px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(3rem, 6vw, 5.1rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.mm-legacy-main .hero-section h2 {
  margin: 0 0 14px;
  color: var(--mm-copy);
  font-size: clamp(1.18rem, 2.5vw, 1.95rem);
}

.mm-legacy-main .hero-section p {
  max-width: 66ch;
}

.mm-legacy-main h3,
.mm-legacy-main h4 {
  color: var(--mm-copy);
}

.mm-legacy-main > :not(.back-button) > h3:first-child,
.mm-legacy-main > section > h3:first-child,
.mm-legacy-main article > header h3:first-child {
  margin-top: 0;
}

.mm-legacy-main p,
.mm-legacy-main li,
.mm-legacy-main td,
.mm-legacy-main th,
.mm-legacy-main small,
.mm-legacy-main em {
  color: var(--mm-copy-soft);
  line-height: 1.72;
}

.mm-legacy-main :is(
  .format-grid,
  .feature-grid,
  .features-grid,
  .option-grid,
  .spec-grid,
  .size-grid,
  .pricing-grid,
  .capability-grid,
  .modification-methods,
  .example-grid,
  .experience-steps,
  .plot-selection,
  .customization-grid,
  .process-steps,
  .grid
) {
  gap: 18px;
}

.mm-legacy-main :is(
  .format-card,
  .feature-card,
  .option-card,
  .spec-item,
  .material-card,
  .size-card,
  .pricing-card,
  .capability-item,
  .feature-item,
  .method-card,
  .example-card,
  .step-card,
  .plot-option,
  .custom-option,
  .benefit-card,
  .flow-step
) {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mm-legacy-main table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 18px;
}

.mm-legacy-main th,
.mm-legacy-main td {
  border-color: rgba(255, 255, 255, 0.08);
}

.mm-legacy-main video {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--mm-shadow-soft);
}

.mm-pricing-shell {
  margin-top: 24px;
}

.mm-pricing-shell #pricing-table-container {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 180px;
}

.mm-pricing-note {
  margin-top: 18px;
}

.mm-table-ish {
  width: 100%;
  border-collapse: collapse;
}

.mm-table-ish th,
.mm-table-ish td {
  padding: 0.92rem 0.98rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  color: var(--mm-copy-soft);
}

.mm-table-ish th {
  color: var(--mm-copy);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.mm-table-ish tr:last-child td {
  border-bottom: 0;
}

.mm-hero-stage-card,
.mm-stat-card,
.mm-mini-card,
.mm-card,
.mm-flow-step,
.mm-audience-card,
.mm-surface,
.mm-pricing-shell,
.mm-pricing-note,
.mm-playlist-shell,
.mm-contact-grid .contact-form,
.mm-contact-grid .contact-info {
  animation: mm-rise-in 700ms ease both;
}

.mm-home-copy,
.mm-page-hero,
.mm-section-head,
.mm-pill-row,
.mm-cta-row {
  animation: mm-fade-up 720ms ease both;
}

@keyframes mm-rise-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mm-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .mm-about-film-copy {
    width: min(34rem, 100%);
  }

  .mm-about-film-copy .mm-page-title {
    max-width: 10.5ch;
  }

  .mm-about-film-shell {
    width: min(100vw - 40px, var(--mm-shell-width));
    padding-top: clamp(120px, 15vh, 154px);
    padding-bottom: clamp(48px, 9vh, 84px);
  }

  .mm-home-feature-pin {
    height: 100svh;
  }

  .mm-home-feature-shell {
    width: min(100vw - 40px, var(--mm-shell-width));
    padding-top: clamp(112px, 15vh, 146px);
    padding-bottom: clamp(34px, 7vh, 62px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .mm-home-feature-links {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-self: auto;
    align-self: stretch;
  }

  .mm-home-feature-copy h2 {
    max-width: 14ch;
  }

  .mm-playlist-section .mm-section-head {
    width: min(100vw - 40px, var(--mm-shell-width));
    margin-left: auto;
    margin-right: auto;
  }

  .mm-playlist-shell {
    width: min(100vw - 40px, var(--mm-shell-width));
  }

  .mm-home-opening-pin {
    height: 100svh;
  }

  .mm-home-opening-shell {
    width: min(100vw - 40px, var(--mm-shell-width));
    padding-top: clamp(122px, 16vh, 154px);
    padding-bottom: clamp(44px, 9vh, 82px);
  }

  .mm-home-hero-pin,
  .mm-contact-grid,
  .mm-auth-layout {
    grid-template-columns: 1fr;
  }

  .mm-home-hero {
    min-height: auto;
  }

  .mm-home-hero-pin {
    position: static;
    min-height: auto;
  }

  .mm-playlist-fallback,
  .mm-playlist-fallback-inline {
    grid-template-columns: 1fr;
  }

  .mm-mini-card-grid,
  .mm-card-grid,
  .mm-output-grid,
  .mm-service-grid,
  .mm-process-grid,
  .mm-metric-grid,
  .mm-audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-home-stage-rail {
    min-height: clamp(440px, 62vh, 580px);
  }

  .mm-hero-stage-card {
    position: relative;
    width: 100%;
    min-height: clamp(440px, 62vh, 580px);
    height: clamp(440px, 62vh, 580px);
    transform: none;
  }

  .mm-auth-copy .mm-page-title {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .mm-about-film-stage-rail {
    min-height: calc(100vh + 1180px);
  }

  .mm-about-film-pin {
    height: 100svh;
  }

  .mm-about-film::before {
    inset: 18% auto auto -18%;
    width: min(76vw, 420px);
  }

  .mm-about-film-shell {
    width: min(100vw - 24px, var(--mm-shell-width));
    padding: 104px 0 34px;
  }

  .mm-about-film-copy {
    width: 100%;
  }

  .mm-about-film-copy .mm-page-title {
    max-width: 8.8ch;
    font-size: clamp(2.7rem, 13vw, 4.1rem);
  }

  .mm-site-nav {
    padding: 16px;
    border-radius: 28px;
    top: 10px;
  }

  .mm-brand-copy {
    display: none;
  }

  .mm-nav-links {
    gap: 12px;
  }

  .mm-nav-links a {
    font-size: 0.9rem;
  }

  .mm-site-main {
    width: min(100vw - 24px, 1200px);
    padding-bottom: 72px;
  }

  .mm-home-opening-rail {
    min-height: calc(100svh + 1280px);
  }

  .mm-home-opening-shell {
    width: min(100vw - 24px, var(--mm-shell-width));
    padding: 108px 0 34px;
  }

  .mm-home-hero .mm-display-title {
    max-width: 8.4ch;
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .mm-home-hero .mm-home-copy p {
    font-size: 1rem;
    line-height: 1.62;
  }

  .mm-home-feature-rail {
    min-height: calc(100svh + 1240px);
  }

  .mm-home-feature-shell {
    width: min(100vw - 24px, var(--mm-shell-width));
    padding: 104px 0 28px;
    gap: 18px;
  }

  .mm-home-feature-copy h2 {
    max-width: none;
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .mm-home-feature-copy p {
    font-size: 1rem;
  }

  .mm-home-feature-link {
    padding: 0.84rem 0.92rem;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .mm-auth-main {
    padding-top: 24px;
  }

  .mm-auth-sidecard,
  .mm-auth-panel,
  .mm-legacy-main > :not(.back-button) {
    padding: 20px;
  }

  .mm-legacy-main > .hero-section {
    padding: 26px 20px;
  }

  .mm-mini-card-grid,
  .mm-card-grid,
  .mm-output-grid,
  .mm-service-grid,
  .mm-process-grid,
  .mm-metric-grid,
  .mm-audience-grid {
    grid-template-columns: 1fr;
  }

  .mm-home-hero-pin {
    gap: 22px;
  }

  .mm-hero-stage-card {
    min-height: auto;
    padding: 14px;
  }

  .mm-playlist-preview img {
    min-height: 240px;
  }

  .mm-playlist-shell {
    width: min(100vw - 24px, var(--mm-shell-width));
  }

  .mm-auth-toggle {
    grid-template-columns: 1fr;
    border-radius: 28px;
  }

  .mm-viewer-enter {
    display: none;
  }

  .mm-hero-scene {
    min-height: min(62vh, 480px);
  }

  .mm-site-footer .mm-surface {
    flex-direction: column;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-hero-stage-card,
  .mm-stat-card,
  .mm-mini-card,
  .mm-card,
  .mm-flow-step,
  .mm-audience-card,
  .mm-surface,
  .mm-pricing-shell,
  .mm-pricing-note,
  .mm-playlist-shell,
  .mm-contact-grid .contact-form,
  .mm-contact-grid .contact-info,
  .mm-home-copy,
  .mm-page-hero,
  .mm-section-head,
  .mm-pill-row,
  .mm-cta-row {
    animation: none;
  }
}
