/* Global warm theme and typography */
:root {
  --bg: #FAF7F2;
  --text: #222222;
  --muted-text: #444a;
  --accent: #C46A2B;
  --accent-soft: #E7A36F;
  --header-bg: #1E2A38;
  --footer-bg: #1E2A38;
  --link: #ffffff;
  --container-max: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background-color: var(--bg);
  margin: 0;
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, h4, h5 {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  margin: 0.6em 0 0.4em;
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0.8em 0; text-indent: 2em; }
p[style*="text-align"] { text-indent: 0; }
figcaption { text-indent: 0; margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent); opacity: 1; }

.container {
  width: 92%;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Header */
header {
  background: var(--header-bg);
  color: #fff;
  position: relative;
}
header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 8px;
}
.logo-icon {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center 20%; margin: 0 0 8px;
}
header h1 { margin: 0 0 8px; font-size: 1.8rem; text-align: center; }
/* Improve legibility of site title */
header h1 { text-shadow: 0 2px 8px rgba(0,0,0,0.45); }

nav[aria-label="Primary"] ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 0;
  margin: 8px 0 0;
}
nav[aria-label="Primary"] a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
nav[aria-label="Primary"] a:hover { color: var(--accent); text-decoration: none; }
nav[aria-label="Primary"] a.active { text-decoration: underline; }

/* Translate dropdown (top-right of header) */
.translate-control {
  position: absolute;
  top: 10px;
  right: 4%;
  display: inline-block;
}
.translate-control::after {
  content: "\25BE";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #fff;
  font-size: 0.8rem;
  pointer-events: none;
}
.translate-select {
  appearance: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 6px 32px 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .06s ease;
  min-width: 150px;
}
.translate-select:hover {
  color: var(--accent);
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-1px);
}
.translate-select:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* AI chat assistant */
.ai-chat {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-size: 0.95rem;
}
.ai-chat__toggle {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  transition: transform .12s ease, box-shadow .12s ease;
}
.ai-chat__toggle:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22); }
.ai-chat__toggle:focus { outline: 2px solid #fff; outline-offset: 2px; }
.ai-chat--open .ai-chat__toggle { display: none; }
.ai-chat__panel {
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}
.ai-chat__panel[hidden] { display: none; }
.ai-chat__header {
  background: var(--header-bg);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-chat__close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.ai-chat__close:focus { outline: 2px solid #fff; outline-offset: 2px; }
.ai-chat__messages {
  background: #f6f6fa;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}
.ai-chat__bubble {
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #222;
  align-self: flex-start;
}
.ai-chat__bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}
.ai-chat__bubble--pending { opacity: 0.7; font-style: italic; }
.ai-chat__bubble--error {
  background: #f8d7da;
  color: #5f2a2f;
}
.ai-chat__text {
  margin: 0;
  white-space: pre-wrap;
}
.ai-chat__form {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #ececf0;
}
.ai-chat__input {
  min-height: 72px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.ai-chat__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 106, 43, 0.25);
  outline: none;
}
.ai-chat__actions { display: flex; justify-content: flex-end; }
.ai-chat__send {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition: transform .12s ease, box-shadow .12s ease;
}
.ai-chat__send:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); }
.ai-chat__send:focus { outline: 2px solid #fff; outline-offset: 2px; }
.ai-chat--busy .ai-chat__send { cursor: wait; opacity: 0.75; }
.ai-chat--busy .ai-chat__input { cursor: wait; }

/* Main content */
.content { padding: 28px 0 40px; }
/* Center section titles like "Video Work" etc. */
.content h2 { text-align: center; }
section { max-width: 800px; margin: 0 auto; }
.text-indent { text-indent: 1.5em; }
.resource-links { margin-top: 12px; }
.resource-links a { display: block; margin: 6px 0; font-weight: 600; }

/* About page */
.bio-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 36px;
}
.profile-portrait {
  margin: 0;
  text-align: center;
}
.profile-portrait img {
  width: 176px;
  height: 176px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}
.bio-copy {
  max-width: 640px;
  text-align: left;
}
.bio-copy p { text-indent: 0; margin: 0 0 14px; }
.bio-cta { text-align: center; margin: 20px 0 0; }
.bio-note { text-align: center; font-size: 0.95rem; color: #555; margin-top: 6px; display: none; }

.structure-section,
.timeline-section {
  width: 100%;
  max-width: 1020px;
  margin-top: 48px;
}
.structure-section p { text-indent: 0; }
.structure-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  position: relative;
}
.structure-level {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  position: relative;
  width: 100%;
}
.structure-level + .structure-level::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 2px;
  height: 16px;
  background: #d9cabc;
  transform: translateX(-50%);
}
.structure-level--satellite::before {
  display: none;
}
.structure-level--branches {
  padding-top: 18px;
}
.structure-level--branches::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(520px, calc(100% - 40px));
  border-top: 2px solid #d9cabc;
  transform: translateX(-50%);
}
.structure-card {
  background: #fff;
  border: 1px solid #e7e1d6;
  border-radius: 18px;
  padding: 18px 20px;
  width: min(240px, 100%);
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  position: relative;
}
.structure-card h4,
.structure-card h5 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.structure-card h4 a,
.structure-card h5 a {
  color: inherit;
  text-decoration: none;
}
.structure-card h4 a:hover,
.structure-card h5 a:hover,
.structure-card h4 a:focus,
.structure-card h5 a:focus { text-decoration: underline; }
.structure-card p {
  margin: 0;
  text-indent: 0;
  color: var(--muted-text);
  font-size: 0.95rem;
}
.structure-link { color: inherit; text-decoration: none; }
.structure-link:hover,
.structure-link:focus { text-decoration: underline; }
.structure-card--primary {
  background: linear-gradient(135deg, rgba(196, 106, 43, 0.88), rgba(196, 106, 43, 0.72));
  color: #fff;
  border: none;
  box-shadow: 0 18px 36px rgba(196, 106, 43, 0.28);
}
.structure-card--primary p { color: rgba(255, 255, 255, 0.85); }
.structure-card--secondary {
  border: 2px solid rgba(196, 106, 43, 0.22);
}
.structure-card--satellite {
  background: #fcfaf6;
  border: 1px dashed #d9cabc;
}
.structure-level--branches .structure-card::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  width: 2px;
  height: 18px;
  background: #d9cabc;
  transform: translateX(-50%);
}
.structure-sub {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  background: rgba(196, 106, 43, 0.12);
  border-radius: 999px;
  font-weight: 600;
  color: var(--accent);
}

.timeline-section p { text-indent: 0; }
.timeline-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  position: relative;
}
.timeline-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 60px;
  width: 2px;
  background: linear-gradient(180deg, rgba(217, 202, 188, 0.9), rgba(217, 202, 188, 0.2));
}
.timeline-item {
  position: relative;
  padding-left: 140px;
  margin-bottom: 34px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-node {
  position: absolute;
  left: 0;
  top: 0;
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.timeline-year {
  display: inline-block;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #2f3b49;
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.timeline-photo {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 3px solid rgba(196, 106, 43, 0.28);
  background: #f6f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: rgba(70, 60, 50, 0.6);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timeline-photo span { pointer-events: none; }
.timeline-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.timeline-photo--blank {
  background: #f6f0e8;
}
/* Keep all timeline photos uniform; large variant maps to base size now */
.timeline-photo--large { width: 108px; height: 108px; }
.timeline-photo--left {
  align-self: flex-start;
}
.timeline-photo--contain img {
  object-fit: contain;
  padding: 4px;
}
.timeline-content {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e7e1d6;
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
}
.timeline-content h4 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}
.timeline-content p { margin: 0 0 12px; }
.timeline-highlights {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--muted-text);
  font-size: 0.96rem;
}
.timeline-highlights li { margin-bottom: 6px; }
.timeline-highlights li:last-child { margin-bottom: 0; }
.timeline-media-note {
  margin: 12px 0 0;
  font-style: italic;
  color: rgba(68, 68, 68, 0.8);
}

/* Video grid */
.video-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.video-card { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.video-thumb { position: relative; width: 100%; padding-top: 100%; background: #111 no-repeat center/cover; cursor: pointer; border-radius: 0; overflow: hidden; transition: transform .18s ease, box-shadow .2s ease, opacity .2s ease; }
.video-thumb:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,0.16); }
.video-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.video-thumb.is-playing { background: #000; box-shadow: none; }
.video-iframe { position: absolute; top: 50%; left: 50%; width: 100%; height: 56.25%; transform: translate(-50%, -50%); border: 0; }
.video-play { position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; border-radius: 50%; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; transform: translate(-50%, -50%); transition: background .2s ease, transform .2s ease; }
.video-play::before { content: ""; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.video-thumb:hover .video-play { background: rgba(0,0,0,0.75); transform: translate(-50%, -50%) scale(1.05); }
.video-thumb.is-playing .video-play { display: none; }
.video-card figcaption { font-size: 0.95rem; color: var(--muted-text); line-height: 1.45; text-indent: 0; }
.video-card figcaption strong { display: block; color: var(--text); font-weight: 600; }

/* Simple gallery grid and buy overlay */
.gallery-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.gallery-item { position: relative; background: #111; overflow: hidden; border-radius: 8px; }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1/1; opacity: 0.92; transition: transform .18s ease, opacity .18s ease; }
.gallery-item:hover img { transform: scale(1.02); opacity: 1; }
.gallery-buy { position: absolute; inset: auto 8px 8px auto; background: rgba(0,0,0,0.7); color: #fff; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; opacity: 0; transform: translateY(4px); transition: all .18s ease; cursor: pointer; }
.gallery-item:hover .gallery-buy, .gallery-item:focus-within .gallery-buy { opacity: 1; transform: translateY(0); }

/* CITY Pictures experience */
.city-pictures-body {
  background: radial-gradient(circle at top, #252f75 0%, #0a0d26 45%, #03040a 100%);
  color: #f5f6ff;
}
.city-pictures-body a { color: #ffe270; }
.city-pictures-body a:hover { color: #ffe270; opacity: 0.85; }
.city-pictures-body p { text-indent: 0; }

.city-stage {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 90px) 0 clamp(60px, 10vw, 120px);
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 6vw, 72px);
}

.library-shell {
  display: grid;
  gap: clamp(28px, 5vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  padding: clamp(36px, 6vw, 64px);
  border-radius: 42px;
  background: linear-gradient(145deg, rgba(39, 47, 118, 0.92), rgba(86, 36, 128, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 36px 90px rgba(6, 10, 32, 0.55);
  position: relative;
  overflow: hidden;
}
.library-shell::before {
  content: "";
  position: absolute;
  inset: -240px auto auto -160px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 198, 120, 0.35), rgba(255, 198, 120, 0));
  pointer-events: none;
}
.library-shell::after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -140px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(118, 205, 255, 0.25), rgba(118, 205, 255, 0));
  pointer-events: none;
}
.library-shell > * { position: relative; z-index: 1; }

.library-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(245, 246, 255, 0.72);
}
.status-left, .status-right { display: flex; align-items: center; gap: 8px; }
.status-time { font-weight: 600; font-size: 0.82rem; }
.status-bed {
  width: 16px;
  height: 8px;
  border-radius: 4px;
  border: 2px solid rgba(245, 246, 255, 0.6);
  position: relative;
  display: inline-block;
}
.status-bed::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 6px;
  height: 4px;
  border-radius: 2px;
  background: rgba(245, 246, 255, 0.6);
}
.status-signal { display: inline-flex; align-items: flex-end; gap: 2px; }
.status-signal span {
  width: 5px;
  border-radius: 999px;
  background: rgba(245, 246, 255, 0.38);
}
.status-signal span:nth-child(1) { height: 6px; }
.status-signal span:nth-child(2) { height: 10px; }
.status-signal span:nth-child(3) { height: 14px; background: rgba(245, 246, 255, 0.78); }
.status-battery { font-variant-numeric: tabular-nums; }

.library-heading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.library-heading h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1;
  color: #fefeff;
  font-weight: 800;
}
.library-range {
  margin: 0;
  font-size: 1.02rem;
  color: rgba(245, 246, 255, 0.76);
}

.library-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  justify-content: start;
}
.control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fefeff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.control:hover { transform: translateY(-1px); opacity: 0.9; }
.control:focus-visible {
  outline: 2px solid rgba(255, 226, 112, 0.85);
  outline-offset: 3px;
}
.control-search { background: rgba(255, 255, 255, 0.18); }
.icon-search {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-block;
  position: relative;
}
.icon-search::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  background: currentColor;
  bottom: -4px;
  right: -4px;
  transform: rotate(45deg);
  border-radius: 1px;
}
.control-select { justify-self: center; background: rgba(255, 255, 255, 0.12); }
.control-profile {
  justify-self: end;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
}
.control-profile:focus-visible {
  outline: 2px solid rgba(255, 226, 112, 0.85);
  outline-offset: 3px;
}
.profile-initial { font-size: 0.95rem; }
.profile-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff3b30;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
}

.library-grid-section {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.library-shell > .library-bottom {
  grid-column: 1 / -1;
}

.city-hero-full {
  display: none;
}

.city-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.city-hero-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 226, 112, 0.86);
}
.city-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  line-height: 1.1;
  color: #fefeff;
}
.city-hero-copy p { margin: 0; font-size: 1.08rem; color: rgba(245, 246, 255, 0.86); }
.city-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.city-hero-tips {
  list-style: none;
  margin: 6px 0 0;
  padding: 16px 18px;
  background: rgba(7, 11, 32, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  color: rgba(247, 248, 255, 0.76);
}
.city-hero-tips li { display: flex; align-items: flex-start; gap: 10px; }
.city-hero-tips li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: #ffe270;
  flex-shrink: 0;
}

.city-hero-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.city-gallery-wall {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.city-gallery-wall.is-loading::before {
  content: 'Loading photos…';
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(245, 246, 255, 0.7);
  font-size: 0.95rem;
  padding: 24px 0;
}
.city-gallery-wall .gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(6, 11, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(5, 8, 24, 0.38);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.city-gallery-wall .gallery-item:hover,
.city-gallery-wall .gallery-item:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(5, 8, 24, 0.5);
}
.city-gallery-wall .gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}
.gallery-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(5, 7, 18, 0) 0%, rgba(5, 7, 18, 0.88) 92%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fefeff;
  font-size: 0.82rem;
  pointer-events: none;
}
.gallery-code {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gallery-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.14em;
}
.city-gallery-wall .gallery-buy {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(8, 12, 32, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.city-gallery-wall .gallery-item:hover .gallery-buy,
.city-gallery-wall .gallery-item:focus-within .gallery-buy {
  opacity: 1;
  transform: translateY(0);
}
.gallery-note {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(245, 246, 255, 0.7);
}

.library-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px 0;
}
.library-bottom-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: #fefeff;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.library-bottom-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.library-bottom-btn:focus-visible {
  outline: 2px solid rgba(255, 226, 112, 0.85);
  outline-offset: 3px;
}
.icon-share {
  width: 16px;
  height: 18px;
  border-radius: 8px 8px 6px 6px;
  border: 2px solid currentColor;
  position: relative;
}
.icon-share::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  width: 2px;
  height: 8px;
  background: currentColor;
  transform: translateX(-50%);
}
.icon-share::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateX(-50%) rotate(-45deg);
}
.icon-close {
  width: 16px;
  height: 16px;
  position: relative;
}
.icon-close::before,
.icon-close::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: currentColor;
  width: 2px;
  margin: auto;
}
.icon-close::before { transform: rotate(45deg); }
.icon-close::after { transform: rotate(-45deg); }
.library-filter {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.filter-btn {
  background: transparent;
  border: 0;
  color: rgba(245, 246, 255, 0.74);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-btn:hover { color: #fefeff; }
.filter-btn.is-active {
  background: rgba(255, 255, 255, 0.22);
  color: #1a1633;
}

.city-checkout-callout {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  padding: clamp(28px, 5vw, 40px);
  border-radius: 34px;
  background: rgba(9, 13, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px rgba(5, 10, 32, 0.45);
}
.checkout-card h2 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  color: #fefeff;
}
.checkout-card p { margin: 0 0 16px; color: rgba(245, 246, 255, 0.78); }
.checkout-card ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: rgba(245, 246, 255, 0.72);
  font-size: 0.95rem;
  display: grid;
  gap: 6px;
}
.checkout-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.checkout-qr { margin: 0; text-align: center; }
.checkout-qr img {
  max-width: 220px;
  width: 100%;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 22px 44px rgba(4, 7, 24, 0.45);
}
.checkout-qr figcaption {
  margin-top: 10px;
  font-size: 0.84rem;
  color: rgba(245, 246, 255, 0.68);
}

.city-flow {
  background: rgba(8, 12, 30, 0.78);
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(28px, 4.5vw, 44px);
  box-shadow: 0 26px 56px rgba(4, 8, 26, 0.42);
}
.city-flow h2 {
  margin: 0 0 20px;
  text-align: center;
  font-size: 1.7rem;
  color: #fefeff;
}
.city-flow-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.city-flow-steps li {
  background: rgba(6, 9, 24, 0.86);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.flow-step-number {
  font-size: 0.9rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 226, 112, 0.85);
  font-weight: 700;
}
.city-flow-steps h3 {
  margin: 0;
  font-size: 1.12rem;
  color: #fefeff;
}
.city-flow-steps p { margin: 0; color: rgba(245, 246, 255, 0.72); font-size: 0.95rem; line-height: 1.6; }

.city-request {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.city-request .section-copy {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  color: rgba(245, 246, 255, 0.8);
}
.city-request .section-copy h2 {
  margin: 0 0 12px;
  color: #fefeff;
  font-size: 1.9rem;
}
.city-form-card {
  background: rgba(7, 11, 28, 0.82);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: clamp(24px, 5vw, 36px);
  box-shadow: 0 26px 56px rgba(4, 7, 26, 0.42);
}
.city-form-card .form {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.city-form-card .form-grid { gap: 18px; }
.city-form-card label { color: rgba(255, 255, 255, 0.92); }
.city-form-card input[type="text"],
.city-form-card input[type="email"],
.city-form-card textarea {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f6f7ff;
}
.city-form-card input::placeholder,
.city-form-card textarea::placeholder { color: rgba(255, 255, 255, 0.55); }
.city-form-card textarea { min-height: 130px; }
.city-form-card .actions { text-align: right; }
.city-form-card .hint { color: rgba(245, 246, 255, 0.68); }

.city-pictures-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #ffe270, #ffb347);
  color: #201033;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(255, 214, 95, 0.33);
  transition: transform 0.1s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.city-pictures-body .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(255, 214, 95, 0.38);
}
.city-pictures-body .btn:focus-visible {
  outline: 2px solid rgba(255, 226, 112, 0.9);
  outline-offset: 3px;
}
.city-pictures-body .btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #f7f7ff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.city-pictures-body .btn.secondary:hover { opacity: 0.88; }

@media (max-width: 900px) {
  .library-shell { border-radius: 36px; }
  .library-controls { grid-template-columns: minmax(0, 1fr) auto auto; }
  .city-gallery-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .city-stage { gap: 48px; }
  .library-shell {
    grid-template-columns: 1fr;
    padding: 28px 20px;
    border-radius: 26px;
  }
  .library-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 10px;
  }
  .library-controls .control-search { grid-column: 1 / -1; }
  .control-select { justify-self: start; }
  .control-profile { justify-self: end; }
  .city-gallery-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .city-checkout-callout { grid-template-columns: 1fr; }
  .checkout-qr { order: -1; }
  .city-flow-steps { grid-template-columns: 1fr; }
  .city-form-card .actions { text-align: center; }
}

/* CITY Pictures refresh */
.city-gallery-body {
  background: radial-gradient(circle at top, #131a2f 0%, #050b1d 55%, #02030a 100%);
  color: #f7f8ff;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
.city-gallery-body a { color: #ffe270; }
.city-gallery-body a:hover { opacity: 0.85; }
.city-gallery-body p { text-indent: 0; }

.gallery-shell {
  width: min(1200px, 94vw);
  margin: 0 auto 72px;
  padding: clamp(48px, 8vw, 80px) 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.gallery-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gallery-header h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
}
.gallery-header p {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(247, 248, 255, 0.78);
}

.gallery-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffe270;
  box-shadow: none;
}
.btn.outline:hover { background: rgba(255, 255, 255, 0.08); }

.city-gallery-body .gallery-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  position: relative;
}
.city-gallery-body .gallery-grid.is-loading::after {
  content: 'Loading photos…';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 11, 29, 0.85);
  color: rgba(247, 248, 255, 0.72);
  letter-spacing: 0.08em;
}

.city-gallery-body .gallery-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(12, 18, 38, 0.65);
  aspect-ratio: 1 / 1;
  box-shadow: 0 18px 32px rgba(2, 5, 15, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.city-gallery-body .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  position: relative;
  z-index: 0;
}
.city-gallery-body .gallery-item::before,
.city-gallery-body .gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.city-gallery-body .gallery-item::before {
  content: 'PREVIEW ONLY · PREVIEW ONLY · PREVIEW ONLY';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 2.6vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  color: rgba(242, 244, 255, 0.24);
  text-align: center;
  transform: rotate(-28deg);
  transform-origin: center;
  mix-blend-mode: screen;
  opacity: 0.9;
  padding: 0 12%;
}
.city-gallery-body .gallery-item::after {
  background-image: repeating-linear-gradient(135deg, rgba(8, 12, 28, 0.32) 0, rgba(8, 12, 28, 0.32) 14px, transparent 14px, transparent 28px);
  mix-blend-mode: soft-light;
}
.city-gallery-body .gallery-item.placeholder::before,
.city-gallery-body .gallery-item.placeholder::after {
  content: none;
}
.city-gallery-body .gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(2, 7, 21, 0.6);
}
.city-gallery-body .gallery-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px 16px;
  background: linear-gradient(180deg, rgba(3, 6, 15, 0) 0%, rgba(3, 6, 15, 0.85) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #fff;
  z-index: 2;
}
.city-gallery-body .gallery-code {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.city-gallery-body .gallery-label {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.7);
}
.city-gallery-body .gallery-buy {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(255, 226, 112, 0.95);
  color: #1c122e;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: transform 0.18s ease, opacity 0.18s ease;
  cursor: pointer;
  position: relative;
  z-index: 3;
}
.city-gallery-body .gallery-item:hover .gallery-buy,
.city-gallery-body .gallery-item:focus-within .gallery-buy {
  opacity: 1;
  transform: translateY(0);
}

.city-gallery-body .gallery-item.placeholder {
  background: linear-gradient(135deg, rgba(255, 226, 112, 0.12), rgba(111, 205, 255, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(247, 248, 255, 0.65);
  font-weight: 600;
  letter-spacing: 0.1em;
}
.city-gallery-body .gallery-item.placeholder::after {
  content: 'COMING SOON';
}

.gallery-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  color: rgba(247, 248, 255, 0.76);
}

@media (max-width: 680px) {
  .gallery-actions { flex-direction: column; }
  .gallery-actions .btn,
  .gallery-actions .btn.secondary { width: 100%; justify-content: center; }
  .city-gallery-body .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); z-index: 9999; padding: 20px; }
.modal[open] { display: flex; }
.modal-card { background: #fff; width: 100%; max-width: 520px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; }
.modal-header { padding: 14px 16px; background: #2f3b49; color: #fff; display: flex; align-items: center; justify-content: space-between; }
.modal-header h4 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 16px; }
.modal-actions { padding: 0 16px 16px; display: flex; gap: 10px; justify-content: center; }
.modal-close { background: transparent; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; }

/* Native gear grid (About page / Gear cards) */
.gear-intro { text-align: center; color: #444; max-width: 780px; margin: 0 auto 26px; text-indent: 0; font-size: 1.02rem; }
.page-lede { text-align: center; font-style: italic; color: #444; max-width: 760px; margin: 0 auto 18px; text-indent: 0; }
.gear-section { margin: 36px 0 0; }
.gear-section:first-of-type { margin-top: 12px; }
.gear-section h3 { margin: 0 0 14px; font-size: 1.25rem; text-align: left; text-indent: 0; }
.gear-grid { display: grid; gap: 16px; grid-template-columns: repeat(1, minmax(0, 1fr)); justify-content: center; justify-items: center; }
.gear-card { background: #fff; border: 1px solid #e7e1d6; border-radius: 0; padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center; max-width: 320px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.gear-card img { width: 100%; height: 150px; object-fit: contain !important; border-radius: 6px; background: #f2efe9; }
.gear-card h4 { margin: 0 0 6px; font-size: 1rem; }
.gear-card p { margin: 0 0 8px; color: var(--muted-text); font-size: 0.95rem; text-indent: 0; }
.gear-card a { font-weight: 600; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid rgba(30, 42, 56, 0.25);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: transform .06s ease, box-shadow .12s ease, opacity .2s ease, border-color .12s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  border-color: rgba(30, 42, 56, 0.4);
}
.btn.secondary {
  background: var(--accent-soft);
  color: #2a2a2a;
  border-color: rgba(30, 42, 56, 0.2);
}
.btn.secondary:hover {
  border-color: rgba(30, 42, 56, 0.35);
}

/* Footer */
footer {
  background: var(--footer-bg);
  color: #fff;
  margin-top: 48px;
}
footer .container {
  padding: 28px 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
footer p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
  text-indent: 0;
}
footer a {
  color: #fff;
  font-size: 1rem;
  display: inline-block;
  margin: 0 10px;
}
footer a:hover { color: var(--accent); }
footer a:focus { outline: 2px dashed #fff; outline-offset: 2px; }

/* Footer socials (icon-only) */
footer .socials {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0;
}
footer .socials li {
  display: inline-flex;
}
footer .socials a {
  width: 2rem;
  height: 2rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  transition: background .2s ease, transform .08s ease, color .2s ease;
  flex-shrink: 0;
  font-size: 0;
}
footer .socials a:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
footer .socials svg {
  width: 0.95rem;
  height: 0.95rem;
  color: #fff;
  transition: color .2s ease;
  display: block;
  transform: translateY(1px);
}

/* Brand hover colors */
footer .socials a[aria-label="YouTube"]:hover svg { color: #FF0000; }
footer .socials a[aria-label="Instagram"]:hover svg { color: #E1306C; }
footer .socials a[aria-label="TikTok"]:hover svg { color: #EE1D52; }
footer .socials a[aria-label="LinkedIn"]:hover svg { color: #0A66C2; }

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

/* Forms */
.form { max-width: 780px; margin: 18px auto 0; background: #fff; border: 1px solid #e7e1d6; border-radius: 12px; padding: 16px; box-shadow: 0 6px 14px rgba(0,0,0,0.06); }
.form h3 { margin-top: 0; text-indent: 0; }
.form .hint { color: var(--muted-text); font-size: 0.95rem; margin: 4px 0 12px; text-indent: 0; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form label { display: block; font-weight: 600; margin: 6px 0 6px; }
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="date"],
.form select,
.form textarea { width: 100%; padding: 10px 12px; border: 1px solid #d9cabc; border-radius: 8px; background: #fcfaf6; color: var(--text); font-size: 1rem; }
.form textarea { min-height: 120px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form .actions { margin-top: 10px; text-align: center; }
.form .required { color: #b00020; font-weight: 700; margin-left: 4px; }
.form .hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form .row.two { grid-template-columns: 1fr 1fr; }
}

/* Responsive tweaks */
@media (min-width: 720px) {
  header .container { padding: 18px 0 10px; }
  header h1 { font-size: 2rem; }
  .bio-intro {
    flex-direction: row;
    align-items: center;
  }
  .bio-copy { text-align: left; }
  .timeline-item { padding-left: 160px; }
  .timeline-node {
    width: 140px;
  }
  .timeline-list::before {
    left: 70px;
  }
}

@media (min-width: 640px) {
  .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .gear-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .gear-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  footer a { font-size: 1.2rem; }
}

@media (max-width: 600px) {
  .translate-control {
    position: static;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
  }
  .translate-control::after {
    right: 24px;
  }
  .translate-select {
    width: 100%;
    max-width: 220px;
  }
  header .container {
    padding-top: 26px;
  }
  .ai-chat {
    right: 16px;
    bottom: 18px;
  }
  .ai-chat__panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 120px);
  }
  .ai-chat__messages {
    max-height: calc(100vh - 240px);
  }
}
