@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/NotoSans-Thin.ttf") format("truetype");
  font-style: normal;
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/NotoSans-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/NotoSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/NotoSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/NotoSans-ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --color-page: #292b2f;
  --color-surface: #36383c;
  --color-surface-raised: #3d4044;
  --color-surface-control: #45484c;
  --color-surface-hover: #505458;
  --color-surface-accent: #4b342e;
  --color-text: #f1f3f1;
  --color-text-strong: #fff;
  --color-text-body: #d6dbd9;
  --color-text-muted: #aeb5b7;
  --color-text-subtle: #9da6a8;
  --color-text-faint: #7d8a94;
  --color-ar-text-body: #fff;
  --color-border: #4b4e52;
  --color-border-soft: rgba(241, 243, 241, 0.12);
  --color-border-faint: rgba(241, 243, 241, 0.08);
  --color-accent: #e39a78;
  --color-accent-strong: #f0b398;
  --color-accent-selected: #c97958;
  --color-accent-contrast: #2a201c;
  --color-accent-link: #eda681;
  --color-poi-selected: #a95136;
  --color-poi-selected-text: #fff;
  --color-poi-selected-border: #fff;
  --color-popup-eyebrow: #ffe0cf;
  --color-popup-surface: #36383c;
  --color-popup-fade-low: rgba(20, 22, 25, 0.35);
  --color-popup-fade-high: rgba(20, 22, 25, 0.72);
  --color-popup-image-fade: var(--color-popup-surface);
  --color-muted: #62676a;
  --color-disabled: #858c8d;
  --color-disabled-bg: #303236;
  --color-map-background: #d5e2e0;
  --color-glass: rgba(52, 54, 58, 0.9);
  --color-glass-soft: rgba(52, 54, 58, 0.7);
  --color-glass-popup: rgba(52, 54, 58, 0.70);
  --color-overlay: rgba(19, 22, 24, 0.62);
  --color-shadow: rgba(0, 0, 0, 0.34);
  --color-shadow-soft: rgba(0, 0, 0, 0.22);
  --color-location: #2d8cff;
  --color-location-dark: #1d5ea8;
  --color-location-ring: rgba(45, 140, 255, 0.24);
  --color-location-outline: rgba(45, 140, 255, 0.62);
  --color-route: #c56f4e;
  --color-status-online: #62c98c;
  --color-status-online-ring: rgba(98, 201, 140, 0.18);
  --color-status-offline: #8a9290;
  --color-status-offline-ring: rgba(138, 146, 144, 0.18);
  --color-image-overlay-start: rgba(0, 0, 0, 0.04);
  --color-image-overlay-end: rgba(0, 0, 0, 0.7);
  font-family:
    "Noto Sans",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--color-text);
  background: var(--color-page);
}
html[data-theme="light"] {
  color-scheme: light;
  --color-page: #fff;
  --color-surface: #fff;
  --color-surface-raised: #f7faf9;
  --color-surface-control: #edf3f1;
  --color-surface-hover: #e3ece9;
  --color-surface-accent: #f7e5de;
  --color-text: #19302b;
  --color-text-strong: #132621;
  --color-text-body: #314541;
  --color-text-muted: #60716c;
  --color-text-subtle: #62736d;
  --color-text-faint: #6b7a75;
  --color-ar-text-body: #19302b;
  --color-border: #d5dfdb;
  --color-border-soft: rgba(30, 56, 49, 0.16);
  --color-border-faint: rgba(30, 56, 49, 0.1);
  --color-accent: #b85f3f;
  --color-accent-strong: #9c4c32;
  --color-accent-selected: #98482f;
  --color-accent-contrast: #fff;
  --color-accent-link: #a45137;
  --color-poi-selected: #6f2f22;
  --color-poi-selected-text: #fff;
  --color-poi-selected-border: #fff;
  --color-popup-eyebrow: #fff1e8;
  --color-popup-surface: #fff;
  --color-popup-fade-low: rgba(255, 255, 255, 0.35);
  --color-popup-fade-high: rgba(255, 255, 255, 0.72);
  --color-popup-image-fade: var(--color-popup-surface);
  --color-muted: #9baaa5;
  --color-disabled: #80908a;
  --color-disabled-bg: #edf1ef;
  --color-map-background: #e7efec;
  --color-glass: rgba(255, 255, 255, 0.88);
  --color-glass-soft: rgba(255, 255, 255, 0.7);
  --color-glass-popup: rgba(255, 255, 255, 0.74);
  --color-overlay: rgba(22, 38, 34, 0.35);
  --color-shadow: rgba(28, 50, 45, 0.16);
  --color-shadow-soft: rgba(28, 50, 45, 0.12);
  --color-status-online: #258052;
  --color-status-online-ring: rgba(37, 128, 82, 0.16);
  --color-status-offline: #68736f;
  --color-status-offline-ring: rgba(104, 115, 111, 0.16);
  --color-image-overlay-start: rgba(0, 0, 0, 0.02);
  --color-image-overlay-end: rgba(0, 0, 0, 0.62);
}
* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
  margin: 0;
}
html.i18n-pending body > * {
  visibility: hidden;
}
html.i18n-pending::before {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  content: '';
  background: var(--color-page);
}
html.i18n-pending::after {
  position: fixed;
  z-index: 2147483648;
  top: 50%;
  left: 50%;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  content: '';
  animation: i18n-loading-spin .8s linear infinite;
}
@keyframes i18n-loading-spin {
  to { transform: rotate(360deg); }
}
body {
  overflow: hidden;
  color: var(--color-text);
  background: var(--color-page);
}
button,
a {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
.ui-icon {
  display: block;
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
}
.ui-icon--asset {
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.ui-icon--asset-church {
  -webkit-mask-image: url('/assets/images/cross-grave-halloween-svgrepo-com.svg');
  mask-image: url('/assets/images/cross-grave-halloween-svgrepo-com.svg');
}
.ui-icon--asset-column {
  -webkit-mask-image: url('/assets/images/column-art-svgrepo-com.svg');
  mask-image: url('/assets/images/column-art-svgrepo-com.svg');
}
.ui-icon--asset-location2 {
  -webkit-mask-image: url('/assets/images/location-2-svgrepo-com.svg');
  mask-image: url('/assets/images/location-2-svgrepo-com.svg');
}
.ui-icon--asset-location-pin {
  -webkit-mask-image: url('/assets/images/location-pin-svgrepo-com.svg');
  mask-image: url('/assets/images/location-pin-svgrepo-com.svg');
}
.eyebrow {
  margin: 0 0 0.28rem;
  color: var(--color-text-faint);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* Map screen */
.map-page {
  background: var(--color-page);
}
.map-shell {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 38rem;
  overflow: hidden;
}
html:fullscreen .map-shell,
html:-webkit-full-screen .map-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}
#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--color-map-background);
}
.map-header,
.map-style-menu,
.map-status,
.explore-sheet,
.bottom-nav,
.story-header,
.story-bottom-nav {
  -webkit-backdrop-filter: blur(14px);
}
.leaflet-container {
  font: inherit;
}

.leaflet-container a {
	color: var(--color-text-strong);
	}

.leaflet-control-attribution {
  margin: 0 1rem calc(9.2rem + env(safe-area-inset-bottom)) 0 !important;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  color: var(--color-text-muted);
  background: transparent !important;
  box-shadow: none;
  font-size: 0.55rem;
  line-height: 1.15;
}
.leaflet-control-attribution a {
  color: var(--color-accent-link);
}
.leaflet-control-zoom {
  display: grid;
  gap: 0.35rem;
  margin: 1rem !important;
  border: 0 !important;
}
.leaflet-control-zoom a {
  width: 2.5rem;
  height: 2.5rem;
  border: 0 !important;
  border-radius: 50% !important;
  color: var(--color-text-strong) !important;
  background: var(--color-glass);
  box-shadow: 0 0.5rem 1rem var(--color-shadow-soft);
  line-height: 2.5rem;
}

.map-header {
  position: absolute;
  z-index: 10;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem;
  width: min(100% - 2rem, 38rem);
  min-height: 3.65rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.1rem;
  color: var(--color-text);
  background: var(--color-glass);
  box-shadow: 0 1rem 2rem var(--color-shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}
.map-header--with-back {
  grid-template-columns: 2rem minmax(0, 1fr) auto;
}
.map-header__back {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.65rem;
  color: var(--color-text-strong);
  font-size: 1.45rem;
  line-height: 1;
  text-decoration: none;
}
.map-header__back[hidden] {
  display: none;
}
.map-header__back .ui-icon {
  width: 1.25rem;
  height: 1.25rem;
}
.map-header__title {
  min-width: 0;
  padding: 0 0.25rem;
}
.map-header__title .eyebrow {
  max-width: 100%;
  margin-bottom: 0.04rem;
  overflow: hidden;
  color: var(--color-accent);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-header h1 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(0.84rem, 3.3vw, 1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-header__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
}
.fullscreen-feedback[hidden] {
  display: none;
}
#fullscreen-toggle,
#fullscreen-toggle[hidden] {
  display: none;
}
#fullscreen-toggle.fullscreen-toggle--available:not([hidden]) {
  display: grid;
}
.fullscreen-feedback {
  position: absolute;
  z-index: 14;
  top: calc(100% + 0.4rem);
  right: 0;
  width: min(17rem, calc(100vw - 2rem));
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.75rem;
  color: var(--color-text);
  background: var(--color-glass);
  box-shadow: 0 0.7rem 1.5rem var(--color-shadow);
  font-size: 0.82rem;
  line-height: 1.35;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.fullscreen-feedback--loading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.fullscreen-feedback--loading::before {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: '';
  animation: fullscreen-feedback-spin 0.8s linear infinite;
}
@keyframes fullscreen-feedback-spin {
  to { transform: rotate(360deg); }
}
.fullscreen-page-host {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--color-page);
}
#fullscreen-toggle.fullscreen-toggle--restore {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.ar-header__actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ar-experience-active #fullscreen-toggle.fullscreen-toggle--available:not([hidden]),
.ar-experience-active #fullscreen-feedback {
  display: none;
}
.ar-editor-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.65rem;
  color: var(--color-text);
  background: var(--color-surface-control);
  font-size: 1.05rem;
}
.icon-button .ui-icon {
  width: 1.05rem;
  height: 1.05rem;
}
.language-toggle {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.icon-button:hover,
.icon-button:focus-visible {
  background: var(--color-surface-hover);
}
@media (max-width: 390px) {
  .map-header__actions {
    gap: 0.18rem;
  }
  .map-header__actions .icon-button {
    width: 1.85rem;
    height: 1.85rem;
  }
}
.map-style-menu[hidden] {
  display: none;
}
.map-style-menu {
  position: absolute;
  z-index: 12;
  top: max(8.2rem, calc(env(safe-area-inset-top) + 7.8rem));
  right: 1rem;
  display: grid;
  gap: 0.3rem;
  width: min(14rem, calc(100% - 2rem));
  max-height: min(70vh, 32rem);
  padding: 0.65rem;
  overflow: auto;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: var(--color-glass-soft);
  box-shadow: 0 1rem 2rem var(--color-shadow);
  backdrop-filter: blur(14px);
}
.map-style-menu__title {
  margin: 0;
  padding: 0.15rem 0.4rem 0.35rem;
  color: var(--color-text-subtle);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.map-style-menu button {
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  color: var(--color-text-body);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: left;
}
.map-style-menu button:hover,
.map-style-menu button:focus-visible,
.map-style-menu button.is-active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-surface-accent);
}

.map-status-row {
  position: absolute;
  z-index: 5;
  top: max(5.25rem, calc(env(safe-area-inset-top) + 4.85rem));
  left: max(1rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: calc(100% - 2rem);
  max-width: 38rem;
  pointer-events: none;
}
.map-status-row > * {
  pointer-events: auto;
}
.map-status {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 1 auto;
  width: max-content;
  max-width: 100%;
  height: 2.25rem;
  overflow: hidden;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  color: var(--color-text-body);
  background: var(--color-glass);
  box-shadow: 0 0.5rem 1.2rem var(--color-shadow-soft);
  font-size: 0.7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.map-ar-prompt[hidden] {
  display: none;
}
.map-ar-prompt {
  display: flex;
  flex: 1 1 10rem;
  align-items: center;
  min-width: 0;
  max-width: 18rem;
  gap: 0.4rem;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0.24rem 0.62rem;
  border: 1px solid var(--color-accent-strong);
  border-radius: 0.7rem;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  box-shadow: 0 0.5rem 1.2rem var(--color-shadow-soft);
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.map-ar-prompt:hover,
.map-ar-prompt:focus-visible {
  color: var(--color-accent-contrast);
  filter: brightness(1.06);
  outline: none;
  transform: translateY(-0.05rem);
}
.map-ar-prompt__icon {
  display: inline-flex;
  flex: 0 0 auto;
}
.map-ar-prompt__icon .ui-icon {
  width: 1.28rem;
  height: 1.28rem;
}
.map-ar-prompt__copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.05;
}
.map-ar-prompt__copy strong,
.map-ar-prompt__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-ar-prompt__copy strong {
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 800;
}
.map-ar-prompt__copy small {
  display: block;
  min-width: 0;
  margin-top: 0.14rem;
  color: var(--color-accent-contrast);
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.72;
}
.map-ar-prompt__copy small::before {
  display: none;
}
.status-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--color-status-online);
  box-shadow: 0 0 0 0.2rem var(--color-status-online-ring);
}
.status-dot.is-offline {
  background: var(--color-status-offline);
  box-shadow: 0 0 0 0.2rem var(--color-status-offline-ring);
}
.map-status--ready {
  padding: 0.15rem 0.55rem;
  color: var(--color-text-body);
  font-size: 0.65rem;
}
.language-modal[hidden] {
  display: none;
}
.language-modal {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: var(--color-overlay);
  backdrop-filter: blur(8px);
}
.language-modal.is-fading {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: languageModalFade 1.5s ease forwards;
}
.language-modal.is-fading .language-modal__card {
  display: none;
}
@keyframes languageModalFade {
  from { background-color: var(--color-overlay); }
  to { background-color: transparent; }
}
.language-modal__card {
  width: min(100%, 22rem);
  padding: 1.4rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.35rem;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: 0 1.5rem 3rem var(--color-shadow);
}
.language-modal__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 0.8rem;
  color: var(--color-accent);
  background: var(--color-surface-accent);
}
.language-modal__icon .ui-icon {
  width: 1.25rem;
  height: 1.25rem;
}
.language-modal__card .eyebrow {
  margin-bottom: 0.25rem;
  color: var(--color-accent);
}
.language-modal__card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}
.language-modal__card > p:not(.eyebrow) {
  margin: 0 0 1.1rem;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.language-modal__options {
  display: grid;
  gap: 0.55rem;
}
.language-modal__options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 0.8rem;
  color: var(--color-text);
  background: var(--color-surface-raised);
  text-align: left;
}
.language-modal__options button:hover,
.language-modal__options button:focus-visible {
  border-color: var(--color-accent);
  background: var(--color-surface-accent);
}
.language-modal__options strong {
  color: var(--color-accent);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}
.user-marker-wrap {
  background: transparent;
  border: 0;
}
.user-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 0.22rem solid var(--color-text-strong);
  border-radius: 50%;
  background: var(--color-location);
  box-shadow:
    0 0 0 0.17rem var(--color-location-dark),
    0 0 0 0.42rem var(--color-location-ring),
    0 0.35rem 0.8rem var(--color-shadow);
}
.user-marker::before {
  position: absolute;
  inset: -0.6rem;
  border: 1px solid var(--color-location-outline);
  border-radius: 50%;
  content: "";
}
.user-marker span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--color-text-strong);
  box-shadow: 0 0 0.2rem var(--color-shadow-soft);
}
.user-accuracy {
  stroke-dasharray: 5 5;
}

.poi-marker-wrap {
  background: transparent;
  border: 0;
}
.poi-marker {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 0.2rem solid var(--color-text-strong);
  border-radius: 50% 50% 50% 0.35rem;
  background: var(--color-accent);
  box-shadow: 0 0.35rem 0.7rem var(--color-shadow);
  transform: rotate(-45deg);
}
.poi-marker span {
  display: grid;
  place-items: center;
  min-width: 0.8rem;
  height: 0.8rem;
  color: var(--color-accent-contrast);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(45deg);
}
.poi-marker-wrap--selected .poi-marker {
  border-color: var(--color-poi-selected-border);
  background: var(--color-poi-selected);
}
.poi-marker-wrap--selected .poi-marker span {
  color: var(--color-poi-selected-text);
}

.leaflet-popup.poi-popup .leaflet-popup-content-wrapper {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.15rem;
  background: var(--color-popup-surface) !important;
  background-color: var(--color-popup-surface) !important;
  box-shadow: 0 1rem 2.5rem var(--color-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.leaflet-popup.poi-popup .leaflet-popup-content {
  width: min(16.75rem, calc(100vw - 3rem)) !important;
  margin: 0;
}
.leaflet-popup.poi-popup .leaflet-popup-tip {
  background: var(--color-popup-surface);
}
.leaflet-popup.poi-popup .leaflet-popup-close-button {
  z-index: 2;
  top: 0.55rem !important;
  right: 0.6rem !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  border-radius: 50%;
  color: var(--color-text-body) !important;
  background: var(--color-surface-control);
  font-size: 1rem !important;
  line-height: 1.4rem !important;
}
.poi-preview {
  position: relative;
  padding: 0.55rem 0.9rem 0.72rem;
  color: var(--color-text);
  background: transparent;
}
.poi-preview__close {
  position: absolute;
  z-index: 2;
  top: 0.55rem;
  right: 0.6rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 50%;
  color: var(--color-text-body);
  background: var(--color-surface-control);
  font-size: 1rem;
  line-height: 1;
  pointer-events: auto;
}
.poi-preview__close .ui-icon {
  width: 0.9rem;
  height: 0.9rem;
}
.poi-preview__close:hover,
.poi-preview__close:focus-visible {
  color: var(--color-accent-contrast);
  background: var(--color-accent);
}
.poi-preview__heading {
  position: relative;
  display: block;
  padding-right: 2.2rem;
}
.poi-preview__heading-copy {
  min-width: 0;
}
.poi-preview__top-actions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.poi-preview__actions {
  display: grid;
  grid-template-columns: minmax(4.2rem, 0.62fr) minmax(0, 1.38fr);
  align-items: stretch;
  gap: 0.48rem;
  margin-top: 0.4rem;
}
.poi-preview__ar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 2.3rem;
  box-sizing: border-box;
  margin: 0;
  border: 0.14rem solid var(--color-accent-strong);
  border-radius: 0.75rem;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  gap: 0.28rem;
  box-shadow: 0 0.45rem 0.9rem var(--color-shadow-soft);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.poi-preview__ar .ui-icon {
  width: 1.12rem;
  height: 1.12rem;
}
.poi-preview__ar:hover,
.poi-preview__ar:focus-visible {
  color: var(--color-accent-contrast);
  box-shadow: 0 0.6rem 1.25rem var(--color-shadow);
  outline: none;
  transform: translateY(-0.1rem) scale(1.04);
}
.poi-preview__eyebrow {
  max-width: 100%;
  margin-bottom: 0.14rem;
  overflow: hidden;
  padding-right: 0;
  color: var(--color-accent);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.poi-preview h3 {
  margin: 0 0 0.08rem;
  font-size: 1.08rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.poi-preview__meta {
  margin: 0 0 0.72rem;
  color: var(--color-text-muted);
  font-size: 0.72rem;
}
.poi-preview__description {
  display: -webkit-box;
  margin: 0 0 0.36rem;
  overflow: hidden;
  color: var(--color-text-body);
  font-size: 0.79rem;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.poi-preview__route {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  margin: 0 0 0.36rem;
  overflow: hidden;
  padding: 0.22rem 0.5rem;
  border-radius: 0.55rem;
  color: var(--color-accent-strong);
  background: var(--color-surface-accent);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poi-preview__route::before {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--color-accent);
}
.poi-preview__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  height: 2.3rem;
  box-sizing: border-box;
  padding: 0.62rem 0.72rem;
  border-radius: 0.72rem;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  font-size: 0.81rem;
  font-weight: 800;
  text-decoration: none;
}
.leaflet-popup.poi-popup .poi-preview__button,
.leaflet-popup.poi-popup .poi-preview__button:visited {
  color: var(--color-accent-contrast) !important;
}
.leaflet-popup.poi-popup .poi-preview__button:hover,
.leaflet-popup.poi-popup .poi-preview__button:focus-visible {
  color: var(--color-accent-contrast) !important;
}
.poi-preview__button span {
  font-size: 1rem;
}

.explore-sheet {
  position: absolute;
  z-index: 6;
  right: 1rem;
  bottom: calc(4.85rem + env(safe-area-inset-bottom));
  left: 1rem;
  display: flex;
  flex-direction: column;
  width: min(calc(100% - 2rem), 38rem);
  max-height: 40vh;
  padding: 0.55rem 0.85rem 0.8rem;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.45rem;
  background: var(--color-glass-soft);
  box-shadow: 0 1.2rem 2.8rem var(--color-shadow);
  transition: transform 0.28s ease;
  backdrop-filter: blur(16px);
}
.explore-sheet.is-dragging {
  transition: none;
}
.sheet-toggle {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.18rem 0 0.62rem;
  background: transparent;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
}
.sheet-toggle:active {
  cursor: grabbing;
}
.sheet-toggle::before {
  position: absolute;
  z-index: 0;
  top: -0.35rem;
  bottom: -0.45rem;
  left: 50%;
  width: min(14rem, 100%);
  content: '';
  transform: translateX(-50%);
}
.sheet-handle {
  position: relative;
  z-index: 1;
  display: block;
  width: 3.15rem;
  height: 0.3rem;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--color-text-muted);
  box-shadow: 0 0.08rem 0.16rem var(--color-shadow-soft);
}
.sheet-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.25rem 0.52rem;
}
.sheet-heading .eyebrow {
  margin-bottom: 0.1rem;
  color: var(--color-text-subtle);
  font-size: 0.77rem;
}
.sheet-heading h2 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.23rem;
  letter-spacing: -0.04em;
}
.sheet-action {
  padding: 0.2rem 0;
  color: var(--color-accent);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}
.sheet-action span {
  margin-left: 0.2rem;
  font-size: 1rem;
}
.points {
  display: grid;
  flex: 1 1 auto;
  gap: 0.4rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.05rem 0.1rem 0.1rem 0;
  scrollbar-color: var(--color-muted) transparent;
  scrollbar-width: thin;
}
.point-card {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) 1.45rem 1.15rem;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.48rem;
  border: 1px solid var(--color-border);
  border-radius: 0.9rem;
  color: var(--color-text);
  background: var(--color-surface-raised);
  text-align: left;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}
.point-card:hover,
.point-card:focus-visible {
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}
.point-card__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  color: var(--color-accent);
  background: var(--color-surface-accent);
  font-size: 1.15rem;
}
.point-card__icon .ui-icon {
  width: 1.15rem;
  height: 1.15rem;
}
.point-card__copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.point-card strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.point-card__number {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  justify-self: end;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}
.point-card__title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.point-card small {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}
.point-card__arrow {
  width: 1.15rem;
  justify-self: end;
  color: var(--color-accent);
  font-size: 1.1rem;
  text-align: center;
}
.sheet-footer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.7rem;
  padding: 0.65rem 0.25rem 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.sheet-footer__icon {
  display: grid;
  place-items: center;
  color: var(--color-accent);
}
.sheet-footer__icon .ui-icon {
  width: 0.95rem;
  height: 0.95rem;
}
.sheet-footer__arrow {
  margin-left: auto;
  color: var(--color-accent);
  font-size: 1rem;
}
.explore-sheet.is-collapsed {
  overflow: hidden;
  transform: translateY(calc(100% - 4.25rem));
}
.explore-sheet.is-collapsed .points {
  overflow: hidden;
}
.bottom-nav {
  position: absolute;
  z-index: 7;
  right: 1rem;
  bottom: max(0.8rem, env(safe-area-inset-bottom));
  left: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(calc(100% - 2rem), 38rem);
  padding: 0.45rem 0.35rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.2rem;
  background: var(--color-glass);
  box-shadow: 0 0.8rem 2rem var(--color-shadow);
  backdrop-filter: blur(14px);
}
.bottom-nav__item {
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.35rem;
  border-radius: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: none;
}
.bottom-nav__item span {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  font-size: 1.05rem;
  line-height: 1;
}
.bottom-nav__item small {
  font-size: 0.6rem;
  font-weight: 700;
}
.bottom-nav__item--active {
  color: var(--color-accent);
  background: var(--color-surface-accent);
}

/* Point info screen */
.point-page {
  min-height: 100vh;
  overflow: auto;
  color: var(--color-text);
  background: var(--color-page);
}
.story-screen {
  width: min(100%, 48rem);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 5.8rem;
}
.story-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 4.3rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border-faint);
  background: var(--color-glass-soft);
  backdrop-filter: blur(16px);
}
.stories-page .story-header,
.point-detail-page .story-header,
.guide-page .story-header,
.settings-page .story-header {
  top: max(1rem, env(safe-area-inset-top));
  margin-top: max(1rem, env(safe-area-inset-top));
}
.story-header__back {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  color: var(--color-text);
  font-size: 1.8rem;
  line-height: 1;
  text-decoration: none;
}
.story-header__title {
  min-width: 0;
}
.story-header__title .eyebrow {
  margin-bottom: 0.12rem;
  color: var(--color-accent);
  white-space: nowrap;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}
.story-header h1 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.story-header__actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.story-header__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.46rem;
  border-radius: 0.65rem;
  color: var(--color-text-body);
  background: var(--color-surface);
  font-size: 0.68rem;
  font-weight: 700;
}
.story-header__status > span:first-child {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--color-status-online);
}
.story-header__status.is-offline > span:first-child {
  background: var(--color-status-offline);
}
.story-content {
  padding: 1rem;
}
.story-carousel {
  margin-bottom: 1.35rem;
}
.story-carousel__stage {
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  background: var(--color-surface);
  box-shadow: 0 1rem 2.5rem var(--color-shadow-soft);
  touch-action: pan-y;
}
.story-carousel__stage::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--color-image-overlay-start) 45%,
    var(--color-image-overlay-end)
  );
}
.story-carousel__stage img {
  display: block;
  width: 100%;
  height: clamp(15rem, 68vw, 25rem);
  object-fit: cover;
}
.carousel-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 50%;
  color: var(--color-text);
  background: var(--color-glass);
  font-size: 1.25rem;
  transform: translateY(-50%);
}
.carousel-button--previous {
  left: 0.75rem;
}
.carousel-button--next {
  right: 0.75rem;
}
.carousel-button .ui-icon {
  width: 1.2rem;
  height: 1.2rem;
}
.carousel-button:hover,
.carousel-button:focus-visible {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}
.story-media__fullscreen {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--color-border-soft);
  border-radius: 50%;
  color: var(--color-text);
  background: var(--color-glass);
  box-shadow: 0 0.35rem 0.8rem var(--color-shadow-soft);
  cursor: pointer;
}
.story-media__fullscreen .ui-icon {
  width: 1rem;
  height: 1rem;
}
.story-media__fullscreen:hover,
.story-media__fullscreen:focus-visible {
  color: var(--color-accent-contrast);
  background: var(--color-accent);
}
.story-carousel__fullscreen {
  top: 0.75rem;
  right: 0.75rem;
}
.story-image {
  margin: 1rem 0 1.15rem;
}
.story-image__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border-faint);
  border-radius: 1rem;
  background: var(--color-surface-raised);
  box-shadow: 0 0.7rem 1.5rem var(--color-shadow-soft);
}
.story-image__media {
  display: block;
  width: 100%;
  height: auto;
  max-height: 32rem;
  object-fit: contain;
}
.story-image__fullscreen {
  top: 0.65rem;
  right: 0.65rem;
}
.story-image figcaption {
  margin-top: 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.story-carousel__caption {
  position: absolute;
  z-index: 2;
  right: 1rem;
  bottom: 0.9rem;
  left: 1rem;
  display: grid;
  gap: 0.15rem;
  color: var(--color-text);
}
.story-carousel__caption span {
  font-size: 1rem;
  font-weight: 800;
}
.story-carousel__caption small {
  color: var(--color-text-body);
  font-size: 0.72rem;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding-top: 0.7rem;
}
.carousel-dot {
  width: 0.42rem;
  height: 0.42rem;
  padding: 0;
  border-radius: 50%;
  background: var(--color-muted);
}
.carousel-dot--active {
  width: 1.15rem;
  border-radius: 999px;
  background: var(--color-accent);
}
.story-heading {
  padding: 0 0.25rem 0.85rem;
}
.story-heading__eyebrow {
  margin: 0 0 0.4rem;
  color: var(--color-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.story-heading h2 {
  margin: 0 0 0.35rem;
  color: var(--color-text);
  font-size: clamp(1.8rem, 8vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.story-heading__location {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}
.story-copy {
  padding: 1rem 0 1.2rem;
  border-top: 1px solid var(--color-border-faint);
}
.story-copy h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.7rem;
  color: var(--color-text);
  font-size: 1.05rem;
}
.story-copy__section-title {
  margin: 1.5rem 0 0.55rem;
  color: var(--color-text);
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.story-copy__section-title:first-of-type {
  margin-top: 0.9rem;
}
.story-copy__icon {
  display: inline-grid;
  color: var(--color-accent);
  font-size: 1.35rem;
}
.story-copy__icon .ui-icon {
  width: 1.2rem;
  height: 1.2rem;
}
.story-copy p {
  margin: 0 0 0.75rem;
  color: var(--color-text-body);
  font-size: 1.06rem;
  line-height: 1.65;
}
.story-copy p:last-child {
  margin-bottom: 0;
  color: var(--color-text-muted);
}
.story-video {
  margin: 1rem 0 1.15rem;
}
.story-video__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border-faint);
  border-radius: 1rem;
  background: var(--color-surface-raised);
  box-shadow: 0 0.7rem 1.5rem var(--color-shadow-soft);
}
.story-video__preview {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--color-surface-raised);
}
.story-video__preview[hidden],
.story-video__status[hidden] {
  display: none;
}
.story-video__status {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--color-accent);
  background: rgba(31, 33, 37, .38);
  pointer-events: none;
}
.story-video__status::before {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: '';
  animation: story-video-loading-spin .8s linear infinite;
}
.story-video.has-error .story-video__status {
  color: var(--color-text-muted);
  background: rgba(31, 33, 37, .58);
}
.story-video.has-error .story-video__status::before {
  width: auto;
  height: auto;
  border: 0;
  content: '↻';
  font-size: 1.7rem;
  animation: none;
}
@keyframes story-video-loading-spin {
  to { transform: rotate(360deg); }
}
.story-video__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-surface-raised);
}
.story-video__toggle {
  position: absolute;
  z-index: 4;
  left: 0.65rem;
  bottom: 0.65rem;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 50%;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  box-shadow: 0 0.35rem 0.8rem var(--color-shadow);
}
.story-video__fullscreen {
  right: 0.65rem;
  bottom: 0.65rem;
}
.story-video__toggle .ui-icon {
  width: 1rem;
  height: 1rem;
}
.story-video figcaption {
  margin-top: 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.voiceover {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--color-border-faint);
  border-radius: 1rem;
  background: var(--color-surface);
}
.voiceover__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.voiceover__label {
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.voiceover__heading strong {
  color: var(--color-text);
  font-size: 1rem;
}
.language-pill {
  padding: 0.3rem 0.45rem;
  border-radius: 0.45rem;
  color: var(--color-accent);
  background: var(--color-surface-accent);
  font-size: 0.65rem;
  font-weight: 800;
}
.voiceover__controls {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: center;
  gap: 0.55rem;
}
.voiceover__play {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 800;
}
.voiceover__play .ui-icon {
  width: 1rem;
  height: 1rem;
}
.voiceover__play:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.voiceover__timeline {
  position: relative;
  display: flex;
  align-items: center;
  height: 2rem;
  min-width: 0;
  border-radius: 0.5rem;
}
.voiceover__timeline:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 0.2rem;
}
.voiceover__timeline input {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.voiceover__waveform {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  pointer-events: none;
}
.voiceover__waveform--base {
  color: var(--color-accent);
  opacity: 0.3;
}
.voiceover__waveform--active {
  width: 100%;
  color: var(--color-accent);
  clip-path: inset(0 calc(100% - var(--voiceover-progress)) 0 0);
  transition: clip-path 0.08s linear;
}
.voiceover__waveform i {
  display: block;
  width: 3px;
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 999px;
  background: currentColor;
}
.voiceover__waveform i:nth-child(3n) {
  height: 0.85rem;
}
.voiceover__waveform i:nth-child(3n + 1) {
  height: 0.45rem;
}
.voiceover__waveform i:nth-child(3n + 2) {
  height: 0.68rem;
}
.voiceover__time {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}
.story-bottom-nav {
  position: fixed;
  z-index: 11;
  right: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(calc(100% - 2rem), 30rem);
  padding: 0.4rem;
  border: 1px solid var(--color-border-faint);
  border-radius: 1rem;
  background: var(--color-glass-soft);
  box-shadow: 0 0.8rem 2rem var(--color-shadow);
  transform: translateX(50%);
  backdrop-filter: blur(14px);
}
.story-bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.35rem;
  border-radius: 0.7rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  text-decoration: none;
}
.story-bottom-nav a > span {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
}
.story-bottom-nav a > span .ui-icon {
  width: 1.1rem;
  height: 1.1rem;
}
.story-bottom-nav small {
  font-size: 0.62rem;
  font-weight: 700;
}
.story-bottom-nav .story-bottom-nav__active {
  color: var(--color-accent);
  background: var(--color-surface-accent);
}
.story-error {
  display: grid;
  place-items: center;
  min-height: 80vh;
  padding: 2rem;
  text-align: center;
}
.story-error h1 {
  margin-bottom: 0.4rem;
}
.story-error p {
  color: var(--color-text-muted);
}
.story-error a {
  color: var(--color-accent);
  font-weight: 700;
}
.point-info__status {
  padding: 2rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Settings screen */
.settings-screen {
  width: min(100%, 48rem);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 5.8rem;
}
.settings-content {
  padding: 1.5rem 1rem 2rem;
}
.settings-content > h2 {
  margin: 0 0 0.35rem;
  color: var(--color-text);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  letter-spacing: -0.045em;
}
.settings-intro {
  margin: 0 0 1.6rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.55;
}
.settings-group {
  margin-top: 1.35rem;
  padding: 1rem;
  border: 1px solid var(--color-border-faint);
  border-radius: 1rem;
  background: var(--color-surface);
}
.settings-group h3 {
  margin: 0 0 0.35rem;
  color: var(--color-text);
  font-size: 1rem;
}
.settings-group > p {
  margin: 0 0 0.85rem;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}
.settings-options {
  display: grid;
  gap: 0.45rem;
}
.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.theme-toggle-row__label {
  color: var(--color-text-body);
  font-size: 0.82rem;
  font-weight: 700;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  background: var(--color-surface-raised);
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}
.theme-toggle__icon {
  display: grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
}
.theme-toggle__icon .ui-icon {
  width: 0.85rem;
  height: 0.85rem;
}
.theme-toggle__track {
  position: relative;
  display: block;
  width: 2.65rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--color-surface-control);
  box-shadow: inset 0 0 0 1px var(--color-border);
}
.theme-toggle__thumb {
  position: absolute;
  top: 0.18rem;
  left: 0.2rem;
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0.15rem 0.35rem var(--color-shadow-soft);
  transition: transform 0.2s ease;
}
.theme-toggle:not(.is-light) .theme-toggle__thumb {
  transform: translateX(1.2rem);
}
.theme-toggle.is-light .theme-toggle__icon:first-child,
.theme-toggle:not(.is-light) .theme-toggle__icon:last-child {
  color: var(--color-accent);
}
.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  color: var(--color-text-body);
  background: var(--color-surface-raised);
  text-align: left;
}
.settings-option:hover,
.settings-option:focus-visible,
.settings-option.is-selected {
  border-color: var(--color-accent);
  color: var(--color-text);
  background: var(--color-surface-accent);
}
.settings-option__code {
  color: var(--color-accent);
  font-size: 0.68rem;
  font-weight: 800;
}
.settings-option:disabled {
  border-color: var(--color-border-faint);
  color: var(--color-disabled);
  background: var(--color-disabled-bg);
  cursor: not-allowed;
}
.settings-option:disabled .settings-option__code {
  color: var(--color-muted);
}
.settings-storage {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-surface-raised);
}
.settings-storage__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}
.settings-storage__meta strong {
  color: var(--color-accent);
  font-size: 1.05rem;
  font-weight: 900;
}
.settings-storage__meta span {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-storage__track {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-surface-control);
  box-shadow: inset 0 0 0 1px var(--color-border);
}
.settings-storage__track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
  transition: width 0.25s ease;
}
.settings-storage__status {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.settings-storage__clear {
  width: 100%;
  margin-top: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  color: var(--color-text-body);
  background: var(--color-surface-control);
  font-size: 0.82rem;
  font-weight: 800;
}
.settings-storage__clear:hover:not(:disabled),
.settings-storage__clear:focus-visible:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-text);
  background: var(--color-surface-accent);
  outline: none;
}
.settings-storage__clear:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.settings-bottom-nav .story-bottom-nav__settings {
  color: var(--color-accent);
  background: var(--color-surface-accent);
}

/* Stories screen */
.stories-screen {
  width: min(100%, 48rem);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 8rem;
}
.stories-content {
  padding: 1.5rem 1rem 2rem;
}
.stories-content > h2 {
  margin: 0 0 0.35rem;
  color: var(--color-text);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  letter-spacing: -0.045em;
}
.stories-intro {
  margin: 0 0 1.6rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.download-teaser {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr) minmax(2.15rem, auto) 2.2rem;
  align-items: center;
  gap: 0.45rem;
  margin: 0.8rem 0 1rem;
  padding: 0.7rem;
  border: 1px solid var(--color-accent);
  border-radius: 0.85rem;
  color: var(--color-text);
  background: var(--color-surface-accent);
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.download-teaser:hover,
.download-teaser:focus-visible {
  filter: brightness(1.06);
  outline: none;
  transform: translateY(-1px);
}
.download-teaser__icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
}
.download-teaser__icon .ui-icon {
  width: 1.05rem;
  height: 1.05rem;
}
.download-teaser__copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.download-teaser__copy strong {
  overflow: hidden;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.download-teaser__copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.63rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.download-teaser__count {
  display: grid;
  justify-items: end;
  gap: 0.08rem;
  min-width: 2.45rem;
  color: var(--color-accent);
  white-space: nowrap;
}
.download-teaser__count strong {
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}
.download-teaser__count small {
  color: var(--color-text-muted);
  font-size: 0.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}
.download-teaser__arrow {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--color-accent);
  border-radius: 0.7rem;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  box-shadow: 0 0.25rem 0.65rem rgb(0 0 0 / 14%);
}
.download-teaser__arrow .ui-icon {
  width: 1.15rem;
  height: 1.15rem;
}
.downloads-content {
  padding: 1.5rem 1rem 9rem;
}
.downloads-content .ar-preload {
  margin: 0;
}
.stories-list {
  display: grid;
  gap: 0.6rem;
}
.story-list-item {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.9rem;
  color: var(--color-text);
  background: var(--color-surface);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}
.story-list-item:hover,
.story-list-item:focus-visible {
  border-color: var(--color-accent);
  background: var(--color-surface-accent);
  transform: translateY(-1px);
}
.story-list-item__index {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  color: var(--color-accent);
  background: var(--color-surface-accent);
  font-size: 0.68rem;
  font-weight: 800;
}
.story-list-item__copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}
.story-list-item__copy strong {
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-list-item__copy small {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}
.story-list-item__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
}
.story-list-item__meta-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-list-item__meta-text.is-location-loading {
  opacity: 0.62;
  animation: location-text-pulse 1.4s ease-in-out infinite;
}
@keyframes location-text-pulse {
  0%,
  100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}
.story-list-item__download {
  display: inline-block;
  position: relative;
  top: -0.04em;
  margin-left: 0.28rem;
  color: var(--color-accent);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  vertical-align: baseline;
}
.story-list-item__download.is-update {
  color: var(--color-accent);
}
.story-list-item__arrow {
  color: var(--color-accent);
  font-size: 1.1rem;
}
.stories-bottom-nav .story-bottom-nav__stories {
  color: var(--color-accent);
  background: var(--color-surface-accent);
}
.ar-preload {
  margin: 1.25rem 1rem 0;
  padding: 1rem;
  border: 1px solid var(--color-border-faint);
  border-radius: 1rem;
  background: var(--color-surface);
}
.ar-preload__heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.ar-preload__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  color: var(--color-accent);
  background: var(--color-surface-accent);
}
.ar-preload__icon .ui-icon {
  width: 1.15rem;
  height: 1.15rem;
}
.ar-preload__heading .eyebrow {
  margin: 0 0 0.15rem;
}
.ar-preload__heading h2 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.05rem;
}
.ar-preload__description {
  margin: 0.8rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}
.ar-preload__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
}
.ar-preload__select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-body);
  font-size: 0.72rem;
  font-weight: 700;
}
.ar-preload__select-all input,
.ar-preload-item input {
  accent-color: var(--color-accent);
}
.ar-preload__count {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  white-space: nowrap;
}
.ar-preload__summary {
  display: grid;
  justify-items: end;
  gap: 0.12rem;
  min-width: 0;
  text-align: right;
}
.ar-preload__total {
  color: var(--color-accent);
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
}
.ar-preload__list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.ar-preload-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-surface-raised);
  cursor: pointer;
}
.ar-preload-item.is-downloaded {
  border-color: var(--color-status-online);
}
.ar-preload-item.is-update {
  border-color: var(--color-accent);
}
.ar-preload-item.is-ready {
  border-color: var(--color-border);
}
.ar-preload-item.is-unavailable {
  cursor: default;
}
.ar-preload-item__copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}
.ar-preload-item__copy strong {
  overflow: hidden;
  color: var(--color-text);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ar-preload-item__copy small {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.62rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ar-preload-item__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 7rem;
  padding: 0.2rem 0.42rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  background: var(--color-surface-control);
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ar-preload-item__status.is-downloaded {
  border-color: var(--color-status-online);
  color: var(--color-status-online);
  background: var(--color-status-online-ring);
}
.ar-preload-item__status.is-update {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-surface-accent);
}
.ar-preload-item__status.is-ready {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-surface-accent);
}
.ar-preload-item__status.is-partial {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-surface-accent);
}
.ar-preload-item__status.is-unavailable {
  color: var(--color-text-faint);
}
.ar-preload__empty,
.ar-preload__status {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  line-height: 1.4;
}
.ar-preload__actions {
  display: block;
  margin-top: 0.8rem;
}
.ar-preload__actions button {
  min-width: 0;
  width: 100%;
  padding: 0.65rem 0.55rem;
  border: 1px solid var(--color-accent);
  border-radius: 0.7rem;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  font-size: 0.68rem;
  font-weight: 800;
}
.ar-preload__actions button:first-child {
  color: var(--color-text-body);
  background: var(--color-surface-control);
}
.downloads-action-bar {
  position: fixed;
  z-index: 12;
  right: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 4.9rem);
  width: min(calc(100% - 2rem), 30rem);
  margin: 0;
  padding: 0.4rem;
  border: 1px solid var(--color-border-faint);
  border-radius: 0.9rem;
  background: var(--color-glass-soft);
  box-shadow: 0 0.8rem 2rem var(--color-shadow);
  transform: translateX(50%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.downloads-action-bar button,
.downloads-action-bar button:first-child {
  color: var(--color-accent-contrast);
  background: var(--color-accent);
}
.ar-preload__actions button:disabled,
.ar-preload__select-all input:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.ar-preload__status {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--color-border-faint);
}
.ar-preload__status[hidden] {
  display: none;
}
.ar-preload-progress-overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--color-overlay);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.ar-preload-progress-overlay[hidden] {
  display: none;
}
.ar-preload-progress {
  width: 24rem;
  max-width: calc(100vw - 2rem);
  min-width: 0;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: var(--color-glass);
  box-shadow: 0 1rem 3rem var(--color-shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.ar-preload-progress__header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
  color: var(--color-text);
  font-size: 0.7rem;
}
.ar-preload-progress__header strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ar-preload-progress__close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  margin: -0.2rem -0.2rem 0 0;
}
.ar-preload-progress__close .ui-icon {
  width: 1rem;
  height: 1rem;
}
.ar-preload-progress__header span {
  color: var(--color-accent);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
}
.ar-preload-progress__track {
  height: 0.4rem;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-surface-control);
}
.ar-preload-progress__track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
  transition: width 0.18s ease;
}
.ar-preload-progress > small {
  display: block;
  overflow: hidden;
  margin-top: 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-bottom-nav .story-bottom-nav__guide {
  color: var(--color-accent);
  background: var(--color-surface-accent);
}

/* Guide screen */
.guide-screen {
  width: min(100%, 48rem);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 8rem;
}
.guide-content {
  padding: 1.5rem 1rem 2rem;
}
.guide-content > h2 {
  margin: 0 0 0.35rem;
  color: var(--color-text);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  letter-spacing: -0.045em;
}
.guide-intro {
  margin: 0 0 1.6rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.55;
}
.guide-card,
.guide-tip {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.85rem;
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--color-border-faint);
  border-radius: 1rem;
  background: var(--color-surface);
}
.guide-card--accent {
  border-color: var(--color-accent);
  background: var(--color-surface-accent);
}
.guide-card__icon,
.guide-tip__icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  color: var(--color-accent);
  background: var(--color-surface-raised);
}
.guide-card__icon .ui-icon,
.guide-tip__icon .ui-icon {
  width: 1.2rem;
  height: 1.2rem;
}
.guide-card__body h3,
.guide-tip h3 {
  margin: 0 0 0.3rem;
  color: var(--color-text);
  font-size: 0.98rem;
}
.guide-card__body p,
.guide-tip p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}
.guide-card__body ol {
  display: grid;
  gap: 0.35rem;
  margin: 0.8rem 0 0;
  padding-left: 1.15rem;
  color: var(--color-text-body);
  font-size: 0.94rem;
  line-height: 1.45;
}
.guide-card__body li::marker {
  color: var(--color-accent);
  font-weight: 800;
}
.guide-tip {
  align-items: start;
  border-color: var(--color-accent);
  background: var(--color-surface-accent);
}

.ar-launch {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--color-accent);
  border-radius: 0.8rem;
  color: var(--color-accent-contrast) !important;
  background: var(--color-accent);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
}
.ar-launch:hover,
.ar-launch:focus-visible {
  color: var(--color-accent-contrast) !important;
  filter: brightness(1.06);
}
.ar-launch__icon,
.ar-launch__arrow {
  display: inline-flex;
  flex: 0 0 auto;
}
.ar-launch__icon .ui-icon {
  width: 1.05rem;
  height: 1.05rem;
}
.ar-launch__arrow {
  margin-left: auto;
}
.ar-launch__arrow .ui-icon {
  width: 1rem;
  height: 1rem;
}

/* AR scene */
.ar-page {
  overflow: hidden;
  background: #000;
}
.ar-screen {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 32rem;
  overflow: hidden;
  background: var(--color-surface);
}
.ar-camera {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: cover;
}
.ar-camera[hidden] {
  display: none;
}
#ar-scene {
  position: fixed;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
}
body.ar-webxr-active #ar-scene,
body.ar-camera-fallback-active #ar-scene {
  opacity: 1;
}
body.ar-webxr-active #ar-scene {
  transition: none;
}
#ar-scene canvas.a-canvas {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  touch-action: none;
}
.ar-overlay {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(max(0.75rem, env(safe-area-inset-top)) + 0.4rem)
    max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  pointer-events: none;
}
.ar-overlay > * {
  pointer-events: auto;
}
.ar-overlay button,
.ar-overlay a {
  touch-action: manipulation;
}
.ar-welcome {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  width: min(calc(100% - 2rem), 22rem);
  padding: 1.35rem 1.1rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 1.15rem;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
  text-align: center;
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.ar-welcome[hidden] {
  display: none;
}
.ar-welcome__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.8rem;
  border-radius: 1rem;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
}
.ar-welcome__icon .ui-icon {
  width: 1.45rem;
  height: 1.45rem;
}
.ar-welcome__eyebrow {
  margin: 0 0 0.25rem;
  color: var(--color-accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ar-welcome h2 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.35rem;
}
.ar-welcome > p:not(.ar-welcome__eyebrow):not(.ar-welcome__note) {
  margin: 0.65rem 0 1rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.ar-welcome__download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  color: var(--color-text-muted);
  background: var(--color-surface-raised);
  font-size: 0.68rem;
  text-align: left;
}
.ar-welcome__download strong {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 72%;
  overflow-wrap: anywhere;
  color: var(--color-text);
  font-size: 0.72rem;
  text-align: right;
  white-space: normal;
}
.ar-welcome__button {
  width: 100%;
}
.ar-welcome__actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.55rem;
  width: 100%;
}
.ar-welcome__actions .ar-welcome__button {
  width: 100%;
  min-width: 0;
}
.ar-welcome__download-button:not([aria-disabled="true"]) {
  color: var(--color-text-strong);
  background: var(--color-surface-control);
}
.ar-welcome__download-button[aria-disabled="true"] {
  color: var(--color-text-muted);
  background: var(--color-surface-raised);
}
.ar-welcome__actions .ar-action[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.42;
}
.ar-welcome__feedback {
  width: 100%;
  margin: 0.65rem 0 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.65rem;
  color: var(--color-text-muted);
  background: var(--color-surface-raised);
  font-size: 0.64rem;
  line-height: 1.35;
  text-align: center;
}
.ar-welcome__feedback[hidden] {
  display: none;
}
.ar-welcome__button[hidden] {
  display: none;
}
.ar-download-progress {
  width: 100%;
  margin: 0 0 0.75rem;
}
.ar-download-progress[hidden] {
  display: none;
}
.ar-download-progress__track {
  width: 100%;
  height: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-border);
}
.ar-download-progress__track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
  transition: width 0.18s ease;
}
.ar-download-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
  color: var(--color-text-muted);
  font-size: 0.62rem;
}
.ar-download-progress__meta strong {
  color: var(--color-text);
}
.ar-welcome__note {
  margin: 0.7rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.64rem;
  line-height: 1.4;
}
.ar-welcome__guide-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}
.ar-welcome__guide-link .ui-icon {
  width: 1rem;
  height: 1rem;
}
.ar-experience-active .ar-welcome {
  display: none;
}
body:not(.ar-experience-active) .ar-actions,
body:not(.ar-experience-active) .ar-placement-action,
body:not(.ar-experience-active) .ar-control-dock,
body:not(.ar-experience-active) .ar-instructions {
  display: none;
}
.ar-header,
.ar-actions,
.ar-instructions {
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 0.75rem 2rem var(--color-shadow-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.ar-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  width: min(100%, 38rem);
  box-sizing: border-box;
  margin: 0.5rem auto 0;
  padding: 0.55rem 0.65rem;
  border-radius: 1rem;
  color: var(--color-text);
  background: var(--color-glass);
}
.ar-header__back {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  color: var(--color-text);
  background: var(--color-surface-control);
  text-decoration: none;
}
.ar-header__title {
  min-width: 0;
}
.ar-header__title .eyebrow {
  margin: 0 0 0.1rem;
  color: var(--color-text-muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ar-header__title h1 {
  overflow: hidden;
  margin: 0;
  color: var(--color-text-strong);
  font-size: clamp(0.9rem, 4vw, 1.2rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ar-header .language-toggle {
  color: var(--color-text);
  background: var(--color-surface-control);
}
.ar-placement-action {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: var(--color-glass);
  box-shadow: 0 0.75rem 2rem var(--color-shadow-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.ar-control-dock {
  position: absolute;
  bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + 0.55rem);
  left: 50%;
  z-index: 4;
  display: grid;
  gap: 0.45rem;
  width: min(calc(100% - 1.5rem), 24rem);
  transform: translateX(-50%);
}
.ar-control-dock[hidden] {
  display: none;
}
.ar-control-dock .ar-actions {
  width: 100%;
  margin: 0;
}
.ar-actions--single {
  grid-template-columns: 1fr;
}
.ar-placement-action .ar-action {
  width: 100%;
  min-height: 2.9rem;
}
.ar-placement-action[hidden] {
  display: none;
}
.ar-placement-action .ar-action:disabled {
  color: var(--color-text-muted);
  background: var(--color-surface-control);
}
.ar-placement-action .ar-action[hidden],
.ar-actions .ar-action[hidden] {
  display: none;
}
.ar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  width: min(100%, 38rem);
  margin: auto auto 0;
  padding: 0.45rem;
  border-radius: 1rem;
  background: var(--color-glass);
}
.ar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
  min-height: 2.65rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.7rem;
  color: var(--color-text);
  background: var(--color-surface-control);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}
.ar-action--primary {
  border-color: var(--color-accent);
  color: var(--color-accent-contrast);
  background: var(--color-accent);
}
.ar-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
.ar-action .ui-icon {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
}
.ar-instructions {
  position: absolute;
  z-index: 6;
  /* JS refines this from the actual header height; this keeps the first
     paint close to the header even before fonts finish loading. */
  top: calc(max(0.75rem, env(safe-area-inset-top)) + 4.55rem);
  right: max(0.75rem, env(safe-area-inset-right));
  left: max(0.75rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 38rem;
  min-height: 2.5rem;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  color: var(--color-text-body);
  background: var(--color-glass-soft);
  font-size: 0.78rem;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  overflow: visible;
}
.ar-instructions__text {
  min-width: 0;
  flex: 1 1 auto;
}
.ar-instructions__help {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-left: 0.5rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 50%;
  color: var(--color-text-body);
  background: var(--color-surface-control);
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}
.ar-instructions__help .ui-icon {
  width: 1rem;
  height: 1rem;
}
.ar-spatial-hit-targets {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}
.ar-overlay > .ar-spatial-hit-targets {
  pointer-events: none;
}
body:not(.ar-experience-active) .ar-spatial-hit-targets {
  display: none;
}
.ar-header,
.ar-welcome {
  position: relative;
  z-index: 6;
}
.ar-welcome {
  position: absolute;
}
.ar-spatial-hit-target {
  position: absolute;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  transform: translate(-50%, -50%);
  touch-action: manipulation;
}
.ar-spatial-hit-target--text {
  border-radius: 0.2rem;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.ar-spatial-hit-target--model {
  touch-action: none;
}
.ar-spatial-hit-targets .ar-spatial-hit-target {
  pointer-events: auto;
}
.ar-spatial-hit-target:active,
.ar-spatial-hit-target:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  background: transparent;
}
.ar-spatial-hit-target--model:active,
.ar-spatial-hit-target--model:focus,
.ar-spatial-hit-target--model:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.ar-spatial-hit-target[hidden] {
  display: none;
}
.ar-media-viewer {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.9rem;
  padding: max(0.75rem, env(safe-area-inset-top))
    max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  color: var(--color-text);
  background: var(--color-page);
}
.ar-media-viewer[hidden] {
  display: none;
}
.ar-media-viewer__header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 48rem);
  margin: 0 auto;
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.05rem;
  background: var(--color-glass);
  box-shadow: 0 0.9rem 2rem var(--color-shadow-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.ar-media-viewer__header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}
.ar-media-viewer__content {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.9rem;
  min-height: 0;
  width: 100%;
}
.ar-media-viewer--content-rotated {
  overflow: hidden;
}
.ar-media-viewer--content-rotated .ar-media-viewer__content {
  position: relative;
  display: block;
  overflow: visible;
  padding: 0;
}
.ar-media-viewer--content-rotated.ar-media-viewer--carousel .ar-media-viewer__stage,
.ar-media-viewer--content-rotated.ar-media-viewer--video .ar-media-viewer__stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--ar-media-rotated-width, 100vh);
  max-width: none;
  height: var(--ar-media-rotated-height, 100vw);
  margin: 0;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}
.ar-media-viewer--content-rotated .ar-media-viewer__figure {
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
}
.ar-media-viewer--content-rotated.ar-media-viewer--carousel .ar-media-viewer__figure img {
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
}
.ar-media-viewer--content-rotated.ar-media-viewer--carousel .ar-media-viewer__figure {
  overflow: hidden;
}
.ar-media-viewer--content-rotated .ar-media-viewer__footer {
  position: absolute;
  z-index: 5;
  top: 50% !important;
  right: auto;
  bottom: auto;
  left: calc(max(0.65rem, env(safe-area-inset-left)) - 2rem);
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
}
.ar-media-viewer--content-rotated.ar-media-viewer--video .ar-media-viewer__figure {
  overflow: visible;
  box-sizing: border-box;
  gap: 0.45rem;
}
.ar-media-viewer--content-rotated.ar-media-viewer--video .ar-media-viewer__figure video {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100% - 3.25rem) !important;
}
.ar-media-viewer--content-rotated.ar-media-viewer--video .ar-media-viewer__video-controls {
  flex: 0 0 2.4rem;
  grid-template-columns: auto minmax(4rem, 1fr) auto auto;
  grid-template-rows: auto;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 2.4rem;
  padding: 0;
  gap: 0.4rem;
}
.ar-media-viewer--content-rotated.ar-media-viewer--video .ar-media-viewer__video-time {
  grid-column: auto;
  grid-row: auto;
  min-width: 4.8rem;
}
.ar-media-viewer--content-rotated.ar-media-viewer--video .ar-media-viewer__video-mute {
  grid-column: auto;
  grid-row: auto;
}
.ar-media-viewer__heading {
  min-width: 0;
}
.ar-media-viewer__heading p {
  margin: 0 0 0.1rem;
  overflow: hidden;
  color: var(--color-accent);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.ar-media-viewer__header h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--color-text-strong);
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ar-media-viewer__stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 64rem);
  min-height: 0;
  margin: 0 auto;
}
.ar-media-viewer--video .ar-media-viewer__stage {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 52rem);
}
.ar-media-viewer--video .ar-media-viewer__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: min(100%, 52rem);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ar-media-viewer--carousel .ar-media-viewer__figure {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ar-media-viewer--carousel .ar-media-viewer__figure img {
  border-radius: 0;
}
.ar-media-viewer--carousel .ar-media-viewer__stage {
  position: relative;
  display: block;
  width: min(100%, 52rem);
  touch-action: pan-y;
}
.ar-media-viewer--carousel .ar-media-viewer__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
}
.ar-media-viewer--carousel .ar-media-viewer__arrow:hover,
.ar-media-viewer--carousel .ar-media-viewer__arrow:focus-visible {
  transform: translateY(-50%) scale(1.04);
}
.ar-media-viewer--carousel .ar-media-viewer__arrow:first-child {
  left: 0.8rem;
}
.ar-media-viewer--carousel .ar-media-viewer__arrow:last-child {
  right: 0.8rem;
}
.ar-media-viewer--video .ar-media-viewer__figure video {
  flex: 0 1 auto;
  width: 100%;
  height: auto;
  max-height: calc(100% - 3.4rem);
  border-radius: 0;
  object-fit: contain;
}
.ar-media-viewer__video-controls {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(6rem, 1fr) auto auto;
  align-items: center;
  gap: 0.65rem;
  width: min(100%, 52rem);
  margin: 0 auto;
  padding: 0.4rem 0;
  border: 0;
  border-radius: 0;
  color: var(--color-text);
  background: transparent;
  box-shadow: none;
}
.ar-leave-confirm {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  background: rgb(0 0 0 / 42%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.ar-leave-confirm[hidden] {
  display: none;
}
.ar-leave-confirm__card {
  width: min(100%, 25rem);
  padding: 1.25rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.35rem;
  color: var(--color-text);
  background: var(--color-surface-raised);
  box-shadow: 0 1.5rem 4rem var(--color-shadow);
}
.ar-leave-confirm__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--color-accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ar-leave-confirm__card h2 {
  margin: 0;
  color: var(--color-text-strong);
  font-size: 1.35rem;
}
.ar-leave-confirm__card > p:not(.ar-leave-confirm__eyebrow) {
  margin: 0.65rem 0 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.ar-leave-confirm__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.ar-leave-confirm .button {
  min-height: 2.8rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.85rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.ar-leave-confirm .button--quiet {
  color: var(--color-text-strong);
  background: var(--color-surface-control);
}
.ar-leave-confirm .button--accent {
  color: var(--color-accent-contrast);
  border-color: var(--color-accent);
  background: var(--color-accent);
}
.ar-media-viewer__video-controls[hidden] {
  display: none;
}
.ar-media-viewer__video-button {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  cursor: pointer;
}
.ar-media-viewer__video-button .ui-icon {
  width: 1rem;
  height: 1rem;
}
.ar-media-viewer__video-progress {
  width: 100%;
  accent-color: var(--color-accent);
}
.ar-media-viewer__video-time {
  min-width: 5.5rem;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}
.ar-media-viewer--video .ar-media-viewer__arrow {
  display: none;
}
.ar-media-viewer__figure {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.15rem;
  background: var(--color-surface-raised);
  box-shadow: 0 1.1rem 3rem var(--color-shadow);
}
.ar-media-viewer__figure img,
.ar-media-viewer__figure video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ar-media-viewer__figure img[hidden],
.ar-media-viewer__figure video[hidden] {
  display: none;
}
.ar-media-viewer__arrow {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 50%;
  color: var(--color-text-strong);
  background: var(--color-surface-control);
  box-shadow: 0 0.45rem 1rem var(--color-shadow-soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.ar-media-viewer__arrow:hover,
.ar-media-viewer__arrow:focus-visible {
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  transform: scale(1.04);
}
.ar-media-viewer__arrow .ui-icon {
  width: 1.35rem;
  height: 1.35rem;
}
.ar-media-viewer__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 1.35rem;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--color-glass-soft);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.ar-media-viewer__footer > div {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 0.45rem;
}
.ar-media-viewer__footer[hidden] {
  display: none;
}
.ar-media-viewer__dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--color-muted);
}
.ar-media-viewer__dot.is-active {
  width: 1.35rem;
  border-radius: 999px;
  background: var(--color-accent);
}
body.ar-media-viewer-active .ar-spatial-hit-targets {
  display: none;
}
body.ar-media-viewer-active {
  overflow: hidden;
}
.ar-media-viewer--carousel .ar-media-viewer__stage {
  touch-action: none;
}
@media (max-width: 30rem) {
  .ar-media-viewer__stage {
    gap: 0.35rem;
  }
  .ar-media-viewer__arrow {
    width: 2.35rem;
    height: 2.35rem;
  }
  .ar-media-viewer__video-controls {
    grid-template-columns: auto minmax(4rem, 1fr) auto;
    gap: 0.4rem;
  }
  .ar-media-viewer__video-time {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    min-width: 0;
  }
  .ar-media-viewer__video-mute {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}
@media (orientation: landscape) {
  .ar-media-viewer,
  .ar-media-viewer--landscape {
    gap: 0.35rem;
    padding: max(0.35rem, env(safe-area-inset-top))
      max(0.45rem, env(safe-area-inset-right))
      max(0.35rem, env(safe-area-inset-bottom))
      max(0.45rem, env(safe-area-inset-left));
  }
  .ar-media-viewer__header {
    padding: 0.3rem 0.45rem 0.3rem 0.75rem;
    border-radius: 0.75rem;
  }
  .ar-media-viewer__heading p {
    margin-bottom: 0;
    font-size: 0.5rem;
  }
  .ar-media-viewer__header h2 {
    font-size: 0.9rem;
  }
  .ar-media-viewer__header .icon-button {
    width: 2.1rem;
    height: 2.1rem;
  }
  .ar-media-viewer__footer {
    min-height: 1rem;
    padding: 0.15rem 0.55rem;
    font-size: 0.68rem;
  }
  .ar-media-viewer--video .ar-media-viewer__figure video {
    max-height: calc(100% - 2.6rem);
  }
  .ar-media-viewer__video-controls {
    padding: 0.15rem 0;
  }
}
/* Developer AR layout editor */
.ar-editor-page {
  min-height: 100vh;
  overflow: auto;
  color: var(--color-text);
  background: var(--color-page);
}
.ar-editor-shell {
  width: min(100% - 2rem, 88rem);
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
}
.ar-editor-header,
.ar-editor-toolbar,
.ar-editor-workspace {
  display: flex;
  gap: 1rem;
}
.ar-editor-header {
  position: relative;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.ar-editor-header h1,
.ar-editor-inspector h2 {
  margin: .15rem 0 .3rem;
  color: var(--color-text-strong);
  font-size: clamp(1.35rem, 3vw, 2rem);
}
.ar-editor-subtitle {
  margin: 0;
  color: var(--color-text-muted);
  font-size: .82rem;
}
.ar-editor-back {
  flex: 0 0 auto;
  padding: .55rem .75rem;
  border: 1px solid var(--color-border);
  border-radius: .7rem;
  color: var(--color-text);
  background: var(--color-surface);
  font-size: .78rem;
  text-decoration: none;
}
.ar-editor-toolbar {
  align-items: end;
  justify-content: space-between;
  padding: .75rem;
  border: 1px solid var(--color-border);
  border-radius: .9rem;
  background: var(--color-surface);
}
.ar-editor-toolbar label,
.ar-editor-fields label {
  display: grid;
  gap: .3rem;
  color: var(--color-text-muted);
  font-size: .7rem;
}
.ar-editor-toolbar select,
.ar-editor-fields input {
  min-height: 2.25rem;
  padding: .45rem .55rem;
  border: 1px solid var(--color-border);
  border-radius: .55rem;
  color: var(--color-text);
  background: var(--color-surface-control);
  font: inherit;
}
.ar-editor-toolbar select {
  min-width: min(22rem, 60vw);
}
.ar-editor-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
}
.ar-editor-button {
  min-height: 2.25rem;
  padding: .45rem .7rem;
  border: 1px solid var(--color-border);
  border-radius: .55rem;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  cursor: pointer;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
}
.ar-editor-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.ar-editor-button--secondary {
  color: var(--color-text-body);
  background: var(--color-surface-control);
}
.ar-editor-status {
  min-height: 1.2rem;
  margin: .65rem 0;
  color: var(--color-text-muted);
  font-size: .75rem;
}
.ar-editor-status.is-error {
  color: #eaa08b;
}
.ar-editor-workspace {
  align-items: stretch;
}
.ar-editor-preview {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: min(70vh, 48rem);
  min-height: 32rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  background: #1d2023;
}
#ar-editor-scene {
  width: 100%;
  height: 100%;
  min-height: 0;
}
#ar-editor-scene canvas.a-canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: 1rem;
  background: #1d2023 !important;
}
.ar-editor-preview-help {
  position: absolute;
  right: .75rem;
  bottom: .65rem;
  left: .75rem;
  margin: 0;
  padding: .45rem .6rem;
  border-radius: .55rem;
  color: var(--color-text-muted);
  background: rgba(19, 22, 24, .78);
  font-size: .7rem;
  text-align: center;
  pointer-events: none;
}
.ar-editor-preview-controls {
  position: absolute;
  top: .7rem;
  right: .7rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem;
  border: 1px solid var(--color-border);
  border-radius: .65rem;
  background: rgba(29, 32, 35, .88);
}
.ar-editor-preview-controls button,
.ar-editor-preview-controls span {
  min-width: 2rem;
  min-height: 1.9rem;
  padding: .25rem .45rem;
  border: 0;
  border-radius: .4rem;
  color: var(--color-text);
  background: transparent;
  font: inherit;
  font-size: .74rem;
  text-align: center;
}
.ar-editor-preview-controls button { cursor: pointer; }
.ar-editor-preview-controls button:hover,
.ar-editor-preview-controls button:focus-visible {
  color: var(--color-accent-contrast);
  background: var(--color-accent);
}
.ar-editor-preview-controls button:last-child {
  min-width: auto;
  color: var(--color-text-muted);
  font-size: .68rem;
}
.ar-editor-inspector {
  flex: 0 1 24rem;
  min-width: 20rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  background: var(--color-surface);
}
.ar-editor-object-list {
  display: grid;
  gap: .4rem;
  margin: 1rem 0 1.25rem;
}
.ar-editor-object-list button {
  padding: .6rem .7rem;
  border: 1px solid var(--color-border);
  border-radius: .6rem;
  color: var(--color-text-body);
  background: var(--color-surface-control);
  cursor: pointer;
  font: inherit;
  font-size: .76rem;
  text-align: left;
}
.ar-editor-object-list button.is-selected,
.ar-editor-object-list button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-contrast);
  background: var(--color-accent);
}
.ar-editor-object-list button[hidden] {
  display: none;
}
.ar-editor-fields {
  display: grid;
  gap: .65rem;
}
.ar-editor-field-heading {
  margin: 0;
  color: var(--color-text-muted);
  font-size: .7rem;
  line-height: 1.4;
}
.ar-editor-note {
  margin: 1.4rem 0 0;
  color: var(--color-text-subtle);
  font-size: .68rem;
  line-height: 1.45;
}
.ar-editor-content {
  margin: 1rem 0 1.1rem;
  padding: .75rem;
  border: 1px solid var(--color-border);
  border-radius: .75rem;
  background: color-mix(in srgb, var(--color-surface-control) 72%, transparent);
}
.ar-editor-content__header,
.ar-editor-copy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.ar-editor-content__header .ar-editor-field-heading { margin: 0; }
.ar-editor-content__header select,
.ar-editor-media-fields select,
.ar-editor-copy-fields input,
.ar-editor-copy-fields textarea {
  width: 100%;
  min-width: 0;
  padding: .48rem .55rem;
  border: 1px solid var(--color-border);
  border-radius: .5rem;
  color: var(--color-text);
  background: var(--color-surface-control);
  font: inherit;
  font-size: .76rem;
}
.ar-editor-content__header select { width: auto; max-width: 50%; }
.ar-editor-content-help {
  margin: .5rem 0 .7rem;
  color: var(--color-text-subtle);
  font-size: .7rem;
  line-height: 1.4;
}
.ar-editor-content-options {
  display: grid;
  gap: .35rem;
}
.ar-editor-content-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .45rem;
  min-height: 2rem;
  color: var(--color-text-body);
  font-size: .76rem;
}
.ar-editor-content-option input { accent-color: var(--color-accent); }
.ar-editor-content-option small {
  color: var(--color-text-subtle);
  font-size: .66rem;
  text-align: right;
}
.ar-editor-media-fields,
.ar-editor-copy-fields {
  display: grid;
  gap: .55rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--color-border);
}
.ar-editor-media-fields label,
.ar-editor-copy-fields label {
  display: grid;
  gap: .3rem;
  color: var(--color-text-muted);
  font-size: .7rem;
}
.ar-editor-media-fields select[multiple] { min-height: 4.7rem; }
.ar-editor-copy-heading {
  color: var(--color-text-muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ar-editor-copy-heading span:last-child { margin-left: auto; }
.ar-editor-copy-fields textarea { resize: vertical; line-height: 1.45; }

@media (max-width: 760px) {
  .ar-editor-header,
  .ar-editor-toolbar,
  .ar-editor-workspace {
    display: grid;
  }
  .ar-editor-header {
    gap: .65rem;
  }
  .ar-editor-toolbar__actions {
    justify-content: flex-start;
  }
  .ar-editor-toolbar select {
    width: 100%;
  }
  .ar-editor-preview,
  #ar-editor-scene {
    height: 30rem;
    min-height: 0;
  }
  .ar-editor-inspector {
    width: auto;
    min-width: 0;
  }
}
@media (max-width: 380px) {
  .ar-action {
    font-size: 0.58rem;
  }
  .ar-action .ui-icon {
    display: none;
  }
}

@media (min-width: 760px) {
  .map-header,
  .explore-sheet,
  .bottom-nav {
    width: min(100% - 4rem, 34rem);
  }
  .map-header {
    top: 2rem;
    left: 2rem;
    transform: none;
  }
  .stories-page .story-header,
  .point-detail-page .story-header,
  .guide-page .story-header,
  .settings-page .story-header {
    top: 2rem;
    margin-top: 2rem;
  }
  .map-status-row {
    top: 6.15rem;
    left: 2rem;
    width: min(calc(100% - 4rem), 38rem);
  }
  .explore-sheet {
    right: auto;
    bottom: 2rem;
    left: 2rem;
    max-height: 47vh;
  }
  .bottom-nav {
    right: auto;
    bottom: 2rem;
    left: auto;
    margin-left: calc(50% - 17rem);
  }
  .leaflet-control-attribution {
    margin-bottom: 6.5rem !important;
  }
}

/* Supporting text scale: keep large titles unchanged while making small
   labels, metadata, captions, and helper text easier to read on phones. */
.eyebrow { font-size: 0.77rem; }
.leaflet-control-attribution { font-size: 0.66rem; }
.map-header__title .eyebrow { font-size: 0.67rem; }
.language-toggle { font-size: 0.7rem; }
.map-style-menu__title { font-size: 0.74rem; }
.map-style-menu button { font-size: 0.9rem; }
.map-status,
.map-status--ready { font-size: 0.84rem; }
.map-ar-prompt__copy small { font-size: 0.84rem; }
.poi-preview__eyebrow { font-size: 0.73rem; }
.poi-preview__route { font-size: 0.84rem; }
.sheet-action { font-size: 0.9rem; }
.bottom-nav__item small { font-size: 0.72rem; }
.language-modal__options strong { font-size: 0.84rem; }

.story-header__status { font-size: 0.82rem; }
.story-carousel__caption small { font-size: 0.86rem; }
.story-heading__eyebrow { font-size: 0.82rem; }
.story-heading__location { font-size: 0.9rem; }
.voiceover__eyebrow { font-size: 0.74rem; }
.language-pill { font-size: 0.78rem; }
.voiceover__time { font-size: 0.84rem; }
.story-bottom-nav small { font-size: 0.74rem; }

.settings-group > p { font-size: 0.91rem; }
.settings-option__code { font-size: 0.82rem; }
.download-teaser__copy strong { font-size: 0.9rem; }
.download-teaser__copy small { font-size: 0.76rem; }
.download-teaser__count small { font-size: 0.48rem; }
.story-list-item__index { font-size: 0.82rem; }
.story-list-item__copy small { font-size: 0.84rem; }
.story-list-item__download { font-size: 0.91rem; }

.ar-preload__description { font-size: 0.91rem; }
.ar-preload__select-all { font-size: 0.86rem; }
.ar-preload__count { font-size: 0.82rem; }
.ar-preload-item__copy strong { font-size: 0.91rem; }
.ar-preload-item__status { font-size: 0.67rem; }
.ar-preload__empty,
.ar-preload__status { font-size: 0.84rem; }
.ar-preload__actions button { font-size: 0.82rem; }
.ar-preload-progress__header { font-size: 0.84rem; }
.ar-preload-progress__header span { font-size: 0.86rem; }
.ar-preload-progress > small { font-size: 0.74rem; }

.guide-card__body p,
.guide-tip p,
.guide-card__body ol { font-size: 0.91rem; }
.ar-launch { font-size: 0.94rem; }

.ar-welcome__eyebrow { font-size: 0.74rem; }
.ar-welcome__download { font-size: 0.82rem; }
.ar-welcome__download strong { font-size: 0.86rem; }
.ar-welcome__feedback { font-size: 0.77rem; }
.ar-welcome__note { font-size: 0.77rem; }
.ar-header__title .eyebrow { font-size: 0.7rem; }
.ar-action { font-size: 0.79rem; }
.ar-instructions { font-size: 0.8rem; }

.ar-editor-subtitle { font-size: 0.98rem; }
.ar-editor-back { font-size: 0.94rem; }
.ar-editor-toolbar label,
.ar-editor-fields label { font-size: 0.84rem; }
.ar-editor-button { font-size: 0.86rem; }
.ar-editor-status { font-size: 0.9rem; }
.ar-editor-preview-help { font-size: 0.84rem; }
.ar-editor-object-list button { font-size: 0.91rem; }
.ar-editor-field-heading { font-size: 0.84rem; }
.ar-editor-note { font-size: 0.82rem; }
.ar-editor-content-help,
.ar-editor-content-option,
.ar-editor-media-fields label,
.ar-editor-copy-fields label { font-size: 0.82rem; }
.ar-editor-content-option small,
.ar-editor-copy-heading { font-size: 0.72rem; }

/* Readability refinement: make supporting copy comfortable to read on small
   screens while reclaiming space from the gaps around it. */
.map-header__title .eyebrow { font-size: 0.74rem; }
.language-toggle { font-size: 0.77rem; }
.bottom-nav__item small,
.story-bottom-nav small { font-size: 0.78rem; }

.download-teaser {
  gap: 0.35rem;
  padding: 0.65rem;
}
.download-teaser__copy { gap: 0.08rem; }
.download-teaser__copy strong { font-size: 0.94rem; }
.download-teaser__copy small {
  font-size: 0.9rem;
  line-height: 1.32;
  -webkit-line-clamp: 3;
}
.download-teaser__count small {
  font-size: 0.62rem;
  line-height: 1.1;
}

.story-list-item {
  gap: 0.55rem;
  padding: 0.7rem 0.65rem;
}
.story-list-item__copy { gap: 0.08rem; }
.story-list-item__copy strong { font-size: 0.96rem; }
.story-list-item__copy small {
  font-size: 0.92rem;
  line-height: 1.25;
}

.ar-preload__description { font-size: 0.94rem; }
.ar-preload__select-all { font-size: 0.9rem; }
.ar-preload-item__copy strong { font-size: 0.95rem; }
.ar-preload-item__status { font-size: 0.78rem; }
.ar-preload-progress > small { font-size: 0.82rem; }

.ar-welcome__feedback,
.ar-welcome__note { font-size: 0.84rem; }
.ar-action { font-size: 0.86rem; }
.ar-instructions { font-size: 0.78rem; }

/* Final page-specific balance pass after the supporting text scale. */
.map-status { font-size: 0.88rem; }
.map-status {
  height: 2.55rem;
  padding: 0.2rem 0.65rem;
}
.map-ar-prompt {
  flex-basis: 11rem;
  height: 2.55rem;
  min-height: 2.55rem;
  padding: 0.3rem 0.7rem;
}
.map-ar-prompt__copy { line-height: 1.1; }
.map-ar-prompt__copy strong { font-size: 0.94rem; }
.map-ar-prompt__copy small { font-size: 0.86rem; }

/* Keep the connection status and nearby AR action as one visual family. */
.map-status,
.map-ar-prompt {
  border-radius: 999px;
}

.point-card small {
  font-size: 0.92rem;
  line-height: 1.2;
}

.download-teaser {
  grid-template-columns: 2rem minmax(0, 1fr) 2.45rem;
  gap: 0.45rem;
  align-items: stretch;
}
.download-teaser__icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 2rem;
  height: 2rem;
}
.download-teaser__copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.download-teaser__count {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  justify-items: center;
}
.download-teaser__arrow {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
  justify-self: end;
  width: 2.15rem;
  height: 2.15rem;
}

.settings-intro,
.settings-group > p { font-size: 0.98rem; }
.settings-group h3 { font-size: 1.05rem; }
.theme-toggle-row__label { font-size: 0.92rem; }
.settings-option { font-size: 0.96rem; }

.guide-intro { font-size: 0.98rem; }
.guide-card__body p,
.guide-tip p,
.guide-card__body ol { font-size: 0.98rem; }

/* Keep the collapsed discover header clear of the bottom navigation after
   the supporting text was enlarged. */
.explore-sheet.is-collapsed {
  transform: translateY(calc(100% - 4.62rem));
}
.explore-sheet.is-collapsed .sheet-heading {
  gap: 0.65rem;
  padding-bottom: 0.34rem;
  transform: translateY(-0.08rem);
}
.explore-sheet.is-collapsed .sheet-heading .eyebrow {
  margin-bottom: 0;
  line-height: 1;
}

/* Keep the points-page download prompt in one stable horizontal row. */
.download-teaser {
  grid-template-columns: 2rem minmax(0, 1fr) 2.15rem;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
}
.download-teaser__icon {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 2rem;
  height: 2rem;
}
.download-teaser__copy {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.download-teaser__copy small {
  font-size: 0.84rem;
  line-height: 1.25;
  -webkit-line-clamp: 3;
}
.download-teaser__copy strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.15;
}
.download-teaser__count {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-items: end;
}
.download-teaser__arrow {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  width: 2.15rem;
  height: 2.15rem;
}

/* Keep the download teaser's navigation cue visible without competing with
   the filled download icon. */
.download-teaser__arrow {
  border: 1px solid var(--color-accent);
  border-radius: 0.65rem;
  color: var(--color-accent);
  background: transparent;
  box-shadow: none;
}
.download-teaser__arrow .ui-icon {
  width: 1.05rem;
  height: 1.05rem;
  stroke-width: 1.35;
}
.download-teaser:hover .download-teaser__arrow,
.download-teaser:focus-visible .download-teaser__arrow {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Compact map popup: reserve the top-right corner for close and use the
   recovered vertical space for larger, more readable copy. */
.poi-preview {
  padding: 0.6rem 0.8rem 0.54rem;
}
.poi-preview__close {
  top: 0.46rem !important;
  right: 0.46rem !important;
  width: 1.58rem !important;
  height: 1.58rem !important;
}
.poi-preview__top-actions {
  display: none;
}
.poi-preview__heading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-right: 2.35rem;
  padding-bottom: 1.58rem;
  padding-left: 0.8rem;
  z-index: 1;
}
.poi-preview__hero {
  position: relative;
  min-height: 6.75rem;
  margin: -0.6rem -0.8rem 0.08rem;
  overflow: hidden;
  border-radius: 0.95rem 0.95rem 0 0;
  background: transparent;
}
.poi-preview__hero-image {
  display: block;
  width: 100%;
  height: 6.75rem;
  object-fit: cover;
}
.poi-preview__hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 22, 25, 0.23) 0%, rgba(20, 22, 25, 0.16) 34%, rgba(20, 22, 25, 0.18) 52%, var(--color-popup-fade-low) 70%, var(--color-popup-fade-high) 86%, var(--color-popup-image-fade) 100%);
  pointer-events: none;
}
.poi-preview__heading-copy {
  width: 100%;
  min-width: 0;
}
.poi-preview__eyebrow {
  margin-bottom: 0.1rem;
  overflow: hidden;
  color: var(--color-popup-eyebrow);
  font-size: 0.68rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  text-shadow: 0 0.08rem 0.24rem rgba(0, 0, 0, 0.42);
}
.poi-preview__hero h3,
.poi-preview__hero .poi-preview__heading h3 {
  max-width: 100%;
  margin: 0;
  color: var(--color-text-strong);
  line-height: 1.04;
  text-shadow: 0 0.15rem 0.42rem rgba(0, 0, 0, 0.76);
  -webkit-text-stroke: 0.012em rgba(0, 0, 0, 0.18);
  paint-order: stroke fill;
}
html[data-theme="light"] .poi-preview__hero h3 {
  color: #fff;
}
.poi-preview__eyebrow {
  margin-bottom: 0;
  font-size: 0.8rem;
  line-height: 1.05;
}
.poi-preview h3 {
  margin-bottom: 0;
  font-size: 1.28rem;
  line-height: 1.02;
}
.poi-preview__description {
  margin-bottom: 0.18rem;
  font-size: 0.98rem;
  line-height: 1.16;
}
.poi-preview__route {
  gap: 0.3rem;
  margin-bottom: 0.18rem;
  padding: 0.18rem 0.48rem;
  font-size: 0.9rem;
  line-height: 1.12;
}
.poi-preview__actions {
  gap: 0.42rem;
  margin-top: 0.18rem;
}
.poi-preview__ar,
.poi-preview__button {
  height: 2.22rem;
}
.poi-preview__ar {
  font-size: 1.02rem;
}
.poi-preview__button {
  padding: 0.46rem 0.68rem;
  overflow: hidden;
  font-size: 0.86rem;
  white-space: nowrap;
}
.leaflet-popup.poi-popup .leaflet-popup-content p {
  font-size: 0.68em;
}
.poi-preview__button span {
  flex: 0 0 auto;
}
.leaflet-popup-content p {
  margin: 1em 0;
}
.leaflet-popup.poi-popup .poi-preview__eyebrow {
  margin: 0;
}

/* Downloads page: give the content room to reflow on narrow phones. The
   desktop row layout is useful when there is space, but the select-all
   summary and status pills should stack before they can squeeze the point
   names or create horizontal overflow. */
.downloads-screen {
  overflow-x: hidden;
}
.downloads-content,
.downloads-content .ar-preload {
  min-width: 0;
}
.ar-preload__controls {
  align-items: flex-start;
}
.ar-preload__select-all {
  min-width: 0;
  flex: 1 1 auto;
}
.ar-preload__select-all span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ar-preload__summary {
  min-width: 0;
  flex: 0 1 45%;
}
.ar-preload__total {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 30rem) {
  .downloads-content {
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  }
  .ar-preload {
    padding: 0.85rem;
  }
  .ar-preload__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
  }
  .ar-preload__summary {
    justify-items: start;
    text-align: left;
  }
  .ar-preload__total {
    font-size: 0.7rem;
  }
  .downloads-action-bar {
    width: calc(100% - 1rem);
    bottom: calc(env(safe-area-inset-bottom) + 4.7rem);
  }
  .downloads-action-bar button {
    min-height: 2.75rem;
  }
  .ar-preload-progress {
    width: 100%;
    max-width: 100%;
  }
  .ar-preload-progress__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: start;
  }
}

@media (max-width: 22rem) {
  .story-header {
    grid-template-columns: 2.15rem minmax(0, 1fr) auto;
    gap: 0.45rem;
    padding-right: 0.7rem;
    padding-left: 0.7rem;
  }
  .story-header__back {
    width: 2rem;
    height: 2rem;
  }
  .story-header__title .eyebrow {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ar-preload__heading {
    align-items: flex-start;
  }
  .ar-preload__icon {
    width: 2rem;
    height: 2rem;
  }
}
