/* ============================================================
   MEDARIA AID — CHRISTMAS eCARDS
   Loads after /style.css and reuses its variables, nav, footer
   and buttons. Everything here is scoped with an x- prefix.
   ============================================================ */

:root {
  --x-cream:      #f6efe2;
  --x-cream-dark: #e9dfcc;
  --x-ink:        #1b2130;
  --x-ink-soft:   #4a5266;
  --x-gold-soft:  rgba(245,197,24,0.14);
  --x-blue-soft:  rgba(0,91,187,0.18);
  --x-card-radius: 14px;
  --x-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 4px 18px rgba(0,0,0,0.35);
}

[hidden] { display: none !important; }

.x-page { padding-top: 72px; }
@media (max-width: 768px) { .x-page { padding-top: 64px; } }

.x-section { padding: 72px 0; position: relative; }
.x-section.tight { padding: 48px 0; }
.x-section.alt { background: var(--navy-mid); border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); }
.x-narrow { max-width: 760px; margin: 0 auto; }
.x-lead { color: var(--off-white); font-size: 1.1rem; line-height: 1.75; max-width: 680px; }
.x-muted { color: var(--muted); }
.x-small { font-size: 0.85rem; }
.x-center { text-align: center; }
.x-center .x-lead { margin-left: auto; margin-right: auto; }
.x-gold { color: var(--gold); }
.x-stack > * + * { margin-top: 16px; }
.x-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Snow (canvas, decorative) ── */
.x-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.85; }
.x-snow.behind { position: absolute; }

/* ── Hero ── */
.x-hero {
  position: relative; overflow: hidden;
  padding: 96px 0 72px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0,91,187,0.35), transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(245,197,24,0.16), transparent 50%),
    linear-gradient(180deg, #070a14 0%, var(--navy) 60%, var(--navy-mid) 100%);
}
.x-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,197,24,0.5), transparent);
}
.x-hero .container { position: relative; z-index: 1; }
.x-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.x-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(245,197,24,0.4); border-radius: 999px; padding: 8px 16px;
  background: rgba(245,197,24,0.06);
}
.x-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin: 22px 0 18px; font-weight: 900; }
.x-hero h1 em { font-style: normal; color: var(--gold); }
.x-hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.x-credit { display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--muted); font-size: 0.85rem; }
.x-credit .x-album-mark { flex: 0 0 auto; }

/* Album mark: a small typographic "cover" (used where no cover art is supplied) */
.x-album-mark {
  width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center; text-align: center;
  background: linear-gradient(135deg, #003b7a, var(--blue)); color: var(--gold);
  font-family: var(--font-display); font-weight: 900; font-size: 0.55rem; letter-spacing: 1px; line-height: 1.2;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
}
.x-album-mark.large { width: 200px; height: 200px; font-size: 1rem; border-radius: 12px; }

/* Hero card fan */
.x-fan { position: relative; height: 420px; }
.x-fan img {
  position: absolute; width: 58%; aspect-ratio: 384 / 341; object-fit: cover;
  border-radius: 10px; box-shadow: var(--x-shadow); border: 1px solid rgba(255,255,255,0.12);
  transition: transform 0.6s ease;
}
.x-fan img:nth-child(1) { left: 0;  top: 40px; transform: rotate(-9deg); z-index: 1; }
.x-fan img:nth-child(2) { left: 21%; top: 0;   transform: rotate(0deg);  z-index: 3; width: 60%; }
.x-fan img:nth-child(3) { right: 0; top: 48px; transform: rotate(9deg);  z-index: 2; }
.x-fan:hover img:nth-child(1) { transform: rotate(-12deg) translateX(-10px); }
.x-fan:hover img:nth-child(3) { transform: rotate(12deg) translateX(10px); }

/* ── Route cards ── */
.x-routes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.x-route {
  position: relative; border-radius: var(--border-radius); padding: 36px 32px 32px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column; transition: var(--transition);
}
.x-route:hover { transform: translateY(-4px); border-color: rgba(245,197,24,0.5); }
.x-route.primary { background: linear-gradient(160deg, rgba(0,91,187,0.28), rgba(0,59,122,0.12)); border-color: rgba(0,119,230,0.5); }
.x-route h3 { font-size: 1.35rem; margin: 14px 0 10px; }
.x-route p { color: var(--muted); line-height: 1.7; }
.x-route ul { list-style: none; padding: 0; margin: 18px 0 24px; }
.x-route li { color: var(--off-white); padding: 6px 0 6px 28px; position: relative; font-size: 0.95rem; }
.x-route li::before { content: '✦'; position: absolute; left: 4px; color: var(--gold); }
.x-route .btn { margin-top: auto; align-self: flex-start; }
.x-route-tag {
  position: absolute; top: -12px; left: 28px; font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--gold); color: var(--navy);
}
.x-route-tag.quiet { background: var(--navy-light); color: var(--off-white); border: 1px solid rgba(255,255,255,0.15); }

/* ── Steps ── */
.x-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.x-step { counter-increment: step; padding: 24px; border-radius: var(--border-radius); background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.x-step::before { content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-weight: 900; color: var(--gold); font-size: 1.4rem; display: block; margin-bottom: 8px; }
.x-step h4 { font-size: 1rem; margin-bottom: 6px; }
.x-step p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* ── Gallery (landing preview and builder chooser) ── */
.x-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.x-gallery-item {
  position: relative; border-radius: 10px; overflow: hidden; background: var(--navy-light);
  border: 2px solid transparent; padding: 0; margin: 0; cursor: pointer; text-align: left; display: grid; width: 100%; min-width: 0;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
/* display:grid on the button gives the image a definite width; a bare <button> would let it overflow */
/* Square tiles with the whole design visible: the collection mixes portrait and landscape fronts */
.x-gallery-item img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #0b1730; }
.x-gallery-item figcaption, .x-gallery-item .x-cap {
  display: block; padding: 10px 12px; font-size: 0.82rem; color: var(--off-white); font-weight: 600;
  background: rgba(10,14,26,0.85);
}
.x-gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.x-gallery-item:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.x-gallery-item[aria-checked="true"] { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.x-gallery-item[aria-checked="true"]::after {
  content: '✓'; position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: var(--navy); font-weight: 900; display: grid; place-items: center; font-size: 0.9rem;
}

/* ── Album / song list ── */
.x-album { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.x-songs { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(255,255,255,0.08); }
.x-song {
  display: grid; grid-template-columns: 44px 1fr auto auto; gap: 14px; align-items: center;
  padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); transition: background 0.2s ease;
}
.x-song:hover { background: rgba(255,255,255,0.03); }
.x-song.selected { background: var(--x-gold-soft); }
.x-song-title { color: var(--white); font-weight: 600; }
.x-song-meta { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.x-song-dur { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.x-icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05);
  color: var(--white); cursor: pointer; display: grid; place-items: center; transition: var(--transition); font-size: 1rem;
}
.x-icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.x-icon-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.x-icon-btn.playing { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.x-icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.x-select-btn {
  padding: 9px 16px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: transparent; color: var(--white);
  font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; cursor: pointer; transition: var(--transition);
}
.x-select-btn:hover { border-color: var(--gold); color: var(--gold); }
.x-select-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.x-song.selected .x-select-btn { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* ── Playlist player (landing page) ── */
.x-playlist { list-style: none; padding: 0; margin: 0; border-radius: var(--border-radius); overflow: hidden; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.x-pl-row + .x-pl-row { border-top: 1px solid rgba(255,255,255,0.07); }
.x-pl-btn {
  display: grid; grid-template-columns: 44px 36px 1fr auto; gap: 14px; align-items: center; width: 100%;
  padding: 10px 14px; background: none; border: 0; color: var(--off-white); text-align: left; cursor: pointer; font-family: var(--font-body); transition: background 0.2s ease;
}
.x-pl-btn:hover { background: rgba(255,255,255,0.04); }
.x-pl-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.x-pl-row.current .x-pl-btn { background: var(--x-gold-soft); }
.x-pl-row.current .x-pl-icon { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.x-pl-num { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; text-align: right; display: inline-flex; justify-content: flex-end; align-items: center; height: 20px; }
.x-pl-row.playing .x-pl-n, .x-eq { display: none; }
.x-pl-row.playing .x-eq { display: inline-flex; }
.x-pl-title { font-weight: 600; color: var(--white); }
.x-pl-row.current .x-pl-title { color: var(--gold); }
.x-pl-dur { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.x-pl-fail { grid-column: 3 / -1; color: #ff8a80; font-size: 0.78rem; font-weight: 600; }
.x-eq { align-items: flex-end; gap: 2px; height: 16px; }
.x-eq i { display: block; width: 3px; background: var(--gold); border-radius: 1px; animation: x-eq 0.9s ease-in-out infinite; height: 40%; }
.x-eq i:nth-child(2) { animation-delay: 0.15s; } .x-eq i:nth-child(3) { animation-delay: 0.3s; } .x-eq i:nth-child(4) { animation-delay: 0.45s; }
@keyframes x-eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.x-pl-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 768px) {
  .x-pl-btn { grid-template-columns: 40px 28px 1fr auto; gap: 10px; padding: 8px 10px; }
  .x-pl-icon { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .x-eq i { animation: none; height: 60%; } }

/* ── Builder layout ── */
.x-builder { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.x-builder-side { position: sticky; top: 92px; }
.x-panel { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--border-radius); padding: 28px; }
.x-panel + .x-panel { margin-top: 24px; }
.x-panel h2 { font-size: 1.25rem; margin-bottom: 6px; }
.x-panel h2 .x-num { color: var(--gold); margin-right: 8px; }
.x-panel > p.x-muted { margin-bottom: 20px; }

/* Stepper */
.x-stepper { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 32px; padding: 0; list-style: none; }
.x-stepper li {
  font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: var(--muted);
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12);
}
.x-stepper li.done { color: var(--gold); border-color: rgba(245,197,24,0.4); }
.x-stepper li.current { color: var(--navy); background: var(--gold); border-color: var(--gold); }

/* Amount chips */
.x-amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 18px 0; }
.x-amount {
  padding: 16px 8px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.03);
  color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; cursor: pointer; transition: var(--transition);
}
.x-amount:hover { border-color: rgba(245,197,24,0.6); }
.x-amount[aria-checked="true"] { border-color: var(--gold); background: var(--x-gold-soft); color: var(--gold); }
.x-amount:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.x-amount-other { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; }
.x-amount-other input { width: 140px; }
.x-give-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.x-give-buttons .btn { font-size: 0.78rem; padding: 13px 22px; }

/* Forms */
.x-field { margin-bottom: 18px; }
.x-field label { display: block; font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.x-field input[type="text"], .x-field input[type="number"], .x-field textarea, .x-amount-other input {
  width: 100%; padding: 13px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
  color: var(--white); font-family: var(--font-body); font-size: 1rem; transition: border-color 0.2s ease;
}
.x-field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.x-field input:focus, .x-field textarea:focus, .x-amount-other input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,197,24,0.2); }
.x-count { display: block; text-align: right; color: var(--muted); font-size: 0.75rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.x-count.over { color: #ff8a80; }
.x-check { display: flex; align-items: flex-start; gap: 12px; color: var(--off-white); font-size: 0.92rem; line-height: 1.5; cursor: pointer; }
.x-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--gold); flex: 0 0 auto; }
.x-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.x-error { color: #ff8a80; font-size: 0.88rem; margin-top: 10px; display: none; }
.x-error.show { display: block; }
.x-notice {
  border: 1px solid rgba(245,197,24,0.35); background: var(--x-gold-soft); border-radius: 10px; padding: 16px 18px; color: var(--off-white); font-size: 0.92rem; line-height: 1.6;
}
.x-notice .x-actions { margin-top: 12px; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-sm { padding: 10px 18px; font-size: 0.72rem; }

/* ── The eCard component (preview and recipient view) ── */
.x-ecard {
  width: 100%; max-width: 520px; margin: 0 auto; border-radius: var(--x-card-radius); overflow: hidden;
  background: var(--x-cream); color: var(--x-ink); box-shadow: var(--x-shadow); border: 1px solid rgba(255,255,255,0.15);
}
.x-ecard-art { position: relative; background: var(--navy-light); }
.x-ecard-art img { display: block; width: 100%; height: auto; }  /* natural ratio: fronts may be portrait or landscape */
.x-ecard-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 -30px 40px -20px rgba(0,0,0,0.35);
}
/* The printed inside spread, shown as two pages (stacked so the verse stays readable on phones) */
.x-ecard-inside { background: #efe6d4; border-top: 1px solid rgba(0,0,0,0.08); }
.x-ecard-inside img { display: block; width: 100%; height: auto; }
.x-ecard-inside .x-ecard-page-right { border-top: 1px solid rgba(0,0,0,0.08); }
@media (min-width: 1100px) {
  .x-stage .x-ecard-inside { display: grid; grid-template-columns: 1fr 1fr; }
  .x-stage .x-ecard-inside .x-ecard-page-right { border-top: 0; border-left: 1px solid rgba(0,0,0,0.08); }
  .x-stage .x-ecard { max-width: 760px; }
}
.x-album-mark.has-cover { background: none; border: 0; overflow: hidden; }
.x-album-mark img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

.x-ecard-inner {
  padding: 30px 32px 28px; position: relative;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.7), transparent 60%),
    linear-gradient(180deg, var(--x-cream) 0%, var(--x-cream-dark) 100%);
}
.x-ecard-inner::before {
  content: ''; display: block; height: 3px; width: 64px; margin: 0 auto 22px;
  background: linear-gradient(90deg, var(--blue), var(--gold)); border-radius: 2px;
}
.x-ecard-to { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 1px; color: #003b7a; text-align: center; margin-bottom: 14px; overflow-wrap: anywhere; }
.x-ecard-msg {
  font-family: var(--font-quote); font-size: 1.1rem; line-height: 1.75; color: var(--x-ink); text-align: center;
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; padding: 0 4px;
}
.x-ecard-msg.empty { color: var(--x-ink-soft); font-style: italic; }
.x-ecard-from { font-family: var(--font-quote); font-style: italic; font-size: 1.05rem; color: #3a2f0b; text-align: center; margin-top: 18px; overflow-wrap: anywhere; }
.x-ecard-support {
  margin-top: 22px; padding-top: 16px; border-top: 1px dashed rgba(0,59,122,0.25);
  font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; color: #003b7a; text-align: center; font-weight: 700;
}
.x-ecard-support::before { content: '🇺🇦 '; }
.x-ecard-line { font-size: 0.82rem; color: var(--x-ink-soft); text-align: center; margin-top: 6px; font-style: italic; }

/* ── Share panel ── */
.x-share-link { display: flex; gap: 10px; margin: 14px 0 18px; }
.x-share-link input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: var(--white); font-size: 0.9rem; }
.x-share-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.x-share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: var(--white); text-decoration: none;
  font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: var(--transition);
}
.x-share-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.x-share-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.x-share-btn svg { width: 18px; height: 18px; fill: currentColor; }
.x-share-btn.copied { border-color: var(--gold); color: var(--gold); }

/* ── Recipient page ── */
.x-card-page { min-height: 100vh; background: radial-gradient(ellipse at 50% 0%, rgba(0,91,187,0.28), transparent 55%), var(--navy); position: relative; }
.x-envelope {
  position: relative; z-index: 2; min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px 20px;
}
.x-envelope-inner { max-width: 520px; }
.x-envelope-art {
  width: 200px; height: 140px; margin: 0 auto 28px; position: relative; border-radius: 10px;
  background: linear-gradient(160deg, #f6efe2, #e9dfcc); box-shadow: var(--x-shadow); overflow: hidden;
}
.x-envelope-art::before { /* flap */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 70px;
  background: linear-gradient(180deg, #e2d6bd, #d3c4a6); clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.x-envelope-art::after { /* seal */
  content: '🇺🇦'; position: absolute; left: 50%; top: 58px; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); display: grid; place-items: center; font-size: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.x-envelope h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin-bottom: 14px; }
.x-envelope p { color: var(--muted); margin-bottom: 26px; }
.x-envelope .btn { font-size: 0.95rem; padding: 18px 40px; }
.x-envelope .x-open-glow { animation: x-glow 2.8s ease-in-out infinite; }
@keyframes x-glow { 0%,100% { box-shadow: 0 0 0 rgba(245,197,24,0); } 50% { box-shadow: 0 0 40px rgba(245,197,24,0.45); } }

.x-stage { position: relative; z-index: 1; padding: 40px 20px 140px; display: none; }
.x-stage.open { display: block; }
.x-stage .x-ecard { transform-origin: 50% 20%; }
.x-stage.open .x-ecard { animation: x-card-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes x-card-in { from { opacity: 0; transform: translateY(40px) scale(0.92) rotateX(12deg); } to { opacity: 1; transform: none; } }
.x-reveal { opacity: 0; transform: translateY(12px); animation: x-reveal 0.8s ease forwards; animation-delay: var(--d, 0s); }
@keyframes x-reveal { to { opacity: 1; transform: none; } }

.x-after {
  max-width: 560px; margin: 44px auto 0; text-align: center; padding: 32px 26px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--border-radius);
}
.x-after h2 { font-size: 1.35rem; margin-bottom: 12px; }
.x-after p { color: var(--muted); line-height: 1.7; margin-bottom: 8px; }
.x-after .x-actions { justify-content: center; margin-top: 20px; }
.x-after .x-fine { font-size: 0.78rem; margin-top: 18px; }

/* Player bar */
.x-player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; transform: translateY(110%); transition: transform 0.5s ease;
  background: rgba(10,14,26,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.1); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.x-player.show { transform: none; }
.x-player-inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; }
.x-player .x-album-mark { width: 46px; height: 46px; font-size: 0.42rem; }
.x-player-now { font-size: 0.66rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.x-player-title { color: var(--white); font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-player-artist { color: var(--muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-player-bar { height: 3px; background: rgba(255,255,255,0.12); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.x-player-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.5s linear; }

/* ── Homepage campaign block (also used on landing) ── */
.x-home-block {
  position: relative; overflow: hidden; padding: 72px 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(245,197,24,0.14), transparent 55%), linear-gradient(135deg, #061a3a 0%, var(--navy) 100%);
  border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06);
}
.x-home-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; position: relative; z-index: 1; }
.x-home-block h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 12px 0 10px; }
.x-home-block .x-tag { font-family: var(--font-quote); font-style: italic; color: var(--gold); font-size: 1.25rem; }
.x-home-block p { color: var(--muted); max-width: 560px; line-height: 1.7; margin-top: 12px; }
.x-home-cards { display: flex; gap: 12px; }
.x-home-cards img { width: 150px; aspect-ratio: 384/341; object-fit: cover; border-radius: 8px; box-shadow: var(--x-shadow); border: 1px solid rgba(255,255,255,0.12); }
.x-home-cards img:nth-child(2) { transform: translateY(-16px); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .x-gallery { grid-template-columns: repeat(3, 1fr); }
  .x-steps { grid-template-columns: repeat(2, 1fr); }
  .x-builder { grid-template-columns: 1fr; }
  .x-builder-side { position: static; }
  .x-album { grid-template-columns: 1fr; }
  .x-album .x-album-mark.large { margin: 0 auto; }
}
@media (max-width: 768px) {
  .x-section { padding: 52px 0; }
  .x-hero { padding: 72px 0 56px; }
  .x-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .x-fan { height: 260px; }
  .x-routes { grid-template-columns: 1fr; }
  .x-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .x-amounts { grid-template-columns: repeat(3, 1fr); }
  .x-song { grid-template-columns: 40px 1fr auto; }
  .x-song .x-song-dur { display: none; }
  .x-panel { padding: 20px 18px; }
  .x-ecard-inner { padding: 24px 20px 22px; }
  .x-ecard-msg { font-size: 1rem; max-height: 260px; }
  .x-home-grid { grid-template-columns: 1fr; }
  .x-home-cards { justify-content: center; }
  .x-home-cards img { width: 30%; }
  .x-player-inner { grid-template-columns: auto 1fr auto auto; gap: 10px; }
  .x-player .x-album-mark { display: none; }
  .x-share-buttons { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .x-steps { grid-template-columns: 1fr; }
  .x-amounts { grid-template-columns: repeat(2, 1fr); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .x-snow { display: none; }
  .x-stage.open .x-ecard, .x-reveal { animation: none; opacity: 1; transform: none; }
  .x-envelope .x-open-glow { animation: none; }
  .x-fan img, .x-route, .x-gallery-item, .x-player { transition: none; }
}

/* Portrait artwork in the hero fan and homepage block */
.x-fan img { aspect-ratio: auto; height: auto; width: 46%; }
.x-fan img:nth-child(2) { width: 48%; left: 26%; }
.x-home-cards img { aspect-ratio: auto; height: auto; width: 140px; }
