/* LPU 140 Living Scenes v2.2.1 — progressive enhancement only.
   Original manuscript and author portrait markup is never touched. */
body .md-poetry-grid>a {overflow-wrap:anywhere;hyphens:auto}
body .md-poetry-grid>a:not(:first-child) {position:relative;isolation:isolate;overflow:hidden;contain:paint;outline-offset:4px}
body .md-poetry-grid>a:not(:first-child)>.lpu2-card-aura {
  position:absolute!important;inset:0;z-index:0!important;display:block;
  pointer-events:none;overflow:hidden;border-radius:inherit;
  background:radial-gradient(ellipse at 50% 85%,hsl(var(--lpu2-hue, 194) 83% 67% / .2),transparent 65%);
  transform:none!important;opacity:.68;
}
body .md-poetry-grid>a:not(:first-child)>.lpu2-card-aura::before {
  content:"";position:absolute;inset:-45%;
  background:conic-gradient(from 30deg,transparent 0 20%,hsl(var(--lpu2-hue, 194) 94% 75% / .29) 27%,transparent 38% 61%,rgba(255,211,137,.17) 70%,transparent 83%);
  transform:rotate(0deg);
}
body .md-poetry-grid>a:not(:first-child)>.lpu2-card-aura::after {
  content:"";position:absolute;left:var(--lpu2-x,38%);top:var(--lpu2-y,20%);
  width:clamp(52px,7vw,130px);aspect-ratio:1;border-radius:50%;
  background:radial-gradient(circle at 38% 33%,rgba(255,251,224,.56),hsl(var(--lpu2-hue,194) 82% 75% / .22) 54%,transparent 75%);
  box-shadow:0 0 52px hsl(var(--lpu2-hue,194) 88% 75% / .26);
}
body .md-poetry-grid>a.lpu2-inview:not(:first-child)>.lpu2-card-aura::before{animation:lpu2-card-orbit 20s linear infinite}
body .md-poetry-grid>a.lpu2-inview:not(:first-child)>.lpu2-card-aura::after{animation:lpu2-card-float 9s ease-in-out infinite alternate}
body .md-poetry-grid>a:not(:first-child)>span:not(.lpu2-card-aura) {position:relative;z-index:1}
body .md-poetry-grid>a:not(:first-child):hover>.lpu2-card-aura,
body .md-poetry-grid>a:not(:first-child):focus-visible>.lpu2-card-aura {opacity:1}
body .md-poetry-grid>a:focus-visible {outline:3px solid #ffe7ad!important;outline-offset:4px}
body .md-poetry-grid>a>.lpu2-card-title {font-size:clamp(13px,1.55vw,22px)!important;line-height:1.26!important}
body .md-poetry-grid>a>.lpu2-card-author {font-size:clamp(12px,1.2vw,16px)!important;line-height:1.35!important}
@media(max-width:780px) {
 body .md-poetry-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:clamp(8px,1.8vw,14px)!important}
 body .md-poetry-grid>a {padding:clamp(7px,1.5vw,14px)!important;gap:clamp(6px,1.4vw,11px)!important}
}
@media(max-width:540px) {
 body .md-poetry-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
.lpucr-environment>.lpu2-canvas {
 position:absolute;top:0;left:0;display:block;width:100%;height:min(82vh,720px);
 max-height:720px;pointer-events:none;z-index:1;opacity:.43;
 filter:saturate(.94);
}
.lpucr-experience.lpu2-scene-on .lpucr-original{position:relative;z-index:2}
.lpucr-experience.lpu2-scene-on .lpucr-environment{isolation:isolate}
.lpucr-experience.lpu2-scene-on .lpucr-toolbar button:focus-visible,
.lpucr-experience.lpu2-scene-on .lpucr-toolbar a:focus-visible{outline:3px solid #ffe7ad;outline-offset:3px}
.lpucr-experience.lpu2-scene-on .lpucr-scene-caption{font-size:clamp(11px,1.25vw,13px)!important;letter-spacing:.07em!important}
@keyframes lpu2-card-orbit {to{transform:rotate(360deg)}}
@keyframes lpu2-card-float {to{transform:translate(8px,-14px) scale(1.08)}}
@media(prefers-reduced-motion:reduce){
 body .md-poetry-grid>a>.lpu2-card-aura,
 body .md-poetry-grid>a>.lpu2-card-aura::before,
 body .md-poetry-grid>a>.lpu2-card-aura::after{
  animation:none!important;transition:none!important;transform:none!important
 }
}
@media(forced-colors:active) {
 .lpu2-card-aura,.lpu2-canvas{display:none!important}
}

/* Reader resize fix: 109+ poems store their stanzas in pre-line DIVs,
   not P elements. Apply only AFTER the reader presses A+ or A−,
   preserving the author's original typography on initial load. */
.lpucr-experience.lpu2-reader-resized .lpucr-original [style*="white-space:pre-line"],
.lpucr-experience.lpu2-reader-resized .lpucr-original [style*="white-space: pre-line"] {
 font-size:calc(clamp(16px,2.15vw,21px) * var(--lpucr-text-scale,1))!important;
 line-height:1.9!important;
}
