.quest-targets.lantern-goals { position: relative; flex: 1; gap: clamp(2px, 1vw, 8px); justify-content: space-between; align-items: flex-end; padding-top: 9px; background: url('assets/oak-branch.svg') left top / calc(100% - 56px) 28px no-repeat; }
.quest-target.lantern-target { display: block; position: relative; flex: 1; max-width: 58px; min-width: 0; height: 76px; padding: 0; border: 0; border-radius: 0; background: none; color: #e2d7b4; }
.lantern-target::before { content: ''; position: absolute; width: 1px; height: 8px; top: 1px; left: 50%; background: #b69663; }
.lantern-target img.lantern-image { position: absolute; left: 8%; top: 5px; width: 84%; height: 57px; object-fit: contain; opacity: .6; transition: opacity .4s, filter .4s; }
.lantern-flame { position: absolute; left: 36%; right: 36%; top: 32px; height: 20px; border-radius: 35% 35% 45% 45%; background: radial-gradient(ellipse at 50% 70%, #fff8d8, var(--lantern-color) 42%, transparent 78%); clip-path: inset(calc(100% - var(--charge, 0%)) 0 0); filter: drop-shadow(0 0 4px var(--lantern-color)); transition: clip-path .45s ease-out; pointer-events: none; }
.lantern-target img.lantern-gem { position: absolute; left: calc(50% - 22px); bottom: 3px; width: 12px; height: 12px; }
.lantern-target .quest-count { position: absolute; bottom: 0; left: 0; width: 100%; padding-left: 11px; text-align: center; font-size: .67rem; font-variant-numeric: tabular-nums; }
.lantern-target.is-lit img.lantern-image { opacity: 1; filter: brightness(1.1) drop-shadow(0 0 7px var(--lantern-color)); }
.lantern-target.is-lit .quest-count { color: #ffe7a4; }
.lantern-target.is-lit .lantern-flame { box-shadow: 0 0 12px var(--lantern-color); }
.lantern-book { position: relative; flex: 0 0 52px; height: 74px; margin-left: 4px; }
.lantern-book img { position: absolute; inset: 3px 0 auto; width: 100%; height: 56px; object-fit: contain; }
.hidden-book { filter: brightness(.2) saturate(.3); opacity: .65; }
.revealed-book { clip-path: inset(0 calc(100% - var(--book-reveal, 0%)) 0 0); filter: drop-shadow(0 0 6px #fbc963); transition: clip-path .6s ease-out; }
.book-progress { position: absolute; bottom: 0; width: 100%; text-align: center; color: #ffe4a1; font: 600 .72rem/1.3 system-ui, sans-serif; }
.board-frame.is-lantern-level { --board-size: min(560px, calc(100svh - 278px), calc(100vw - 40px)); }
.lantern-halo { position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: 50%; background: radial-gradient(ellipse, #ffdb7340, transparent 67%); opacity: var(--lantern-light, 0); transition: opacity 1s; }
.board-frame:not(.is-lantern-level) .lantern-halo { display: none; }
.flying-lantern-light { position: fixed; width: 8px; height: 8px; border-radius: 50%; z-index: 25; pointer-events: none; background: #fff3c5; box-shadow: 0 0 9px var(--light-color), 0 0 18px var(--light-color); }
.flying-book { position: absolute; width: 105px; height: 105px; object-fit: contain; z-index: 25; pointer-events: none; filter: drop-shadow(0 0 18px #ffd375); }
.book-letter { position: absolute; color: #ffedb4; font: 700 25px Georgia, serif; text-shadow: 0 0 8px #ffce56; z-index: 26; pointer-events: none; }
.open-book-pages { position: absolute; width: 110px; height: 78px; border: 2px solid #d8ae56; border-radius: 8px 8px 20px 20px; background: linear-gradient(90deg, #fff1b7, #e5ce8d 48%, #9b743b 50%, #fff0b7 53%, #fff6ce); box-shadow: 0 0 28px #ffda6f99; z-index: 24; pointer-events: none; }
.story-world[data-world="lukomorye"] .atmosphere::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 12% 26%, #ffce634f, transparent 55%), radial-gradient(ellipse at 55% 7%, #ffdf7633, transparent 62%); opacity: var(--forest-glow, 0); mix-blend-mode: screen; transition: opacity 1.5s ease; }
.forest-fireflies { display: none; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: var(--forest-glow, 0); transition: opacity 1.5s ease; }
.story-world[data-world="lukomorye"] .forest-fireflies { display: block; }
.forest-fireflies i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff1b7; box-shadow: 0 0 8px #ffdb76, 0 0 20px #ffcf6a; animation: forest-wake 5s ease-in-out infinite alternate; }
.forest-fireflies i:nth-child(1) { left: 14%; top: 35%; }
.forest-fireflies i:nth-child(2) { left: 26%; top: 58%; animation-delay: -2s; }
.forest-fireflies i:nth-child(3) { left: 7%; top: 70%; animation-delay: -3s; }
.forest-fireflies i:nth-child(4) { left: 78%; top: 24%; animation-delay: -1s; }
.forest-fireflies i:nth-child(5) { left: 85%; top: 65%; animation-delay: -4s; }
.forest-fireflies i:nth-child(6) { left: 61%; top: 11%; animation-delay: -2.5s; }
@keyframes forest-wake { from { transform: translate(-5px,4px); opacity: .3; } to { transform: translate(7px,-10px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .forest-fireflies i { animation: none; } }
@media (max-width: 600px) {
  .quest-targets.lantern-goals { gap: 2px; background-size: calc(100% - 42px) 24px; }
  .quest-target.lantern-target { height: 68px; }
  .lantern-target img.lantern-image { left: 0; width: 100%; height: 51px; }
  .lantern-flame { top: 29px; height: 17px; left: 34%; right: 34%; }
  .lantern-target .quest-count { font-size: .59rem; padding-left: 9px; }
  .lantern-target img.lantern-gem { left: calc(50% - 19px); width: 10px; height: 10px; }
  .lantern-book { flex-basis: 38px; height: 68px; margin-left: 2px; }
  .lantern-book img { height: 50px; }
  .board-frame.is-lantern-level { --board-size: min(560px, calc(100svh - 278px), calc(100vw - 30px)); }
}
@media (orientation: landscape) and (max-height: 550px) {
  .quest-bar.has-lanterns { position: static; margin-bottom: 0; }
  .has-lanterns .quest-level { display: none; }
  .quest-targets.lantern-goals { padding-top: 0; background-size: calc(100% - 40px) 18px; }
  .quest-target.lantern-target, .lantern-book { height: 45px; }
  .lantern-target img.lantern-image, .lantern-book img { height: 33px; top: 0; }
  .lantern-flame { top: 17px; height: 13px; }
  .board-frame.is-lantern-level { --board-size: min(560px, calc(100svh - 170px), calc(100vw - 190px)); }
}
