:root {
  --ink: #f7f4ee;
  --muted: rgba(247, 244, 238, 0.68);
  --panel: rgba(12, 16, 22, 0.72);
  --panel-strong: rgba(12, 16, 22, 0.88);
  --line: rgba(255, 255, 255, 0.16);
  --gold: #d9b36c;
  --teal: #4fc3b3;
  --rose: #d96f7f;
  --blue: #78a8ff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #07090d;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #07090d;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  gap: 18px;
  align-content: center;
  background:
    linear-gradient(rgba(7, 9, 13, 0.62), rgba(7, 9, 13, 0.86)),
    radial-gradient(circle at 30% 24%, rgba(79, 195, 179, 0.16), transparent 28%),
    #07090d;
  transition: opacity 500ms ease, visibility 500ms ease;
}

.loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading__mark,
.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 179, 108, 0.64);
  color: var(--gold);
  font-weight: 800;
  background: rgba(0, 0, 0, 0.24);
}

.loading__copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.loading__copy span {
  color: var(--muted);
  font-size: 13px;
}

.loading__copy strong {
  font-size: 18px;
}

.loading__bar {
  width: min(360px, 64vw);
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.loading__bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--rose));
  transition: width 220ms ease;
}

.start {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  padding: clamp(22px, 4vw, 56px);
  pointer-events: none;
  transition: opacity 400ms ease, transform 400ms ease, visibility 400ms ease;
}

.start.is-hidden {
  opacity: 0;
  transform: translateY(16px);
  visibility: hidden;
}

.start__content {
  max-width: 560px;
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

.start__content p:not(.eyebrow) {
  max-width: 440px;
  margin-bottom: 22px;
  color: rgba(247, 244, 238, 0.82);
  font-size: 16px;
  line-height: 1.55;
}

.start__how {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.start__how span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(247, 244, 238, 0.76);
  background: rgba(0, 0, 0, 0.34);
  font-size: 12px;
  font-weight: 700;
}

.primary-action {
  min-width: 128px;
  min-height: 48px;
  border: 0;
  color: #07100f;
  background: var(--teal);
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  background: #73d9cb;
}

.start__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.developer-tools {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.secondary-action {
  min-width: 128px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(12, 16, 22, 0.72);
  font-weight: 800;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.secondary-action:hover {
  border-color: rgba(79, 195, 179, 0.72);
  color: var(--teal);
  transform: translateY(-1px);
}

.is-showcase .secondary-action {
  display: none;
}

.is-dev .developer-tools {
  display: flex;
}

.is-client-demo-clean .start__how,
.is-client-demo-clean .start__actions .secondary-action,
.is-client-demo-clean .developer-tools {
  display: none;
}

.is-client-demo-clean .start__content {
  max-width: 640px;
}

.is-client-demo-clean .primary-action {
  min-width: 178px;
}

.is-showcase .developer-tools {
  display: none;
}

.developer-tools .secondary-action {
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  color: rgba(247, 244, 238, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.primary-action--link,
.secondary-action--compact {
  min-width: 0;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
}

.primary-action--link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.unity-shell {
  background: #07090d;
}

.unity-embed {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #07090d;
}

.unity-embed__bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.unity-embed__brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.unity-embed__brand strong,
.unity-embed__brand small {
  display: block;
}

.unity-embed__brand strong {
  font-size: 15px;
}

.unity-embed__brand small {
  color: var(--muted);
  font-size: 12px;
}

.unity-embed__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.unity-embed__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #07090d;
}

.hud {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.hud--top {
  top: 18px;
  left: 18px;
  right: 18px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--panel);
  pointer-events: auto;
}

.segment {
  min-width: 42px;
  height: 34px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.segment.is-active {
  color: #08100f;
  background: var(--teal);
}

.help-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  font-size: 16px;
  font-weight: 800;
  pointer-events: auto;
}

.help-panel {
  position: fixed;
  top: 78px;
  right: 18px;
  z-index: 14;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(360px, calc(100vw - 36px));
}

.help-panel[hidden] {
  display: none;
}

.help-panel span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(247, 244, 238, 0.84);
  background: rgba(7, 9, 13, 0.78);
  backdrop-filter: blur(14px);
  font-size: 11px;
  font-weight: 800;
}

.guide-panel {
  position: fixed;
  right: 18px;
  top: 78px;
  z-index: 12;
  width: min(360px, calc(100vw - 36px));
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.guide-panel__scroll {
  display: contents;
}

.is-prestart .guide-panel,
.is-prestart .hotspot-list,
.is-prestart .hud--bottom {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.guide-panel__avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(79, 195, 179, 0.24), rgba(217, 179, 108, 0.16));
}

.guide-panel__avatar span {
  width: 22px;
  height: 28px;
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(180deg, #f1d8b8, #d79f8d);
  box-shadow: 0 0 20px rgba(79, 195, 179, 0.25);
}

.guide-panel__copy {
  min-width: 0;
}

.guide-panel h2 {
  margin-bottom: 7px;
  font-size: 18px;
  letter-spacing: 0;
}

.guide-panel p:not(.eyebrow) {
  margin-bottom: 0;
  color: rgba(247, 244, 238, 0.76);
  font-size: 13px;
  line-height: 1.5;
}

.route-controls {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.route-status {
  margin: 0;
  color: rgba(247, 244, 238, 0.64);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.route-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.route-button {
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.route-button:hover {
  border-color: rgba(79, 195, 179, 0.7);
  color: var(--teal);
  transform: translateY(-1px);
}

.route-button--primary {
  border-color: rgba(79, 195, 179, 0.5);
  color: #07100f;
  background: var(--teal);
}

.route-button--primary:hover {
  color: #07100f;
  background: #73d9cb;
}

.ask-context {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(79, 195, 179, 0.22);
  background: rgba(79, 195, 179, 0.08);
  padding: 10px;
}

.ask-context span,
.ask-suggestion {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ask-context span {
  color: var(--teal);
}

.ask-context strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.ask-context p {
  margin: 0;
  color: rgba(247, 244, 238, 0.62);
  font-size: 11px;
  line-height: 1.38;
}

.runtime-status {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 6px;
}

.is-dev .runtime-status,
.has-diagnostics .runtime-status {
  display: grid;
}

.runtime-status div {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  padding: 7px 8px;
}

.runtime-status span,
.runtime-status strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-status span {
  color: rgba(247, 244, 238, 0.54);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.runtime-status strong {
  margin-top: 3px;
  color: var(--teal);
  font-size: 11px;
  line-height: 1.15;
}

.runtime-status[data-state="degraded"] strong {
  color: var(--gold);
}

.runtime-status[data-state="offline"] strong,
.runtime-status[data-state="error"] strong {
  color: var(--rose);
}

.runtime-health-card {
  position: relative;
}

.runtime-status[data-demo-readiness="green"] .runtime-health-card {
  border-color: rgba(92, 214, 169, 0.34);
  background: rgba(92, 214, 169, 0.1);
}

.runtime-status[data-demo-readiness="green"] .runtime-health-card strong {
  color: #7ee3bd;
}

.runtime-status[data-demo-readiness="yellow"] .runtime-health-card {
  border-color: rgba(240, 162, 106, 0.36);
  background: rgba(240, 162, 106, 0.11);
}

.runtime-status[data-demo-readiness="yellow"] .runtime-health-card strong {
  color: var(--gold);
}

.runtime-status[data-demo-readiness="red"] .runtime-health-card {
  border-color: rgba(255, 122, 122, 0.42);
  background: rgba(255, 122, 122, 0.1);
}

.runtime-status[data-demo-readiness="red"] .runtime-health-card strong {
  color: var(--rose);
}

.runtime-health-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
}

.runtime-check-button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(247, 244, 238, 0.82);
  background: rgba(255, 255, 255, 0.07);
  min-height: 24px;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.runtime-check-button:hover,
.runtime-check-button:focus-visible {
  color: #fff;
  border-color: rgba(143, 183, 255, 0.45);
  background: rgba(143, 183, 255, 0.16);
}

.runtime-check-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ask-suggestions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ask-suggestion {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(247, 244, 238, 0.78);
  background: rgba(255, 255, 255, 0.06);
  padding: 7px 9px;
  text-align: left;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.ask-suggestion:hover,
.ask-suggestion:focus-visible {
  border-color: rgba(217, 179, 108, 0.62);
  color: var(--gold);
  background: rgba(217, 179, 108, 0.08);
}

.ask {
  grid-column: 1 / -1;
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  margin-top: 0;
  padding-top: 6px;
  background: linear-gradient(180deg, rgba(13, 16, 20, 0), var(--panel) 34%);
}

.ask input {
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  padding: 0 10px;
  outline: 0;
}

.ask input:focus {
  border-color: rgba(79, 195, 179, 0.7);
}

.ask button {
  height: 38px;
  border: 0;
  color: #09100f;
  background: var(--gold);
  font-weight: 800;
}

.hotspot-list {
  position: fixed;
  left: 264px;
  bottom: 66px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 112px));
  gap: 8px;
  max-width: min(360px, calc(100vw - 662px));
}

.hotspot-card {
  width: 100%;
  min-height: 54px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  padding: 10px;
  text-align: left;
  backdrop-filter: blur(16px);
}

.hotspot-card span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.hotspot-card strong {
  font-size: 13px;
}

.hotspot-card.is-active {
  border-color: rgba(79, 195, 179, 0.72);
  background: rgba(15, 42, 42, 0.82);
}

.minimap {
  position: fixed;
  left: 18px;
  bottom: 66px;
  z-index: 12;
  width: 220px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 13, 18, 0.78);
  backdrop-filter: blur(16px);
}

.is-prestart .minimap {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.minimap__head {
  display: grid;
  gap: 3px;
}

.minimap__head .eyebrow {
  margin-bottom: 0;
}

.minimap__head strong {
  font-size: 14px;
}

.minimap__head span {
  color: rgba(247, 244, 238, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.minimap__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 220 / 180;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    radial-gradient(circle at 50% 18%, rgba(120, 168, 255, 0.16), transparent 26%),
    rgba(7, 10, 15, 0.9);
}

.minimap__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.minimap__route {
  fill: none;
  stroke: rgba(217, 179, 108, 0.52);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 7 5;
}

.mini-stop {
  position: absolute;
  min-width: 58px;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 1px;
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(247, 244, 238, 0.84);
  background: rgba(9, 12, 17, 0.88);
  font-size: 10px;
  line-height: 1.15;
}

.mini-stop strong {
  font-size: 11px;
}

.mini-stop.is-current {
  border-color: rgba(120, 168, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(120, 168, 255, 0.28);
}

.mini-stop.is-next {
  border-color: rgba(79, 195, 179, 0.62);
  box-shadow: 0 0 0 1px rgba(79, 195, 179, 0.22);
}

.mini-marker {
  position: absolute;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.mini-marker--player {
  border: 2px solid #05080c;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(217, 179, 108, 0.52);
}

.mini-marker--anna {
  border: 2px solid #05100f;
  background: var(--teal);
  box-shadow: 0 0 16px rgba(79, 195, 179, 0.42);
}

.mini-marker__arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 14px;
  transform-origin: 50% 78%;
  translate: -50% -100%;
  background: linear-gradient(180deg, rgba(247, 244, 238, 0.96), rgba(247, 244, 238, 0.12));
}

.mini-marker__arrow::before {
  position: absolute;
  left: 50%;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(247, 244, 238, 0.96);
  border-left: 2px solid rgba(247, 244, 238, 0.96);
  transform: translateX(-50%) rotate(45deg);
  content: "";
}

.hud--bottom {
  left: 18px;
  right: 18px;
  bottom: 16px;
  flex-wrap: wrap;
}

.control-hint {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(247, 244, 238, 0.72);
  background: rgba(0, 0, 0, 0.36);
  font-size: 12px;
}

.studio-panel {
  position: fixed;
  left: 18px;
  top: 78px;
  z-index: 32;
  width: min(360px, calc(100vw - 36px));
  max-height: calc(100vh - 164px);
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(217, 179, 108, 0.32);
  background: rgba(10, 13, 18, 0.9);
  backdrop-filter: blur(16px);
}

.studio-panel__header {
  display: grid;
  gap: 2px;
}

.studio-panel__header span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.studio-panel__header strong {
  font-size: 16px;
}

.studio-panel label {
  display: grid;
  gap: 5px;
  color: rgba(247, 244, 238, 0.72);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.studio-panel input,
.studio-panel select,
.studio-panel textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  padding: 9px;
  outline: 0;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-transform: none;
}

.studio-panel textarea {
  resize: vertical;
}

.studio-panel input:focus,
.studio-panel select:focus,
.studio-panel textarea:focus {
  border-color: rgba(217, 179, 108, 0.72);
}

.studio-panel__actions {
  display: grid;
  grid-template-columns: 1fr 1fr 0.72fr;
  gap: 7px;
}

.studio-panel__actions--package {
  grid-template-columns: 1fr 1fr;
}

.studio-panel__actions button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 800;
}

.studio-panel__actions button:first-child {
  color: #07100f;
  background: var(--gold);
}

.studio-panel__actions button[data-running="true"] {
  color: #07100f;
  background: var(--rose);
}

.studio-panel__progress {
  height: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.studio-panel__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 180ms ease;
}

.studio-panel__progress[data-state="ready"] span {
  background: var(--teal);
}

.studio-panel__progress[data-state="cancelled"] span,
.studio-panel__progress[data-state="stopped"] span {
  background: var(--rose);
}

.studio-panel__job {
  margin: 6px 0 0;
  color: rgba(247, 244, 238, 0.66);
  font-size: 11px;
  line-height: 1.35;
}

.studio-panel__job[data-state="ready"] {
  color: rgba(130, 220, 197, 0.95);
}

.studio-panel__job[data-state="failed"] {
  color: rgba(255, 156, 165, 0.95);
}

.studio-file-input {
  display: none;
}

.studio-panel__status {
  margin: 0;
  color: rgba(247, 244, 238, 0.66);
  font-size: 11px;
  line-height: 1.35;
}

.studio-panel__status[data-state="saved"] {
  color: var(--teal);
}

.studio-panel__status[data-state="error"] {
  color: var(--rose);
}

[dir="rtl"] .guide-panel {
  right: auto;
  left: 18px;
}

[dir="rtl"] .help-panel {
  right: auto;
  left: 18px;
}

[dir="rtl"] .hotspot-list {
  left: auto;
  right: 264px;
}

[dir="rtl"] .minimap {
  left: auto;
  right: 18px;
}

.mobile-move-controls {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --mobile-edge: 12px;
    --mobile-safe-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    --mobile-guide-height: min(45vh, 380px);
  }

  .hud--top {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .segment,
  .help-toggle {
    min-width: 44px;
    height: 44px;
  }

  .guide-panel {
    top: auto;
    right: var(--mobile-edge);
    left: var(--mobile-edge);
    bottom: var(--mobile-safe-bottom);
    width: auto;
    height: var(--mobile-guide-height);
    max-height: var(--mobile-guide-height);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
    touch-action: auto;
    scrollbar-gutter: auto;
    border-radius: 14px;
    box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.3);
  }

  .guide-panel__scroll {
    min-height: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 12px 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
  }

  .guide-panel__avatar {
    width: 38px;
    height: 38px;
  }

  .guide-panel__avatar span {
    width: 18px;
    height: 23px;
  }

  .route-button,
  .ask input,
  .ask button {
    min-height: 44px;
    height: 44px;
  }

  .ask {
    position: static;
    bottom: auto;
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 16, 22, 0.98);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.2);
  }

  .is-prestart .guide-panel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .hotspot-list {
    left: var(--mobile-edge);
    right: var(--mobile-edge);
    bottom: calc(var(--mobile-safe-bottom) + var(--mobile-guide-height) + 8px);
    height: 56px;
    grid-auto-flow: column;
    grid-auto-columns: minmax(116px, 1fr);
    grid-template-columns: none;
    max-width: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    scrollbar-width: none;
  }

  .hotspot-list::-webkit-scrollbar {
    display: none;
  }

  .hotspot-card {
    min-width: 116px;
    min-height: 56px;
    padding: 8px 10px;
    scroll-snap-align: start;
  }

  .help-panel {
    top: 68px;
    left: var(--mobile-edge);
    right: var(--mobile-edge);
    bottom: auto;
    z-index: 18;
    max-width: none;
  }

  .minimap {
    left: var(--mobile-edge);
    right: var(--mobile-edge);
    bottom: calc(var(--mobile-safe-bottom) + var(--mobile-guide-height) + 72px);
    width: auto;
    height: 48px;
    gap: 0;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .minimap__head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
  }

  .minimap__head .eyebrow {
    grid-column: 1 / -1;
    font-size: 9px;
    line-height: 1;
  }

  .minimap__head strong,
  .minimap__head span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .minimap__head strong {
    font-size: 12px;
  }

  .minimap__head span {
    font-size: 10px;
  }

  .minimap__stage {
    display: none;
  }

  .mobile-move-controls {
    position: fixed;
    z-index: 15;
    left: var(--mobile-edge);
    bottom: calc(var(--mobile-safe-bottom) + var(--mobile-guide-height) + 132px);
    display: grid;
    grid-template-columns: repeat(3, 36px);
    grid-template-rows: repeat(2, 36px);
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(8, 12, 17, 0.72);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .is-prestart .mobile-move-controls {
    display: none;
  }

  .mobile-move-button {
    display: grid;
    place-items: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    font: 700 18px/1 Inter, sans-serif;
    touch-action: none;
  }

  .mobile-move-button.is-pressed {
    color: #10171c;
    background: var(--teal);
    transform: scale(0.94);
  }

  .mobile-move-button--up {
    grid-column: 2;
    grid-row: 1;
  }

  .mobile-move-button--left {
    grid-column: 1;
    grid-row: 2;
  }

  .mobile-move-button--down {
    grid-column: 2;
    grid-row: 2;
  }

  .mobile-move-button--right {
    grid-column: 3;
    grid-row: 2;
  }

  .studio-panel {
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 48vh;
  }

  .studio-panel__actions {
    grid-template-columns: 1fr;
  }

  .hud--bottom {
    display: none;
  }

  .control-hint {
    font-size: 11px;
    padding: 7px 8px;
  }

  .ask {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  [dir="rtl"] .guide-panel,
  [dir="rtl"] .hotspot-list,
  [dir="rtl"] .help-panel,
  [dir="rtl"] .minimap {
    right: var(--mobile-edge);
    left: var(--mobile-edge);
  }

  .start {
    padding: 20px;
  }

  .start__content {
    margin-bottom: 8px;
  }

  .start__how {
    margin-bottom: 14px;
  }

  h1 {
    font-size: clamp(38px, 13vw, 58px);
  }
}

@media (max-width: 760px) and (min-height: 620px) {
  :root {
    --mobile-guide-height: min(45dvh, 380px);
  }
}

@media (max-width: 760px) and (max-height: 619px) {
  :root {
    --mobile-guide-height: 34dvh;
  }

  .minimap {
    display: none;
  }

  .hotspot-list {
    bottom: calc(var(--mobile-safe-bottom) + var(--mobile-guide-height) + 8px);
  }

  .mobile-move-controls {
    bottom: calc(var(--mobile-safe-bottom) + var(--mobile-guide-height) + 76px);
  }
}
