/* Cover-only camera treatment. No lesson Canvas, geometry or controls are styled. */
html.has-living-cover,
html.has-living-cover body { overflow: hidden; }
html.has-living-cover .floating-lang-container { visibility: hidden; }

.intro-screen.living-cover {
  isolation: isolate;
  display: block;
  opacity: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 720ms cubic-bezier(.22,.61,.36,1);
}
.intro-screen.living-cover::before { content: none; animation: none; }
.living-cover .cover-backdrop {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: var(--cover-focus-x,50%) var(--cover-focus-y,50%);
  filter: blur(18px) brightness(.48);
  transform: scale(1.04);
  pointer-events: none;
}
.living-cover .cover-camera {
  position: absolute;
  inset: -2px;
  display: block;
  transform: translate3d(0,0,0) scale(1.01);
  transform-origin: var(--cover-focus-x,50%) var(--cover-focus-y,50%);
  pointer-events: none;
  will-change: transform;
}
.living-cover.cover-ready .cover-camera {
  animation: introZoom 12s cubic-bezier(.2,.08,.3,1) both;
}
.living-cover .cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--cover-focus-x,50%) var(--cover-focus-y,50%);
  pointer-events: none;
  transition: transform 720ms ease-out;
}
.intro-screen.living-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%,transparent 38%,rgba(11,26,21,.38) 100%),
    linear-gradient(180deg,rgba(11,26,21,.09),transparent 28%,transparent 68%,rgba(11,26,21,.28));
}
.intro-screen.living-cover.cover-leaving { opacity: 0; pointer-events: none; }
.living-cover.cover-leaving .cover-image { transform: scale(1.025); }
.intro-screen.living-cover:focus-visible { outline: 3px solid #55e9ff; outline-offset: -6px; }
@keyframes introZoom {
  from { transform: translate3d(0,0,0) scale(1.01); }
  to { transform: translate3d(var(--cover-drift-x,0%),var(--cover-drift-y,0%),0) scale(var(--cover-end-scale,1.18)); }
}
/* Portrait keeps the complete composition; the soft backdrop fills the screen. */
@media (orientation: portrait) {
  .living-cover .cover-image { object-fit: contain; object-position: center; }
  .living-cover .cover-camera { transform-origin: center; }
}
@media (prefers-reduced-motion: reduce) {
  .living-cover.cover-ready .cover-camera { animation: none; transform: none; }
  .intro-screen.living-cover, .living-cover .cover-image { transition: none; }
  .living-cover.cover-leaving .cover-image { transform: none; }
}
/* After the cover, focus moves to the lesson title for screen readers. No
   frame around it: while it holds that focus the title is emphasised by colour. */
#title[tabindex="-1"]:focus,#title[tabindex="-1"]:focus-visible{outline:none;box-shadow:none;color:var(--chalk-yellow,#fde047);transition:color .5s ease}
