:root {
  color-scheme: dark;
  --ink: #f7f4eb;
  --ink-muted: rgba(247, 244, 235, 0.68);
  --panel: rgba(9, 12, 10, 0.48);
  --panel-strong: rgba(9, 12, 10, 0.74);
  --line: rgba(255, 255, 255, 0.24);
  --shadow: rgba(0, 0, 0, 0.34);
  --scene-media-width: max(106vw, calc(106vh * 16 / 9));
  --scene-media-height: max(106vh, calc(106vw * 9 / 16));
  --house-roof-tip-x-offset: -48%;
}

@supports (height: 100svh) {
  :root {
    --scene-media-width: max(106vw, calc(106svh * 16 / 9));
    --scene-media-height: max(106svh, calc(106vw * 9 / 16));
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #101411;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.experience {
  position: fixed;
  inset: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  outline: none;
  background: #101411;
}

.experience::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0) 28%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0) 34%);
}

.loading-video,
.scene-video,
.fallback-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--scene-media-width);
  height: var(--scene-media-height);
  object-fit: cover;
  object-position: 50% 50%;
  transform: translate3d(var(--house-roof-tip-x-offset), -50%, 0);
  user-select: none;
  pointer-events: none;
}

.experience[data-media-profile="portrait"] .loading-video,
.experience[data-media-profile="portrait"] .scene-video,
.experience[data-media-profile="portrait"] .fallback-image {
  object-position: 50% 50%;
}

.experience[data-media-profile="mobile"] .loading-video,
.experience[data-media-profile="mobile"] .scene-video,
.experience[data-media-profile="mobile"] .fallback-image {
  object-position: 50% 50%;
}

.experience[data-media-profile="tablet"] .loading-video,
.experience[data-media-profile="tablet"] .scene-video,
.experience[data-media-profile="tablet"] .fallback-image {
  object-position: 50% 50%;
}

.experience[data-media-profile="desktop"] .loading-video,
.experience[data-media-profile="desktop"] .scene-video,
.experience[data-media-profile="desktop"] .fallback-image {
  object-position: 50% 50%;
}

.loading-video {
  z-index: 3;
  opacity: 0;
  background: #e9e3d4;
  filter: saturate(0.2) contrast(1.12) brightness(1.04);
  transition: opacity 900ms ease;
}

.experience.is-loading-context .loading-video {
  opacity: 1;
}

.scene-video {
  z-index: 1;
  opacity: 0;
  filter: saturate(1.03) contrast(1.02);
  transition: opacity 720ms ease;
}

.scene-video.is-visible {
  opacity: 1;
}

.fallback-image {
  z-index: 0;
  opacity: 1;
}

.experience.is-still .scene-video {
  opacity: 0;
}

.brand {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(2.5rem, 3.375vw, 3.2rem);
  font-weight: 380;
  letter-spacing: 0.05em;
}

.action-glass {
  --lg-bg-color: rgba(255, 255, 255, 0.25);
  --lg-text: #ffffff;
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 9;
  display: flex;
  width: max-content;
  min-height: 48px;
  max-width: calc(100vw - 96px);
  margin-inline: auto;
  border-radius: 999px;
  color: var(--lg-text);
  background: transparent;
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);
}

.action-glass:hover {
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.22);
}

.action-glass__filter,
.action-glass__overlay,
.action-glass__specular {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.action-glass__filter {
  z-index: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  filter: url("#lg-dist");
  isolation: isolate;
}

.action-glass__overlay {
  z-index: 1;
  background: var(--lg-bg-color);
}

.action-glass__specular {
  z-index: 2;
  overflow: hidden;
}

.action-glass__content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  pointer-events: auto;
}

.action-glass__button {
  min-width: 82px;
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: var(--lg-text);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 520;
  letter-spacing: 0;
  cursor: pointer;
  pointer-events: auto;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);
}

.action-glass[data-glass="webgl"] .action-glass__filter,
.action-glass[data-glass="webgl"] .action-glass__specular,
.action-glass[data-glass="webgl"] .action-glass__svg {
  display: none;
}

.action-glass__button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.96);
}

.action-glass__button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 2px;
}

.action-glass__svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.action-modal-root {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 7;
  min-width: 320px;
  padding:
    max(18px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  pointer-events: none;
}

.action-modal-root[hidden] {
  display: none;
}

.action-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 6, 5, 0.46);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 240ms ease;
}

.action-modal-root[data-state="open"] .action-modal__backdrop,
.action-modal-root[data-state="switching"] .action-modal__backdrop {
  opacity: 1;
}

.action-dialog {
  position: relative;
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  z-index: 1;
  width: min(92vw, 420px);
  max-height: calc(100vh - 36px);
  max-height: calc(100svh - 36px);
  overflow: visible;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.955);
  transform-origin: center center;
  transition:
    opacity 230ms ease,
    filter 230ms ease,
    transform 320ms cubic-bezier(0.2, 0.92, 0.22, 1);
  will-change: opacity, filter, transform;
  pointer-events: none;
}

.action-dialog[hidden] {
  display: none;
}

.action-dialog[data-state="active"] {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.action-dialog[data-state="exiting"] {
  transform: scale(0.965);
}

.action-dialog__content {
  position: relative;
  max-height: inherit;
  overflow: auto;
  padding: 0;
  pointer-events: auto;
}

.action-dialog:not([data-state="active"]) .action-dialog__content {
  pointer-events: none;
}

.action-form {
  --action-control-inline-padding: 16px;
  display: grid;
  gap: 12px;
}

.action-form > * {
  transform-origin: center center;
}

.action-dialog[data-state="entering"] .action-form > * {
  opacity: 0;
  transform: scale(0.96);
}

.action-dialog[data-state="active"] .action-form > * {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.2, 0.92, 0.22, 1);
}

.action-dialog[data-state="exiting"] .action-form > * {
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 150ms ease,
    transform 180ms ease-out;
}

.action-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.action-purpose {
  display: grid;
  min-height: 138px;
}

.action-purpose__panel {
  grid-area: 1 / 1;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    visibility 0ms linear 180ms;
}

.action-purpose__panel[data-state="active"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0ms;
}

.action-field > span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.42);
}

.action-field input,
.action-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 22px;
  color: var(--ink);
  background: rgba(9, 12, 10, 0.38);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  font: inherit;
  font-size: 1.18rem;
  line-height: 1.32;
}

.action-field input {
  min-height: 52px;
  padding: 12px var(--action-control-inline-padding);
}

.action-field input::placeholder,
.action-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
  opacity: 1;
}

.action-field textarea {
  height: 138px;
  padding: 14px var(--action-control-inline-padding);
  resize: none;
}

.action-field input:focus,
.action-field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.file-field {
  position: relative;
  min-height: 138px;
}

.file-field__input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-dropper {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 138px;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.38);
  border-radius: 22px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(9, 12, 10, 0.34);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  text-align: center;
}

.file-dropper strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1.18rem;
  font-weight: 560;
  letter-spacing: 0;
}

.file-field.is-dragging .file-dropper,
.file-field__input:focus-visible + .file-dropper {
  outline: none;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(26, 31, 28, 0.5);
}

.action-form__feedback {
  min-height: 20px;
  margin: 0;
  padding-inline: var(--action-control-inline-padding);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  line-height: 1.35;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.42);
}

.action-form__feedback[data-status="error"] {
  color: #ffb3a6;
}

.action-form__feedback[data-status="success"] {
  color: rgba(255, 255, 255, 0.9);
}

.action-submit {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 6px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  font-size: 0.94rem;
  font-weight: 620;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    transform 160ms ease-out;
}

.action-submit:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: scale(0.98);
}

.action-submit:focus-visible {
  outline: none;
}

.action-form[data-state="submitting"] .action-submit,
.action-form[data-state="submitting"] .file-dropper,
.action-form[data-state="submitting"] input:not(.file-field__input),
.action-form[data-state="submitting"] textarea {
  cursor: progress;
  opacity: 0.7;
}

.file-field__input:disabled {
  cursor: progress;
}

.form-honeypot {
  display: none;
}

.controls {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 12;
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 10px 32px var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.icon-button:hover {
  background: var(--panel-strong);
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.icon-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.is-active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(28, 34, 30, 0.68);
}

.debug-panel {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  top: max(18px, env(safe-area-inset-top));
  z-index: 10;
  min-width: 280px;
  max-width: min(520px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(4, 6, 5, 0.64);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

@supports (height: 100dvh) {
  .experience {
    min-height: 100dvh;
    height: 100dvh;
  }

  .debug-panel {
    max-height: calc(100dvh - 36px);
  }

  .action-dialog {
    max-height: calc(100dvh - 36px);
  }
}

.debug-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  line-height: 1.25;
}

.debug-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.debug-controls span {
  color: rgba(255, 255, 255, 0.62);
}

.debug-controls select,
.debug-controls input {
  width: 100%;
  min-height: 32px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(9, 12, 10, 0.76);
  font: inherit;
}

.debug-controls select:focus,
.debug-controls input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 1px;
}

.debug-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  grid-column: 1 / -1;
}

.debug-actions button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(20, 25, 22, 0.88);
  cursor: pointer;
}

.debug-actions button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(35, 43, 38, 0.92);
}

.debug-output {
  margin: 0;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .icon-button {
    width: 40px;
    height: 40px;
  }

  .brand {
    font-size: 2.4rem;
  }

  .debug-controls {
    grid-template-columns: 1fr;
  }

  .action-dialog__content {
    padding: 22px 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-video,
  .scene-video {
    opacity: 0;
    transition: none;
  }

  .fallback-image {
    z-index: 1;
  }

  .icon-button {
    transition: none;
  }

  .action-glass,
  .action-glass__button,
  .action-dialog,
  .action-modal__backdrop,
  .action-form > *,
  .action-purpose__panel,
  .action-submit {
    transition: none;
  }
}

.review-body {
  min-width: 320px;
  min-height: 100%;
  height: auto;
  overflow: auto;
  background: #101411;
}

.review-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
}

.review-header h1 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.review-summary {
  margin: 6px 0 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.review-actions,
.review-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.review-link,
.review-button {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  font-size: 0.86rem;
  cursor: pointer;
}

.review-link:hover,
.review-button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.1);
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.54fr);
  gap: 18px;
  align-items: start;
}

.review-matrix-wrap {
  overflow: auto;
  padding-bottom: 4px;
}

.review-matrix {
  display: grid;
  grid-template-columns: minmax(104px, 0.7fr) repeat(var(--weather-count), minmax(118px, 1fr));
  min-width: 840px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
}

.matrix-header,
.matrix-cell {
  min-height: 68px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.matrix-header {
  display: grid;
  align-items: center;
  padding: 10px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.matrix-header.is-row {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.matrix-cell {
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
}

.matrix-cell:hover,
.matrix-cell.is-selected {
  background: rgba(255, 255, 255, 0.1);
}

.matrix-cell.is-selected {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.56);
}

.matrix-cell-label {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
}

.matrix-cell-status,
.review-status {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.matrix-cell-status,
.review-status.is-pending {
  color: #d8d4c9;
  background: rgba(255, 255, 255, 0.12);
}

.matrix-cell.is-ready .matrix-cell-status,
.review-status.is-ready {
  color: #101411;
  background: #95d7a6;
}

.review-inspector {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.preview-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #050706;
  aspect-ratio: 16 / 9;
}

.review-video,
.review-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-detail {
  display: grid;
  gap: 13px;
}

.review-status {
  margin: 0 0 8px;
}

.review-detail h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.review-meta {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
  font-size: 0.86rem;
}

.review-meta dt {
  color: var(--ink-muted);
}

.review-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.review-prompt {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .review-layout {
    grid-template-columns: 1fr;
  }

  .review-inspector {
    position: static;
  }
}

@media (max-width: 640px) {
  .review-shell {
    padding: 14px;
  }

  .review-header {
    display: grid;
  }
}
