/* Spooky Pals · lantern.css — "Your lantern" / «Tu farol» and the porch companion (lantern.js, Brillo 2.0). Trazo.
 * Its own little night: deep teal glass instead of the Play room's violet, so the phosphor light reads as the hero.
 * Tokens (by job): --ln-night panel · --ln-glass empty glass · --ln-phos light · --ln-core hottest light ·
 * --ln-soft secondary text · --ln-ink outlines. Radii by job: 22 panel · 50% Ghostie stars · 14 chips.
 * Only transform/opacity animate; hover only for fine pointers; reduced motion: nothing floats, the porch friend hides. */
.ln {
  --ln-night: #0d1b20;
  --ln-glass: #12262a;
  --ln-phos: #8cffc9;
  --ln-aqua: #45e3c2;
  --ln-core: #eafff4;
  --ln-soft: #b9d9cf;
  --ln-ink: #2b2238;
  --ln-ease: cubic-bezier(.23, 1, .32, 1);
  position: relative;
  padding: 14px 14px 16px;
  border-radius: 22px;
  color: var(--ln-core);
  text-align: left;
  background:
    radial-gradient(1.2px 1.2px at 18px 26px, #eafff4cc 98%, #eafff400) 0 0 / 120px 90px,
    radial-gradient(1px 1px at 70px 64px, #8cffc999 98%, #8cffc900) 0 0 / 170px 110px,
    radial-gradient(90% 70% at 12% 0%, #16343a 0, #16343a00 70%),
    var(--ln-night);
  box-shadow: 0 0 0 1px #8cffc926, 0 14px 30px -18px #000;
}
.ln-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; }
.ln-lamp { width: 50px; height: 68px; display: block; overflow: visible; }
.ln.has-light .ln-lamp { filter: drop-shadow(0 0 10px #45e3c259); }
.ln-head-text { min-width: 0; }
.ln-kicker { margin: 0; font: 700 11.5px/1.2 var(--body, 'DM Sans', sans-serif); letter-spacing: .18em; text-transform: uppercase; color: var(--ln-phos); }
.ln-title { margin: 3px 0 0; font: 800 22px/1.1 var(--display, 'Outfit', sans-serif); letter-spacing: -.02em; color: var(--ln-core); }
.ln-line { margin: 4px 0 0; max-width: 40ch; font: 500 14px/1.4 var(--body, 'DM Sans', sans-serif); color: var(--ln-soft); text-wrap: pretty; }

/* the glowing ones, together like a small constellation: staggered, never a straight row */
.ln-sky { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 12px 0 0; padding: 4px 0 10px; list-style: none; }
.ln-sky li { min-width: 0; }
.ln-sky li:nth-child(3n+2) { transform: translateY(9px); }
.ln-sky li:nth-child(3n) { transform: translateY(-2px); }
.ln-star {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 62px; min-height: 76px; margin: 0; padding: 4px 2px 2px;
  border: 0; border-radius: 16px; background: none; color: var(--ln-core); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform .14s var(--ln-ease);
}
.ln-star img {
  width: 50px; height: 50px; object-fit: contain; object-position: 50% 100%; border-radius: 50%;
  background: radial-gradient(closest-side, #8cffc93d, #45e3c214 60%, #45e3c200);
  filter: drop-shadow(0 0 1.5px #e6fff3) drop-shadow(0 0 6px #7dffc4b3);
}
.ln-star-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 11.5px/1.2 var(--body, 'DM Sans', sans-serif); color: var(--ln-soft); }
/* the one who walks with you: a cream ring, like a lantern handle held */
.ln-star.is-buddy img { box-shadow: 0 0 0 2px var(--ln-core), 0 0 0 5px #8cffc94d; }
.ln-star.is-buddy .ln-star-name { color: var(--ln-core); }
.ln-star:active { transform: scale(.95); }
.ln-star:focus-visible { outline: 3px solid var(--ln-phos); outline-offset: 2px; }
.ln-more { align-self: center; }
.ln-more span { display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 8px; background: #8cffc91f; font: 800 14px/1 var(--body, 'DM Sans', sans-serif); color: var(--ln-phos); }

/* everyone's light at a glance: 23 tiny jars on a shelf */
.ln-shelf { margin: 10px 0 0; padding: 8px 8px 0; border-top: 1px solid #8cffc91f; }
.ln-jars { display: block; width: 100%; max-width: 300px; height: auto; overflow: visible; }
.ln-jar-glass { fill: var(--ln-glass); stroke: #4f7a72; stroke-width: 1; }
.ln-jar-light { fill: var(--ln-aqua); opacity: .8; }
.ln-jar-light.is-lit { fill: var(--ln-phos); opacity: 1; filter: drop-shadow(0 0 2.5px #8cffc9); }
.ln-jar-lid { fill: #c58f3f; }

/* the closest to glowing: tap one to go play */
.ln-next-title { margin: 12px 0 6px; font: 700 13px/1.3 var(--body, 'DM Sans', sans-serif); color: var(--ln-soft); }
.ln-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ln-chip {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; margin: 0; padding: 4px 10px 4px 4px;
  border: 1px solid #8cffc933; border-radius: 14px; background: #ffffff0a; color: var(--ln-core); text-align: left;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .14s var(--ln-ease), background-color .2s;
}
.ln-chip-pic { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
.ln-chip-pic img { position: relative; width: 32px; height: 32px; object-fit: contain; filter: saturate(.7) brightness(.92); }
.ln-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ln-ring-track { fill: #0a1518; stroke: #2c4a46; stroke-width: 3; }
.ln-ring-light { fill: none; stroke: var(--ln-phos); stroke-width: 3.4; stroke-linecap: round; }
.ln-chip-text { display: flex; flex-direction: column; min-width: 0; }
.ln-chip-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 14.5px/1.15 var(--display, 'Outfit', sans-serif); }
.ln-chip-text small { font: 600 12.5px/1.3 var(--body, 'DM Sans', sans-serif); color: var(--ln-phos); }
.ln-chip:active { transform: scale(.97); }
.ln-chip:focus-visible { outline: 3px solid var(--ln-phos); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .ln-star:hover { transform: translateY(-2px); }
  .ln-chip:hover { background: #ffffff14; }
}
/* compact (the Play room's hero): a little tighter */
.ln-compact { padding: 12px 12px 14px; }
.ln-compact .ln-lamp { width: 42px; height: 57px; }
.ln-compact .ln-title { font-size: 20px; }
@media (max-width: 359px) {
  .ln-star { width: 56px; }
  .ln-star img { width: 46px; height: 46px; }
  .ln-next { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- the porch: your companion floats by the Ghosties (decorative, taps go through) ---------- */
.ln-porch { position: absolute; left: 0; top: 0; z-index: 2; width: 52px; height: 56px; pointer-events: none; } /* lantern.js measures left/top */
.ln-porch[hidden] { display: none; }
.ln-porch img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 0 2px #e6fff3) drop-shadow(0 0 9px #7dffc4cc) drop-shadow(0 0 22px #2fe0b380); }
@media (min-width: 768px) { .ln-porch { width: 74px; height: 80px; } }
@media (prefers-reduced-motion: no-preference) {
  .ln-porch img { animation: ln-float 5.6s ease-in-out infinite; }
}
@keyframes ln-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) {
  .ln-porch { display: none; }
  .ln-star, .ln-chip { transition: none; }
  .ln-star:active, .ln-chip:active { transform: none; }
}
@media (forced-colors: active) {
  .ln { border: 1px solid CanvasText; }
  .ln-star img, .ln-porch img, .ln-jar-light.is-lit, .ln.has-light .ln-lamp { filter: none; }
  .ln-star.is-buddy img { outline: 2px solid Highlight; }
  .ln-star:focus-visible, .ln-chip:focus-visible { outline: 3px solid Highlight; }
}
