:root {
  --bg-deep: #0e0805;
  --bg: #1a0f0a;
  --cream: #f1e7d3;
  --cream-dim: #b8a98d;
  --gold: #c9a45c;
  --gold-bright: #e6c785;
  --border: rgba(201, 164, 92, 0.28);
  --shadow: rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background: radial-gradient(ellipse at 50% 0%, #241407 0%, var(--bg) 45%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--cream);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.wrap { max-width: 540px; margin: 0 auto; padding: 48px 24px 64px; }

.card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 28px;
  box-shadow: 0 20px 60px var(--shadow);
}

h1 {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 1.9rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  text-align: center;
  margin: 0 0 4px;
  line-height: 1.25;
}

.help {
  text-align: center;
  color: var(--cream-dim);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 auto 28px;
  max-width: 30ch;
}

.hero-madame {
  display: block;
  width: 100%;
  max-width: 280px;        /* caps the size on mobile; never wider than this */
  height: auto;            /* keeps aspect ratio */
  margin: 0 auto 1.5rem;   /* auto left/right centers it in the container */
  border-radius: 18px;
  border: 1px solid rgba(201, 162, 75, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.tagline { text-align: center; color: var(--cream-dim); font-style: italic; margin: 0 0 28px; }
.divider { text-align: center; color: var(--gold); letter-spacing: 0.5em; margin: 24px 0; font-size: 0.9rem; }

.upload { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 8px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.btn {
  font-family: "Cinzel", serif; font-size: 0.82rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 14px 26px; border-radius: 8px; cursor: pointer;
  text-align: center; transition: all 0.2s ease; display: inline-block;
}
.btn-outline { background: transparent; border: 1px solid var(--gold); color: var(--gold-bright); }
.btn-outline:hover { background: rgba(201, 164, 92, 0.12); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: 1px solid var(--gold-bright); color: #2a1808; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); }

.file-name { color: var(--cream-dim); font-style: italic; min-height: 1.2em; text-align: center; }

.martini-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 8px 0 4px;
  box-shadow: 0 12px 36px var(--shadow);
}

.reading { font-size: 1.3rem; line-height: 1.85; }
.reading p { margin: 0 0 1.1em; }

a { color: var(--gold-bright); }

.share { margin-top: 8px; color: var(--cream-dim); font-size: 1rem; }
.share-label {
  display: block; font-family: "Cinzel", serif; font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px;
}
.share a { word-break: break-all; }

.again { display: block; text-align: center; margin-top: 28px; }
.again a {
  font-family: "Cinzel", serif; font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
}
.again a:hover { text-decoration: underline; }

.flash {
  border: 1px solid var(--border); background: rgba(201, 164, 92, 0.08);
  color: var(--cream); padding: 12px 16px; border-radius: 8px;
  text-align: center; margin-bottom: 22px; font-style: italic;
}

.pending {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 24px 0 8px;
}
.pending p { font-family: "Cinzel", serif; letter-spacing: 0.12em; color: var(--gold-bright); margin: 0; }

#loading-overlay {
  position: fixed; inset: 0; background: rgba(8, 5, 3, 0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; z-index: 50;
}
#loading-overlay.visible { opacity: 1; visibility: visible; }
#loading-overlay p { font-family: "Cinzel", serif; letter-spacing: 0.12em; color: var(--gold-bright); }

/* loading screen */
.loading-madame {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: 0 auto 1.25rem;
}
.loading-madame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 2px solid rgba(201, 162, 75, 0.6);
  box-shadow: 0 0 30px rgba(201, 162, 75, 0.45);
  animation: madame-float 4s ease-in-out infinite;
}
.loading-madame::before {        /* pulsing mystical aura behind her */
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(201, 162, 75, 0.35) 0%, rgba(201, 162, 75, 0) 70%);
  animation: madame-pulse 3s ease-in-out infinite;
  z-index: -1;
}
@keyframes madame-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-8px) scale(1.015); }
}
@keyframes madame-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

.spinner {
  width: 54px; height: 54px;
  border: 2px solid rgba(201, 164, 92, 0.25); border-top-color: var(--gold-bright);
  border-radius: 50%; animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
