/* ───────────── Themes ───────────── */

/* Dark: "Shadow of Mordor". The default, also used when JS is off. */
:root,
[data-theme='dark'] {
  --bg-top: #1c2a1f;
  --bg-bottom: #0c0e0a;
  --glow-top: rgba(217, 169, 58, .2);
  --glow-bottom: rgba(194, 65, 12, .3);
  --text: #f1e4c2;
  --text-soft: rgba(241, 228, 194, .72);
  --heading: #f5d26b;
  --heading-glow: rgba(245, 210, 107, .38);
  --link: #f5d26b;
  --accent: #d9a93a;
  --card-top: #f3e6c4;
  --card-bottom: #dfc995;
  --card-shadow: 0 18px 45px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
  --step-bg: rgba(243, 230, 196, .05);
  --step-border: rgba(217, 169, 58, .25);
  --flash-bg: rgba(245, 210, 107, .13);
  --flash-border: rgba(245, 210, 107, .5);
  --flash-text: #f5d26b;
  --error-text: #ffd2b8;
  --ember: #ff9a3c;
  --ember-opacity: .75;
  --noise-opacity: .07;
  --ring-glow: rgba(245, 210, 107, .4);
  --footer-border: rgba(217, 169, 58, .2);
  color-scheme: dark;
}

/* Light: "Morning in Rivendell". */
[data-theme='light'] {
  --bg-top: #fdf8ea;
  --bg-bottom: #e8dbb6;
  --glow-top: rgba(255, 233, 160, .9);
  --glow-bottom: rgba(104, 145, 78, .3);
  --text: #3b2c18;
  --text-soft: #6b5737;
  --heading: #6b3f08;
  --heading-glow: rgba(217, 169, 58, .3);
  --link: #8a5a12;
  --accent: #b8860b;
  --card-top: #fffdf7;
  --card-bottom: #f5e9cb;
  --card-shadow: 0 14px 34px rgba(110, 80, 30, .16), 0 2px 5px rgba(110, 80, 30, .12);
  --step-bg: rgba(255, 253, 247, .6);
  --step-border: rgba(184, 134, 11, .3);
  --flash-bg: rgba(217, 169, 58, .16);
  --flash-border: rgba(184, 134, 11, .55);
  --flash-text: #5a3a0a;
  --error-text: #7c2709;
  --ember: #e8b64a;
  --ember-opacity: .5;
  --noise-opacity: .06;
  --ring-glow: rgba(217, 169, 58, .45);
  --footer-border: rgba(184, 134, 11, .25);
  color-scheme: light;
}

:root {
  --ink: #2b2116;
  --card-heading: #4a3214;
  --muted: #6e5d44;
  --gold: #d9a93a;
  --gold-light: #f5d26b;
  --ember-red: #c2410c;
  --deep-red: #7c2709;
  --ok: #3f6b33;
  --field-bg: #fffbf2;
  --field-border: #bfa36a;
  --radius: 16px;
  --serif: 'EB Garamond', 'Palatino Linotype', Palatino, Georgia, serif;
  --display: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', Georgia, serif;
}

/* ───────────── Base ───────────── */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg-bottom); }
::selection { background: rgba(217, 169, 58, .4); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--glow-top), transparent 70%),
    radial-gradient(ellipse 90% 45% at 50% 115%, var(--glow-bottom), transparent 70%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
}

/* Fine film-grain texture over everything. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.site-header, main, .site-footer { position: relative; z-index: 1; }

html.theme-anim body,
html.theme-anim .card,
html.theme-anim .steps > div,
html.theme-anim h1,
html.theme-anim .tagline,
html.theme-anim .flash {
  transition: color .5s, background-color .5s, border-color .5s, box-shadow .5s;
}

a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .03em; line-height: 1.2; }
h1 {
  font-size: clamp(2rem, 6vw, 3.3rem);
  margin: .4em 0 .15em;
  color: var(--heading);
  text-shadow: 0 0 28px var(--heading-glow);
  overflow-wrap: anywhere;
}
h1.big { font-size: clamp(2.4rem, 8vw, 4.6rem); }
h2 { font-size: 1.45rem; margin: 0 0 .7em; }
h3 { font-size: 1.1rem; margin: 1.2em 0 .4em; }

.wrap { width: min(780px, 100% - 2rem); margin: 0 auto; flex: 1; padding-bottom: 3rem; }

/* ───────────── Embers / golden motes ───────────── */

.embers { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.embers i {
  position: absolute;
  bottom: -12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 6px 2px var(--ember);
  opacity: 0;
  animation: rise 14s linear infinite;
}
.embers i:nth-child(1)  { left: 4%;  animation-duration: 15s; animation-delay: -2s;  --drift: 40px; }
.embers i:nth-child(2)  { left: 11%; animation-duration: 11s; animation-delay: -7s;  --drift: -30px; width: 3px; height: 3px; }
.embers i:nth-child(3)  { left: 18%; animation-duration: 17s; animation-delay: -11s; --drift: 60px; }
.embers i:nth-child(4)  { left: 25%; animation-duration: 13s; animation-delay: -4s;  --drift: -50px; width: 2px; height: 2px; }
.embers i:nth-child(5)  { left: 32%; animation-duration: 19s; animation-delay: -15s; --drift: 25px; }
.embers i:nth-child(6)  { left: 39%; animation-duration: 12s; animation-delay: -1s;  --drift: -20px; width: 3px; height: 3px; }
.embers i:nth-child(7)  { left: 46%; animation-duration: 16s; animation-delay: -9s;  --drift: 45px; width: 2px; height: 2px; }
.embers i:nth-child(8)  { left: 53%; animation-duration: 14s; animation-delay: -13s; --drift: -40px; }
.embers i:nth-child(9)  { left: 60%; animation-duration: 18s; animation-delay: -6s;  --drift: 30px; width: 3px; height: 3px; }
.embers i:nth-child(10) { left: 67%; animation-duration: 12s; animation-delay: -10s; --drift: -60px; }
.embers i:nth-child(11) { left: 74%; animation-duration: 15s; animation-delay: -3s;  --drift: 20px; width: 2px; height: 2px; }
.embers i:nth-child(12) { left: 81%; animation-duration: 20s; animation-delay: -12s; --drift: -35px; }
.embers i:nth-child(13) { left: 87%; animation-duration: 13s; animation-delay: -8s;  --drift: 50px; width: 3px; height: 3px; }
.embers i:nth-child(14) { left: 92%; animation-duration: 17s; animation-delay: -5s;  --drift: -25px; }
.embers i:nth-child(15) { left: 97%; animation-duration: 11s; animation-delay: -14s; --drift: -45px; width: 2px; height: 2px; }
.embers i:nth-child(16) { left: 50%; animation-duration: 22s; animation-delay: -18s; --drift: 70px; width: 3px; height: 3px; }
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: var(--ember-opacity); }
  80% { opacity: calc(var(--ember-opacity) * .6); }
  100% { transform: translate(var(--drift, 30px), -105vh); opacity: 0; }
}

/* ───────────── Header / footer ───────────── */

.site-header { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; max-width: 1100px; width: 100%; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.brand a { color: var(--heading); text-decoration: none; }
.logo-btn { display: grid; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.logo-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.logo { width: 40px; height: 40px; transition: transform .6s, filter .4s; }
.logo-btn:hover .logo { transform: rotate(180deg); filter: drop-shadow(0 0 8px rgba(255, 138, 42, .8)); }
.logo .inscription { display: none; }

.theme-toggle {
  margin-left: auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--step-border);
  background: var(--step-bg);
  color: var(--heading);
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}
.theme-toggle:hover { transform: rotate(20deg); box-shadow: 0 0 18px var(--heading-glow); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-theme='dark'] .icon-moon,
[data-theme='light'] .icon-sun { display: none; }

.site-footer { text-align: center; padding: 2rem 1rem; color: var(--text-soft); border-top: 1px solid var(--footer-border); }
.site-footer p { margin: .2rem 0; }
.quote-btn {
  font: inherit;
  font-style: italic;
  color: var(--heading);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline dotted rgba(217, 169, 58, .6);
  text-underline-offset: 4px;
}
.quote-btn:hover { text-shadow: 0 0 12px var(--heading-glow); }

/* ───────────── Hero ───────────── */

.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero-ring { width: min(270px, 68vw); height: auto; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 0 32px var(--ring-glow)); }
.small-hero .ring { width: 150px; height: auto; filter: drop-shadow(0 0 22px var(--ring-glow)); }
.tagline { font-size: 1.3rem; font-style: italic; margin: 0 0 .6rem; color: var(--text-soft); }
blockquote { font-style: italic; font-size: 1.25rem; margin: 1.1rem auto; max-width: 32em; color: var(--heading); }
blockquote::before { content: '\201C'; }
blockquote::after { content: '\201D'; }

.ornament { display: flex; align-items: center; gap: .8rem; max-width: 300px; margin: .3rem auto .7rem; color: var(--accent); font-size: .9rem; }
.ornament::before, .ornament::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.ornament::after { background: linear-gradient(90deg, var(--accent), transparent); }

/* ───────────── The ring ───────────── */

.ring .inscription {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  fill: #ffe9a8;
  stroke: #b8320a;
  stroke-width: .6px;
  paint-order: stroke;
  filter: drop-shadow(0 0 1.5px #ff6a00) drop-shadow(0 0 4px #ff3d00);
  animation: glow 3.5s ease-in-out infinite;
}
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(4deg); } }

/* ───────────── Cards (parchment pages) ───────────── */

.card {
  position: relative;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, .45), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(150, 100, 30, .14), transparent 60%),
    linear-gradient(180deg, var(--card-top), var(--card-bottom));
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
  margin: 1.6rem 0;
  border: 1px solid rgba(120, 80, 20, .35);
  box-shadow: var(--card-shadow), inset 0 0 50px rgba(120, 80, 20, .14);
  outline: 1px solid rgba(160, 110, 30, .38);
  outline-offset: -8px;
}
.card h2 { color: var(--card-heading); }
.card h2:not(.recipient)::after {
  content: '';
  display: block;
  width: 70px;
  height: 2px;
  margin-top: .45rem;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.card a { color: #7a4b0c; }
.muted { color: var(--text-soft); }
.card .muted { color: var(--muted); }
.small { font-size: .95rem; }
.warn { background: rgba(194, 65, 12, .09); border-left: 4px solid var(--ember-red); padding: .55rem .85rem; border-radius: 8px; }
.success { background: rgba(63, 107, 51, .12); border-left: 4px solid var(--ok); padding: .55rem .85rem; border-radius: 8px; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .4rem 0; }
.hero .meta, .reveal .meta { justify-content: center; }
.count { display: inline-block; min-width: 1.8em; padding: 0 .45em; border-radius: 99px; background: var(--card-heading); color: var(--card-top); font-size: .9rem; text-align: center; vertical-align: middle; }
.badge { font-family: var(--display); font-size: .7rem; padding: .1em .55em; border-radius: 99px; background: var(--gold); color: var(--ink); vertical-align: middle; }

/* ───────────── Flash messages ───────────── */

.flash { padding: .85rem 1.1rem; border-radius: 12px; margin: 1rem 0; background: var(--flash-bg); border: 1px solid var(--flash-border); color: var(--flash-text); }
.flash a { font-weight: 600; }
.card .flash { color: var(--ink); background: rgba(217, 169, 58, .2); }
.flash.error { background: rgba(194, 65, 12, .15); border-color: var(--ember-red); color: var(--error-text); }
.card .flash.error { color: var(--deep-red); }

/* ───────────── Forms ───────────── */

.form { display: grid; gap: 1.1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 600; }
.label-text { display: block; }
label.check { display: flex; align-items: center; gap: .55rem; font-weight: 400; cursor: pointer; }
.opt { font-weight: 400; font-style: italic; color: var(--muted); }
input, textarea, select {
  font: inherit;
  font-size: 1.05rem;
  padding: .6rem .75rem;
  border-radius: 10px;
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  color: var(--ink);
  width: 100%;
  color-scheme: light;
  box-shadow: inset 0 1px 3px rgba(90, 60, 20, .12);
  transition: border-color .2s, box-shadow .2s;
}
input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--ember-red); box-shadow: none; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 169, 58, .3), inset 0 1px 3px rgba(90, 60, 20, .12); }
::placeholder { color: #a08c6a; }

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .06em;
  padding: .7rem 1.4rem;
  border-radius: 99px;
  border: 1px solid #8a5a12;
  background: linear-gradient(180deg, #fdebb2, var(--gold));
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 3px 10px rgba(90, 60, 10, .2);
  transition: transform .12s, box-shadow .25s, filter .25s;
}
.btn:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 20px rgba(245, 210, 107, .65); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #ffb35c, var(--ember-red) 85%);
  color: #fff8e6;
  border-color: var(--deep-red);
  text-shadow: 0 1px 1px rgba(80, 20, 0, .4);
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .6), 0 4px 16px rgba(194, 65, 12, .35);
}
.btn.primary:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 220, 170, .6), 0 0 26px rgba(255, 138, 42, .7); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { font-size: .8rem; padding: .38rem .85rem; }

.copy-field { margin: .9rem 0; }
.copy-field label:empty { display: none; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { font-family: ui-monospace, monospace; font-size: .85rem; }

/* ───────────── Members & exclusions ───────────── */

.members, .exclusions { list-style: none; padding: 0; margin: 0; }
.member { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px dashed rgba(120, 80, 20, .35); }
.member:last-child { border-bottom: 0; }
.member-main { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; }
.member details { grid-column: 1 / -1; grid-row: 2; }
.member summary { cursor: pointer; color: var(--muted); font-size: .95rem; }
.member form { grid-column: 2; grid-row: 1; }
.exclusions li { display: flex; justify-content: space-between; align-items: center; padding: .4rem 0; }
.excl-form { display: flex; gap: .5rem; align-items: center; margin-top: .8rem; }

/* ───────────── Steps on the home page ───────────── */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; text-align: center; }
.steps > div { padding: 1.3rem 1rem; border-radius: var(--radius); background: var(--step-bg); border: 1px solid var(--step-border); }
.steps span {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--accent);
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--heading);
  box-shadow: 0 0 14px var(--heading-glow);
}
.steps h3 { margin: .6rem 0 .2rem; color: var(--heading); }
.steps p { margin: 0; color: var(--text-soft); }

/* ───────────── Reveal ───────────── */

.reveal { text-align: center; overflow: hidden; }
.reveal-ring { width: 180px; height: auto; filter: drop-shadow(0 0 18px rgba(217, 169, 58, .5)); }
.reveal-ring.forging { animation: forge 1.6s ease-in forwards; }
@keyframes forge {
  0% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 18px rgba(217, 169, 58, .5)); }
  70% { transform: scale(1.25) rotate(540deg); filter: drop-shadow(0 0 50px #ff8a2a) brightness(1.4); }
  100% { transform: scale(.2) rotate(720deg); opacity: 0; }
}
.reveal.burst::after {
  content: '';
  position: absolute;
  inset: -30%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 214, 130, .95), rgba(255, 138, 42, .35) 30%, transparent 60%);
  animation: burst 1.1s ease-out forwards;
}
@keyframes burst { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(1.4); } }
.revealed { animation: appear 1s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.quote { font-family: var(--display); font-size: 1.6rem; color: var(--ember-red); margin: 0 0 .5rem; }
.recipient { font-size: clamp(2rem, 7vw, 3.1rem); color: var(--deep-red); margin: .2rem 0 .6rem; text-shadow: 0 0 22px rgba(255, 138, 42, .45); overflow-wrap: anywhere; }
.wishlist { white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 12px; padding: 1rem 1.1rem; }

/* ───────────── Boromir ───────────── */

.polaroid {
  margin: 0;
  padding: 10px 10px 8px;
  background: #fffdf6;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35), 0 2px 4px rgba(0, 0, 0, .25);
}
.polaroid img { display: block; width: 100%; height: auto; border-radius: 2px; }
.polaroid figcaption { font-family: var(--display); font-weight: 700; color: var(--deep-red); text-align: center; padding-top: .45rem; }

.meme-reveal { max-width: 320px; margin: 0 auto 1.2rem; transform: rotate(-2.5deg); animation: drop-in .7s cubic-bezier(.2, 1.4, .4, 1); }
.meme-reveal figcaption { font-size: .85rem; letter-spacing: .02em; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-30px) rotate(-12deg) scale(.8); } to { opacity: 1; transform: rotate(-2.5deg); } }

.meme-dialog { border: 0; padding: 0; background: transparent; width: min(560px, 92vw); max-height: 92vh; overflow: visible; }
.meme-dialog::backdrop { background: rgba(8, 6, 3, .78); backdrop-filter: blur(3px); }
.meme-dialog .polaroid { transform: rotate(-1.5deg); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.meme-dialog img { max-height: 70vh; object-fit: contain; }
.meme-dialog figcaption { font-size: clamp(1.3rem, 4vw, 1.8rem); }
.meme-dialog figcaption small { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 1rem; color: var(--muted); }
.meme-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #8a5a12;
  background: linear-gradient(180deg, #fdebb2, var(--gold));
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
@keyframes pop { from { opacity: 0; transform: scale(.6) rotate(-10deg); } to { opacity: 1; transform: rotate(-1.5deg); } }

.cameo {
  position: fixed;
  left: 18px;
  bottom: 0;
  z-index: 50;
  width: 170px;
  padding: 8px 8px 6px;
  border: 0;
  cursor: pointer;
  transform: translateY(130%) rotate(-10deg);
  transition: transform .8s cubic-bezier(.2, 1.3, .4, 1);
}
.cameo.show { transform: translateY(-22px) rotate(-4deg); }
.cameo:hover { transform: translateY(-30px) rotate(-1deg); }
.cameo .bubble {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 70%;
  padding: .4rem .8rem;
  border-radius: 14px;
  background: #fffdf6;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
  opacity: 0;
  transition: opacity .4s .7s;
}
.cameo.show .bubble { opacity: 1; }
.cameo .bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 18px;
  border: 8px solid transparent;
  border-top-color: #fffdf6;
}

/* Boromir's blessing without the photo. */
.saying { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--deep-red); max-width: 28em; margin: 0 auto 1.2rem; }
.saying::before { content: '\201C'; }
.saying::after { content: '\201D'; }
.saying span { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: .95rem; color: var(--muted); }
.saying span::before { content: '\2014\00a0'; }

.greeting { font-style: italic; color: var(--heading); margin: 0 0 .3rem; font-size: 1.15rem; }
.countdown { display: inline-block; margin: .2rem 0 .4rem; padding: .25rem .8rem; border-radius: 99px; border: 1px solid var(--step-border); background: var(--step-bg); color: var(--text); font-size: 1rem; }

/* ───────────── Easter eggs ───────────── */

.toast {
  position: fixed;
  top: 1.2rem;
  left: 50%;
  z-index: 100;
  transform: translateX(-50%);
  max-width: min(90vw, 460px);
  padding: .7rem 1.2rem;
  border-radius: 12px;
  background: rgba(20, 18, 12, .92);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-family: var(--display);
  font-size: .95rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45), 0 0 20px rgba(217, 169, 58, .25);
  animation: toast-in .4s ease-out;
  transition: opacity .7s, transform .7s;
}
.toast.gone { opacity: 0; transform: translate(-50%, -10px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* All rings are clickable: a subtle glow on hover hints at it. */
.hero-ring, .small-hero .ring, .sealed .reveal-ring { cursor: pointer; transition: filter .4s; }
.hero-ring:hover, .small-hero .ring:hover, .sealed .reveal-ring:hover { filter: drop-shadow(0 0 30px rgba(255, 138, 42, .75)) brightness(1.08); }

/* The Eye of Sauron. */
.sauron {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(90, 0, 0, .35), transparent 65%);
  animation: sauron-in .5s ease-out;
  transition: opacity .7s;
}
.sauron.gone { opacity: 0; }
.sauron-eye {
  position: relative;
  width: min(260px, 60vw);
  aspect-ratio: 2 / 1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #fff2a8 0%, #ffcc33 12%, #ff7a00 30%, #d61f00 52%, #6b0000 70%, transparent 72%);
  filter: drop-shadow(0 0 30px #ff3d00) drop-shadow(0 0 70px #b30000);
  animation: eye-open .6s cubic-bezier(.2, 1.3, .4, 1), eye-burn 1.2s ease-in-out infinite alternate;
}
.sauron-eye::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 10%;
  width: 7%;
  height: 80%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 14px 4px rgba(0, 0, 0, .8);
}
.sauron-words {
  margin: .3em 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 13vw, 8.5rem);
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ff1a00;
  text-shadow: 0 0 12px #ff3d00, 0 0 40px #c40000, 0 0 90px #800000, 0 3px 0 #3a0000;
  animation: words-in .45s .25s both cubic-bezier(.2, 1.4, .4, 1), flicker 1.1s .7s infinite;
}
.sauron-sub {
  margin: .6rem 0 0;
  font-family: var(--display);
  font-size: clamp(.9rem, 2.5vw, 1.2rem);
  color: #ffb08a;
  text-shadow: 0 0 10px #000, 0 0 20px #000;
  animation: words-in .5s .6s both;
}
@keyframes sauron-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes eye-open { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes eye-burn { from { filter: drop-shadow(0 0 30px #ff3d00) drop-shadow(0 0 70px #b30000); } to { filter: drop-shadow(0 0 45px #ff6a00) drop-shadow(0 0 110px #e00000); } }
@keyframes words-in { from { opacity: 0; transform: scale(1.6); } to { opacity: 1; transform: scale(1); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 45% { opacity: .82; } 50% { opacity: .6; } 55% { opacity: .9; } }

/* Put on the Ring: the wraith-world. */
html.wraith .site-header,
html.wraith main,
html.wraith .site-footer,
html.wraith .embers { filter: grayscale(1) blur(1.5px) contrast(.85) brightness(.8); transition: filter .6s; }
html.wraith body { cursor: none; }
.site-header, main, .site-footer, .embers { transition: filter 1.2s; }

/* Speak, friend, and enter: the inscription awakens. */
html.ring-awake .ring .inscription { animation: none; opacity: 1; filter: drop-shadow(0 0 2px #ffd36a) drop-shadow(0 0 7px #ff3d00) drop-shadow(0 0 14px #ff6a00); }
html.ring-awake .hero-ring, html.ring-awake .small-hero .ring { filter: drop-shadow(0 0 40px rgba(255, 106, 0, .8)); }

/* ───────────── Responsive / motion ───────────── */

@media (max-width: 520px) {
  .card { padding: 1.2rem 1.15rem; outline-offset: -6px; }
  .excl-form { flex-wrap: wrap; }
  .excl-form select { flex: 1 1 40%; }
  .cameo { width: 125px; left: 10px; }
  .cameo .bubble { font-size: .8rem; left: 45%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .embers { display: none; }
}
