/* Sand + Teal theme (default, non-dark) */
:root {
  --bg: #f4efe7;
  --panel: #fffaf2;
  --text: #23313a;
  --muted: #5f7280;
  --border: #d8dfde;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#map {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#mobile-address-input {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0) + 10px);
  left: 74px;
  right: 12px;
  z-index: 12;
  pointer-events: none;
}

.mobile-top-controls {
  position: relative;
}

.mobile-search-row {
  display: grid;
  grid-template-columns: 1fr 112px 40px;
  gap: 0.5rem;
  pointer-events: auto;
  align-items: center;
}

#mobile-auth-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

#mobile-auth-btn:hover,
#mobile-auth-btn:focus {
  background: var(--panel);
  border-color: var(--accent);
}

#mobile-auth-btn svg {
  width: 20px;
  height: 20px;
}

#mobile-auth-btn[data-authenticated="true"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f5fffe;
  border-color: transparent;
}

#mobile-address-query,
#mobile-skin-select {
  width: 100%;
  min-height: 40px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.mobile-address-results {
  margin-top: 0.35rem;
  max-height: 210px;
  overflow-y: auto;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  display: none;
  pointer-events: auto;
}

.mobile-address-results.visible {
  display: block;
}

.mobile-address-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.mobile-address-option:last-child {
  border-bottom: 0;
}

#mobile-proceed {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0) + 1rem);
  left: 1rem;
  right: 1rem;
  z-index: 11;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f5fffe;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

#mobile-status {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0) + 4.2rem);
  left: 1rem;
  right: 1rem;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

#mobile-status:empty {
  display: none;
}

#mobile-status::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.35);
}

#mobile-status[data-status="running"]::before,
#mobile-status[data-status="loading"]::before {
  animation: mobile-status-pulse 1s ease-out infinite;
}

#mobile-status[data-status="success"]::before {
  background: #15803d;
}

#mobile-status[data-status="error"] {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

#mobile-status[data-status="error"]::before {
  background: #dc2626;
}

#mobile-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  max-height: 72vh;
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 180ms ease-out;
  padding: 0.7rem 1rem calc(env(safe-area-inset-bottom, 0) + 1rem);
}

#mobile-bottom-sheet.visible {
  transform: translateY(0);
}

#mobile-bottom-sheet.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.mobile-bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.mobile-bottom-sheet-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-bottom-sheet-handle {
  width: 44px;
  height: 4px;
  margin: 0.35rem auto 0.55rem;
  border-radius: 999px;
  background: #b9c8c6;
}

.mobile-report-form-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-report-section {
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0;
}

.mobile-report-header {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 36px;
}

.mobile-report-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.mobile-report-name {
  font-size: 0.96rem;
  color: var(--text);
}

.mobile-report-header input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.mobile-report-slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding-left: 32px;
  margin-top: 0.2rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #d0dcda;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ecf6f3;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 2px solid #ecf6f3;
  border-radius: 50%;
  background: var(--accent);
}

.mobile-report-radius-value {
  min-width: 42px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}

.mobile-report-divider {
  height: 1px;
  margin: 0.35rem 0;
  background: var(--border);
}

.mobile-report-submit,
.mobile-report-view-close {
  margin-top: 0.9rem;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #f5fffe;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  transition: filter 120ms ease, transform 120ms ease, opacity 120ms ease;
}

.mobile-report-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.mobile-report-submit-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 120ms ease, transform 120ms ease;
}

.mobile-report-submit[data-loading="true"] .mobile-report-submit-spinner {
  opacity: 1;
  transform: scale(1);
  animation: mobile-submit-spin 0.8s linear infinite;
}

.mobile-report-submit[data-loading="true"] {
  background: linear-gradient(135deg, #0f766e, #115e59);
  filter: none;
  opacity: 1;
}

.mobile-report-submit-label {
  line-height: 1;
}

.mobile-report-submit.is-loading {
  cursor: progress;
}

.mobile-report-submit:disabled,
.mobile-report-submit.is-disabled {
  background: linear-gradient(135deg, #9ba9b4, #7e8c97);
  color: rgba(245, 255, 254, 0.9);
  filter: saturate(0.2);
  opacity: 0.85;
  transform: none;
  cursor: not-allowed;
}

.mobile-report-submit[data-loading="true"]:disabled {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #f5fffe;
  filter: none;
  opacity: 1;
  cursor: progress;
}

.mobile-report-success-container {
  display: grid;
  gap: 0.65rem;
}

.mobile-report-success-text {
  margin: 0;
  color: var(--muted);
}

.mobile-report-success-close {
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 42px;
  color: var(--text);
  background: var(--surface);
}

.mobile-report-view-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--bg);
}

.mobile-report-view-overlay.hidden {
  display: none;
}

.mobile-report-view-content {
  height: 100%;
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0) + 0.7rem) 1rem calc(env(safe-area-inset-bottom, 0) + 1rem);
}

.mobile-report-view-top-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 31;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.mobile-report-view-top-panel-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-report-view-top-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 32;
  padding: calc(env(safe-area-inset-top, 0) + 0.85rem) 1rem 1rem;
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 18px 18px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  transform: translateY(-105%);
  transition: transform 220ms ease;
}

.mobile-report-view-top-panel.visible {
  transform: translateY(0);
}

.mobile-report-view-top-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-report-view-top-panel-title {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 600;
}

.mobile-report-view-top-panel-close {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 34px;
  padding: 0.45rem 0.85rem;
  color: var(--text);
  background: var(--surface);
}

.mobile-report-view-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 260px);
  margin: 0.9rem auto 0;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
}

.mobile-report-view-qr-image {
  display: block;
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 1 / 1;
}

.mobile-report-view-top-panel-copy {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.mobile-report-view-section-stack {
  display: grid;
  gap: 0.8rem;
}

.mobile-report-view-section {
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.mobile-report-view-section-header {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.mobile-report-view-section-header.without-icon {
  grid-template-columns: 1fr;
}

.mobile-report-view-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.mobile-report-view-section-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mobile-report-view-section-title {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 600;
}

.mobile-report-view-origin {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.mobile-report-view-origin-button {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8faf9;
  text-align: left;
}

.mobile-report-view-origin-coordinates {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.mobile-report-view-origin-hint {
  color: var(--muted);
  font-size: 0.76rem;
}

.mobile-report-view-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.mobile-report-view-action-button {
  width: 100%;
  min-height: 40px;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #f5fffe;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.mobile-report-view-action-button.is-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.mobile-report-view-action-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mobile-report-view-inline-status {
  margin: 0.6rem 0 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8faf9;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.mobile-report-view-inline-status[data-status="success"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.mobile-report-view-inline-status[data-status="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.mobile-report-view-text,
.mobile-report-view-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.mobile-report-view-message.is-error {
  color: var(--muted);
}

.mobile-report-view-message.is-empty {
  font-weight: 600;
}

.mobile-report-view-nearest-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.mobile-report-view-nearest-item {
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.mobile-report-view-nearest-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.mobile-report-view-nearest-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-report-view-nearest-item-label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}

a.mobile-report-view-nearest-item-label {
  color: var(--accent);
  text-decoration: none;
}

a.mobile-report-view-nearest-item-label:focus-visible,
a.mobile-report-view-nearest-item-label:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.mobile-report-view-nearest-item-distance,
.mobile-report-view-source-name {
  color: var(--muted);
  font-size: 0.8rem;
}

.mobile-report-view-nearest-item-distance {
  white-space: nowrap;
}

.mobile-report-view-source-link {
  display: inline-flex;
  margin-top: 0.28rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}

.mobile-report-view-source-link:focus-visible,
.mobile-report-view-source-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.mobile-report-view-demographics-layout {
  display: grid;
  grid-template-columns: minmax(96px, 120px) 1fr;
  align-items: start;
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.mobile-report-view-demographics-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.mobile-report-view-demographics-chart svg {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
}

.mobile-report-view-demographics-legend {
  display: grid;
  gap: 0.6rem;
}

.mobile-report-view-demographics-legend-row {
  display: grid;
  grid-template-columns: 12px 1fr;
  align-items: start;
  gap: 0.55rem;
}

.mobile-report-view-demographics-swatch {
  width: 12px;
  height: 12px;
  margin-top: 0.2rem;
  border-radius: 999px;
}

.mobile-report-view-demographics-legend-copy {
  min-width: 0;
}

.mobile-report-view-demographics-legend-label {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
}

.mobile-report-view-demographics-legend-value {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

@media (max-width: 420px) {
  .mobile-report-view-demographics-layout {
    grid-template-columns: 1fr;
  }

  .mobile-report-view-demographics-chart {
    justify-content: flex-start;
  }
}

.mobile-results-marker-icon {
  background: transparent;
  border: 0;
}

.mobile-results-marker {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-results-marker__badge {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--mobile-results-marker-color, var(--accent));
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid currentColor;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.mobile-results-marker__badge svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mobile-results-popup .leaflet-popup-content-wrapper {
  border-radius: 14px;
  padding: 0.15rem;
}

.mobile-results-popup .leaflet-popup-content {
  margin: 0;
  min-width: 210px;
}

.mobile-results-popup .leaflet-popup-close-button {
  width: 34px;
  height: 34px;
  padding: 8px 8px 0 0;
  font-size: 24px;
}

.mobile-result-popup {
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.mobile-result-popup-title {
  margin-bottom: 0.42rem;
  color: var(--text);
  font-weight: 600;
}

.mobile-result-popup-title-link {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.mobile-result-popup-title-link:focus-visible,
.mobile-result-popup-title-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.mobile-result-popup-row {
  display: grid;
  grid-template-columns: minmax(0, 72px) minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
}

.mobile-result-popup-row + .mobile-result-popup-row {
  margin-top: 0.22rem;
}

.mobile-result-popup-key {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.mobile-result-popup-value,
.mobile-result-popup-link {
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mobile-result-popup-link {
  color: var(--accent);
  text-decoration: none;
}

.mobile-result-popup-link:focus-visible,
.mobile-result-popup-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

/* Saved report marker: full-size flag icon */
.mobile-saved-report-marker-icon {
  background: transparent;
  border: 0;
}

.mobile-saved-report-marker {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mobile-saved-report-pin-color, #14b8a6);
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.25));
}

.mobile-saved-report-marker svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mobile-saved-report-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.mobile-saved-report-popup-action {
  display: inline-block;
}

.mobile-saved-report-popup-delete {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.mobile-saved-report-popup-delete:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

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

@keyframes mobile-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.38);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(15, 118, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0);
  }
}

/* Auth Modal */
.mobile-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mobile-auth-modal.hidden {
  display: none;
}

.mobile-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  animation: mobile-auth-fade-in 200ms ease forwards;
}

@keyframes mobile-auth-fade-in {
  to { opacity: 1; }
}

.mobile-auth-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 0.5rem 1rem 1.5rem;
  transform: translateY(100%);
  animation: mobile-auth-slide-up 250ms ease forwards;
  max-height: 80vh;
  overflow-y: auto;
}

@keyframes mobile-auth-slide-up {
  to { transform: translateY(0); }
}

.mobile-auth-handle {
  width: 44px;
  height: 4px;
  margin: 0.35rem auto 0.8rem;
  border-radius: 999px;
  background: #b9c8c6;
}

.mobile-auth-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-auth-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.mobile-auth-subtitle {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.mobile-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-auth-form.hidden,
.mobile-auth-waiting.hidden,
.mobile-auth-success.hidden {
  display: none;
}

#mobile-auth-email {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

#mobile-auth-email:focus {
  outline: none;
  border-color: var(--accent);
}

.mobile-auth-submit,
.mobile-auth-logout {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #f5fffe;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
  transition: opacity 120ms ease;
}

.mobile-auth-submit:hover:not(:disabled),
.mobile-auth-logout:hover:not(:disabled) {
  opacity: 0.9;
}

.mobile-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mobile-auth-error {
  margin: 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.85rem;
  text-align: center;
}

.mobile-auth-error.hidden {
  display: none;
}

.mobile-auth-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.mobile-auth-waiting p {
  margin: 0;
  color: var(--text);
  text-align: center;
}

.mobile-auth-hint {
  color: var(--muted) !important;
  font-size: 0.85rem;
}

.mobile-auth-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: mobile-auth-spin 0.8s linear infinite;
}

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

.mobile-auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
}

.mobile-auth-success p {
  margin: 0;
  color: var(--text);
  text-align: center;
}

.mobile-auth-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d !important;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.mobile-auth-email-display {
  color: var(--muted) !important;
  font-size: 0.9rem;
  word-break: break-all;
}

.mobile-auth-logout {
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #9ba9b4, #7e8c97) !important;
}
