@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-Variable-Latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-Variable-LatinExt.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: rgba(255, 253, 250, .97);
  --surface-active: #eee1d5;
  --surface-hover: #f7f0ea;
  --line: #ddd1c5;
  --ink: #64513f;
  --muted: #766b61;
  --accent: #806047;
  --shadow: 0 10px 30px rgba(78, 61, 46, .14);
}

* {
  box-sizing: border-box;
}

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

body,
button {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

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

#panorama {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #f8f5f0;
}

#panorama,
#panorama .pnlm-container,
#panorama .pnlm-render-container {
  touch-action: none;
}

.texture-warmup {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(124, 146, 157, .22), transparent 42%),
    linear-gradient(145deg, rgba(14, 19, 22, .98), rgba(25, 32, 35, .98));
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s step-end;
  pointer-events: none;
}

.texture-warmup.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity .18s ease, visibility 0s;
  pointer-events: auto;
}

.texture-warmup__card {
  display: grid;
  width: min(390px, calc(100vw - 40px));
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 5px 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px;
  background: rgba(255, 255, 255, .08);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .32),
    inset 0 1px 0 rgba(255, 255, 255, .1);
  color: #fff;
}

.texture-warmup__spinner {
  width: 30px;
  height: 30px;
  grid-row: 1;
  border: 2px solid rgba(255, 255, 255, .18);
  border-top-color: #f0a24a;
  border-radius: 50%;
  animation: texture-warmup-spin .8s linear infinite;
}

.texture-warmup__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.texture-warmup__copy strong {
  font-size: 14px;
  font-weight: 670;
  letter-spacing: -.015em;
}

.texture-warmup__copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, .66);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.texture-warmup__progress {
  grid-column: 1 / -1;
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}

.texture-warmup__progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #dd8e37, #ffc779);
  box-shadow: 0 0 16px rgba(240, 162, 74, .45);
  transition: width .16s ease-out;
}

@keyframes texture-warmup-spin {
  to { transform: rotate(360deg); }
}

.pnlm-controls-container,
.pnlm-panorama-info,
.pnlm-load-box,
.pnlm-about-msg {
  display: none !important;
}

.hint {
  position: fixed;
  z-index: 5;
  right: 50%;
  bottom: calc(98px + env(safe-area-inset-bottom));
  min-height: 36px;
  max-width: calc(100vw - 32px);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(78, 61, 46, .12);
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(50%);
  transition: opacity .22s ease;
  pointer-events: none;
}

.hint.is-hidden {
  opacity: 0;
}

#panorama.annotations-hidden .nehir-annotation-overlay {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.view-nav {
  position: fixed;
  z-index: 10;
  right: auto;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(640px, calc(100vw - 32px));
  min-height: 60px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 20px;
  background: rgba(21, 24, 27, .46);
  box-shadow:
    0 18px 45px rgba(5, 8, 10, .24),
    inset 0 1px 0 rgba(255, 255, 255, .16);
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition:
    opacity .24s ease,
    transform .34s cubic-bezier(.22, 1, .36, 1);
}

.view-nav.is-ready {
  opacity: 1;
  transform: translate(-50%, 0);
}

.view-nav__inner {
  display: grid;
  width: 100%;
  min-height: 46px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.nav-item {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 620;
  line-height: 16px;
  letter-spacing: -.01em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .28);
  transition:
    color .18s ease,
    transform .18s ease,
    background-color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.nav-item::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 5px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0);
  transform: translateX(50%);
  transition: background-color .18s ease;
}

.nav-item:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.nav-item:active {
  transform: translateY(1px);
}

.nav-item[aria-current="true"],
.nav-item[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 8px 20px rgba(0, 0, 0, .12);
  color: #fff;
}

.nav-item[aria-current="true"]::after,
.nav-item[aria-pressed="true"]::after {
  background: #f0a24a;
  box-shadow: 0 0 12px rgba(240, 162, 74, .38);
}

.nav-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .92);
  outline-offset: 2px;
}

.nav-item__label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item__label--short {
  display: none;
}

.error {
  position: fixed;
  z-index: 20;
  top: 50%;
  left: 50%;
  display: none;
  width: min(420px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdfa;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  transform: translate(-50%, -50%);
}

.error.is-visible {
  display: block;
}

@media (max-width: 720px) {
  .view-nav {
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    min-height: 56px;
    padding: 5px;
    border-radius: 18px;
  }

  .view-nav__inner {
    min-height: 44px;
  }

  .nav-item {
    min-height: 44px;
    padding: 7px 3px;
    border-radius: 13px;
    font-size: 10.5px;
  }

  .nav-item__label--full {
    display: none;
  }

  .nav-item__label--short {
    display: block;
  }

  .hint {
    bottom: calc(84px + env(safe-area-inset-bottom));
    min-height: 34px;
    padding: 7px 12px;
    font-size: 11px;
  }
}

@media (max-height: 460px) and (orientation: landscape) {
  .view-nav {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(520px, calc(100vw - 20px));
    min-height: 48px;
    padding: 4px;
    border-radius: 16px;
  }

  .view-nav__inner,
  .nav-item {
    min-height: 40px;
  }

  .nav-item {
    padding: 4px 8px;
    border-radius: 12px;
  }

  .hint {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

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