/* Cart controls and navigation share the existing moonlit palette. */
[hidden] { display: none !important; }
.cart-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.mobile-cart { display:none; }
.cart-count { display:inline-flex; min-width:1.5rem; min-height:1.5rem; justify-content:center; align-items:center; border-radius:99px; background:rgb(var(--c-violet-300-5)); color:rgb(var(--c-violet-900)); font:700 .78rem/1 var(--lh-sans); padding:.2rem .35rem; }
.nav-cart .lh-icon,.mobile-cart .lh-icon { width:22px; height:22px; }
.test-cart-add { display:flex; flex-wrap:wrap; align-items:center; gap:.7rem; margin:1.1rem 0 .5rem; }
.test-cart-add label { margin:0; }
.test-cart-add input { width:4.5rem; min-height:46px; text-align:center; background:var(--lh-field); color:rgb(var(--c-ink)); border:1px solid var(--lh-field-edge); border-radius:8px; font:600 1rem var(--lh-sans); padding:.5rem; }
.test-cart-add button { min-height:46px; font-size:1rem; }
.test-cart-add .cart-add-feedback { flex-basis:100%; color:rgb(var(--c-violet-700-3)); font-size:.95rem; }
.test-cart-add .cart-add-feedback:empty { display:none; }
.cart-added-link { display:inline-flex; align-items:center; gap:.4rem; min-height:44px; font-weight:700; }
.cart-test-price { font-weight:700; text-align:center; }
.haven-cart { max-width:1100px; margin:auto; }
.haven-cart h1 { font:600 clamp(2.5rem,5vw,4rem)/1.1 var(--lh-serif); font-size-adjust: 0.46; color:rgb(var(--c-ink)); margin:.4rem 0 .8rem; }
.haven-cart h2 { font:600 clamp(1.5rem,2.7vw,2rem)/1.2 var(--lh-serif); font-size-adjust: 0.46; color:rgb(var(--c-ink)); margin:0 0 1rem; }
.haven-cart p { line-height:1.65; }
.cart-heading { text-align:center; margin:0 auto 1.8rem; }
.cart-heading > p:not(.cart-eyebrow) { max-width:580px; margin:.6rem auto; color:rgb(var(--c-muted)); }
.cart-eyebrow { margin:.2rem 0 .6rem; color:rgb(var(--c-violet-600-4)); font:700 .74rem/1.4 var(--lh-sans); text-transform:uppercase; letter-spacing:.14em; }
.cart-browse { display:inline-flex; align-items:center; gap:.5rem; min-height:44px; font-weight:650; }
.cart-message { padding:.8rem 1rem; border:1px solid rgb(var(--c-violet-400-5)); background:rgb(var(--c-surface-soft)); border-radius:8px; }
.cart-message:empty { display:none; }
.cart-message.is-error { border-color:rgb(var(--c-rose-500-7)); color:rgb(var(--c-rose-600)); background:rgb(var(--c-rose-100)); }
.cart-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr); gap:1.6rem; align-items:start; }
.cart-section-heading { display:flex; align-items:baseline; gap:1rem; justify-content:space-between; margin-bottom:1rem; }
.cart-section-heading h2 { margin:0; }
.cart-section-heading > span { white-space:nowrap; color:rgb(var(--c-muted)); }
.cart-line { padding:1.25rem; border:1px solid rgb(var(--c-violet-400-4)); border-radius:10px; background:linear-gradient(120deg,rgb(var(--c-surface-soft)),rgb(var(--c-surface))); margin-bottom:1rem; box-shadow:0 2px 0 rgb(var(--c-violet-300-2) / 0.2); }
.cart-line-heading { display:flex; align-items:baseline; gap:1rem; justify-content:space-between; }
.cart-line-heading h3 { font:600 1.35rem/1.3 var(--lh-serif); font-size-adjust: 0.46; margin:0; color:rgb(var(--c-ink)); }
.cart-line-heading > strong { flex-shrink:0; font-size:1.1rem; }
.cart-line-unit { font-size:.9rem; color:rgb(var(--c-muted)); margin:.6rem 0 1rem; }
.cart-line-unit [data-line-price-label]:empty { display:none; }
.cart-line-controls { display:flex; gap:.65rem; align-items:end; flex-wrap:wrap; }
.cart-quantity-label { display:grid; gap:.3rem; font:600 .82rem var(--lh-sans); color:rgb(var(--c-violet-700)); }
.cart-quantity { display:inline-flex; align-items:center; border:1px solid rgb(var(--c-violet-400-4)); border-radius:8px; background:rgb(var(--c-white)); overflow:hidden; }
.cart-quantity button { width:44px; min-height:46px; border:0; background:rgb(var(--c-surface-deep)); color:rgb(var(--c-violet-700-3)); font-size:1.4rem; padding:0; }
.cart-quantity button:hover { background:rgb(var(--c-violet-300-5)); }
.cart-quantity input { width:3.7rem; min-height:46px; padding:.4rem .15rem; text-align:center; border:0; border-radius:0; background:transparent; font:600 1rem var(--lh-sans); color:rgb(var(--c-ink)); appearance:textfield; -moz-appearance:textfield; }
.cart-quantity input::-webkit-inner-spin-button { -webkit-appearance:none; }
.cart-update,.cart-remove { min-height:46px; border:1px solid rgb(var(--c-violet-400-5)); border-radius:8px; padding:.6rem .7rem; color:rgb(var(--c-deep)); background:rgb(var(--c-surface)); font:600 .88rem var(--lh-sans); }
.cart-remove { background:transparent; border-color:transparent; text-decoration:underline; text-underline-offset:3px; }
.cart-line-credit { color:rgb(var(--c-violet-700-3)); font-weight:600; margin:.8rem 0 0; font-size:.9rem; }
.cart-reassurance { color:rgb(var(--c-muted)); padding:.25rem .2rem .7rem; font-size:.95rem; }
.cart-credit-card { padding:clamp(1.2rem,2.5vw,1.8rem); border:2px solid rgb(var(--c-violet-600-6)); border-radius:12px; background:radial-gradient(ellipse at top right,rgb(var(--c-violet-100)),rgb(var(--c-surface-soft)) 72%); box-shadow:inset 0 0 0 3px rgb(var(--c-surface-soft) / 0.2); }
.cart-credit-card h2 { margin-bottom:.65rem; }
.cart-credit-card p { margin:.7rem 0; }
.cart-credit-balances { list-style:none; margin:1rem 0; padding:0; }
.cart-credit-balances li { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.3rem 1rem; padding:.7rem 0; border-bottom:1px solid rgb(var(--c-violet-300-2)); font-size:.95rem; }
.cart-credit-balances li > span { flex:1 1 160px; }
.cart-credit-balances li > strong { color:rgb(var(--c-deep)); }
.cart-credit-balances small { flex-basis:100%; color:rgb(var(--c-violet-700)); }
.cart-credit-explainer { border-block:1px solid rgb(var(--c-violet-300-2)); padding:.45rem 0; margin:1rem 0; }
.cart-credit-explainer summary,.cart-dilute summary { min-height:44px; padding:.65rem .1rem; font-weight:650; color:rgb(var(--c-violet-700-3)); cursor:pointer; }
.cart-credit-explainer p { font-size:.92rem; }
.cart-buy-credits { margin-top:.6rem; display:flex; justify-content:center; width:100%; min-height:48px; font-size:1rem; }
.cart-credit-card > small { display:block; text-align:center; margin:.85rem 0 0; color:rgb(var(--c-violet-600-7)); line-height:1.5; }
.cart-summary { background:linear-gradient(145deg,rgb(var(--c-surface-soft)),rgb(var(--c-surface))); border:3px double rgb(var(--c-border)); border-radius:12px; padding:clamp(1.1rem,2.3vw,1.6rem); box-shadow:0 8px 25px rgb(var(--c-violet-700-3) / 0.0706); }
.cart-totals { margin:1.5rem 0 1rem; }
.cart-totals > div { display:flex; justify-content:space-between; gap:1rem; margin:0 0 .85rem; font-size:.95rem; }
.cart-totals dd { margin:0; font-weight:650; white-space:nowrap; color:rgb(var(--c-violet-700-3)); }
.cart-totals dt small { display:block; margin-top:.15rem; font-size:.8rem; color:rgb(var(--c-muted)); }
.cart-totals > .cart-due { border-top:1px solid rgb(var(--c-violet-300-2)); padding-top:1rem; margin-top:1rem; font-weight:700; align-items:baseline; }
.cart-due dd { font:700 1.9rem/1.2 var(--lh-serif); font-size-adjust: 0.46; }
.cart-summary-note,.cart-help { font-size:.9rem; color:rgb(var(--c-violet-700)); }
.cart-checkout-button { width:100%; justify-content:center; min-height:50px; font-size:1rem; margin:1rem 0 .7rem; }
.cart-next-steps { padding-left:1.3rem; font-size:.9rem; color:rgb(var(--c-muted)); line-height:1.65; }
.cart-next-steps li { padding:.2rem 0 .2rem .25rem; }
.cart-dilute { background:rgb(var(--c-surface-soft)); border:1px solid rgb(var(--c-violet-300-2)); border-radius:8px; padding:1rem; margin-top:1rem; font-size:.9rem; }
.cart-dilute h3 { font:600 1.25rem var(--lh-serif); font-size-adjust: 0.46; margin:0; }
.cart-check { display:flex; align-items:flex-start; gap:.65rem; line-height:1.5; padding:.6rem 0; cursor:pointer; }
.cart-check input { width:21px; height:21px; flex-shrink:0; margin:.1rem 0 0; accent-color:rgb(var(--c-violet-600-4)); }
.cart-empty { text-align:center; max-width:560px; margin:2rem auto; padding:2rem 1rem; }
.cart-empty > .lh-icon { width:48px; height:48px; margin-bottom:1.25rem; color:rgb(var(--c-violet-500-4)); }
.cart-empty .btn-primary { margin-top:1rem; }
.haven-cart button:disabled { opacity:.65; cursor:wait; }
@media (max-width:1180px) {
 .site-header { gap:.6rem; min-height:76px; padding:.65rem 1.2rem; }
 .brand { margin-right:auto; }
 .mobile-cart { display:inline-flex; gap:.3rem; align-items:center; justify-content:center; min-width:50px; min-height:44px; color:rgb(var(--c-violet-100-2)); text-decoration:none; }
 .mobile-menu-btn { display:inline-flex; align-items:center; gap:.6rem; min-height:44px; border:1px solid rgb(var(--c-violet-400-5)); border-radius:6px; background:rgb(var(--c-ink)); color:rgb(var(--c-violet-100-2)); padding:.6rem .8rem; }
 .menu-icon { display:grid; gap:4px; width:17px; }
 .menu-icon i { height:1px; background:currentColor; }
 .main-nav { display:none; position:absolute; top:100%; right:0; width:min(380px,100vw); max-height:calc(100dvh - 76px); overflow-y:auto; padding:1rem; background:rgb(var(--c-bg-2)); border:1px solid rgb(var(--c-violet-400-4)); box-shadow:-15px 25px 45px rgb(var(--c-black) / 0.4667); z-index:2; }
 .mobile-nav-open .main-nav { display:flex; flex-direction:column; align-items:stretch; }
 .main-nav > a,.nav-dropdown > summary { font-size:1rem; min-height:48px; padding:.8rem; }
 .nav-dropdown-panel { position:static; width:100%; max-height:none; margin-bottom:.5rem; box-shadow:none; }
 .main-nav .nav-order { margin:.7rem 0; }
 .main-nav .nav-cart { display:none; }
 .mobile-nav-open .mobile-nav-overlay:not([hidden]) { display:block; position:fixed; inset:76px 0 0; z-index:1; border:0; background:rgb(var(--c-violet-900) / 0.549); }
 html.mobile-nav-open { overflow:hidden; }
}
@media (max-width:820px) { .cart-layout { grid-template-columns:minmax(0,1fr); } .cart-summary { grid-row:2; } }
@media (max-width:480px) {
 .site-header { padding:.6rem .6rem; gap:.35rem; }
 .site-header .brand { gap:.4rem; min-width:0; flex-shrink:1; }
 .site-header .brand-logo { width:38px; height:38px; }
 .site-header .brand-title { font-size:1.2rem; }
 .site-header .brand-tagline { font-size:.58rem; letter-spacing:.22em; }
 .mobile-menu-btn { padding:.55rem; min-width:44px; gap:.3rem; font-size:.78rem; }
 .mobile-menu-btn > span:last-child { display:inline; }
 .mobile-cart { min-width:48px; }
 .cart-line { padding:1rem .8rem; }
 .cart-line-heading { gap:.6rem; }
 .cart-line-heading h3 { font-size:1.22rem; }
 .cart-line-controls { gap:.35rem; }
 .cart-quantity input { width:3rem; }
 .cart-update,.cart-remove { padding:.5rem; }
 .cart-section-heading { flex-wrap:wrap; gap:.25rem; }
 .cart-credit-card,.cart-summary { padding:1.1rem; }
}

.cart-summary .cart-credit-card { margin-top:1.6rem; padding:1.1rem; }
.cart-summary .cart-credit-card h2 { font-size:1.5rem; }

.cart-pending { padding:1.25rem; margin-bottom:1.5rem; border:1px solid rgb(var(--c-violet-400-5)); border-radius:10px; background:rgb(var(--c-surface)); }
.cart-pending > a { display:inline-flex; min-height:44px; align-items:center; margin-right:1rem; margin-top:.4rem; }

.cart-cancel-payment { min-height:44px; border:0; background:transparent; padding:.5rem 0; text-decoration:underline; color:rgb(var(--c-deep)); font:600 .9rem var(--lh-sans); }
.cart-pending form { margin-top:.65rem; }

@media(max-width:360px) { .site-header .brand-logo { width:30px; height:30px; } .site-header .brand-title { font-size:1.08rem; } .site-header .brand-tagline { font-size:.53rem; } }

.cart-notice { padding:.85rem 1rem; border:1px solid rgb(var(--c-violet-400-4)); background:rgb(var(--c-violet-100-2)); border-radius:8px; }
.cart-notice.error { color:rgb(var(--c-rose-600)); border-color:rgb(var(--c-rose-400-2)); background:rgb(var(--c-surface-soft)); }

/* A sequential review keeps short carts compact and gives credit explanations room. */
.cart-layout { display:block; }
.cart-selections { margin-bottom:1.5rem; }
[data-cart-items] { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.cart-line { margin-bottom:0; }
.cart-reassurance { margin:1rem 0 0; }
.cart-summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1.6rem; align-items:start; }
.cart-summary-main { min-width:0; }
.cart-summary .cart-credit-card { margin-top:0; padding:1.25rem; }
@media(max-width:760px) {
 [data-cart-items],.cart-summary { grid-template-columns:minmax(0,1fr); }
 .cart-summary { gap:1.25rem; }
}

/* The living moonlit room.

   Mist drifts behind the page, the painted candle breathes, a few motes of
   light rise, ivy sways from the top corners and the footer carries an
   apothecary shelf of glowing bottles. It is all slow on purpose: the page
   is the thing to read, the room is only there to feel like somewhere.

   Every moving part stops when sparkles are off. The sparkle control already
   starts "off" for visitors who ask their device for reduced motion. */

.atmo { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

/* Mist: two soft violet clouds crossing the dark middle of the room. */
.atmo-mist {
  position: absolute;
  width: 70vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .5;
  will-change: transform;
}
.atmo-mist-a {
  left: -18vmax;
  top: 18vh;
  background: radial-gradient(closest-side, rgb(var(--c-deep) / .55), rgb(var(--c-deep) / 0));
  animation: atmo-drift-a 70s ease-in-out infinite alternate;
}
.atmo-mist-b {
  right: -22vmax;
  bottom: -8vh;
  background: radial-gradient(closest-side, rgb(var(--c-accent) / .32), rgb(var(--c-accent) / 0));
  animation: atmo-drift-b 90s ease-in-out infinite alternate;
}
@keyframes atmo-drift-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(34vw, -8vh, 0) scale(1.15); } }
@keyframes atmo-drift-b { from { transform: translate3d(0, 0, 0) scale(1.1); } to { transform: translate3d(-30vw, -14vh, 0) scale(.95); } }

/* Candle glow sitting over the candles painted into the side windows. */
.atmo-candle {
  position: absolute;
  top: 63%;
  width: 11vw;
  height: 11vw;
  max-width: 190px;
  max-height: 190px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--c-candle) / .34), rgb(var(--c-candle) / .1) 45%, rgb(var(--c-candle) / 0));
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  animation: atmo-flicker 5.3s ease-in-out infinite;
}
/* The left glow sits on the painted flame (36, 685 in the 1536 x 1024 room).
   The room is cover-sized and anchored centre top, so its scale is
   max(100vw / 1536, 100vh / 1024) and the flame follows from that. */
.atmo-candle-left {
  left: calc(50vw - max(47.66vw, 71.48vh));
  top: max(44.6vw, 66.9vh);
  animation: atmo-candle-flicker 2.6s linear infinite;
}
/* A small bright core right on the flame that dances faster than the halo. */
.atmo-candle-left::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16%;
  height: 24%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--c-candle-core) / .9), rgb(var(--c-candle) / .45) 55%, rgb(var(--c-candle) / 0));
  transform-origin: 50% 100%;
  animation: atmo-flame-dance .75s ease-in-out infinite;
}
.atmo-candle-right { left: 96%; top: 70%; width: 8vw; height: 8vw; opacity: .55; animation-duration: 6.7s; animation-delay: -2s; background: radial-gradient(closest-side, rgb(var(--c-neon) / .35), rgb(var(--c-neon) / 0)); }
@keyframes atmo-flicker {
  0%, 100% { opacity: .85; transform: translate(-50%, -50%) scale(1); }
  18% { opacity: .7; transform: translate(-50%, -50%) scale(.97); }
  34% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  52% { opacity: .78; transform: translate(-50%, -50%) scale(.99); }
  71% { opacity: .95; transform: translate(-50%, -50%) scale(1.02); }
}
/* Uneven dips and catches, like a real wick in a draught: quick gutters,
   bright flares, and short steady spells in between. */
@keyframes atmo-candle-flicker {
  0%, 100% { opacity: .9; transform: translate(-50%, -50%) scale(1); }
  4% { opacity: .5; transform: translate(-50%, -50%) scale(.9); }
  7% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  12% { opacity: .78; transform: translate(-50%, -50%) scale(.97); }
  17% { opacity: .95; transform: translate(-50%, -50%) scale(1.03); }
  23% { opacity: .42; transform: translate(-50%, -50%) scale(.88); }
  26% { opacity: .88; transform: translate(-50%, -50%) scale(1.02); }
  31% { opacity: .6; transform: translate(-50%, -50%) scale(.93); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  46% { opacity: .9; transform: translate(-50%, -50%) scale(1.01); }
  52% { opacity: .55; transform: translate(-50%, -50%) scale(.91); }
  55% { opacity: .97; transform: translate(-50%, -50%) scale(1.06); }
  63% { opacity: .72; transform: translate(-50%, -50%) scale(.95); }
  68% { opacity: 1; transform: translate(-50%, -50%) scale(1.09); }
  76% { opacity: .48; transform: translate(-50%, -50%) scale(.9); }
  80% { opacity: .92; transform: translate(-50%, -50%) scale(1.04); }
  89% { opacity: .66; transform: translate(-50%, -50%) scale(.95); }
  94% { opacity: 1; transform: translate(-50%, -50%) scale(1.07); }
}
@keyframes atmo-flame-dance {
  0%, 100% { opacity: .9; transform: translate(-50%, -62%) scale(1, 1) skewX(0); }
  15% { opacity: .55; transform: translate(-46%, -58%) scale(.84, 1.16) skewX(8deg); }
  35% { opacity: 1; transform: translate(-54%, -66%) scale(1.14, .9) skewX(-7deg); }
  55% { opacity: .7; transform: translate(-47%, -60%) scale(.9, 1.12) skewX(5deg); }
  78% { opacity: .95; transform: translate(-52%, -64%) scale(1.06, .95) skewX(-4deg); }
}
  45% { opacity: 1; transform: translate(-52%, -64%) scale(1.08, .94) skewX(-3deg); }
  70% { opacity: .75; transform: translate(-49%, -61%) scale(.95, 1.05) skewX(2deg); }
}

/* Motes of light rising slowly through the room. */
.atmo-motes { position: absolute; inset: 0; }
.atmo-mote {
  position: absolute;
  bottom: -12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgb(var(--c-violet-100));
  box-shadow: 0 0 6px 2px rgb(var(--c-neon) / .55);
  opacity: 0;
  animation: atmo-rise 26s linear infinite;
}
.atmo-mote:nth-child(1) { left: 4%;  animation-delay: -2s; }
.atmo-mote:nth-child(2) { left: 11%; animation-delay: -15s; animation-duration: 31s; }
.atmo-mote:nth-child(3) { left: 19%; animation-delay: -8s; animation-duration: 23s; width: 3px; height: 3px; }
.atmo-mote:nth-child(4) { left: 33%; animation-delay: -21s; animation-duration: 34s; }
.atmo-mote:nth-child(5) { left: 52%; animation-delay: -5s; animation-duration: 29s; width: 3px; height: 3px; }
.atmo-mote:nth-child(6) { left: 68%; animation-delay: -18s; }
.atmo-mote:nth-child(7) { left: 81%; animation-delay: -11s; animation-duration: 33s; width: 3px; height: 3px; }
.atmo-mote:nth-child(8) { left: 90%; animation-delay: -25s; animation-duration: 27s; }
.atmo-mote:nth-child(9) { left: 96%; animation-delay: -4s; animation-duration: 36s; }
@keyframes atmo-rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: .75; }
  50% { transform: translate3d(18px, -55vh, 0); opacity: .45; }
  85% { opacity: .6; }
  100% { transform: translate3d(-10px, -108vh, 0); opacity: 0; }
}

/* Ivy hanging from the top corners, over the painted window columns. */
.atmo-ivy {
  position: absolute;
  top: 58px;
  width: clamp(80px, 8vw, 130px);
  height: auto;
  overflow: visible;
  transform-origin: 50% 0;
  animation: atmo-sway 13s ease-in-out infinite;
}
/* the left ivy hangs just outside the painted moon so the moon stays clear */
.atmo-ivy-left { left: calc(-.6vw - 18px); }
.atmo-ivy-right { right: max(0px, calc(1.2vw - 20px)); transform: scaleX(-1); animation-name: atmo-sway-mirror; animation-duration: 15s; animation-delay: -4s; }
.atmo-ivy-back { opacity: .65; }
.atmo-stem { fill: none; stroke: rgb(var(--c-ivy)); stroke-width: 2.4; stroke-linecap: round; }
.atmo-leaf { fill: rgb(var(--c-ivy)); stroke: rgb(var(--c-ivy-deep)); stroke-width: .8; }
.atmo-ivy-back .atmo-leaf { fill: rgb(var(--c-ivy-deep)); }
.atmo-vein { fill: none; stroke: rgb(var(--c-ivy-vein) / .75); stroke-width: .7; stroke-linecap: round; }
.atmo-ivy use:nth-of-type(3n) { filter: brightness(1.18); }
@keyframes atmo-sway { 0%, 100% { transform: rotate(1.4deg); } 50% { transform: rotate(-1.6deg); } }
@keyframes atmo-sway-mirror { 0%, 100% { transform: scaleX(-1) rotate(1.3deg); } 50% { transform: scaleX(-1) rotate(-1.5deg); } }

/* The ivy and candles only have somewhere to sit on wide screens. */
@media (max-width: 1100px) {
  .atmo-ivy, .atmo-candle { display: none; }
  .atmo-mist { opacity: .4; }
}

/* The apothecary shelf along the top of the footer. */
.apothecary-shelf {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  height: 118px;
  /* the footer keeps a 3rem top margin; the shelf plank lands on its border */
  margin: 2rem auto calc(-3rem - 1px);
  width: min(100%, 1240px);
  padding-inline: 1rem;
  pointer-events: none;
}
.apothecary-shelf::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(rgb(var(--c-wood)), rgb(var(--c-night)));
  box-shadow: 0 1px 0 rgb(var(--c-glass) / .22) inset, 0 10px 22px rgb(var(--c-black) / .55);
}
.shelf-cluster { height: 100%; width: auto; overflow: visible; }
.shelf-book { fill: rgb(var(--c-deep) / .85); stroke: rgb(var(--c-glass) / .35); stroke-width: 1; }
.shelf-book-alt { fill: rgb(var(--c-bg-2)); }
.shelf-trim { fill: none; stroke: rgb(var(--c-amber-300-3) / .6); stroke-width: 1.2; }
.shelf-wax { fill: rgb(var(--c-wax)); }
.shelf-drip { fill: none; stroke: rgb(var(--c-wax)); stroke-width: 3; stroke-linecap: round; }
.shelf-wick { stroke: rgb(var(--c-night)); stroke-width: 1.6; }
.shelf-flame { fill: rgb(var(--c-candle)); stroke: rgb(var(--c-candle-core)); stroke-width: 1.2; transform-box: fill-box; transform-origin: 50% 100%; animation: shelf-flame 2.6s ease-in-out infinite; }
.shelf-candle-glow { fill: rgb(var(--c-candle) / .16); animation: atmo-glow 2.6s ease-in-out infinite; }
.shelf-glass { fill: rgb(var(--c-glass) / .08); stroke: rgb(var(--c-glass) / .75); stroke-width: 2; }
.shelf-jar-body { stroke-width: 1.8; }
.shelf-rim { fill: rgb(var(--c-glass) / .5); stroke: rgb(var(--c-glass) / .8); stroke-width: 1; }
.shelf-cork { fill: rgb(var(--c-amber-400-2)); stroke: rgb(var(--c-amber-600)); stroke-width: 1; }
.shelf-label { fill: rgb(var(--c-wax) / .85); }
.shelf-label-ink { fill: none; stroke: rgb(var(--c-deep)); stroke-width: 1.4; }
.shelf-rack { fill: none; stroke: rgb(var(--c-glass) / .45); stroke-width: 2; }
.shelf-liquid { fill: rgb(var(--c-neon)); animation: shelf-pulse 6s ease-in-out infinite; }
.shelf-liquid-b { fill: rgb(var(--c-potion-teal)); animation-delay: -2s; }
.shelf-liquid-c { fill: rgb(var(--c-violet-300)); animation-delay: -4s; }
.shelf-liquid-top { fill: none; stroke: rgb(var(--c-violet-100)); stroke-width: 1.5; opacity: .8; }
.shelf-flask-glow { fill: rgb(var(--c-neon) / .2); filter: blur(10px); animation: atmo-glow 6s ease-in-out infinite; }
.shelf-flask .shelf-glass { filter: drop-shadow(0 0 6px rgb(var(--c-neon) / .7)); }
.shelf-bubble { fill: rgb(var(--c-violet-100)); opacity: 0; animation: shelf-bubble 4.2s ease-in infinite; }
.shelf-bubble-b { animation-delay: -1.4s; }
.shelf-bubble-c { animation-delay: -2.8s; }
.shelf-leaf { fill: rgb(var(--c-ivy)); stroke: rgb(var(--c-ivy-vein) / .6); stroke-width: .8; }
.shelf-leaf-alt { fill: rgb(var(--c-ivy-deep)); }
.shelf-vine { fill: none; stroke: rgb(var(--c-ivy)); stroke-width: 1.8; stroke-linecap: round; }
.shelf-pot { fill: rgb(var(--c-amber-600-3)); stroke: rgb(var(--c-amber-400-2) / .7); stroke-width: 1.2; }
.shelf-fern { transform-box: fill-box; transform-origin: 50% 100%; animation: shelf-fern 11s ease-in-out infinite; }
@keyframes shelf-flame { 0%, 100% { transform: scale(1, 1) skewX(0); } 25% { transform: scale(.94, 1.06) skewX(2deg); } 55% { transform: scale(1.04, .95) skewX(-2deg); } 80% { transform: scale(.98, 1.03) skewX(1deg); } }
@keyframes atmo-glow { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes shelf-pulse { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes shelf-bubble { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translateY(-26px); } }
@keyframes shelf-fern { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.4deg); } }
@media (max-width: 760px) {
  .apothecary-shelf { height: 84px; gap: .4rem; padding-inline: .5rem; }
  .shelf-cluster { max-width: 48%; }
}

/* Tonight's moon. The window holds a painted full moon; moon-phase.js lays
   the shadow of the real phase over it, placed from the size of the room
   painting, and a soft halo that grows with the light. */
.lunar { display: contents; }
.lunar-svg { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 0; overflow: visible; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.lunar.is-ready .lunar-svg { opacity: 1; }
.lunar-shadow { mix-blend-mode: darken; }
.lunar-glow { mix-blend-mode: screen; }
.lunar-shade { fill: rgb(var(--c-moon-shade) / .95); }
.lunar-halo { animation: lunar-breathe 9s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.lunar-halo-core { stop-color: rgb(var(--c-moonlight)); stop-opacity: .55; }
.lunar-halo-rim { stop-color: rgb(var(--c-moonlight)); stop-opacity: .34; }
.lunar-halo-mid { stop-color: rgb(var(--c-violet-100)); stop-opacity: .14; }
.lunar-halo-edge { stop-color: rgb(var(--c-neon)); stop-opacity: 0; }
@keyframes lunar-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.lunar-note {
  position: fixed;
  z-index: 2;
  display: grid;
  gap: .1rem;
  padding: .5rem .55rem .55rem;
  border-radius: 10px;
  text-align: center;
  color: rgb(var(--c-surface-soft));
  background: linear-gradient(180deg, rgb(var(--c-night) / .82), rgb(var(--c-bg-2) / .78));
  border: 1px solid rgb(var(--c-glass) / .3);
  box-shadow: 0 0 0 1px rgb(var(--c-night) / .6), 0 8px 22px rgb(var(--c-black) / .45), 0 0 18px rgb(var(--c-moonlight) / .08);
  backdrop-filter: blur(3px);
  pointer-events: auto;
  font-family: var(--lh-sans);
  animation: lunar-note-in 1.2s ease both;
}
.lunar-note[hidden] { display: none; }
.lunar-note p { margin: 0; }
.lunar-note-kicker { font: 700 .6rem/1.3 var(--lh-sans); letter-spacing: .16em; text-transform: uppercase; color: rgb(var(--c-glass)); }
.lunar-note-name { font: 600 1.05rem/1.1 var(--lh-serif); color: rgb(var(--c-white)); text-wrap: balance; }
.lunar-note-lit { font-size: .72rem; color: rgb(var(--c-candle-core)); }
.lunar-note-link {
  display: block;
  margin-top: .3rem;
  padding-top: .35rem;
  border-top: 1px solid rgb(var(--c-glass) / .22);
  font: 600 .72rem/1.3 var(--lh-sans);
  color: rgb(var(--c-violet-100));
  text-decoration: underline;
  text-decoration-color: rgb(var(--c-violet-100) / .45);
  text-underline-offset: 2px;
}
.lunar-note-link:hover { color: rgb(var(--c-white)); text-decoration-color: rgb(var(--c-white)); }
.lunar-note-link:focus-visible { outline: 2px solid rgb(var(--c-candle)); outline-offset: 2px; border-radius: 3px; }
@keyframes lunar-note-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .lunar, .lunar-note { display: none !important; }
}

/* The hanging garden (partials/hanging_garden.html): phones and tablets only.
   It hangs from under the header at the top of the page and scrolls away. */
.hanging-garden { display: none; }
@media (max-width: 1100px) {
  .hanging-garden { display: block; position: relative; z-index: 4; height: 0; pointer-events: none; }
  .hg-ivy, .hg-planter { position: absolute; top: 0; height: auto; overflow: visible; transform-origin: 50% 0; }
  .hg-ivy { left: -8px; width: 46px; animation: hg-sway 7s ease-in-out infinite; }
  .hg-back { opacity: .7; }
  .hg-back .atmo-leaf { fill: rgb(var(--c-ivy-deep)); }
  .hg-planter { right: 6px; width: 56px; animation: hg-swing 6s ease-in-out infinite; animation-delay: -2s; }
  .hg-chain { fill: none; stroke: rgb(var(--c-glass) / .7); stroke-width: 1.2; stroke-dasharray: 2.5 1.5; }
  .hg-ring { fill: none; stroke: rgb(var(--c-glass) / .8); stroke-width: 1.2; }
  .hg-pot-rim { stroke: rgb(var(--c-amber-400-2)); stroke-width: 2.4; stroke-linecap: round; }
  .hg-vine { stroke-width: 1.8; }
}
@media (max-width: 640px) {
  .hg-ivy { width: 38px; left: -9px; }
  .hg-planter { width: 46px; right: 2px; }
}
@keyframes hg-sway { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-2.5deg); } }
@keyframes hg-swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
html.mobile-nav-open .hanging-garden { visibility: hidden; }
html[data-sparkles='off'] .hanging-garden * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { html:not([data-sparkles='on']) .hanging-garden * { animation: none !important; } }
@media print { .hanging-garden { display: none !important; } }

/* Tonight's moon in the header, for screens too narrow for the painted window. */
.header-moon { display: none; }
@media (max-width: 1100px) {
  .header-moon:not([hidden]) { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; -webkit-tap-highlight-color: transparent; }
  .header-moon svg { width: 30px; height: 30px; overflow: visible; }
  .hm-glow { fill: rgb(var(--c-moonlight) / .22); filter: blur(2.5px); animation: lunar-breathe 9s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
  .hm-disc { fill: rgb(var(--c-moonlight)); }
  .hm-shade { fill: rgb(var(--c-bg-2)); stroke: rgb(var(--c-moon-shade) / .6); stroke-width: .5; }
  .header-moon:hover .hm-disc, .header-moon:focus-visible .hm-disc { fill: rgb(var(--c-white)); }
  .header-moon:focus-visible { outline: 2px solid rgb(var(--c-candle)); outline-offset: 1px; }
}
@media (max-width: 480px) { .header-moon:not([hidden]) { width: 38px; } .header-moon svg { width: 26px; height: 26px; } }
html[data-sparkles='off'] .hm-glow { animation: none; }
@media (prefers-reduced-motion: reduce) { html:not([data-sparkles='on']) .hm-glow { animation: none; } }

/* Sparkles off, or a visitor who asked for less motion: the room holds still. */
html[data-sparkles='off'] :is(.lunar-note, .lunar-halo) { animation: none; }
@media (prefers-reduced-motion: reduce) { html:not([data-sparkles='on']) :is(.lunar-note, .lunar-halo) { animation: none; } }
html[data-sparkles='off'] .atmo *,
html[data-sparkles='off'] .apothecary-shelf * { animation: none !important; }
html[data-sparkles='off'] .atmo-mote { display: none; }
html[data-sparkles='off'] .atmo-ivy-right { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) {
  html:not([data-sparkles='on']) .atmo *,
  html:not([data-sparkles='on']) .apothecary-shelf * { animation: none !important; }
}
@media print { .atmo, .apothecary-shelf, .lunar, .lunar-note { display: none !important; } }

/* Tap-for-meaning (static/dna_portal/moonlit/glossary.js): genetics codes and
   words become buttons that look like the text around them, with a dotted
   underline, and open a small moonlit card with the meaning. */
.gloss {
  display: inline;
  margin: 0;
  padding: 0 .06em;
  border: 0;
  border-bottom: 1.5px dotted rgb(var(--c-accent) / .75);
  border-radius: 3px 3px 0 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: help;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, border-color .2s ease;
}
.gloss:hover, .gloss[aria-expanded='true'] { background: rgb(var(--c-accent) / .12); border-bottom-color: rgb(var(--c-accent)); border-bottom-style: solid; }
.gloss:focus-visible { outline: 2px solid rgb(var(--c-candle)); outline-offset: 2px; }
.gloss-code { white-space: nowrap; }

.gloss-pop {
  position: absolute;
  z-index: 60;
  box-sizing: border-box;
  padding: .75rem 2.2rem .8rem .95rem;
  border-radius: 12px;
  color: rgb(var(--c-surface-soft));
  background: linear-gradient(180deg, rgb(var(--c-night)), rgb(var(--c-bg-2)));
  border: 1px solid rgb(var(--c-neon) / .55);
  box-shadow: 0 0 0 1px rgb(var(--c-night)), 0 12px 28px rgb(var(--c-black) / .45), 0 0 18px rgb(var(--c-neon) / .25);
  font-family: var(--lh-sans);
  text-align: left;
  animation: gloss-in .18s ease both;
}
.gloss-pop[hidden] { display: none; }
.gloss-pop::before {
  content: '';
  position: absolute;
  top: -7px;
  left: calc(var(--gloss-arrow, 50%) - 7px);
  width: 12px;
  height: 12px;
  background: rgb(var(--c-night));
  border-left: 1px solid rgb(var(--c-neon) / .55);
  border-top: 1px solid rgb(var(--c-neon) / .55);
  transform: rotate(45deg);
}
.gloss-pop.is-above::before { top: auto; bottom: -7px; background: rgb(var(--c-bg-2)); border: 0; border-right: 1px solid rgb(var(--c-neon) / .55); border-bottom: 1px solid rgb(var(--c-neon) / .55); }
.gloss-pop p { margin: 0; }
.gloss-pop-gene { font: 700 .64rem/1.3 var(--lh-sans); letter-spacing: .16em; text-transform: uppercase; color: rgb(var(--c-violet-200)); }
.gloss-pop-term { margin-top: .1rem !important; font: 600 1.3rem/1.15 var(--lh-serif); color: rgb(var(--c-white)); }
.gloss-pop-meaning { margin-top: .35rem !important; font-size: .92rem; line-height: 1.5; }
.gloss-pop-close { position: absolute; top: .35rem; right: .4rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: none; color: rgb(var(--c-violet-200)); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.gloss-pop-close:hover { background: rgb(var(--c-white) / .08); color: rgb(var(--c-white)); }
.gloss-pop-close:focus-visible { outline: 2px solid rgb(var(--c-candle)); }
@keyframes gloss-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
html[data-sparkles='off'] .gloss-pop { animation: none; }
@media (prefers-reduced-motion: reduce) { html:not([data-sparkles='on']) .gloss-pop { animation: none; } }
@media print { .gloss { border: 0; } .gloss-pop { display: none !important; } }

/* Finishing touches used across the whole site: the flask logo's glow,
   gentler hover states, and sections that settle into place as you scroll. */

/* The flask is the logo, shown in full colour with its own glow. */
.brand-logo.brand-flask, .footer-logo.brand-flask {
  border-radius: 0;
  filter: drop-shadow(0 0 7px rgb(var(--c-neon) / .75)) drop-shadow(0 0 16px rgb(var(--c-accent) / .45));
  transition: filter .4s ease, transform .4s ease;
}
.brand:hover .brand-flask, .brand:focus-visible .brand-flask {
  filter: drop-shadow(0 0 10px rgb(var(--c-neon))) drop-shadow(0 0 24px rgb(var(--c-accent) / .7));
  transform: rotate(-4deg) scale(1.04);
}

/* Buttons lift a little and catch the light. */
.btn, .btn-primary, .btn-secondary, .button-primary, .button-secondary {
  transition: transform .25s ease, box-shadow .3s ease, background .3s ease, color .2s ease, border-color .3s ease;
}
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(var(--c-white) / .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s ease;
  pointer-events: none;
}
.btn-primary:hover::after, .btn-primary:focus-visible::after { transform: translateX(120%); }
.btn-secondary:hover, .button-secondary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgb(var(--c-ink) / .12), 0 0 14px rgb(var(--c-neon) / .25); }

/* Test cards across the site: lift, glow and a slow zoom on the flask art. */
.home-tests .test-card-link, .moonlit-public .test-card, .moonlit-public .info-card {
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, border-color .35s ease !important;
}
.home-tests .test-card-link:hover, .home-tests .test-card-link:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgb(var(--c-night) / .3), 0 0 0 1px rgb(var(--c-neon) / .6), 0 0 28px rgb(var(--c-neon) / .35) !important;
}
.home-tests .home-test-card-image, .moonlit-public .test-card img { transition: transform .7s cubic-bezier(.2, .8, .2, 1), filter .7s ease; }
.home-tests .test-card-link:hover .home-test-card-image, .moonlit-public .test-card:hover img { transform: scale(1.05); filter: brightness(1.12) saturate(1.1); }
.moonlit-public .test-card:hover, .moonlit-public .info-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 4px rgb(var(--c-surface) / .33), 0 14px 30px rgb(var(--c-ink) / .14), 0 0 24px rgb(var(--c-neon) / .22) !important;
}

/* The specimen portals on the homepage glow when you point at them. */
.haven-triad .haven-path { transition: transform .45s cubic-bezier(.2, .8, .2, 1), filter .45s ease; }
.haven-triad .haven-path:hover, .haven-triad .haven-path:focus-visible { transform: translateY(-6px); filter: drop-shadow(0 0 22px rgb(var(--c-neon) / .5)); }

/* Menu links get a thin glowing underline. */
.main-nav > a:not(.nav-order):not(.nav-cart) { position: relative; }
.main-nav > a:not(.nav-order):not(.nav-cart)::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: .15rem;
  height: 2px;
  border-radius: 2px;
  background: rgb(var(--c-neon));
  box-shadow: 0 0 8px rgb(var(--c-neon));
  transition: left .3s ease, right .3s ease;
}
.main-nav > a:not(.nav-order):not(.nav-cart):hover::after,
.main-nav > a[aria-current='page']:not(.nav-order):not(.nav-cart)::after { left: .7rem; right: .7rem; }

/* Sections settle into place as they scroll into view. site.js only turns
   this on when sparkles are on, so nothing is ever hidden without it. */
html.reveal-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
html.reveal-ready [data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .btn-primary::after { display: none; }
  .home-tests .test-card-link:hover, .moonlit-public .test-card:hover, .moonlit-public .info-card:hover, .haven-triad .haven-path:hover { transform: none; }
  .home-tests .test-card-link:hover .home-test-card-image, .moonlit-public .test-card:hover img { transform: none; }
}
@media print { html.reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; } }

/* My Lab Bench */
.dashboard-eyebrow { margin: 0 0 .2rem; color: var(--lh-accent); font: 700 .78rem/1.2 var(--lh-sans); letter-spacing: .16em; text-transform: uppercase; text-align: center; }
.dashboard-logo-mark img.brand-flask { filter: drop-shadow(0 0 10px rgb(var(--c-neon) / .7)); }

/* Test cards line their buttons up along the bottom, however long the text. */
.moonlit-public .test-card > .view-pill { margin-top: auto; }
.tests-coming-note { margin: 1rem 0 0; padding: .8rem 1rem; border: 1px dashed var(--lh-border); border-radius: 10px; color: var(--lh-muted); background: rgb(var(--c-surface-soft) / .6); }
.tests-coming-note a { font-weight: 700; }

/* "What your result means" notes on the gene test pages. */
.result-meaning-note { margin-top: 1rem; padding: .9rem 1.1rem; border-left: 4px solid rgb(var(--c-accent)); border-radius: 0 12px 12px 0; background: rgb(var(--c-surface-deep) / .45); }
.result-meaning-note h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.result-meaning-note ul { margin: 0 0 .6rem; padding-left: 1.2rem; }
.result-meaning-note li { margin-bottom: .3rem; }
.result-meaning-note p { margin: 0; }

/* The "specimen escaped" page. */
.lost-page { text-align: center; }
.lost-flask { position: relative; width: 140px; height: 140px; margin: 0 auto .6rem; display: grid; place-items: center; }
.lost-flask img { transform: rotate(-18deg); filter: drop-shadow(0 0 14px rgb(var(--c-neon) / .8)); animation: lost-wobble 4s ease-in-out infinite; }
.lost-spark { position: absolute; color: rgb(var(--c-accent)); font-size: 1.1rem; animation: lost-drift 3.6s ease-in-out infinite; }
.lost-spark-a { top: 6%; right: 8%; }
.lost-spark-b { top: 30%; right: -4%; animation-delay: -1.2s; }
.lost-spark-c { top: -4%; right: 34%; animation-delay: -2.4s; }
@keyframes lost-wobble { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(-10deg) translateY(-4px); } }
@keyframes lost-drift { 0% { opacity: 0; transform: translate(0, 6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -18px); } }
.lost-lead { max-width: 34rem; margin: .4rem auto 1.3rem; }
.lost-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; max-width: 40rem; margin: 0 auto; }
.lost-link { display: grid; gap: .15rem; padding: 1rem 1.1rem; border: 1px solid var(--lh-border); border-radius: 14px; background: var(--lh-surface-soft); color: var(--lh-ink) !important; text-decoration: none; text-align: left; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.lost-link strong { font: 600 1.3rem/1.2 var(--lh-serif); font-size-adjust: 0.46; }
.lost-link span { color: var(--lh-muted); font-size: .92rem; }
.lost-link:hover, .lost-link:focus-visible { transform: translateY(-3px); border-color: rgb(var(--c-accent)); box-shadow: 0 10px 24px rgb(var(--c-ink) / .1), 0 0 20px rgb(var(--c-neon) / .25); }
.lost-home { margin: 1.2rem 0 0; font-weight: 700; }
@media (max-width: 560px) { .lost-links { grid-template-columns: 1fr; } }
html[data-sparkles='off'] :is(.lost-flask img, .lost-spark) { animation: none; }
@media (prefers-reduced-motion: reduce) { html:not([data-sparkles='on']) :is(.lost-flask img, .lost-spark) { animation: none; } }

/* Pages crossfade into each other instead of blinking (browsers that
   support cross-page view transitions; others simply load as before).
   The header stays put while the page underneath changes. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: ease; }
html[data-sparkles='off']::view-transition-old(root),
html[data-sparkles='off']::view-transition-new(root) { animation: none; }

/* "Brewing…": the button that sent a form, while the next page loads
   (see site.js). The flask bubbles unless sparkles are off. */
.is-brewing { display: inline-flex; align-items: center; justify-content: center; gap: .45em; cursor: progress !important; opacity: .92; }
button.is-brewing:disabled, input.is-brewing:disabled { cursor: progress !important; opacity: .92; filter: none; }
.brew-flask { flex: 0 0 auto; width: 1.15em; height: 1.15em; overflow: visible; }
.brew-glass { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.brew-potion { fill: rgb(var(--c-neon)); opacity: .9; }
.brew-bubble { fill: currentColor; opacity: 0; transform-box: fill-box; animation: brew-bubble 1.5s ease-in infinite; }
.brew-bubble:nth-of-type(2) { animation-delay: .5s; }
.brew-bubble:nth-of-type(3) { animation-delay: 1s; }
@keyframes brew-bubble { 0% { opacity: 0; transform: translateY(2px); } 25% { opacity: .95; } 100% { opacity: 0; transform: translateY(-7px); } }
html[data-sparkles='off'] .brew-bubble { animation: none; opacity: .8; }
@media (prefers-reduced-motion: reduce) { html:not([data-sparkles='on']) .brew-bubble { animation: none; opacity: .8; } }


/* Keep dashboard navigation readable in every interaction state. */
.main-nav > a.nav-dashboard,
.main-nav > a.nav-dashboard:visited {
  color: rgb(var(--c-ui-ffffff));
  background: rgb(var(--c-ui-54316d));
  border: 1px solid rgb(var(--c-ui-bb9cd4));
  border-radius: 999px;
  font-weight: 600;
  box-shadow: none;
}
.main-nav > a.nav-dashboard:hover,
.main-nav > a.nav-dashboard:focus-visible,
.main-nav > a.nav-dashboard:active {
  color: rgb(var(--c-ui-ffffff));
  background: rgb(var(--c-ui-6a4085));
  border-color: rgb(var(--c-ui-ddc8ee));
  border-radius: 999px;
}
.main-nav > a.nav-dashboard:focus-visible { outline: 2px solid rgb(var(--c-ui-eadbf5)); outline-offset: 3px; }
.main-nav > a.nav-dashboard::after { display: none; }

.payment-choice-panel { margin:1.5rem 0; padding:1.25rem; border:1px solid rgb(var(--c-border) / .5); border-radius:16px; background:rgb(var(--c-surface-soft)); color:rgb(var(--c-ink)); }
.payment-choice-panel form { display:grid; gap:1rem; }
.payment-choice-panel label { display:flex; align-items:flex-start; gap:.75rem; cursor:pointer; padding:.6rem 0; }
.payment-choice-panel input[type=radio] { flex:0 0 auto; width:20px; height:20px; margin-top:.15rem; }
.payment-choice-panel small { display:block; margin-top:.3rem; line-height:1.5; }
.payment-choice-panel button { justify-self:start; min-height:44px; white-space:normal; }

