/* Advent reveal — staged in the night of the event; the result is already committed by the server.
   Classic: the gift drops, shivers, the lid flies in a beam of light, the amount rolls up.
   Blox Fruits: the room goes dark, light cracks in the rarity colour, a shockwave, the real fruit rises. */
.advent-cinema { --aura: #e6bf6b; position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border: 0; border-radius: 0; color: #fff3e5; overflow: auto; overscroll-behavior: contain; text-align: center; isolation: isolate; font-family: var(--n-ui, system-ui, sans-serif);
  background: radial-gradient(60% 50% at 50% 42%, #1f4335 0, #0b1712 60%, #050b08 100%); }
/* The Command Center styles every dialog as a small panel: the cinema always takes the whole screen. */
dialog.advent-cinema { position: fixed !important; inset: 0 !important; width: 100vw !important; max-width: none !important; height: 100dvh !important; max-height: none !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; background: radial-gradient(60% 50% at 50% 42%, #1f4335 0, #0b1712 60%, #050b08 100%) !important; box-shadow: none !important; }
dialog.advent-cinema.is-exclusive { background: radial-gradient(55% 45% at 50% 44%, color-mix(in srgb, var(--aura) 22%, #0b0a12), #050508 72%) !important; }
.advent-cinema[open] { display: grid; place-items: center; animation: cinema-in .45s cubic-bezier(.16, 1, .3, 1); }
.advent-cinema::backdrop { background: #050b08; }
.advent-cinema.is-exclusive { background: radial-gradient(55% 45% at 50% 44%, color-mix(in srgb, var(--aura) 22%, #0b0a12), #050508 72%); }
.advent-cinema[data-phase="leaving"] { animation: cinema-out .28s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes cinema-in { from { opacity: 0; } }
@keyframes cinema-out { to { opacity: 0; transform: translateY(30px) scale(.98); } }
.advent-cinema :is(h2, p, strong, span, small, dt, dd) { color: inherit; }
.advent-cinema h2 { margin: 14px auto 10px; max-width: 760px; font: 650 clamp(1.9rem, 5.4vw, 3.6rem)/1 var(--n-display, Georgia, serif); letter-spacing: -.02em; color: #fff3e5; text-wrap: balance; }
.advent-cinema p { max-width: 620px; margin: 10px auto; font-size: 1.02rem; line-height: 1.6; }
.advent-cinema .btn { display: inline-flex; width: fit-content; margin: 14px auto 0; min-height: 50px; padding: 0 26px; border: 0; border-radius: 14px; font: 700 1rem var(--n-ui, system-ui, sans-serif); color: #fff; text-decoration: none;
  background: linear-gradient(180deg, #ec4a60, #d2263f 55%, #b51c35); box-shadow: 0 1px 0 #ffffff55 inset, 0 14px 30px -12px #d2263f; align-items: center; justify-content: center; }
.advent-cinema .btn.secondary { color: #f6f0e4 !important; background: transparent !important; border: 1px solid #f6f0e466 !important; box-shadow: none !important; }
.advent-cinema .btn.advent-return { margin-top: 22px; color: #14211b; background: #f6f0e4; box-shadow: 0 14px 30px -14px #000; }
.advent-skip { position: fixed; z-index: 5; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); min-height: 44px; padding: 0 18px; border: 1px solid #f6f0e455; border-radius: 99px; background: #ffffff10; color: #f6f0e4; font: 650 .92rem var(--n-ui, system-ui, sans-serif); cursor: pointer; }
.advent-skip:hover { background: #ffffff1c; }
.advent-cinema :focus-visible { outline: 3px solid #f7dfa2; outline-offset: 4px; }
.advent-stage { position: relative; display: grid; place-items: center; width: min(560px, 92vw); height: min(62vh, 520px); }
.advent-opening { position: fixed; left: 0; right: 0; bottom: max(40px, calc(env(safe-area-inset-bottom) + 24px)); margin: 0 auto !important; font: italic 500 1.15rem var(--n-display, Georgia, serif); color: #f7dfa2 !important; animation: cinema-whisper 2s ease-in-out infinite; }
@keyframes cinema-whisper { 50% { opacity: .55; } }
/* The light that falls on the gift (it comes from above). */
.advent-light { position: absolute; left: 50%; top: -20%; width: 70%; height: 110%; translate: -50% 0; background: conic-gradient(from 180deg at 50% 0, transparent 160deg, #f7dfa233 172deg, #fff3c655 180deg, #f7dfa233 188deg, transparent 200deg); filter: blur(6px); opacity: .7; }
.is-exclusive .advent-light { background: conic-gradient(from 180deg at 50% 0, transparent 160deg, color-mix(in srgb, var(--aura) 30%, transparent) 174deg, color-mix(in srgb, var(--aura) 55%, #fff) 180deg, color-mix(in srgb, var(--aura) 30%, transparent) 186deg, transparent 200deg); opacity: .4; }
/* The gift: body, lid, ribbons, bow. */
.advent-gift { position: relative; z-index: 2; width: 180px; height: 170px; animation: gift-drop .75s cubic-bezier(.34, 1.56, .64, 1) both; }
.gift-body { position: absolute; left: 0; right: 0; bottom: 0; height: 74%; border-radius: 10px; background: linear-gradient(90deg, transparent 42%, #e6bf6b 42%, #f7dfa2 50%, #e6bf6b 58%, transparent 58%), linear-gradient(160deg, #ec4a60, #b51c35 55%, #7b0f24); box-shadow: inset -30px -20px 50px #0006, inset 8px 8px 20px #ffffff22, 0 40px 50px -20px #000; }
.gift-lid { position: absolute; left: -8%; right: -8%; top: 12%; height: 22%; border-radius: 12px; background: linear-gradient(90deg, transparent 43%, #e6bf6b 43%, #f7dfa2 50%, #e6bf6b 57%, transparent 57%), linear-gradient(170deg, #f05068, #a3162f); box-shadow: 0 12px 16px -6px #000a, inset 0 2px 0 #ffffff55; transform-origin: 15% 100%; }
.gift-bow { position: absolute; left: 50%; top: -6%; width: 50%; translate: -50% 0; color: #f7dfa2; filter: drop-shadow(0 6px 6px #0007); transform-origin: 50% 100%; }
.gift-bow svg { display: block; width: 100%; }
.gift-cracks { position: absolute; inset: 20% 6% 0; border-radius: 10px; opacity: 0; pointer-events: none; background: linear-gradient(115deg, transparent 47%, #fff 48%, transparent 50%) 0 0 / 100% 100%, linear-gradient(35deg, transparent 58%, #fff 59%, transparent 61%), linear-gradient(160deg, transparent 30%, #fff 31%, transparent 33%), linear-gradient(80deg, transparent 70%, #fff 71%, transparent 72.5%); mix-blend-mode: screen; filter: drop-shadow(0 0 6px var(--aura)) drop-shadow(0 0 14px var(--aura)); }
@keyframes gift-drop { 0% { transform: translateY(-70vh) rotate(-14deg); } 70% { transform: translateY(0) scale(1.08, .9); } 100% { transform: none; } }
.advent-orbit { position: absolute; width: 340px; height: 340px; border: 1px solid color-mix(in srgb, var(--aura) 60%, transparent); border-radius: 50%; transform: rotateX(72deg); opacity: .5; }
.orbit-two { width: 440px; height: 440px; transform: rotateX(72deg) rotateZ(50deg); }
.is-normal .orbit-two { display: none; }
.advent-energy { position: absolute; z-index: 1; width: 200px; height: 200px; border-radius: 50%; background: var(--aura); filter: blur(60px); opacity: .18; transition: opacity 1s, transform 1s; }
.advent-shock { position: absolute; z-index: 3; width: 120px; height: 120px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--aura) 70%, #fff); opacity: 0; pointer-events: none; }
.advent-spark { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #f7dfa2; transform: rotate(var(--angle)) translateX(var(--reach)); opacity: .5; animation: advent-spark 2.4s calc(var(--i) * -.13s) linear infinite; }
.is-exclusive .advent-spark { width: 3px; height: 26px; border-radius: 3px; background: var(--aura); box-shadow: 0 0 14px var(--aura); }
@keyframes advent-spark { 50% { opacity: 1; } to { transform: rotate(calc(var(--angle) + 90deg)) translateX(var(--reach)); } }
/* Charging: the gift shivers, the light gathers. */
.advent-cinema[data-phase="charging"] .advent-gift { animation: gift-shiver .5s ease-in-out infinite; }
.is-exclusive[data-phase="charging"] .advent-gift { animation: gift-shiver .32s ease-in-out infinite; }
.advent-cinema[data-phase="charging"] .gift-lid { transform: translateY(-4px) rotate(-2deg); transition: transform .4s; }
.advent-cinema[data-phase="charging"] .advent-energy { opacity: .65; transform: scale(1.9); }
.advent-cinema[data-phase="charging"] .advent-light { opacity: 1; transition: opacity 1.2s; }
.is-exclusive[data-phase="charging"] .gift-cracks { animation: cracks-grow 2.3s ease-in forwards; }
.is-exclusive[data-phase="charging"] .advent-stage { animation: cinema-push 2.3s cubic-bezier(.65, 0, .35, 1) forwards; }
.is-exclusive[data-phase="charging"] .advent-orbit { opacity: 1; animation: orbit-spin 1.2s linear infinite; box-shadow: 0 0 40px color-mix(in srgb, var(--aura) 40%, transparent); }
@keyframes gift-shiver { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg) translateX(-3px); } 75% { transform: rotate(3deg) translateX(3px); } }
@keyframes cracks-grow { from { opacity: 0; clip-path: inset(40% 40% 40% 40%); } to { opacity: 1; clip-path: inset(0); } }
@keyframes cinema-push { to { transform: scale(1.22); } }
@keyframes orbit-spin { to { rotate: 0 0 1 360deg; } }
/* Burst: the lid flies, the beam rises, the shockwave rolls out. */
.advent-cinema[data-phase="burst"] .gift-lid { transform: translate(40px, -260px) rotate(38deg); opacity: 0; transition: transform .6s cubic-bezier(.16, 1, .3, 1), opacity .6s .2s; }
.advent-cinema[data-phase="burst"] .gift-bow { transform: translateY(-200px) rotate(-30deg) scale(.6); opacity: 0; transition: transform .6s cubic-bezier(.16, 1, .3, 1), opacity .5s .15s; }
.advent-cinema[data-phase="burst"] .gift-body { transform: scale(.9, 1.06); opacity: 0; transition: transform .4s, opacity .45s .15s; }
.advent-cinema[data-phase="burst"] .advent-energy { opacity: .9; transform: scale(4); }
.advent-cinema[data-phase="burst"] .advent-light { opacity: 1; filter: blur(2px) brightness(1.6); transition: filter .4s; }
.advent-cinema[data-phase="burst"] .advent-shock { animation: shock .7s cubic-bezier(.16, 1, .3, 1) forwards; }
.is-exclusive[data-phase="burst"]::after { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 46%, #fff, color-mix(in srgb, var(--aura) 60%, transparent) 30%, transparent 70%); animation: soft-flash .7s ease-out forwards; }
@keyframes shock { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(5); } }
@keyframes soft-flash { from { opacity: .85; } to { opacity: 0; } }
.advent-cinema[data-phase="revealed"] .advent-stage, .advent-cinema[data-phase="revealed"] .advent-opening { display: none; }
/* Reveal. */
.advent-reveal { width: min(720px, 100%); padding: 10px 0 24px; animation: reward-emerge .7s cubic-bezier(.16, 1, .3, 1) both; }
.advent-reveal[hidden] { display: none; }
.advent-normal-icon { display: block; width: 110px; margin: 0 auto; color: #f7dfa2 !important; filter: drop-shadow(0 10px 14px #0008); animation: bow-in .8s cubic-bezier(.34, 1.56, .64, 1) both; }
.advent-normal-icon svg { display: block; width: 100%; }
.advent-cinema .advent-amount { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: 6px auto 4px !important; font: 700 clamp(4rem, 14vw, 8rem)/1 var(--n-display, Georgia, serif); color: #f7dfa2 !important; letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-shadow: 0 0 40px #e6bf6b55; }
.advent-amount > span:last-child { font: 700 clamp(.9rem, 2vw, 1.2rem)/1 var(--n-ui, system-ui, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #fff3e5 !important; }
.advent-fruit-stage { position: relative; display: grid; place-items: center; width: min(260px, 60vw); aspect-ratio: 1; margin: 0 auto; }
.advent-fruit-halo { position: absolute; inset: -10%; border-radius: 50%; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--aura) 60%, transparent), transparent 30%, color-mix(in srgb, var(--aura) 40%, transparent) 55%, transparent 70%); filter: blur(14px); animation: halo-turn 8s linear infinite; }
.advent-prize-image { position: relative; width: 100%; height: auto; filter: drop-shadow(0 20px 30px #000c) drop-shadow(0 0 40px var(--aura)); animation: fruit-rise 1.1s cubic-bezier(.34, 1.56, .64, 1) both, fruit-hover 4s 1.1s ease-in-out infinite; }
.advent-rarity { display: block; margin-top: 10px; font: 700 clamp(1.4rem, 4vw, 2.2rem)/1 var(--n-display, Georgia, serif); font-style: italic; letter-spacing: .02em; color: color-mix(in srgb, var(--aura) 70%, #fff) !important; animation: rarity-in .9s .35s cubic-bezier(.16, 1, .3, 1) both; }
.advent-congrats { font-size: 1.15rem !important; }
.advent-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 680px; margin: 18px auto 4px; padding: 0; }
.advent-facts div { padding: 12px 10px; border-radius: 14px; background: #ffffff0c; border: 1px solid #ffffff1c; }
.advent-facts dt { font: 700 .66rem/1 var(--n-ui, system-ui, sans-serif); letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.advent-facts dd { margin: 6px 0 0; font: 650 .95rem/1.3 var(--n-ui, system-ui, sans-serif); }
.advent-ticket { font-size: .98rem !important; }
.advent-ticket.is-open { color: #bdf0d2 !important; }
.advent-reference { display: block; margin-top: 14px; overflow-wrap: anywhere; font-size: .8rem; opacity: .65; }
@keyframes reward-emerge { from { opacity: 0; transform: translateY(30px) scale(.94); } }
@keyframes bow-in { from { opacity: 0; transform: scale(.3) rotate(-30deg); } }
@keyframes fruit-rise { from { opacity: 0; transform: translateY(80px) scale(.4) rotate(-40deg); } }
@keyframes fruit-hover { 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes rarity-in { from { opacity: 0; letter-spacing: .6em; filter: blur(6px); } }
@keyframes halo-turn { to { rotate: 360deg; } }
.advent-cinema[data-rarity="Mythical"] .advent-reveal { animation: mythical-emerge .9s both; }
@keyframes mythical-emerge { from { opacity: 0; transform: scale(1.25); filter: brightness(2.5); } to { opacity: 1; transform: none; filter: none; } }
/* Collection card (member area). */
.advent-award-card strong { position: relative; z-index: 1; font: 700 1.35rem/1 var(--n-display, Georgia, serif); color: #f6f0e4; }
.advent-award-card img { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .advent-stage { height: 50vh; }
  .advent-gift { scale: .82; }
  .advent-orbit { scale: .7; }
  .advent-facts { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .advent-cinema, .advent-cinema * { animation: none !important; transition: none !important; } }
html[data-effects="off"] .advent-cinema * { animation: none !important; transition: none !important; }

.fruit-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.fruit-stats > div {
  padding: 18px;
  background: #ffffff08;
  border: 1px solid #ffffff22;
  border-radius: 16px;
  display: grid;
  gap: 8px;
}
.fruit-stats strong {
  font-size: 1.7rem;
}
.fruit-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-block: 20px;
}
.fruit-admin details {
  margin-block: 20px;
  padding: 18px;
  border: 1px solid #ffffff22;
  border-radius: 18px;
}
.fruit-admin summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 16px;
}
.fruit-stock {
  padding: 20px;
  border: 1px solid #ffffff22;
  border-radius: 18px;
  background: #ffffff08;
  display: grid;
  gap: 10px;
}
.fruit-stock label {
  display: grid;
  gap: 6px;
}
.fruit-stock input,
.fruit-admin select {
  font: inherit;
  padding: 12px;
  border: 1px solid #686273;
  border-radius: 12px;
  background: #242333;
  color: #fff;
  width: 100%;
  min-width: 0;
}
.fruit-stock input[type="checkbox"] {
  width: auto;
}
.fruit-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.fruit-days > div {
  display: grid;
  padding: 10px;
  background: #ffffff08;
  border-radius: 12px;
}
.fruit-admin table small {
  overflow-wrap: anywhere;
}
.fruit-admin td {
  max-width: 240px;
}
.fruit-admin form[data-winner] {
  display: grid;
  gap: 8px;
}
.fruit-admin .table-scroll {
  overflow: auto;
}
.fruit-admin #fruit-feedback {
  color: #ffcca7;
}

.fruit-discord-card { margin-top:18px;padding:24px;border:1px solid #55515e;border-left:5px solid #fff;border-radius:18px;background:#232428;color:#f4f4f6;max-width:620px; }.fruit-discord-card :is(h3,p,strong){color:#f4f4f6!important}.fruit-discord-card img{object-fit:contain}

.christmas-page[data-christmas-admin="true"] .card :is(p,strong,small) { color:#e4deed; }
.christmas-page[data-christmas-admin="true"] .fruit-admin :is(td,span,strong,p,small) { color:#eee8f5; }
.christmas-page[data-christmas-admin="true"] .fruit-stats strong { color:#fff; }
.christmas-page[data-christmas-admin="true"] .fruit-stats span { color:#cfc5db; }

/* Administration of the fruits (Command Center). */
.fruit-stock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
@media (max-width: 600px) { .fruit-admin { padding: 16px; } .fruit-admin td { min-width: 150px; } }
