/* The amphora: the Lair's run-end ritual and the home page's landing
   (bn-amphora.js). The arena's navy, gold and aqua; calm motion, one stamp. */

.bna-rite, .bna-land {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(9, 20, 40, .82), rgba(1, 10, 19, .94) 78%);
  animation: bna-in .5s ease-out both;
  font-family: 'Alegreya Sans', sans-serif;
  color: #f0e6d2;
}
.bna-rite.leaving, .bna-land.leaving { pointer-events: none; }
.bna-land.leaving .bna-band, .bna-land.leaving .bna-in > :not(.bna-ljar) { opacity: 0; transition: opacity .3s ease; }
.bna-land.leaving { background: transparent; transition: background .5s ease; }

.bna-plate, .bna-lplate {
  position: relative;
  min-width: 0;
  width: min(520px, 100%);
  max-height: 100%;
  display: flex; flex-direction: column;
  text-align: center;
  animation: bna-plate-in .7s cubic-bezier(.2, .8, .3, 1) both;
}
/* What the plate says scrolls inside the band, never the band itself. */
.bna-in { position: relative; z-index: 1; min-height: 0; overflow-y: auto; padding: 26px 56px 24px; }

/* ---- the band: the mana die's banner (manaDie.js #md-banner), stood up ---- */
.bna-band {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(3, 12, 20, .9) 12%, rgba(3, 14, 24, .95) 50%, rgba(3, 12, 20, .9) 88%, transparent 100%);
  transition: opacity .3s ease;
}
.bna-band::before, .bna-band::after {
  content: ""; position: absolute; left: 6%; right: 6%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 170, 110, .7), transparent);
  transition: background .6s ease;
}
.bna-band::before { top: 0; }
.bna-band::after { bottom: 0; }
/* sealed: the lines warm up and the plate takes the die's slam */
.bna-rite.sealed .bna-band::before, .bna-rite.sealed .bna-band::after { background: linear-gradient(90deg, transparent, rgba(240, 216, 144, .95), transparent); }
.bna-rite.sealed .bna-plate { animation: bna-gate-slam .48s cubic-bezier(.18, 1.1, .32, 1) both; }
/* practice: the gold goes cold */
.bna-rite.is-practice .bna-band::before, .bna-rite.is-practice .bna-band::after { background: linear-gradient(90deg, transparent, rgba(185, 198, 209, .6), transparent); }
.bna-kick {
  font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 3.5px; text-transform: uppercase;
  color: #0ac8b9;
}

/* ---- the jar ---- */
.bna-stage { margin: 8px auto 0; width: 100%; max-width: 320px; }
/* The jar gives way before the words do on a short window. */
.bna-stage .bna-svg { display: block; margin: 0 auto; width: auto; max-width: 100%; height: min(260px, 34vh); overflow: visible; }
.bna-svg { display: block; overflow: visible; }
.bna-wave { animation: bna-wave 5s linear infinite; }
.bna-svg.ghost .bna-wave { animation-duration: 8s; }
/* The aqua light at the foot of the water: a slow breath, barely there. */
.bna-glow { opacity: .26; mix-blend-mode: screen; animation: bna-glow 7s ease-in-out infinite; }
.bna-rung line { stroke: rgba(200, 170, 110, .35); stroke-width: 1; }
.bna-rung circle { fill: #0a1626; stroke: rgba(200, 170, 110, .5); stroke-width: 1.2; }
.bna-rung text { font-family: 'Cinzel', serif; fill: #7d7563; transition: fill .4s ease; }
.bna-rung .bna-rn { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.bna-rung .bna-rk { font-size: 10.5px; font-family: 'Alegreya Sans', sans-serif; }
.bna-rung.on line { stroke: rgba(240, 216, 144, .8); }
.bna-rung.on circle { fill: #f0d890; stroke: #f0d890; }
.bna-rung.on .bna-rn { fill: #f0d890; }
.bna-rung.on .bna-rk { fill: #e8d19a; }
.is-practice .bna-rung.on circle { fill: #9aa7b3; stroke: #9aa7b3; }
.is-practice .bna-rung.on .bna-rn, .is-practice .bna-rung.on .bna-rk { fill: #b9c6d1; }
.is-practice .bna-rung.on line { stroke: rgba(185, 198, 209, .6); }

.bna-seal { opacity: 0; transform-box: fill-box; transform-origin: center; }
.bna-seal-k { font-size: 15px; fill: #3a2808; font-weight: 700; }
.sealed .bna-seal { opacity: 1; animation: bna-stamp .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.sealed .bna-rim { filter: drop-shadow(0 0 6px rgba(240, 216, 144, .55)); }

/* ---- the readouts under it ---- */
.bna-depth {
  font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: #a09b8c; margin-top: 2px;
}
.bna-depth b { color: #f0e6d2; font-variant-numeric: tabular-nums; }
.bna-keys { display: flex; justify-content: center; gap: 5px; margin: 10px 0 2px; }
.bna-k {
  font-style: normal; font-size: 19px; line-height: 1; width: 22px;
  color: rgba(200, 170, 110, .22);
  transition: color .35s ease, text-shadow .35s ease, transform .35s ease;
}
.bna-k.on { color: #f0d890; text-shadow: 0 0 10px rgba(240, 216, 144, .6); transform: translateY(-2px); }
/* The Queen's broken key: set apart, cracked. */
.bna-bk { position: relative; margin-left: 8px; }
.bna-bk::after {
  content: ''; position: absolute; left: 3px; right: 3px; top: 50%; height: 1.5px;
  background: #0a1626; transform: rotate(-35deg);
}
.bna-bk:not(.on) { color: rgba(200, 170, 110, .12); }
.bna-count { font-size: 12px; letter-spacing: .5px; color: #a09b8c; }
.bna-count b { color: #f0e6d2; font-variant-numeric: tabular-nums; }
.is-practice .bna-keys, .is-practice .bna-count { opacity: .45; }

.bna-verdict { margin-top: 10px; animation: bna-rise .6s ease-out both; }
.bna-verdict[hidden] { display: none; }
.bna-vt, .bna-lt {
  font-family: 'Cinzel Decorative', 'Cinzel', serif; font-size: 26px; letter-spacing: 3px; text-transform: uppercase;
  color: #f0e6d2;
}
.is-sealed .bna-vt { color: #f3d27a; text-shadow: 0 0 18px rgba(243, 210, 122, .45); }
.is-practice .bna-vt { color: #b9c6d1; }
.is-open .bna-vt { color: #0ac8b9; }
.bna-vl, .bna-ll { font-size: 14.5px; margin-top: 4px; color: #e8d19a; }
.bna-vn, .bna-ln { font-size: 12.5px; line-height: 1.5; margin: 6px auto 0; max-width: 40ch; color: #a09b8c; }
.bna-next { display: block; margin-top: 2px; color: #7d7563; }
.bna-plate code, .bna-lplate code {
  font-family: inherit; font-weight: 800; color: #f0e6d2;
  padding: 0 5px; border-radius: 3px; background: rgba(200, 170, 110, .14);
}
.bna-acts { display: flex; justify-content: center; gap: 10px; margin-top: 16px; min-height: 36px; }
.bna-acts:empty { visibility: hidden; }
.bna-rite:not(.done) .bna-acts { opacity: 0; }
.bna-rite.done .bna-acts { opacity: 1; transition: opacity .5s ease .15s; }

/* Buttons where the page brings none of its own (the home landing). */
.bna-btn {
  margin-top: 16px;
  font-family: 'Cinzel', serif; font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: #0a1428; background: linear-gradient(180deg, #f0d890, #a8843f);
  border: 0; border-radius: 3px; padding: 10px 26px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  transition: filter .15s ease;
}
.bna-btn:hover { filter: brightness(1.1); }
.bna-btn.ghost { background: transparent; color: #c8aa6e; box-shadow: inset 0 0 0 1px rgba(200, 170, 110, .5); }
.bna-acts .bna-btn { margin-top: 0; }

/* ---- the landing ---- */
.bna-lplate { width: min(400px, 100%); }
.bna-lplate .bna-in { padding: 24px 44px; }
.bna-ljar { width: 120px; margin: 8px auto 4px; animation: bna-drop .8s cubic-bezier(.2, .8, .3, 1.15) both .1s; }
.bna-ljar .bna-svg { width: 100%; height: auto; }
.bna-fly {
  position: fixed; z-index: 9600; pointer-events: none; margin: 0;
  transform-origin: center;
  transition: transform .72s cubic-bezier(.5, 0, .25, 1), opacity .72s ease-in;
}
.bna-fly .bna-svg { width: 100%; height: 100%; }
.bna-bump { animation: bna-bump .9s ease-out; }
.bna-bump .cur-val { color: #f0d890; }

@keyframes bna-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bna-gate-slam { 0% { transform: translateY(-4px) scale(1.02); } 60% { transform: translateY(2px) scale(.99); } 100% { transform: none; } }
@keyframes bna-plate-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bna-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bna-wave { from { transform: translateX(0); } to { transform: translateX(50px); } }
@keyframes bna-glow { 0%, 100% { opacity: .14; } 50% { opacity: .4; } }
@keyframes bna-stamp { 0% { opacity: 0; transform: scale(1.9); } 60% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: scale(1); } }
@keyframes bna-drop { from { opacity: 0; transform: translateY(-36px); } to { opacity: 1; transform: none; } }
@keyframes bna-bump {
  0% { background: rgba(240, 216, 144, .28); }
  100% { background: transparent; }
}

@media (max-width: 480px) {
  .bna-plate .bna-in { padding: 22px 20px 20px; }
  .bna-vt, .bna-lt { font-size: 22px; }
  .bna-k { font-size: 17px; width: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .bna-rite, .bna-land, .bna-plate, .bna-lplate, .bna-verdict, .bna-ljar, .sealed .bna-seal, .bna-wave, .bna-glow { animation: none !important; }
}
html.still .bna-rite, html.still .bna-plate, html.still .bna-verdict, html.still .sealed .bna-seal, html.still .bna-wave, html.still .bna-glow { animation: none !important; }
