/* =========================================================================
   FreeCell Solitaire — WebGL preloader
   All artwork is loaded from the build output's Build folder.
   ========================================================================= */

@property --spread {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

:root {
  --gold: #f7c948;
  --gold-bright: #ffe9a3;
  --gold-deep: #a86b16;
  --cream: #fff6dc;
  --felt-deep: #041f14;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--felt-deep);
}

body {
  color: var(--cream);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* -------------------------------------------------------------------------
   Unity host
   ------------------------------------------------------------------------- */

#unity-container {
  position: fixed;
  inset: 0;
  background: #041a11;
}

#unity-fullscreen-container {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.9s var(--ease-out), transform 1.4s var(--ease-out);
  will-change: opacity, transform;
}

body.game-ready #unity-fullscreen-container {
  opacity: 1;
  transform: none;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #062a1b;
  outline: none;
}

#unity-fullscreen-button {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(247, 201, 72, 0.38);
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(18, 68, 44, 0.82), rgba(4, 30, 19, 0.86));
  color: var(--gold-bright);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out),
    background 0.3s ease, border-color 0.3s ease;
}

body.game-ready #unity-fullscreen-button {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

#unity-fullscreen-button:hover {
  background: linear-gradient(160deg, rgba(30, 96, 62, 0.94), rgba(8, 42, 27, 0.94));
  border-color: rgba(247, 201, 72, 0.8);
}

#unity-fullscreen-button svg {
  width: 20px;
  height: 20px;
}

#unity-warning {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 60;
  display: none;
  width: min(92vw, 620px);
  transform: translateX(-50%);
  pointer-events: none;
}

#unity-warning > div {
  margin-bottom: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: #fff;
  background: rgba(24, 24, 24, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

#unity-warning > div.is-warning {
  color: #2a1c00;
  background: linear-gradient(180deg, #ffe28a, #f3c44b);
}

#unity-warning > div.is-error {
  background: linear-gradient(180deg, #c0392b, #8e2318);
}

/* -------------------------------------------------------------------------
   Preloader backdrop
   ------------------------------------------------------------------------- */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  isolation: isolate;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.95s var(--ease-out), visibility 0.95s linear;
  --px: 0;
  --py: 0;
}

#preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#preloader.is-done .pl-stage {
  transform: translateY(-14px) scale(1.035);
  filter: blur(5px);
}

#preloader.is-done .pl-bg {
  transform: scale(1.06);
}

#preloader.is-done .pl-footer {
  opacity: 0;
  transform: translateY(8px);
}

.pl-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 1.6s var(--ease-out);
  will-change: transform;
}

.pl-felt {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 32%, #1a7a49 0%, #0e5231 34%, #07351f 62%, #041f14 84%, #02130c 100%),
    linear-gradient(180deg, #0a3e26 0%, #03180f 100%);
}

.pl-pattern {
  position: absolute;
  inset: -10%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='176' height='176' viewBox='0 0 176 176'%3E%3Cg fill='none' stroke='%23f7c948' stroke-width='1.2'%3E%3Cpath d='M44 35c-6-8-19-3-19 6 0 8 11 14 19 21 8-7 19-13 19-21 0-9-13-14-19-6z'/%3E%3Cpath d='M132 33l12 17-12 17-12-17z'/%3E%3Cpath d='M44 113c-3 5-10 7-10 12 0 4 3 6 6 6 1.5 0 3-.5 4-1.3-.3 2.3-1.5 4-3.2 5.3h10.4c-1.7-1.3-2.9-3-3.2-5.3 1 .8 2.5 1.3 4 1.3 3 0 6-2 6-6 0-5-7-7-10-12z'/%3E%3Cpath d='M132 108c3 4 9 6 9 11 0 3-2 5-5 5-1 0-2-.4-2.8-1 .2 2 1.2 3.3 2.5 4.3h-7.4c1.3-1 2.3-2.3 2.5-4.3-.8.6-1.8 1-2.8 1-3 0-5-2-5-5 0-5 6-7 9-11z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 176px 176px;
  opacity: 0.055;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, #000 35%, transparent 82%);
  mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, #000 35%, transparent 82%);
}

.pl-glow {
  position: absolute;
  top: 6%;
  left: 50%;
  width: 78vw;
  height: 78vw;
  max-width: 900px;
  max-height: 900px;
  transform: translateX(-50%) translate3d(calc(var(--px) * 14px), calc(var(--py) * 11px), 0);
  background: radial-gradient(circle, rgba(255, 206, 92, 0.17) 0%, rgba(120, 224, 156, 0.08) 38%, transparent 68%);
  filter: blur(18px);
  pointer-events: none;
  transition: transform 0.6s var(--ease-soft);
  will-change: transform;
}

.pl-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.pl-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 80% at 50% 45%, transparent 45%, rgba(1, 10, 6, 0.42) 78%, rgba(1, 8, 5, 0.78) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.32) 100%);
  pointer-events: none;
}

.pl-sparks {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.pl-spark-dot {
  position: absolute;
  bottom: -12px;
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px 1px rgba(255, 210, 100, 0.65);
  opacity: 0;
  animation: plDrift var(--d, 12s) linear var(--delay, 0s) infinite;
}

@keyframes plDrift {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.7); }
  12% { opacity: 0.75; }
  70% { opacity: 0.45; }
  100% { opacity: 0; transform: translate3d(var(--dx, 20px), -78vh, 0) scale(1.1); }
}

/* -------------------------------------------------------------------------
   Stage
   ------------------------------------------------------------------------- */

.pl-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.8vh, 22px);
  min-height: 0;
  padding: clamp(16px, 3.5vh, 46px) 20px clamp(8px, 1.6vh, 18px);
  transition: transform 0.95s var(--ease-out), filter 0.95s var(--ease-out);
  --cw: clamp(54px, 9vh, 104px);
  --ch: calc(var(--cw) * 1.36);
}

/* Brand ------------------------------------------------------------------ */

.pl-brand {
  position: relative;
  display: grid;
  place-items: center;
  animation: plBrandIn 1.15s var(--ease-out) 0.08s both;
}

.pl-halo {
  position: absolute;
  width: 132%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 208, 92, 0.24) 0%, rgba(255, 208, 92, 0.07) 42%, transparent 70%);
  filter: blur(16px);
  animation: plHalo 5.5s var(--ease-soft) infinite;
  pointer-events: none;
}

.pl-logo {
  position: relative;
  display: block;
  height: clamp(150px, 29vh, 320px);
  width: auto;
  max-width: min(66vw, 320px);
  object-fit: contain;
  filter:
    drop-shadow(0 22px 34px rgba(0, 0, 0, 0.52))
    drop-shadow(0 0 30px rgba(255, 198, 58, 0.16));
  animation: plFloat 7s var(--ease-soft) infinite;
  transition: filter 0.45s ease;
  will-change: transform;
}

.pl-brand:hover .pl-logo {
  filter:
    drop-shadow(0 24px 38px rgba(0, 0, 0, 0.56))
    drop-shadow(0 0 42px rgba(255, 206, 76, 0.3));
}

@keyframes plBrandIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes plFloat {
  0%, 100% { transform: translateY(-5px); }
  50% { transform: translateY(6px); }
}

@keyframes plHalo {
  0%, 100% { opacity: 0.7; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Card fan --------------------------------------------------------------- */

.pl-deck-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(88vw, 470px);
  height: calc(var(--cw) * 2.02);
  perspective: 1000px;
  animation: plDeckIn 1s var(--ease-out) 0.26s both;
}

.pl-deck {
  position: relative;
  width: calc(var(--cw) * 4.2);
  height: calc(var(--cw) * 1.95);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  cursor: pointer;
  will-change: transform;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.32));
  transition: --spread 0.55s var(--ease-out), filter 0.4s ease;
}

.pl-deck:hover {
  --spread: 1.12;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.44));
}

.pl-deck:focus-visible {
  outline: none;
}

.pl-deck:focus-visible .pl-card {
  box-shadow: 0 0 0 2px var(--gold), 0 12px 24px rgba(0, 0, 0, 0.5);
}

@keyframes plDeckIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.pl-card {
  --fan: translate3d(
      calc(var(--cw) * var(--cx) * var(--spread)),
      calc(var(--cw) * var(--cy) * var(--spread)),
      var(--z, 0px)
    )
    rotate(calc(var(--rot) * var(--spread)));
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--cw);
  height: var(--ch);
  margin-top: calc(var(--ch) / -2);
  margin-left: calc(var(--cw) / -2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: calc(var(--cw) * 0.075);
  background: #fff url("Card_Back_Classic.png") center / cover no-repeat;
  box-shadow:
    0 2px 1px rgba(0, 0, 0, 0.22),
    0 12px 22px -8px rgba(0, 0, 0, 0.62);
  transform: var(--fan);
  transform-origin: 50% 88%;
  overflow: hidden;
  animation: plDeal 0.95s var(--ease-out) calc(0.5s + var(--i) * 72ms) backwards;
  transition: box-shadow 0.3s ease, filter 0.3s ease;
  will-change: transform;
}

.pl-card:hover {
  z-index: 12;
  filter: brightness(1.06) saturate(1.04);
  box-shadow:
    0 2px 1px rgba(0, 0, 0, 0.22),
    0 16px 30px -8px rgba(0, 0, 0, 0.7);
}

.pl-card::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    115deg,
    transparent 36%,
    rgba(255, 255, 255, 0.55) 47%,
    rgba(255, 255, 255, 0.1) 53%,
    transparent 64%
  );
  transform: translateX(-135%) rotate(3deg);
  transition: transform 1.1s var(--ease-out);
  mix-blend-mode: screen;
  pointer-events: none;
}

.pl-card:hover::after {
  transform: translateX(135%) rotate(3deg);
}

@keyframes plDeal {
  from {
    opacity: 0;
    transform: translate3d(0, 16%, 0) rotate(0deg) scale(0.82);
  }
  to {
    opacity: 1;
    transform: var(--fan);
  }
}

/* Shuffle animation — triggered by clicking the fan. */
.pl-deck.is-shuffling .pl-card {
  animation: plShuffle 0.95s cubic-bezier(0.45, 0, 0.2, 1) calc(var(--i) * 38ms) both;
}

@keyframes plShuffle {
  0% { transform: var(--fan); }
  28% { transform: translate3d(0, 5%, 46px) rotate(0deg) scale(0.9); }
  44% { transform: translate3d(0, 5%, 50px) rotate(7deg) scale(0.9); }
  62% { transform: translate3d(-3%, 1%, 30px) rotate(-4deg) scale(0.94); }
  82% { transform: translate3d(2%, -1%, 18px) rotate(2deg) scale(0.97); }
  100% { transform: var(--fan); }
}

/* Flippable face card ----------------------------------------------------- */

.pl-card--flip {
  z-index: 8;
  background: none;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.pl-card--flip:hover {
  filter: brightness(1.06);
  box-shadow: none;
}

.pl-card--flip::after {
  display: none;
}

.pl-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pl-card--flip.is-flipped .pl-card-inner {
  transform: rotateY(180deg);
}

.pl-face {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--cw) * 0.075);
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.pl-face--back {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: #fff url("Card_Back_Classic.png") center / cover no-repeat;
  box-shadow: 0 2px 1px rgba(0, 0, 0, 0.22), 0 12px 22px -8px rgba(0, 0, 0, 0.62);
}

.pl-face--front {
  transform: rotateY(180deg);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background:
    radial-gradient(120% 90% at 50% 0%, #fffef9 0%, #fbf6e8 55%, #efe4ca 100%);
  box-shadow: 0 2px 1px rgba(0, 0, 0, 0.22), 0 12px 22px -8px rgba(0, 0, 0, 0.62);
  color: #1b1b1b;
}

.pl-face--front::before {
  content: "";
  position: absolute;
  inset: 4.5%;
  border: 1px solid rgba(166, 124, 42, 0.28);
  border-radius: calc(var(--cw) * 0.04);
  pointer-events: none;
}

.pl-face--front.red { color: #bf2c2c; }
.pl-face--front.black { color: #161616; }

.pl-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.86;
}

.pl-corner.tl { top: 6%; left: 8%; }
.pl-corner.br { right: 8%; bottom: 6%; transform: rotate(180deg); }

.pl-corner b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(var(--cw) * 0.23);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pl-corner svg {
  width: calc(var(--cw) * 0.17);
  height: auto;
  margin-top: 4%;
  fill: currentColor;
}

.pl-pip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.pl-pip svg {
  width: 46%;
  height: auto;
  fill: currentColor;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.4));
}

/* -------------------------------------------------------------------------
   Loading readout
   ------------------------------------------------------------------------- */

.pl-loader {
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.3vh, 12px);
  width: min(86vw, 480px);
  animation: plLoaderIn 0.9s var(--ease-out) 0.85s backwards;
}

@keyframes plLoaderIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.pl-loader-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 3px;
}

.pl-status {
  font-size: clamp(9px, 1.25vh, 12px);
  font-weight: 600;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  color: rgba(255, 246, 220, 0.74);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: opacity 0.28s ease, transform 0.28s ease, color 0.3s ease;
}

.pl-status.is-swapping {
  opacity: 0;
  transform: translateY(-3px);
}

.pl-percent {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2.7vh, 27px);
  font-weight: 700;
  line-height: 0.9;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(255, 202, 74, 0.4);
}

.pl-percent span {
  margin-left: 1px;
  font-size: 0.55em;
  font-weight: 400;
  opacity: 0.68;
}

.pl-track {
  position: relative;
  height: clamp(9px, 1.35vh, 13px);
  padding: 2px;
  border: 1px solid rgba(247, 201, 72, 0.26);
  border-radius: 999px;
  background: linear-gradient(180deg, #02150d 0%, #06291a 100%);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.8),
    0 1px 0 rgba(255, 255, 255, 0.07);
}

.pl-fill {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #9c5b11 0%, #e1a326 22%, #ffe89a 52%, #f3c13b 76%, #b9781d 100%);
  box-shadow:
    0 0 12px rgba(255, 198, 58, 0.55),
    0 0 30px rgba(255, 198, 58, 0.22);
  will-change: width;
}

.pl-fill::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: clamp(10px, 1.4vh, 13px);
  height: clamp(10px, 1.4vh, 13px);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fffceb 0%, #ffd96f 48%, #b87a1e 100%);
  box-shadow: 0 0 9px 2px rgba(255, 210, 90, 0.7);
  transform: translateY(-50%) scale(0);
  transition: transform 0.35s var(--ease-out);
}

.pl-fill.is-started::after {
  transform: translateY(-50%) scale(1);
}

.pl-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    112deg,
    transparent 18%,
    rgba(255, 255, 255, 0.82) 42%,
    rgba(255, 255, 255, 0.16) 54%,
    transparent 74%
  );
  background-size: 220% 100%;
  animation: plShine 1.9s linear infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes plShine {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}

.pl-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: clamp(15px, 2.2vh, 22px);
  padding: 0 3px;
}

.pl-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(8px, 1.15vh, 10.5px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 246, 220, 0.42);
  transition: color 0.3s ease, opacity 0.3s ease;
}

.pl-hint svg {
  width: 13px;
  height: 13px;
  color: var(--gold);
  opacity: 0.8;
  flex: none;
}

.pl-deck:hover ~ * .pl-hint,
.pl-deck-wrap:hover + .pl-loader .pl-hint {
  color: rgba(255, 246, 220, 0.7);
}

.pl-retry {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 15px;
  border: 1px solid rgba(247, 201, 72, 0.55);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(247, 201, 72, 0.16), rgba(247, 201, 72, 0.06));
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.pl-retry:hover {
  background: rgba(247, 201, 72, 0.26);
  border-color: var(--gold);
}

#preloader.is-error .pl-retry { display: inline-flex; }
#preloader.is-error .pl-hint {
  max-width: 78%;
  color: rgba(255, 178, 150, 0.82);
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: clamp(9px, 1.25vh, 11px);
}
#preloader.is-error .pl-hint svg { display: none; }
#preloader.is-error .pl-status { color: #ffc2ae; }
#preloader.is-error .pl-fill {
  background: linear-gradient(90deg, #7d2418, #c04a33 55%, #e4775f);
  box-shadow: 0 0 12px rgba(220, 90, 60, 0.45);
}
#preloader.is-error .pl-shine { animation: none; opacity: 0.15; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.pl-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 24px max(18px, env(safe-area-inset-bottom));
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 246, 220, 0.3);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
  animation: plFooterIn 1s var(--ease-out) 1.2s backwards;
}

.pl-footer > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.pl-footer i {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.55;
}

.pl-version {
  letter-spacing: 0.18em;
  opacity: 0.6;
}

@keyframes plFooterIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   Responsive tuning
   ------------------------------------------------------------------------- */

@media (max-width: 720px) {
  .pl-stage {
    --cw: clamp(48px, 8.4vh, 78px);
    gap: clamp(6px, 1.2vh, 14px);
  }

  .pl-logo {
    height: clamp(140px, 27vh, 240px);
    max-width: min(74vw, 240px);
  }

  .pl-loader { width: min(88vw, 400px); }

  .pl-footer {
    gap: 12px;
    font-size: 8px;
    letter-spacing: 0.26em;
  }

  .pl-version { display: none; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .pl-stage {
    --cw: clamp(40px, 10vh, 58px);
    gap: 6px;
    padding-top: 10px;
  }

  .pl-logo { height: clamp(96px, 24vh, 130px); }
  .pl-deck-wrap { height: calc(var(--cw) * 1.95); }
  .pl-loader { gap: 6px; }
  .pl-footer { padding-bottom: 8px; }
  .pl-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
