/* Gemini AI Photobooth — Google-inspired light theme */

:root {
  /* Google-inspired primary colors */
  --google-blue: #4285F4;
  --google-blue-dark: #1A73E8;
  --google-red: #EA4335;
  --google-yellow: #FBBC05;
  --google-green: #34A853;

  /* Backgrounds */
  --bg-main: #F8F9FA;
  --bg-page: #FFFFFF;
  --bg-soft: #F1F3F4;
  --bg-hover: #F8FAFD;
  --bg-deep: var(--bg-main);
  --bg: var(--bg-page);
  --bg-elevated: var(--surface);
  --bg-glass: var(--surface);

  /* Cards / surfaces */
  --surface: #FFFFFF;
  --surface-secondary: #F8F9FA;

  /* Typography */
  --text-primary: #202124;
  --text-secondary: #5F6368;
  --text-muted: #80868B;
  --text: var(--text-primary);

  /* Borders */
  --border: #DADCE0;
  --border-light: #E8EAED;

  /* Status */
  --success: #34A853;
  --danger: #EA4335;
  --warning: #F9AB00;
  --info: #4285F4;

  /* Interactive */
  --primary: #1A73E8;
  --primary-hover: #1765CC;
  --primary-soft: #E8F0FE;
  --secondary: var(--google-blue);
  --accent: var(--primary);
  --accent-2: var(--google-blue);
  --accent-soft: var(--primary-soft);
  --accent-glow: rgba(26, 115, 232, 0.18);

  /* Typography */
  --font-display: "Google Sans", "Product Sans", Roboto, "Segoe UI", system-ui, sans-serif;
  --font-body: Roboto, "Segoe UI", system-ui, Arial, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-md: 1rem;
  --fs-lg: 1.15rem;
  --fs-xl: clamp(1.5rem, 3.2vw, 2.4rem);

  /* Spacing & shape */
  --space-1: 0.35rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.10);
  --shadow-md: 0 2px 8px rgba(60, 64, 67, 0.15);
  --shadow-lg: 0 8px 24px rgba(60, 64, 67, 0.16);
  --shadow-glow: 0 4px 16px rgba(26, 115, 232, 0.18);
}

* { box-sizing: border-box; }

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

body.guest-body {
  background:
    linear-gradient(135deg, #FFFFFF 0%, #F8FBFF 55%, #F6FAF7 100%);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

body.guest-body::before,
body.guest-body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
  opacity: 0.14;
}

body.guest-body::before {
  width: 340px;
  height: 340px;
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, var(--google-blue), transparent 70%);
}

body.guest-body::after {
  width: 280px;
  height: 280px;
  right: -40px;
  bottom: 10%;
  background: radial-gradient(circle, var(--google-green), transparent 70%);
}

a { color: var(--primary); text-decoration: none; }
img {
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
}

.guest-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  position: relative;
  z-index: 1;
}

.guest-card,
.kiosk-card {
  width: min(920px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.brand {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  text-transform: none;
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.brand span { color: var(--primary); }

.tagline {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin: 0 0 2rem;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  min-height: 48px;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
}

.btn-secondary {
  background: var(--surface);
  color: #3C4043;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: #C0C4C8;
  color: var(--text-primary);
}

.btn-danger {
  background: transparent;
  color: #D93025;
  border: 1px solid var(--google-red);
}

.btn-danger:hover { background: #FCE8E6; }

.btn-lg {
  min-width: min(320px, 100%);
  min-height: 56px;
  font-size: 1.05rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #9AA0A6; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.field-error {
  color: #D93025;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: #FCE8E6;
  border: 1px solid #F6AEA9;
  color: #C5221F;
}

.alert-success {
  background: #E6F4EA;
  border: 1px solid #A8DAB5;
  color: #137333;
}

.alert-warning {
  background: #FEF7E0;
  border: 1px solid #FDE293;
  color: #B06000;
}

.photo-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.option-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  background: var(--surface-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-align: center;
}

.option-card p {
  color: var(--text-secondary);
  margin: 0.5rem 0 0;
}

.option-ico {
  display: block;
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.option-card:hover,
.option-card.active {
  border-color: #AECBFA;
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.camera-frame {
  padding: 0.65rem;
  border-radius: calc(var(--radius) + 8px);
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  margin: 0 auto 1rem;
  width: min(420px, 100%);
  box-shadow: var(--shadow-sm);
}

.camera-wrap {
  position: relative;
  width: 100%;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #202124;
  aspect-ratio: 4 / 6;
}

/* Never mirror camera/preview/result images — keeps left/right consistent. */
#camera-video.is-selfie-preview,
.preview-frame img,
.result-image-stage img,
.result-image-wrap img,
#local-preview-img {
  transform: none;
}

.camera-wrap video,
.camera-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-frame {
  width: min(420px, 100%);
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.preview-frame img {
  display: block;
  max-width: 100%;
  max-height: min(60dvh, 640px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.upload-status {
  margin: 0.85rem auto 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-height: 1.4em;
}

.upload-status.is-busy { color: var(--primary); }
.upload-status.is-ready { color: var(--success); }
.upload-status.is-error { color: var(--danger); }

.review-actions {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.review-actions .btn {
  min-height: 48px;
}

#btn-retry-upload {
  display: none;
}

#review-panel.has-upload-error #btn-retry-upload,
#review-panel:has(.upload-status.is-error) #btn-retry-upload {
  display: inline-flex;
}

.upload-drop {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  margin: 1rem auto;
  max-width: 520px;
  cursor: pointer;
  background: var(--surface-secondary);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-drop:hover,
.upload-drop:focus {
  border-color: var(--primary);
  background: var(--primary-soft);
  outline: none;
}

.upload-drop p {
  color: var(--text-secondary);
  margin: 0.5rem 0 0;
}

.touch-form .form-group input,
.touch-form .form-group select,
.touch-form .form-group textarea {
  min-height: 56px;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}

.details-card { width: min(640px, 100%); }

.countdown-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(32, 33, 36, 0.45);
  font-family: var(--font-display);
  font-size: 6rem;
  color: #FFFFFF;
}

.countdown-overlay.show { display: flex; }

.loader-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
  background: transparent;
}

.orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  background: radial-gradient(circle at 30% 30%, #fff, var(--primary) 45%, transparent 70%);
  box-shadow: var(--shadow-glow);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.75fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  width: 100%;
  align-items: center;
}

@media (max-width: 900px) {
  .result-layout {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.qr-box {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  display: inline-block;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.qr-box img,
.result-qr img {
  width: clamp(140px, 22vw, 220px);
  height: auto;
  display: block;
}

/* Shared components also used by admin via app.css */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data-table th,
table.data-table td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: middle;
}

table.data-table th {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-completed { background: #E6F4EA; color: #137333; }
.badge-failed { background: #FCE8E6; color: #C5221F; }
.badge-processing { background: #E8F0FE; color: #1967D2; }
.badge-pending { background: #F1F3F4; color: #5F6368; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card:hover {
  border-color: #AECBFA;
  box-shadow: var(--shadow-md);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
}

.gallery-card .meta { padding: 0.75rem 0.9rem 1rem; }

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.gallery-actions .btn-sm {
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  border-radius: 999px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 700px) {
  .compare-grid { grid-template-columns: 1fr; }
}

.compare-grid img {
  width: 100%;
  border-radius: 12px;
  cursor: zoom-in;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

.admin-input,
.admin-select,
.admin-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.admin-textarea {
  width: 100%;
  min-height: 220px;
}

.flash-success { background: #E6F4EA; color: #137333; }
.flash-error { background: #FCE8E6; color: #C5221F; }
.flash-info { background: #E8F0FE; color: #1967D2; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--bg-main);
}

.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.hidden { display: none !important; }

.fade-in {
  animation: fadeIn 0.45s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.event-logo {
  height: 72px;
  margin: 0 auto 1.2rem;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.event-logo.small { height: 48px; }

.event-name-line {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.welcome-card { padding: clamp(2rem, 5vw, 3.5rem); }

.brand-accent {
  display: flex;
  width: 72px;
  height: 4px;
  gap: 3px;
  margin: 0.85rem auto 1.25rem;
}

.brand-accent span {
  flex: 1;
  border-radius: 10px;
}

.brand-accent span:nth-child(1) { background: var(--google-blue); }
.brand-accent span:nth-child(2) { background: var(--google-red); }
.brand-accent span:nth-child(3) { background: var(--google-yellow); }
.brand-accent span:nth-child(4) { background: var(--google-green); }

.brand-accent.left { margin-left: 0; margin-right: auto; }

.btn-pulse {
  animation: softPulse 2.4s ease-in-out infinite;
}

@keyframes softPulse {
  0%, 100% { box-shadow: 0 1px 3px rgba(26, 115, 232, 0.3); }
  50% { box-shadow: 0 4px 16px rgba(26, 115, 232, 0.35); }
}

.loader-inner { max-width: 560px; margin: 0 auto; }
.loader-title {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.loader-message {
  color: var(--text-secondary);
  font-size: 1.15rem;
  min-height: 1.6em;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.loader-message.msg-out { opacity: 0; transform: translateY(6px); }
.loader-message.msg-in { opacity: 1; transform: none; }

.ai-ring {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background:
    conic-gradient(
      from 0deg,
      var(--google-blue) 0deg 90deg,
      var(--google-red) 90deg 180deg,
      var(--google-yellow) 180deg 270deg,
      var(--google-green) 270deg 360deg
    );
  animation: spin 1.8s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}

.ai-ring-core {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-light);
  position: absolute;
  /* core sits outside mask; use sibling structure */
}

.ai-ring-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  position: relative;
  display: grid;
  place-items: center;
}

.ai-ring-wrap .ai-ring {
  position: absolute;
  inset: 0;
  margin: 0;
}

.ai-ring-wrap .ai-ring-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  animation: pulse 1.8s ease-in-out infinite;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}

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

.loader-dots {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.35;
  animation: dotPulse 1.2s ease-in-out infinite;
}

.loader-dots span:nth-child(1) { background: var(--google-blue); }
.loader-dots span:nth-child(2) { background: var(--google-red); animation-delay: 0.15s; }
.loader-dots span:nth-child(3) { background: var(--google-yellow); animation-delay: 0.3s; }
.loader-dots span:nth-child(4) { background: var(--google-green); animation-delay: 0.45s; }

@keyframes dotPulse {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.result-card { width: min(1100px, 100%); }
.result-heading { font-size: clamp(1.35rem, 3vw, 2rem); }

.result-image-stage,
.result-image-wrap {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
  padding: 0.35rem;
}

.result-image-stage img,
.result-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: min(68dvh, 760px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.result-side {
  min-width: 0;
}

.result-actions,
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.result-actions .btn,
.action-grid .btn {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 900px) {
  .result-image-stage img,
  .result-image-wrap img {
    max-height: min(52dvh, 620px);
  }

  .result-qr {
    margin: 0 auto;
  }

  .result-side {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .result-actions,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .result-image-stage img,
  .result-image-wrap img {
    max-height: min(48dvh, 520px);
  }

  .preview-frame img {
    max-height: min(52dvh, 520px);
  }
}

@media (orientation: landscape) and (max-height: 720px) {
  .result-image-stage img,
  .result-image-wrap img {
    max-height: min(62svh, 520px);
  }

  .guest-shell {
    justify-content: flex-start;
  }
}

.reveal-image { animation: imageReveal 0.7s ease both; }
.reveal-qr { animation: fadeIn 0.7s ease 0.2s both; }

@keyframes imageReveal {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}

.side-label {
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.side-hint {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.auto-home {
  margin-top: 1.25rem;
  color: var(--text-muted);
}

.toast-root {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: grid;
  gap: 0.5rem;
  width: min(360px, calc(100vw - 2rem));
}

.toast-root .toast {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.toast-root .toast-success {
  background: #E6F4EA;
  color: #137333;
  border-color: #A8DAB5;
}

.toast-root .toast-error {
  background: #FCE8E6;
  color: #C5221F;
  border-color: #F6AEA9;
}

.toast-root .toast-info {
  background: #E8F0FE;
  color: #1967D2;
  border-color: #AECBFA;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in, .btn-pulse, .ai-ring, .ai-ring-core, .loader-dots span, .reveal-image, .reveal-qr {
    animation: none !important;
  }
}
