:root {
  color-scheme: light;
  --ink: #18352e;
  --muted: #66766f;
  --paper: #e9eeea;
  --glass: rgba(248, 249, 244, 0.88);
  --line: rgba(27, 57, 48, 0.14);
  --accent: #d84b3e;
  --button: #1e4036;
  --button-ink: #f8f8f2;
  --shadow: 0 18px 60px rgba(27, 48, 40, 0.12);
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--paper); color: var(--ink); transition: background 0.8s, color 0.8s; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button { color: inherit; }

#experience { position: relative; width: 100%; height: 100%; min-height: 580px; isolation: isolate; background: radial-gradient(circle at 55% 42%, #f6f6ef 0, var(--paper) 68%); transition: background 0.8s; }
#scene, #scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#scene canvas { touch-action: none; cursor: grab; }
#scene canvas:active { cursor: grabbing; }
#label-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.site-header { position: absolute; z-index: 5; top: 0; left: 0; width: 100%; height: 92px; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; pointer-events: auto; }
.brand-mark { width: 30px; height: 30px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; }
.brand-mark span { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.brand-name { font-family: "Manrope", sans-serif; font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: 0.13em; }
.brand-name > span { display: block; margin-top: 5px; font-family: "DM Sans", sans-serif; font-size: 7px; letter-spacing: 0.19em; font-weight: 500; color: var(--muted); }
.header-center { position: absolute; left: 50%; transform: translateX(-50%); font-size: 10px; letter-spacing: 0.22em; color: var(--muted); }
.coordinates { display: flex; align-items: center; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #4b9977; margin-right: 10px; box-shadow: 0 0 0 4px rgba(75, 153, 119, 0.12); }

.hero { position: absolute; z-index: 2; top: 136px; left: 43px; pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 17px; font-size: 9px; font-weight: 700; letter-spacing: 0.24em; }
.eyebrow > span { display: inline-block; width: 19px; height: 1px; background: var(--accent); }
h1 { margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(40px, 4.1vw, 66px); font-weight: 500; line-height: 1.03; letter-spacing: -0.055em; }
h1 em { font-family: Georgia, serif; font-weight: 400; letter-spacing: -0.055em; color: var(--accent); }
.hero-copy { margin: 20px 0 0; font-size: 11px; line-height: 1.8; color: var(--muted); letter-spacing: 0.01em; }

.scene-tools { position: absolute; z-index: 6; right: 38px; top: 128px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 30px; background: var(--glass); box-shadow: 0 8px 28px rgba(31, 56, 47, 0.06); backdrop-filter: blur(14px); }
.tool-button { position: relative; width: 38px; height: 38px; padding: 9px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.2s; }
.tool-button:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); transform: translateY(-1px); }
.tool-button[aria-pressed="true"] { background: var(--button); color: var(--button-ink); }
.tool-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.tool-button::after { content: attr(data-tooltip); position: absolute; right: 49px; top: 50%; transform: translateY(-50%) translateX(5px); opacity: 0; pointer-events: none; white-space: nowrap; padding: 6px 9px; border-radius: 5px; background: var(--button); color: var(--button-ink); font-size: 9px; letter-spacing: 0.04em; transition: 0.2s; }
.tool-button:hover::after, .tool-button:focus-visible::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.tool-divider { width: 20px; height: 1px; background: var(--line); margin: 2px 0; }
.moon-icon { display: none; }
body.night .moon-icon { display: block; }
body.night .sun-icon { display: none; }

.compass { position: absolute; right: 46px; top: 322px; width: 31px; text-align: center; color: var(--muted); pointer-events: none; }
.compass span { font-size: 8px; font-weight: 700; letter-spacing: 0.15em; }
.compass svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 0.8; margin-top: 3px; }
.compass svg path:first-child { fill: var(--accent); stroke: none; }

.landmark-card { position: absolute; z-index: 5; left: 43px; bottom: 113px; width: 325px; padding: 21px 23px 17px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 4px; background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(18px); transition: background 0.6s, opacity 0.25s, transform 0.25s; }
.landmark-card.changing { opacity: 0.25; transform: translateY(4px); }
.card-topline { display: flex; justify-content: space-between; align-items: center; font-size: 8px; font-weight: 600; letter-spacing: 0.16em; color: var(--muted); }
#card-category { color: var(--accent); }
.landmark-card h2 { margin: 13px 0 8px; font-family: "Manrope", sans-serif; font-size: 23px; line-height: 1.2; letter-spacing: -0.035em; font-weight: 650; }
.landmark-card > p { margin: 0; font-size: 10px; line-height: 1.7; color: var(--muted); }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
#card-location { display: flex; align-items: center; gap: 6px; font-size: 7px; letter-spacing: 0.14em; font-weight: 600; color: var(--muted); }
.tiny-dot { display: inline-block; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
#next-landmark { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 3px 0 3px 8px; font-size: 9px; font-weight: 600; cursor: pointer; }
#next-landmark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform 0.2s; }
#next-landmark:hover svg { transform: translateX(3px); }

.landmark-nav { position: absolute; z-index: 7; left: 0; bottom: 0; width: 100%; min-height: 82px; padding: 0 42px; display: flex; align-items: center; gap: 32px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--glass) 85%, transparent); backdrop-filter: blur(20px); }
.nav-label { flex: 0 0 auto; font-size: 8px; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); }
.nav-items { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); align-items: stretch; width: 100%; max-width: 1060px; height: 82px; }
.landmark-tab { position: relative; display: flex; align-items: center; gap: 9px; padding: 0 14px; border: 0; background: transparent; white-space: nowrap; font-size: 9px; font-weight: 500; color: var(--muted); cursor: pointer; transition: color 0.2s, background 0.2s; }
.landmark-tab > span { font-size: 8px; font-variant-numeric: tabular-nums; opacity: 0.6; }
.landmark-tab::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform 0.25s; }
.landmark-tab:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 3%, transparent); }
.landmark-tab.active { color: var(--ink); font-weight: 700; }
.landmark-tab.active::after { transform: scaleX(1); }
.landmark-tab.active > span { color: var(--accent); opacity: 1; }

.interaction-hint { position: absolute; z-index: 2; right: 43px; bottom: 111px; display: flex; gap: 8px; align-items: center; color: var(--muted); pointer-events: none; }
.interaction-hint svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; }
.interaction-hint span { font-size: 7px; font-weight: 600; letter-spacing: 0.15em; }
.interaction-hint i { font-style: normal; margin: 0 6px; opacity: 0.5; }

.map-label { position: absolute; display: flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(255,255,255,0.6); border-radius: 3px; background: rgba(250,250,244,0.88); box-shadow: 0 4px 16px rgba(17, 40, 33, 0.13); backdrop-filter: blur(6px); color: #24483d; white-space: nowrap; font-size: 8px; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; pointer-events: auto; transform: translate(-50%, -100%); transition: opacity 0.2s, background 0.2s; }
.map-label::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #d84b3e; }
.map-label::after { content: ""; position: absolute; width: 1px; height: 13px; background: rgba(36,72,61,0.45); left: 50%; top: 100%; }
.map-label:hover, .map-label.active { background: #1e4036; color: #fff; }
.map-label.active::before { background: #f5846d; }
body.night .map-label { background: rgba(12,28,38,0.9); border-color: rgba(255,255,255,0.14); color: #dbe8e5; }
body.night .map-label:hover, body.night .map-label.active { background: #dcebdf; color: #132d28; }

.loading-screen, .error-screen { position: absolute; z-index: 20; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; background: var(--paper); transition: opacity 0.7s, visibility 0.7s; }
.loading-screen.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-screen[hidden], .error-screen[hidden] { display: none; }
.loader-mark { width: 27px; height: 27px; border: 1px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.loading-screen p { text-align: center; margin-top: 20px; font-family: "Manrope", sans-serif; font-size: 13px; }
.loading-screen p span { display: block; margin-top: 8px; font-family: "DM Sans", sans-serif; font-size: 7px; letter-spacing: 0.18em; color: var(--muted); }
.error-screen { text-align: center; padding: 30px; }
.error-screen h2 { font-family: "Manrope", sans-serif; font-size: 30px; margin: 0 0 10px; }
.error-screen > p:not(.eyebrow) { max-width: 360px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.error-screen button { margin-top: 15px; border: 0; border-radius: 3px; padding: 11px 22px; background: var(--button); color: var(--button-ink); cursor: pointer; }
.noscript { position: absolute; z-index: 30; inset: 0; display: grid; place-items: center; background: var(--paper); }
@keyframes spin { to { transform: rotate(360deg); } }

body.night {
  color-scheme: dark;
  --ink: #e0ebe5;
  --muted: #8fa59e;
  --paper: #0a1720;
  --glass: rgba(13, 29, 37, 0.88);
  --line: rgba(202, 225, 216, 0.14);
  --accent: #f17a65;
  --button: #d9e7df;
  --button-ink: #16352d;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}
body.night #experience { background: radial-gradient(circle at 55% 42%, #142b35 0, var(--paper) 68%); }
body.night .landmark-card { border-color: rgba(255,255,255,0.08); }

@media (max-width: 1100px) {
  .hero { top: 124px; }
  .hero h1 { font-size: 45px; }
  .landmark-card { width: 285px; }
  .landmark-nav { gap: 14px; padding: 0 25px; }
  .nav-label { display: none; }
  .landmark-tab { padding: 0 9px; font-size: 8px; }
  .landmark-tab::after { left: 9px; right: 9px; }
  .header-center { display: none; }
}

@media (max-width: 760px) {
  #experience { min-height: 540px; }
  .site-header { height: 70px; padding: 0 20px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 10px; }
  .brand-name > span { font-size: 6px; }
  .coordinates { font-size: 7px; letter-spacing: 0.03em; }
  .coordinates .status-dot { margin-right: 6px; }
  .hero { top: 92px; left: 21px; }
  .eyebrow { font-size: 7px; margin-bottom: 11px; }
  .hero h1 { font-size: 36px; }
  .hero-copy { display: none; }
  .scene-tools { right: 16px; top: 90px; padding: 4px; }
  .tool-button { width: 34px; height: 34px; padding: 8px; }
  .tool-button::after { display: none; }
  .compass { display: none; }
  .landmark-card { left: 20px; bottom: 97px; width: min(295px, calc(100vw - 40px)); padding: 16px 18px 13px; }
  .landmark-card h2 { font-size: 19px; margin: 10px 0 6px; }
  .landmark-card > p { font-size: 9px; line-height: 1.55; }
  .card-footer { margin-top: 11px; padding-top: 10px; }
  .landmark-nav { min-height: 70px; padding: 0 10px; overflow-x: auto; }
  .nav-items { display: flex; width: max-content; height: 70px; }
  .landmark-tab { width: auto; min-width: 47px; padding: 0 12px; font-size: 0; }
  .landmark-tab > span { font-size: 10px; }
  .landmark-tab.active { font-size: 9px; min-width: 140px; }
  .landmark-tab::after { left: 10px; right: 10px; }
  .interaction-hint { display: none; }
  .map-label { font-size: 7px; padding: 5px 7px; }
}

@media (max-height: 720px) and (min-width: 761px) {
  .site-header { height: 72px; }
  .hero { top: 96px; }
  .hero h1 { font-size: 43px; }
  .hero-copy { display: none; }
  .scene-tools { top: 94px; }
  .compass { display: none; }
  .landmark-card { bottom: 94px; padding: 16px 20px 13px; }
  .landmark-card > p { display: none; }
  .card-footer { margin-top: 10px; padding-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
