:root {
  --bg: #0d0d0f;
  --text: #f7f6f2;
  --muted: rgba(247, 246, 242, 0.78);
  --surface: rgba(16, 16, 20, 0.72);
  --surface-border: rgba(255, 255, 255, 0.16);
  --accent: #f7f6f2;
  --accent-text: #111114;
  --success: #7ee2a8;
  --error: #ff8c8c;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  display: block;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 12, 0.62) 0%,
    rgba(10, 10, 12, 0.18) 34%,
    rgba(10, 10, 12, 0.56) 64%,
    rgba(10, 10, 12, 0.92) 100%
  );
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top, 16px) + 20px)
    18px
    calc(env(safe-area-inset-bottom, 16px) + 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.hero {
  text-align: center;
  padding-top: 6px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.couple-names {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 7.6vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.couple-names span {
  font-style: italic;
  font-weight: 500;
  opacity: 0.9;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 22px;
  padding: 20px 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.subtitle {
  margin: 0 0 14px;
  text-align: center;
  font-size: 0.93rem;
  line-height: 1.45;
  color: var(--muted);
}

.field {
  margin-bottom: 12px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.field input::placeholder {
  color: rgba(247, 246, 242, 0.52);
}

.field input:focus {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.actions {
  display: grid;
  gap: 10px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, opacity 0.2s ease, background-color 0.2s ease;
}

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

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.counter {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--success);
  font-weight: 500;
}

.queue {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
}

.queue:empty {
  display: none;
}

.queue-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.queue-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.queue-meta {
  min-width: 0;
}

.queue-status {
  font-size: 0.82rem;
  font-weight: 500;
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-status.is-done {
  color: var(--success);
}

.queue-status.is-error {
  color: var(--error);
}

.progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s ease;
}

.queue-item.is-done .progress-bar {
  background: var(--success);
}

.retry-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
