:root {
  color-scheme: dark;
  --lsz-stage-ratio: 16 / 9;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.html-body__title-enter,
#ebg,
#html-body__panic-overlay,
#root {
  visibility: hidden !important;
  pointer-events: none !important;
}

#lsz-player {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

#lsz-stage {
  position: relative;
  width: min(100vw, var(--lsz-window-width, 100vw), calc(100dvh * 16 / 9));
  height: min(100dvh, var(--lsz-window-height, 100dvh), calc(100vw * 9 / 16));
  aspect-ratio: var(--lsz-stage-ratio);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 48px rgb(0 0 0 / 0.7);
}

#lsz-screen,
#lsz-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}

#lsz-video {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

#lsz-video[hidden] { display: none; }

#lsz-hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.lsz-hotspot {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lsz-hotspot:focus-visible {
  outline: max(2px, 0.18vw) solid #8bd8ff;
  outline-offset: max(2px, 0.12vw);
  box-shadow: 0 0 0 max(2px, 0.18vw) rgb(0 56 112 / 0.7);
}

html[data-lsz-debug="1"] .lsz-hotspot {
  outline: 2px dashed #ff4d6d;
  background: rgb(255 77 109 / 0.12);
}

#lsz-status {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  top: max(12px, env(safe-area-inset-top));
  z-index: 2147483001;
  max-width: min(80vw, 32rem);
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  background: rgb(0 0 0 / 0.72);
  color: #fff;
  font-size: clamp(12px, 1.5vw, 16px);
}

#lsz-status[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  #lsz-screen,
  #lsz-video { transition: opacity 120ms ease-out; }
}


#lsz-hotspots[aria-hidden="true"] {
  pointer-events: none;
}

#lsz-dialog {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 42px);
  box-sizing: border-box;
  background: rgb(3 9 16 / 0.74);
  backdrop-filter: blur(8px);
}

#lsz-dialog[hidden] {
  display: none;
}

.lsz-dialog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(760px, 88%);
  max-height: 82%;
  padding: clamp(18px, 3vw, 34px);
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgb(222 178 105 / 0.78);
  border-radius: clamp(12px, 1.4vw, 22px);
  background:
    linear-gradient(145deg, rgb(20 39 58 / 0.97), rgb(8 16 27 / 0.98)),
    #0b1724;
  box-shadow: 0 22px 70px rgb(0 0 0 / 0.68), inset 0 0 34px rgb(222 178 105 / 0.08);
  color: #f6e4bf;
}

.lsz-dialog-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgb(222 178 105 / 0.25);
  border-radius: inherit;
}

#lsz-dialog-title {
  position: relative;
  margin: 0 2rem clamp(10px, 1.5vw, 20px);
  color: #f5ddb0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 3.3vw, 38px);
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.08em;
}

#lsz-dialog-body {
  position: relative;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #a97a3b transparent;
}

.lsz-dialog-close {
  position: absolute;
  top: clamp(9px, 1.3vw, 17px);
  right: clamp(10px, 1.5vw, 20px);
  z-index: 1;
  width: clamp(30px, 3.4vw, 42px);
  height: clamp(30px, 3.4vw, 42px);
  border: 1px solid rgb(222 178 105 / 0.45);
  border-radius: 50%;
  background: rgb(0 0 0 / 0.25);
  color: #f5ddb0;
  cursor: pointer;
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1;
}

.lsz-dialog-copy {
  margin: 0 0 clamp(14px, 2vw, 24px);
  color: #e9ddc8;
  font-size: clamp(13px, 1.55vw, 18px);
  line-height: 1.65;
  text-align: center;
}

.lsz-dialog-actions,
.lsz-setting-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(8px, 1.4vw, 16px);
  margin-top: clamp(12px, 2vw, 24px);
}

.lsz-dialog-button {
  min-width: clamp(120px, 18vw, 190px);
  padding: clamp(9px, 1.1vw, 13px) clamp(14px, 2vw, 24px);
  border: 1px solid #d9ab65;
  border-radius: 999px;
  background: linear-gradient(#425a70, #192b3d);
  box-shadow: inset 0 0 0 2px rgb(5 13 22 / 0.5), 0 5px 18px rgb(0 0 0 / 0.34);
  color: #ffe5b2;
  cursor: pointer;
  font: 600 clamp(13px, 1.55vw, 17px)/1.2 system-ui, sans-serif;
  letter-spacing: 0.05em;
}

.lsz-dialog-button.is-secondary {
  background: rgb(255 255 255 / 0.04);
}

.lsz-dialog-button:hover,
.lsz-dialog-button:focus-visible,
.lsz-dialog-close:hover,
.lsz-dialog-close:focus-visible {
  outline: 2px solid #f4ca84;
  outline-offset: 2px;
  filter: brightness(1.12);
}

.lsz-save-slot {
  display: grid;
  grid-template-columns: minmax(140px, 44%) 1fr;
  gap: clamp(12px, 2vw, 24px);
  align-items: center;
  padding: clamp(10px, 1.5vw, 16px);
  border: 1px solid rgb(222 178 105 / 0.35);
  border-radius: 12px;
  background: rgb(0 0 0 / 0.22);
}

.lsz-save-slot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

.lsz-save-slot div {
  display: grid;
  gap: 0.65em;
}

.lsz-save-slot strong {
  color: #ffe2ad;
  font-size: clamp(14px, 1.7vw, 20px);
}

.lsz-save-slot span {
  color: #c8bca7;
  font-size: clamp(12px, 1.3vw, 15px);
}

.lsz-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 14px);
}

.lsz-gallery-item {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(222 178 105 / 0.42);
  border-radius: 8px;
  background: #050a10;
  color: #ffe2ad;
  cursor: pointer;
}

.lsz-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 180ms ease;
}

.lsz-gallery-item span {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.66);
  font-size: clamp(9px, 1vw, 12px);
}

.lsz-gallery-item:hover,
.lsz-gallery-item:focus-visible {
  outline: 2px solid #f4ca84;
  outline-offset: -2px;
}

.lsz-gallery-item:hover img {
  transform: scale(1.035);
}

.lsz-gallery-preview {
  display: block;
  width: 100%;
  max-height: min(56vh, 500px);
  object-fit: contain;
  border: 1px solid rgb(222 178 105 / 0.42);
  border-radius: 10px;
  background: #000;
}

@media (max-width: 700px), (max-height: 520px) {
  #lsz-dialog {
    padding: 10px;
  }

  .lsz-dialog-card {
    width: 94%;
    max-height: 92%;
    padding: 14px;
  }

  #lsz-dialog-title {
    margin-bottom: 8px;
  }

  .lsz-dialog-copy {
    margin-bottom: 10px;
  }

  .lsz-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lsz-save-slot {
    grid-template-columns: 1fr;
  }
}
.lsz-resolution-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.9fr);
  gap: clamp(10px, 1.8vw, 20px);
  align-items: center;
  margin: 0 0 clamp(12px, 1.8vw, 20px);
  padding: clamp(11px, 1.4vw, 16px);
  border: 1px solid rgb(222 178 105 / 0.35);
  border-radius: 12px;
  background: rgb(0 0 0 / 0.2);
}

.lsz-resolution-row label {
  color: #ffe2ad;
  font: 600 clamp(13px, 1.55vw, 17px)/1.3 system-ui, sans-serif;
  letter-spacing: 0.04em;
}

.lsz-resolution-select {
  width: 100%;
  min-height: 42px;
  padding: 8px 36px 8px 13px;
  border: 1px solid #d9ab65;
  border-radius: 9px;
  background: #182b3d;
  color: #ffe5b2;
  cursor: pointer;
  font: 600 clamp(13px, 1.45vw, 16px)/1.2 system-ui, sans-serif;
}

.lsz-resolution-select:focus-visible {
  outline: 2px solid #f4ca84;
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .lsz-resolution-row {
    grid-template-columns: 1fr;
  }
}
#lsz-stage[hidden],
#lsz-loader[hidden] {
  display: none;
}

#lsz-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: clamp(20px, 5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgb(35 63 86 / 0.78), transparent 46%),
    linear-gradient(135deg, #050c14, #0a1724 55%, #050a10);
  color: #f6e4bf;
}

#lsz-loader::before,
#lsz-loader::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

#lsz-loader::before {
  inset: clamp(14px, 2.4vw, 36px);
  border: 1px solid rgb(222 178 105 / 0.38);
  box-shadow: inset 0 0 50px rgb(222 178 105 / 0.04);
}

#lsz-loader::after {
  width: min(54vw, 680px);
  height: 1px;
  top: 24%;
  background: linear-gradient(90deg, transparent, #d9ab65 22%, #f4d29a 50%, #d9ab65 78%, transparent);
  opacity: 0.65;
}

.lsz-loader-card {
  position: relative;
  z-index: 1;
  width: min(680px, 86vw);
  padding: clamp(24px, 4vw, 46px);
  box-sizing: border-box;
  border: 1px solid rgb(222 178 105 / 0.58);
  border-radius: clamp(14px, 2vw, 24px);
  background: linear-gradient(145deg, rgb(17 37 55 / 0.94), rgb(6 14 23 / 0.96));
  box-shadow: 0 28px 90px rgb(0 0 0 / 0.62), inset 0 0 42px rgb(222 178 105 / 0.05);
  text-align: center;
}

.lsz-loader-emblem {
  margin-bottom: clamp(8px, 1vw, 14px);
  color: #e4bb76;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  text-shadow: 0 0 22px rgb(228 187 118 / 0.48);
}

#lsz-loader-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: 0.055em;
}

#lsz-loader-detail {
  min-height: 1.5em;
  margin: clamp(12px, 1.8vw, 20px) 0;
  overflow: hidden;
  color: #d6c7ac;
  font-size: clamp(12px, 1.4vw, 16px);
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#lsz-loader-progress {
  display: block;
  width: 100%;
  height: clamp(10px, 1.4vw, 15px);
  overflow: hidden;
  border: 1px solid rgb(222 178 105 / 0.58);
  border-radius: 999px;
  background: #050b12;
  appearance: none;
}

#lsz-loader-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #050b12;
}

#lsz-loader-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #8f6533, #efca86 55%, #fff0bf);
  box-shadow: 0 0 16px rgb(239 202 134 / 0.5);
  transition: width 180ms ease-out;
}

#lsz-loader-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #8f6533, #efca86 55%, #fff0bf);
  box-shadow: 0 0 16px rgb(239 202 134 / 0.5);
}

.lsz-loader-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  color: #aa9f8d;
  font: 500 clamp(11px, 1.25vw, 14px)/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

#lsz-loader-error {
  max-height: 7.5em;
  margin: 18px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgb(232 127 103 / 0.5);
  border-radius: 9px;
  background: rgb(72 18 16 / 0.32);
  color: #ffd2c9;
  font-size: clamp(11px, 1.25vw, 14px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#lsz-loader-retry {
  margin-top: 18px;
  min-width: 180px;
  padding: 11px 24px;
  border: 1px solid #d9ab65;
  border-radius: 999px;
  background: linear-gradient(#425a70, #192b3d);
  color: #ffe5b2;
  cursor: pointer;
  font: 650 clamp(13px, 1.5vw, 17px)/1.2 system-ui, sans-serif;
  letter-spacing: 0.05em;
}

#lsz-loader-retry:hover,
#lsz-loader-retry:focus-visible {
  outline: 2px solid #f4ca84;
  outline-offset: 3px;
  filter: brightness(1.14);
}

@media (max-width: 520px) {
  #lsz-loader {
    padding: 14px;
  }

  #lsz-loader::before {
    inset: 8px;
  }

  .lsz-loader-card {
    width: 94vw;
    padding: 22px 18px;
  }

  #lsz-loader-detail {
    white-space: normal;
  }
}