/* Snapstation share viewer — mobile-first, matches kiosk studio look */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-var.woff2') format('woff2');
}

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --amber: #d97706;
  --amber-bright: #f59e0b;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
}

.share-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 22px 48px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-height: 100vh;
  min-height: 100dvh;
}

.share-header {
  display: flex;
  justify-content: center;
}
.share-brand {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}
.share-brand span { color: var(--amber); }

.state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  animation: fade 0.4s ease;
}
.hidden { display: none !important; }

h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.lead {
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 34ch;
}
.sub {
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* Loading spinner */
.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--amber);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Syncing state */
.sync-icon {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 8px;
}
.cloud {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid var(--line);
}
.cloud::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  opacity: 0.4;
  animation: ring 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ring {
  from { transform: scale(0.9); opacity: 0.6; }
  to { transform: scale(1.25); opacity: 0; }
}
.dots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  animation: bounce 1.2s ease-in-out infinite;
}
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-7px); opacity: 1; }
}

/* Ready state */
.state-ready { justify-content: flex-start; }

.strip-wrap {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  background: var(--card);
  padding: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
  animation: fade 0.5s ease;
}
#strip-img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

.strip-caption {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--amber);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 16px 30px;
  border-radius: 40px;
  box-shadow: 0 10px 26px rgba(217, 119, 6, 0.35);
  transition: transform 0.15s ease;
}
.download-btn:active { transform: scale(0.97); }

.hint {
  font-size: 0.78rem;
  color: var(--ink-3);
  max-width: 36ch;
  line-height: 1.5;
}

/* Missing state */
.missing-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 4px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink-3);
}

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