:root {
  color-scheme: light;
  font-family: "TT Moscow Economy", Arial, sans-serif;
  background: #f5f5f7;
  --app-viewport-height: 100%;
  --page-surface: #f5f5f7;
  --shell-red: #d2072a;
  --shell-text: #2e2e2e;
}

@supports (height: 100dvh) {
  :root {
    --app-viewport-height: 100dvh;
  }
}

:root[data-experience-surface="ar"] {
  color-scheme: dark;
  background: #1f1f1f;
  --page-surface: #1f1f1f;
}

@font-face {
  font-family: "Moscow Sans";
  src: url("ui/moscowsansregular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Moscow Economy";
  src: url("ui/TT-Moscow-Economy-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Moscow Economy";
  src: url("ui/TT-Moscow-Economy-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Moscow Economy";
  src: url("ui/TT-Moscow-Economy-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Moscow Economy";
  src: url("ui/TT-Moscow-Economy-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: var(--app-viewport-height);
  min-height: var(--app-viewport-height);
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--page-surface);
}

body {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.desktop-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  min-width: 100%;
  min-height: var(--app-viewport-height);
  padding: clamp(32px, 5vw, 80px);
  place-items: center;
  overflow: auto;
  color: var(--shell-text);
  background: #f5f5f7;
}

:root[data-client-device="desktop"] .desktop-screen {
  display: grid;
}

:root[data-client-device="desktop"] #webcam-video,
:root[data-client-device="desktop"] #video-canvas,
:root[data-client-device="desktop"] #unity-container,
:root[data-client-device="desktop"] #web-shell,
:root[data-client-device="desktop"] .orientation-lock,
:root[data-client-device="desktop"] .ctaDiv,
:root[data-client-device="desktop"] .share-status {
  display: none !important;
}

.desktop-content {
  display: flex;
  width: min(100%, 760px);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.desktop-logo {
  display: block;
  width: clamp(220px, 16.5vw, 316px);
  height: auto;
}

.desktop-title {
  max-width: 760px;
  margin: clamp(38px, 4.2dvh, 52px) 0 clamp(30px, 3.7dvh, 44px);
  color: var(--shell-text);
  font-size: clamp(38px, 3.4vw, 64px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.desktop-title span {
  display: block;
}

.desktop-qr-link {
  display: block;
  width: clamp(232px, 24dvh, 320px);
  border-radius: 16px;
  color: inherit;
  background: #fff;
  box-shadow: 0 14px 44px rgba(46, 46, 46, 0.1);
}

.desktop-qr-link:focus-visible {
  outline: 4px solid var(--shell-red);
  outline-offset: 6px;
}

.desktop-qrcode {
  display: block;
  padding: 16px;
}

.desktop-qrcode canvas,
.desktop-qrcode img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

#unity-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--app-viewport-height);
}

#unity-canvas,
#video-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#unity-canvas {
  background: #231F20;
}

#video-canvas {
  object-fit: cover;
}

#webcam-video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.web-shell {
  position: fixed;
  inset: 0;
  height: var(--app-viewport-height);
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f5f5f7;
}

.web-shell.is-hidden {
  display: none;
}

.orientation-lock {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  min-width: 100%;
  min-height: var(--app-viewport-height);
  padding:
    max(1.5rem, env(safe-area-inset-top))
    max(1.5rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(1.5rem, env(safe-area-inset-left));
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--shell-text);
  background: #f5f5f7;
  touch-action: none;
}

.orientation-lock-content {
  max-width: 42rem;
  text-align: center;
}

.orientation-lock-title,
.orientation-lock-description {
  margin: 0;
}

.orientation-lock-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.orientation-lock-title:focus {
  outline: none;
}

.orientation-lock-description {
  margin-top: 1rem;
  font-size: clamp(1rem, 2vw, 1.375rem);
  line-height: 1.4;
  text-wrap: pretty;
}

@media (orientation: landscape) {
  :root[data-client-device="mobile"] .orientation-lock {
    display: grid;
  }
}

@media (max-height: 700px) and (min-width: 769px) {
  .desktop-screen {
    padding-block: 24px;
  }

  .desktop-logo {
    width: 210px;
  }

  .desktop-title {
    margin-block: 24px;
    font-size: 38px;
  }

  .desktop-qr-link {
    width: 220px;
  }
}

.web-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  container-type: inline-size;
  background: #f5f5f7 url("ui/bg.png") center / cover no-repeat;
}

.web-screen {
  position: absolute;
  inset: 0;
  color: var(--shell-text);
}

.web-logo {
  position: absolute;
  left: 6.667cqw;
  top: min(24.615cqw, 11.374dvh);
  width: min(40.513cqw, 18.720dvh);
  height: min(11.538cqw, 5.332dvh);
  object-fit: contain;
  object-position: left center;
}

.web-title {
  position: absolute;
  left: 6.154cqw;
  top: min(43.333cqw, 20.024dvh);
  width: 76.410cqw;
  margin: 0;
  color: var(--shell-text);
  font-size: min(12.308cqw, 5.687dvh);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.web-title[tabindex="-1"]:focus {
  outline: none;
}

.web-copy {
  position: absolute;
  left: 6.154cqw;
  top: min(75.128cqw, 34.716dvh);
  width: 87.692cqw;
  margin: 0;
  color: var(--shell-text);
  font-size: min(5.128cqw, 2.370dvh);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.web-character {
  position: absolute;
  left: 50%;
  display: block;
  object-fit: contain;
  object-position: center;
  transform: translateX(-50%);
  user-select: none;
  pointer-events: none;
}

.welcome-character {
  top: calc(min(111.026cqw, 51.303dvh) + 3.077cqw);
  width: min(56.667cqw, 26.185dvh);
  height: min(102.308cqw, 47.275dvh);
}

.welcome-caption {
  position: absolute;
  left: 6.154cqw;
  right: 6.154cqw;
  bottom: max(29.231cqw, calc(env(safe-area-inset-bottom) + 22.564cqw));
  z-index: 3;
  margin: 0;
  padding: min(3.590cqw, 1.659dvh) min(5.128cqw, 2.370dvh);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: min(5.128cqw, 2.370dvh);
  color: #fff;
  background: rgba(20, 20, 24, 0.84);
  font-size: min(4.359cqw, 2.014dvh);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-wrap: pretty;
  pointer-events: none;
}

.camera-character {
  top: calc(min(107.949cqw, 49.882dvh) + 3.077cqw);
  width: min(58.205cqw, 26.896dvh);
  height: min(105.128cqw, 48.578dvh);
}

.sound-title {
  position: absolute;
  left: 6.154cqw;
  top: min(43.333cqw, 20.024dvh);
  width: 76.410cqw;
  margin: 0;
  color: var(--shell-text);
  font-size: min(12.308cqw, 5.687dvh);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.sound-title[tabindex="-1"]:focus {
  outline: none;
}

.sound-description {
  position: absolute;
  left: 6.154cqw;
  top: min(75.128cqw, 34.716dvh);
  width: 87.692cqw;
  margin: 0;
  color: var(--shell-text);
  font-size: min(5.128cqw, 2.370dvh);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.sound-character {
  top: min(107.949cqw, 49.882dvh);
  width: min(58.205cqw, 26.896dvh);
  height: min(105.128cqw, 48.578dvh);
}

.sound-character-mask {
  height: min(42.308cqw, 19.550dvh);
}

.sound-action {
  bottom: max(9.487cqw, env(safe-area-inset-bottom));
}

.shared-result-copy {
  position: absolute;
  left: 6.154cqw;
  top: min(43.333cqw, 20.024dvh);
  width: 87.692cqw;
  color: var(--shell-text);
}

.shared-result-title,
.shared-result-score,
.shared-result-description {
  margin: 0;
}

.shared-result-title,
.shared-result-score {
  font-size: min(10.256cqw, 4.739dvh);
  line-height: 1;
}

.shared-result-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.shared-result-score {
  margin-top: min(7.179cqw, 3.318dvh);
  color: #ca001d;
  font-weight: 800;
}

.shared-result-description {
  margin-top: min(7.179cqw, 3.318dvh);
  font-size: min(5.128cqw, 2.370dvh);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.result-character {
  top: min(132.051cqw, 61.019dvh);
  width: min(41.538cqw, 19.194dvh);
  height: min(74.872cqw, 34.597dvh);
}

.result-character-mask {
  height: min(42.308cqw, 19.550dvh);
}

.result-action {
  bottom: max(9.487cqw, env(safe-area-inset-bottom));
}

.character-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  height: min(42.308cqw, 19.550dvh);
  user-select: none;
  pointer-events: none;
}

.web-action {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  left: 6.154cqw;
  right: 6.154cqw;
  bottom: max(6.154cqw, env(safe-area-inset-bottom));
  z-index: 3;
  height: 16.923cqw;
  padding: 0 min(5.128cqw, 2.370dvh);
  border: 0;
  border-radius: 5.897cqw;
  color: #fff;
  background: transparent url("ui/Variant2.png") center / 100% 100% no-repeat;
  box-shadow: none;
  font-family: "Moscow Sans", "TT Moscow Economy", Arial, sans-serif;
  font-size: 5.128cqw;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  cursor: pointer;
  touch-action: manipulation;
}

.web-action:focus-visible {
  outline: 3px solid var(--shell-red);
  outline-offset: 3px;
}

.web-action:active:not(:disabled) {
  transform: scale(0.985);
}

.web-action:disabled {
  cursor: wait;
  color: #fff;
  background-image: url("ui/Default.png");
}

.camera-action {
  --loading-progress-remaining: 100%;
  overflow: hidden;
  font-size: 5.128cqw;
}

.web-action-progress {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  background: transparent url("ui/Variant2.png") center / 100% 100% no-repeat;
  -webkit-clip-path: inset(0 var(--loading-progress-remaining) 0 0);
  clip-path: inset(0 var(--loading-progress-remaining) 0 0);
  transition: -webkit-clip-path 0.25s ease-out, clip-path 0.25s ease-out;
  pointer-events: none;
}

.camera-action.is-loading .web-action-progress {
  display: block;
}

.web-action-label {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.permission-error {
  position: absolute;
  left: 6.15cqw;
  right: 6.15cqw;
  bottom: min(28cqw, 12.938dvh);
  z-index: 4;
  margin: 0;
  color: var(--shell-red);
  font-size: min(4.1cqw, 1.895dvh);
  line-height: 1.2;
}

.error-title {
  top: min(43.333cqw, 20.024dvh);
  font-size: min(10.892cqw, 5.033dvh);
}

.error-copy {
  top: min(72.051cqw, 33.294dvh);
}

.error-character {
  top: min(93.590cqw, 43.246dvh);
  width: min(87.692cqw, 40.521dvh);
  height: min(118.462cqw, 54.739dvh);
}

#forbidden-screen .character-mask,
#not-found-screen .character-mask {
  height: min(50.769cqw, 23.460dvh);
}

#unity-loading-bar {
  display: none;
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: max(5%, env(safe-area-inset-top));
  z-index: 90;
  display: none;
  width: min(90%, 720px);
  transform: translateX(-50%);
  color: #222;
  background: #fff;
  padding: 10px;
}

.ctaDiv {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(47, 46, 50, 0.82);
  transition: opacity 0.25s ease;
}

.share-status {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 120;
  max-width: calc(100% - 48px);
  margin: 0;
  padding: 10px 16px;
  border-radius: 18px;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(46, 46, 46, 0.94);
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
}

.feedback-close:focus-visible,
.feedback-score-option input:focus-visible + span,
.feedback-age-select:focus-visible,
.feedback-submit:focus-visible,
.feedback-later:focus-visible {
  outline: 3px solid var(--shell-red);
  outline-offset: 3px;
}

.feedback-dialog {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  background: rgba(26, 25, 29, 0.72);
}

.feedback-dialog[hidden] {
  display: none !important;
}

.feedback-backdrop {
  position: fixed;
  inset: 0;
}

.feedback-card {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: var(--app-viewport-height);
  margin: 0;
  padding: 28px 24px max(20px, env(safe-area-inset-bottom));
  overflow: auto;
  border-radius: 24px 24px 0 0;
  color: var(--shell-text);
  background: #fff;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.2);
  animation: feedback-sheet-in 260ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

@keyframes feedback-sheet-in {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.feedback-step[hidden],
.feedback-actions button[hidden] {
  display: none !important;
}

.feedback-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #55545a;
  background: #f2f2f4;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.feedback-title {
  margin: 0;
  padding-right: 36px;
  font-size: clamp(24px, 5.6vw, 30px);
  font-weight: 700;
  line-height: 1.1;
}

.feedback-description {
  margin: 8px 0 10px;
  color: #66656b;
  font-size: 15px;
  line-height: 1.4;
}

.feedback-progress {
  margin: 0 0 18px;
  color: #77767d;
  font-size: 13px;
  line-height: 1.3;
}

.feedback-question {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.feedback-question legend {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.feedback-score-scale {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.feedback-score-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.feedback-score-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.feedback-score-option span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid #dedee2;
  border-radius: 12px;
  color: #333238;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.feedback-score-option input:checked + span {
  border-color: var(--shell-red);
  color: #fff;
  background: var(--shell-red);
}

.feedback-scale-hint {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
  color: #77767d;
  font-size: 12px;
  line-height: 1.3;
}

.feedback-scale-hint span:nth-child(2) {
  text-align: center;
}

.feedback-scale-hint span:last-child {
  text-align: right;
}

.feedback-age-field {
  margin: 0 0 20px;
}

.feedback-age-label {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.feedback-age-select {
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid #dedee2;
  border-radius: 12px;
  color: #333238;
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.feedback-error {
  margin: 0 0 14px;
  color: var(--shell-red);
  font-size: 14px;
  line-height: 1.35;
}

.feedback-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.feedback-actions button {
  flex: 1 1 0;
  width: auto;
}

.feedback-submit,
.feedback-later {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.feedback-submit {
  border: 0;
  color: #fff;
  background: var(--shell-red);
}

.feedback-submit:disabled {
  cursor: not-allowed;
  color: #77767d;
  background: #e7e7ea;
}

.feedback-later {
  border: 1px solid #dedee2;
  color: #333238;
  background: #fff;
}

.feedback-success {
  padding: 28px 0 0;
  text-align: center;
}

.feedback-success .feedback-title {
  padding: 0;
}

.feedback-success .feedback-submit {
  margin-top: 24px;
}

:root[data-client-device="desktop"] .feedback-dialog {
  display: none !important;
}

@media (max-width: 420px) {
  .feedback-card {
    padding: 24px 20px max(20px, env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }

  .feedback-score-scale {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
