/* The Phoenix promo floating on every page (assets/phoenix.js): Lemp's Patreon level with 20 spots.
   A card that rises out of embers above the back-to-top button; closing it folds it into a glowing orb. */
.phx-root {
  --phx-rose: #ff5470;
  --phx-fire: #ff8a3d;
  --phx-gold: #ffd27a;
  position: fixed; right: 16px; bottom: calc(72px + var(--chat-bar, 0px)); z-index: 60;
  font: 14px/1.45 var(--body); color: var(--text);
}
.phx-root[hidden] { display: none; }
.phx-root { transition: opacity .35s ease, transform .35s ease; }
.phx-root.phx-away { opacity: 0; transform: translateX(40px); pointer-events: none; }

/* The card */
.phx-card {
  position: relative; width: 300px; padding: 50px 20px 18px; border-radius: 16px; text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 84, 112, .30), transparent 60%),
    radial-gradient(90% 60% at 50% 100%, rgba(255, 138, 61, .22), transparent 70%),
    linear-gradient(180deg, #24101c, #140a14 70%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(255, 84, 112, .22);
  isolation: isolate; overflow: visible;
  animation: phx-rise .9s cubic-bezier(.2, .9, .25, 1.15) both, phx-bob 6s ease-in-out .9s infinite;
}
/* A burning frame: a conic gradient spinning under a 1.5px mask */
.phx-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: -1;
  background: conic-gradient(from var(--phx-a, 0deg), var(--phx-rose), var(--phx-gold), var(--phx-fire), #6b1630, var(--phx-rose));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: phx-spin 6s linear infinite;
}
@property --phx-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.phx-badge {
  position: absolute; left: 50%; top: -44px; width: 84px; height: 84px; transform: translateX(-50%);
  filter: drop-shadow(0 0 14px rgba(255, 84, 112, .8)) drop-shadow(0 0 30px rgba(255, 138, 61, .45));
  animation: phx-pulse 2.6s ease-in-out infinite;
}
.phx-wings {
  position: absolute; left: 50%; top: -30px; width: 190px; height: 70px; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background:
    radial-gradient(50% 60% at 22% 60%, rgba(255, 84, 112, .55), transparent 70%),
    radial-gradient(50% 60% at 78% 60%, rgba(255, 84, 112, .55), transparent 70%),
    radial-gradient(40% 70% at 50% 50%, rgba(255, 210, 122, .45), transparent 70%);
  filter: blur(6px); animation: phx-wings 2.6s ease-in-out infinite;
}
.phx-kicker {
  font: 700 .7rem/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--phx-gold); opacity: .9;
}
.phx-title {
  margin: 8px 0 6px; font: 700 1.32rem/1.15 var(--heading); letter-spacing: .02em;
  background: linear-gradient(180deg, #fff3d6 10%, var(--phx-gold) 45%, var(--phx-fire) 75%, var(--phx-rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 22px rgba(255, 120, 80, .25);
}
.phx-text { margin: 0 0 14px; color: #d9c8b6; font-size: .88rem; }
.phx-text strong { color: var(--phx-rose); font-weight: 600; }

/* 20 spots: lit flames are taken, embers are free */
/* 20 sockets: a lit one is a Phoenix found, an empty one waits */
.phx-spots { display: grid; grid-template-columns: repeat(10, 14px); justify-content: center; gap: 6px 7px; margin: 0 0 8px; }
.phx-spot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #2b1620, #0a0408 70%);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 138, 61, .35); }
.phx-spot.taken { background: radial-gradient(circle at 40% 35%, #fff1c2, var(--phx-gold) 30%, var(--phx-rose) 75%);
  box-shadow: 0 0 10px rgba(255, 84, 112, .85), 0 0 0 1px rgba(255, 210, 122, .6); }
.phx-spot.next { animation: phx-next 1.6s ease-in-out infinite; }
.phx-count { margin: 0 0 14px; font-size: .78rem; color: var(--muted); }
.phx-count b { color: var(--phx-gold); }

.phx-cta {
  position: relative; display: block; overflow: hidden; padding: 11px 16px; border-radius: 999px; text-decoration: none;
  font: 700 .95rem/1 var(--body); color: #2a0610; letter-spacing: .01em;
  background: linear-gradient(90deg, var(--phx-rose), var(--phx-fire) 55%, var(--phx-gold));
  box-shadow: 0 6px 22px rgba(255, 84, 112, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.phx-cta::after { /* a light sweep every few seconds */
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: phx-sweep 4.5s ease-in-out 1.5s infinite;
}
.phx-cta:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 10px 30px rgba(255, 84, 112, .6), inset 0 1px 0 rgba(255, 255, 255, .35); color: #2a0610; }
.phx-cta:focus-visible { outline: 2px solid var(--phx-gold); outline-offset: 3px; }
.phx-cta.soon { pointer-events: none; filter: saturate(.6) brightness(.85); }
.phx-fine { margin: 10px 0 0; font-size: .7rem; color: var(--faint); }

.phx-close {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer;
  font: 400 18px/1 var(--body); color: var(--muted); background: rgba(255, 255, 255, .05);
}
.phx-close:hover { color: var(--text); background: rgba(255, 255, 255, .12); }
.phx-close:focus-visible { outline: 2px solid var(--phx-gold); }

/* Embers rising inside the card */
.phx-embers { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: -1; }
.phx-embers i {
  position: absolute; bottom: -8px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--phx-gold); box-shadow: 0 0 6px 2px rgba(255, 138, 61, .8);
  animation: phx-ember linear infinite; opacity: 0;
}

/* The orb: the card folded away */
.phx-orb {
  position: relative; display: grid; place-items: center; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%;
  cursor: pointer; background: radial-gradient(circle at 50% 60%, #3a0f22, #12070e 70%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 24px rgba(255, 84, 112, .5);
  animation: phx-bob 5s ease-in-out infinite;
}
.phx-orb img { width: 46px; height: 46px; filter: drop-shadow(0 0 8px rgba(255, 84, 112, .9)); }
.phx-orb::before { /* a ring of fire breathing around it */
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from var(--phx-a, 0deg), var(--phx-rose), var(--phx-gold), var(--phx-fire), #6b1630, var(--phx-rose));
  -webkit-mask: radial-gradient(circle, transparent 31px, #000 32px); mask: radial-gradient(circle, transparent 31px, #000 32px);
  animation: phx-spin 3s linear infinite;
}
.phx-orb-label {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
  font: 700 .78rem/1 var(--body); color: var(--phx-gold); background: rgba(20, 10, 20, .92); border: 1px solid #4a1a2c;
  padding: 7px 10px; border-radius: 999px; opacity: 0; transition: opacity .2s ease;
}
.phx-orb:hover .phx-orb-label, .phx-orb:focus-visible .phx-orb-label { opacity: 1; }
.phx-orb:focus-visible { outline: 2px solid var(--phx-gold); outline-offset: 4px; }

@keyframes phx-next { 50% { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9), 0 0 0 1px var(--phx-gold), 0 0 12px rgba(255, 210, 122, .7); } }
@keyframes phx-wings { 0%, 100% { transform: translateX(-50%) scaleX(1); opacity: .75; } 50% { transform: translateX(-50%) scaleX(1.18); opacity: 1; } }
@keyframes phx-rise { from { opacity: 0; transform: translateY(40px) scale(.92); filter: blur(6px) brightness(2); } to { opacity: 1; transform: none; filter: none; } }
@keyframes phx-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes phx-spin { to { --phx-a: 360deg; } }
@keyframes phx-pulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.07); } }
@keyframes phx-sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes phx-ember {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 10px), -260px) scale(.3); }
}

@media (max-width: 640px) {
  .phx-root { right: 12px; }
  .phx-card { width: min(300px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .phx-card, .phx-orb, .phx-badge, .phx-wings, .phx-spot, .phx-cta::after, .phx-card::before, .phx-orb::before, .phx-embers i { animation: none !important; }
  .phx-embers { display: none; }
}

/* The Patreon line in the Support section and the Phoenix wall under it */
.phx-support { display: flex; gap: 12px; align-items: center; text-align: left; margin: 22px 0 12px; padding-top: 18px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.phx-support img { flex: none; filter: drop-shadow(0 0 8px rgba(255, 84, 112, .6)); }
.phx-support strong { color: var(--text); }
.donate-card .phx-support-btn { border-color: rgba(255, 84, 112, .55); color: #ff9aac; }
.donate-card .phx-support-btn:hover { background: rgba(255, 84, 112, .12); color: #ffc2cd; }
.phx-wall { margin-top: 36px; text-align: center; }
.phx-wall[hidden] { display: none; }
.phx-wall h3 { margin: 0 0 6px; font: 700 1.4rem/1.2 var(--heading); color: #ff9aac; text-shadow: 0 0 20px rgba(255, 84, 112, .4); }
.phx-wall p { margin: 0 0 16px; color: var(--muted); }
.phx-wall-names { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; }
.phx-wall-names li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  font: 600 .95rem/1 var(--body); color: #ff8fa3; background: rgba(255, 84, 112, .08); border: 1px solid rgba(255, 84, 112, .35); }
.phx-wall-names li.past { color: var(--muted); border-color: var(--line); background: none; }
.phx-wall-names img { width: 22px; height: 22px; }

/* Supporter passes under the Patreon line (supporter.js) */
.pass-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
.pass-box[hidden] { display: none; }
.pass-intro { margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.pass-intro strong { color: var(--text); }
.pass-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pass { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.pass img { flex: none; }
.pass-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .85rem; color: var(--muted); }
.pass-text strong { color: var(--text); font-size: .95rem; }
.pass-yours { color: #ffb36b; }
.donate-card .pass-btn { flex: none; width: auto; margin: 0; padding: 6px 12px; font-size: .85rem; white-space: nowrap; }

/* Link Patreon and the supporter's own choices, under the Patreon button (assets/supporter.js) */
.patreon-box { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(255, 84, 112, .3); border-radius: 10px;
  background: rgba(255, 84, 112, .05); text-align: left; font-size: .85rem; color: var(--muted); }
.patreon-box[hidden] { display: none; }
.patreon-box strong { color: var(--text); }
.patreon-box p { margin: 0 0 10px; }
.patreon-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.patreon-row img { width: 26px; height: 26px; vertical-align: middle; margin-right: 6px; }
.patreon-box .btn { padding: 7px 14px; font-size: .85rem; }
.patreon-unlink { border: 0; background: none; color: var(--faint); font: inherit; font-size: .78rem; text-decoration: underline; cursor: pointer; }
.patreon-unlink:hover { color: var(--text); }
.patreon-prefs { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.patreon-prefs label { display: flex; gap: 8px; align-items: center; cursor: pointer; color: var(--text); }
.patreon-prefs input { accent-color: #ff8a3d; width: 16px; height: 16px; }

/* The supporter list under the Phoenix wall: grandest tier first */
.supporter-wall { margin-top: 30px; text-align: center; }
.supporter-wall[hidden] { display: none; }
.supporter-wall h3 { margin: 0 0 6px; font: 700 1.25rem/1.2 var(--heading); color: #ffb36b; }
.supporter-wall p { margin: 0 0 14px; color: var(--muted); }
.supporter-names { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; }
.supporter-names li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 7px; border-radius: 999px;
  font: 600 .9rem/1 var(--body); color: var(--text); border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.supporter-names img { width: 20px; height: 20px; }
