:root {
  --bg: #f3efe8;
  --bg-soft: #eae2d7;
  --wall: #f7f3ec;
  --wall-shadow: #d9d1c5;
  --floor: #d5d0c9;
  --ink: #1f1b17;
  --muted: #6f665d;
  --frame: #fdfbf8;
  --frame-edge: #d8cec2;
  --accent: #2c2a28;
  --accent-soft: rgba(44, 42, 40, 0.08);
  --card: rgba(255, 255, 255, 0.66);
  --shadow-xl: 0 30px 80px rgba(81, 68, 53, 0.17);
  --shadow-lg: 0 24px 50px rgba(81, 68, 53, 0.12);
  --shadow-md: 0 14px 26px rgba(81, 68, 53, 0.12);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --transition: 320ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.8), transparent 36%),
    linear-gradient(180deg, #e6dfd4 0%, #f4efe7 42%, #e4ddd2 100%);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* Navigazione da tastiera: focus sempre visibile, nel colore del testo dell'elemento */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.page-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(64, 56, 49, 0.025) 25%, transparent 26%),
    linear-gradient(90deg, transparent 24%, rgba(64, 56, 49, 0.025) 25%, transparent 26%);
  background-size: 20px 20px;
}

.museum-app {
  min-height: 100vh;
  padding: 14px 8px 22px;
}

.museum-app--tour {
  padding: 12px;
}

.menu-screen {
  width: min(100%, 480px);
  margin: 0 auto;
}

.tour-screen {
  width: min(100%, 560px);
  margin: 0 auto;
}

.menu-screen {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 24px;
  min-height: calc(100vh - 48px);
  padding: 20px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(245, 240, 232, 0.32), rgba(245, 240, 232, 0.42)),
    var(--entrance-backdrop) center / cover no-repeat,
    linear-gradient(180deg, #e8e0d5, #ddd3c6);
  box-shadow: var(--shadow-xl);
}

.menu-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.1), transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

/* Tabs e dots: solo mobile portrait, nascosti altrove */
.menu-tabs,
.menu-pagedots {
  display: none;
}

/* Pulsante ghost e freccia ritorno: solo mobile portrait, nascosti altrove */
.button--ghost,
.menu-back {
  display: none;
}

/* Wrapper pagine: trasparente alla griglia desktop */
.menu-pages {
  display: contents;
}

.menu-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 34px;
  background:
    radial-gradient(circle at center, rgba(243, 233, 219, 0.04), transparent 70%),
    linear-gradient(180deg, rgba(255, 251, 245, 0.10), rgba(249, 243, 235, 0.08));
  box-shadow:
    0 28px 60px rgba(55, 46, 37, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
}

.menu-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(225, 205, 179, 0.12), transparent 66%),
    linear-gradient(135deg, transparent 0 72%, rgba(255, 255, 255, 0.3) 100%);
  pointer-events: none;
}

.menu-card--guide {
  position: relative;
  padding: 34px 28px 28px;
}

.lang-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 4px;
  z-index: 5;
}

.lang-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 94, 63, 0.28);
  background: transparent;
  color: rgba(47, 40, 34, 0.55);
  font-family: "Manrope", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.lang-btn.is-active {
  background: rgba(47, 40, 34, 0.9);
  color: #f5ece0;
  border-color: rgba(47, 40, 34, 0.9);
}

.lang-btn:hover:not(.is-active) {
  background: rgba(47, 40, 34, 0.08);
  color: #2f2822;
}


.menu-card--areas {
  display: flex;
  flex-direction: column;
  padding: 34px 24px 28px;
}

.menu-card__eyebrow,
.room-copy__index,
.wall-nav__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.62rem;
  font-weight: 800;
  color: #765938;
}

.menu-card__divider {
  width: 52px;
  height: 2px;
  margin: 18px 0 28px;
  background: rgba(118, 89, 56, 0.72);
}

.menu-card__headline {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.35rem, 7vw, 3.95rem);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #15120f;
}

/* Logo testuale "TERRA ROSSA — Museo Fotografico" */
.logo {
  margin: 0;
  font-family: "Montserrat", "Manrope", sans-serif;
  color: #a94b34;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo__word {
  font-size: clamp(2.6rem, 8vw, 4.3rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.02;
  text-indent: 0.16em;
}

.logo__sub {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  align-self: center;
}

.logo__subtext {
  font-size: clamp(0.78rem, 1.7vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.logo__rule {
  height: 1.5px;
  width: clamp(22px, 4vw, 34px);
  background: currentColor;
  opacity: 0.85;
}

.menu-intro {
  margin-top: 22px;
}

.menu-card__intro {
  margin: 12px 0 0;
  max-width: 36ch;
  color: #2f2822;
  font-size: 0.84rem;
  line-height: 1.66;
}

.menu-intro--clickable {
  cursor: pointer;
}

.menu-intro > .menu-card__intro:first-child {
  margin-top: 0;
}

.menu-intro__details {
  margin-top: 0;
}

.menu-intro__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6a4f2c;
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  cursor: pointer;
}

.menu-intro__toggle:hover {
  color: #4a3415;
}

.menu-intro__toggle svg {
  transition: transform 260ms ease;
}

.menu-intro__toggle.is-open svg {
  transform: rotate(180deg);
}

.menu-screen__actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 22px;
  border: 1px solid rgba(120, 94, 63, 0.18);
  border-radius: 999px;
  font-size: 0.88rem;
  transition:
    transform var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(180deg, #2e2c29, #191816);
  color: #f7f4ef;
  box-shadow: 0 16px 32px rgba(37, 34, 31, 0.18);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.62);
  color: #251f1a;
}

.menu-guide {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(136, 113, 86, 0.18);
}

.menu-guide__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(126, 97, 63, 0.72);
  border-radius: 50%;
  color: #7b5c38;
  background: rgba(255, 252, 247, 0.6);
}

.menu-icon-svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-guide__title {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.62rem;
  font-weight: 800;
  color: #765938;
}

.menu-guide__text {
  margin: 0;
  color: #2f2822;
  font-size: 0.82rem;
  line-height: 1.5;
}

.menu-card__meta {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(136, 113, 86, 0.18);
}

.menu-meta-link,
.menu-meta-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #3d2e1e;
  font-size: 0.8rem;
  font-weight: 500;
}

.menu-meta-link {
  min-height: 58px;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid rgba(120, 158, 78, 0.45);
  border-radius: 999px;
  background: rgba(214, 232, 188, 0.7);
  box-shadow: 0 18px 34px rgba(42, 34, 25, 0.1);
  color: #3a5223;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.menu-meta-link:hover {
  transform: translateY(-1px);
  background: rgba(205, 227, 174, 0.92);
  box-shadow: 0 22px 38px rgba(42, 34, 25, 0.14);
}

.menu-meta-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(126, 97, 63, 0.28);
}

.menu-areas {
  display: grid;
  gap: 28px;
}

.menu-areas__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(136, 113, 86, 0.14);
}

.menu-credit {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #5a4830;
  line-height: 1.55;
  text-align: left;
}

.menu-card--areas .menu-meta-info {
  justify-content: flex-end;
  text-align: right;
}

.menu-area {
  display: grid;
  gap: 0;
}

.menu-area__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 2px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--area-accent, #b8914b) 55%, transparent);
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: opacity 180ms ease;
}

.menu-area__header:hover {
  opacity: 0.82;
}

.menu-area__chevron {
  color: var(--area-accent-text, #c28823);
  display: flex;
  align-items: center;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-area.is-open .menu-area__chevron {
  transform: rotate(180deg);
}

.menu-area__badge {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--area-accent, #b8914b);
  background: rgba(255, 252, 246, 0.55);
  color: var(--area-accent-text, #8a6a40);
}

.menu-area__meta {
  display: grid;
  gap: 2px;
}

.menu-area__label {
  margin: 0;
  font-family: "Montserrat", "Manrope", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--area-accent-text, #c28823);
}

.menu-area__title {
  margin: 0;
  font-family: "Montserrat", "Manrope", sans-serif;
  text-transform: uppercase;
  font-size: clamp(0.98rem, 3vw, 1.22rem);
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.25;
  color: #3a2e23;
}

.room-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(179, 160, 137, 0.34);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
  background: rgba(255, 252, 247, 0.72);
  max-height: 0;
  transition: max-height 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-area.is-open .room-list {
  max-height: 300px;
}

.room-list__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 12px 14px 12px 16px;
  border: 0;
  border-bottom: 1px solid rgba(179, 160, 137, 0.28);
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition:
    transform var(--transition),
    background-color var(--transition),
    box-shadow var(--transition);
}

.room-list__item:last-child {
  border-bottom: 0;
}

.room-list__item:hover,
.room-list__item:focus-visible {
  transform: none;
  background: rgba(255, 255, 255, 0.9);
}

.room-list__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2a211a;
}

.room-list__arrow {
  color: var(--area-accent-text, #7e6646);
  font-size: 0.94rem;
}

.menu-area__badge .menu-icon-svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

.tour-screen {
  position: relative;
}

.tour-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0;
}

.museum-app--tour .tour-screen {
  width: calc(100vw - 24px);
  max-width: none;
  margin: 0 auto;
  position: relative;
}

.museum-app--tour .tour-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 18px 20px;
  z-index: 14;
}

.topbar-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.96rem;
  cursor: pointer;
}

.topbar-link--icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.topbar-link--icon svg {
  display: block;
}

.topbar-link__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.topbar-link--icon:hover {
  transform: translateY(-1px);
  opacity: 0.72;
}

.tour-progress {
  display: grid;
  gap: 8px;
  justify-items: end;
  flex: 1;
}

.tour-progress__label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(46, 39, 33, 0.88);
  text-shadow:
    0 1px 3px rgba(255, 255, 255, 0.85),
    0 0 14px rgba(255, 255, 255, 0.6);
}

.tour-progress__track {
  width: min(180px, 42vw);
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(44, 42, 40, 0.1);
}

.tour-progress__value {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #4b4137, #111);
  transition: width 500ms ease;
}

.gallery-room {
  position: relative;
  overflow: hidden;
  min-height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: transparent;
  box-shadow: 0 14px 30px rgba(37, 29, 20, 0.08);
}

.museum-app--tour .gallery-room {
  min-height: 88svh;
  margin-top: -18px;
}

.gallery-room::before {
  display: none;
}

.gallery-room__shell {
  position: relative;
  aspect-ratio: auto;
  min-height: calc(100vh - 72px);
  padding: 0;
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.02)),
    var(--room-backdrop) var(--room-backdrop-position, center top) / var(--room-backdrop-fit, cover) no-repeat,
    linear-gradient(180deg, #ebe4d9, #ddd4c7);
  background-color: #e4dbcf;
  transform-origin: center;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1), opacity 700ms ease;
}

.museum-app--tour .gallery-room__shell {
  min-height: 88svh;
}

.gallery-room__shell::before {
  display: none;
}

.gallery-room__shell::after {
  display: none;
}

.gallery-room.is-departing .gallery-room__shell {
  transform: scale(1.12) translateX(-12px);
  opacity: 0.3;
}

.gallery-room.is-arriving .gallery-room__shell {
  animation: roomArrive 920ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-room__ceiling {
  display: none;
}

.gallery-room__wall {
  position: relative;
  border-radius: 0;
}

.gallery-room__wall--left,
.gallery-room__wall--right {
  position: absolute;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  z-index: 3;
}

.gallery-room__wall--center {
  position: absolute;
  inset: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.gallery-room__wall--center::before,
.gallery-room__wall--center::after {
  display: none;
}

.wall-nav {
  width: auto;
  min-height: 0;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.wall-nav__arrow {
  display: grid;
  place-items: center;
  width: clamp(36px, 3.5vw, 46px);
  height: clamp(36px, 3.5vw, 46px);
  border: 1px solid rgba(34, 30, 26, 0.26);
  border-radius: 50%;
  color: rgba(34, 30, 26, 0.9);
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.08rem, 1.7vw, 1.45rem);
  line-height: 1;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.wall-nav:hover:not([disabled]) .wall-nav__arrow {
  transform: translateX(-4px);
  border-color: rgba(34, 30, 26, 0.46);
  background: rgba(255, 255, 255, 0.28);
}

.wall-nav__eyebrow {
  color: rgba(34, 30, 26, 0.84);
}

.wall-nav[disabled] {
  opacity: 0.7;
  cursor: default;
}

.room-copy {
  display: grid;
  gap: 10px;
  padding: 0;
}

.room-copy--details {
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(14, 10, 6, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(33, 27, 21, 0.10);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.room-copy--details.is-open {
  background: rgba(10, 6, 3, 0.82);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 32px rgba(33, 27, 21, 0.28);
  cursor: pointer;
}

.room-copy__toggle {
  display: grid;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.room-copy__summary,
.room-copy__details-text {
  color: rgba(245, 240, 232, 0.95);
  font-size: clamp(0.82rem, 1.15vw, 1.02rem);
  line-height: 1.48;
  white-space: pre-line;
}

.room-copy__summary {
  margin: 0;
}

.room-copy__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(220, 212, 200, 0.82);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.room-copy__hint-text {
  white-space: nowrap;
}

.room-copy__chevron {
  display: inline-flex;
  align-items: center;
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.room-copy--details.is-open .room-copy__chevron {
  transform: rotate(180deg);
}

.room-copy--details.is-open .room-copy__hint-text {
  display: none;
}

.room-copy__details-text {
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  /* Il testo lungo scorre nel box invece di coprire le foto o uscire dallo schermo */
  max-height: 32vh;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(220, 210, 195, 0.4) transparent;
}

.room-copy--details.is-static .room-copy__hint,
.room-copy__toggle:disabled .room-copy__hint {
  display: none;
}

.room-copy__toggle:disabled {
  cursor: default;
}

.room-header {
  position: absolute;
  left: clamp(20px, 3vw, 38px);
  top: clamp(58px, 6vw, 84px);
  z-index: 4;
  display: grid;
  gap: 4px;
  max-width: min(34vw, 360px);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.room-header__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 2.35vw, 2.2rem);
  line-height: 0.98;
  font-weight: 600;
  color: rgba(25, 21, 18, 0.94);
}

.room-copy__index,
.room-copy__title {
  max-width: 100%;
}

.room-copy__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 3.2vw, 2.7rem);
  line-height: 0.95;
  font-weight: 600;
}

.light {
  display: none;
}

.light--left {
  left: 16%;
}

.light--center {
  left: 50%;
  transform: translateX(-50%);
}

.light--right {
  right: 16%;
}

.artworks {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Riga di tasti "Foto N" auto-generata, ancorata sopra il tasto "Vai avanti" */
.artwork-zoom-row {
  position: absolute;
  left: 50%;
  top: var(--zoomrow-y, 80%);
  transform: translate(-50%, -50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 86%;
  z-index: 3;
}

.artwork-zoom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(14, 10, 6, 0.62);
  color: rgba(245, 238, 224, 0.94);
  border: 1px solid rgba(220, 200, 165, 0.28);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.artwork-zoom:hover {
  background: rgba(40, 30, 18, 0.85);
  color: #fff5e1;
  transform: translateY(-1px);
}

.artwork-zoom svg {
  flex-shrink: 0;
}

.artwork {
  position: absolute;
  left: var(--art-x);
  top: var(--art-y);
  width: var(--art-w);
  height: var(--art-h);
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 0;
  overflow: visible;
}

.artwork--primary {
  z-index: 2;
}

.artwork--secondary {
  z-index: 2;
}

.artwork__frame {
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
  cursor: zoom-in;
}

.artwork__hittarget {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  cursor: zoom-in;
}

.artwork__zoom-btn {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  background: rgba(14, 10, 6, 0.62);
  color: rgba(245, 238, 224, 0.92);
  border: 1px solid rgba(220, 200, 165, 0.22);
  border-radius: 20px;
  padding: 3px 10px 3px 8px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.52rem, 0.75vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 180ms, color 180ms;
}

.artwork__zoom-btn:hover {
  background: rgba(40, 30, 18, 0.82);
  color: rgba(255, 245, 225, 1);
}

.artwork__empty {
  width: 100%;
  height: 100%;
  background: transparent;
}

.artwork__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.artwork--has-photo {
  cursor: zoom-in;
}

.artwork__label {
  display: none;
}

.room-actions {
  position: absolute;
  left: var(--action-x);
  top: var(--action-y);
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  margin-top: 0;
  z-index: 3;
}

.gallery-room__bench {
  display: none;
}

.gallery-room__wall--left {
  left: clamp(20px, 3vw, 38px);
  bottom: clamp(84px, 9vw, 118px);
  top: auto;
  width: auto;
  transform: none;
  z-index: 4;
}

.gallery-room__wall--right {
  right: clamp(16px, 2.7vw, 34px);
  bottom: clamp(18px, 2.2vw, 34px);
  width: clamp(180px, 22vw, 260px);
  transform: none;
  z-index: 4;
}

.topbar-link,
.tour-progress,
.wall-nav,
.room-copy,
.room-header {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.topbar-link {
  color: rgba(46, 39, 33, 0.78);
}

.button--dark {
  min-width: 140px;
  min-height: 46px;
  padding: 11px 16px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(31, 27, 23, 0.86);
  color: #f3efe8;
  box-shadow: 0 12px 20px rgba(31, 27, 23, 0.15);
}

.room-copy__index {
  font-size: 0.72rem;
}

.travel-overlay {
  position: absolute;
  inset: 48px 0 0;
  z-index: 10;
  overflow: hidden;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(232, 224, 214, 0.96), rgba(255, 255, 255, 0.5) 24%, rgba(255, 255, 255, 0.5) 76%, rgba(232, 224, 214, 0.96)),
    linear-gradient(180deg, rgba(230, 222, 212, 0.88), rgba(245, 239, 231, 0.9));
}

.museum-app--tour .travel-overlay {
  inset: 0;
}

.travel-overlay::before,
.travel-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 31%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(224, 214, 201, 0.9)),
    var(--wall);
  box-shadow: inset -12px 0 26px rgba(176, 164, 150, 0.24);
}

.travel-overlay::before {
  left: 0;
  animation: passWallLeft 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.travel-overlay::after {
  right: 0;
  transform: scaleX(-1);
  animation: passWallRight 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.travel-overlay__center {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 34%;
  height: 42%;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.96), rgba(244, 239, 233, 0.55) 62%, rgba(244, 239, 233, 0) 76%);
  animation: travelZoom 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes passWallLeft {
  0% {
    transform: translateX(0) scale(1);
  }
  100% {
    transform: translateX(-68%) scale(1.2);
  }
}

@keyframes passWallRight {
  0% {
    transform: scaleX(-1) translateX(0) scale(1);
  }
  100% {
    transform: scaleX(-1) translateX(-68%) scale(1.2);
  }
}

@keyframes travelZoom {
  0% {
    opacity: 0.28;
    transform: translate(-50%, -50%) scale(0.38);
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.3);
  }
}

@keyframes roomArrive {
  0% {
    opacity: 0;
    transform: scale(0.9) translateX(18px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

@media (min-width: 760px) {
  .museum-app {
    padding-top: 28px;
  }

  .menu-screen,
  .tour-screen {
    width: min(100%, 1100px);
  }

  .menu-screen {
    grid-template-columns: 1.04fr 0.96fr;
    align-items: stretch;
    padding: 28px;
  }

  .menu-card {
    min-height: calc(100vh - 56px);
  }

  .menu-card--guide {
    padding: 40px 42px 30px;
  }

  .menu-card--areas {
    padding: 40px 34px 30px;
  }

  .menu-card__headline {
    font-size: clamp(2.8rem, 4.5vw, 4rem);
  }

  .menu-card__intro {
    max-width: 42ch;
    font-size: 0.88rem;
  }

  .menu-area__title {
    font-size: clamp(1.05rem, 1.25vw, 1.3rem);
  }

  .menu-screen__panel {
    padding: 34px 28px;
  }

  .tour-topbar {
    margin-bottom: 16px;
  }

  .gallery-room {
    min-height: 0;
  }

  .gallery-room__shell {
    aspect-ratio: 16 / 10;
  }

  .room-copy {
    gap: 12px;
  }

  .wall-nav {
    min-height: 0;
  }

  .room-header__title {
    font-size: clamp(1.3rem, 2vw, 1.95rem);
  }
}

@media (max-height: 860px) {
  .museum-app--tour .tour-topbar {
    padding: 8px 12px;
  }

  .museum-app--tour .gallery-room,
  .museum-app--tour .gallery-room__shell {
    min-height: 82svh;
  }
}

/* ── Corridoio ───────────────────────────────────────────────────────────── */

.gallery-room--corridor .room-header,
.gallery-room--corridor .gallery-room__wall--right {
  display: none;
}

.gallery-room--corridor .gallery-room__wall--left {
  bottom: clamp(84px, 9vw, 118px);
}

/* ── Corridor sign ───────────────────────────────────────────────────────── */

.corridor-sign {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 1.3rem 2rem;
  background: rgba(14, 10, 6, 0.58);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(80, 60, 40, 0.25);
  border-radius: 3px;
  min-width: 0;
  width: clamp(210px, 28vw, 340px);
  pointer-events: none;
}

.corridor-sign__eyebrow {
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.65rem, 1vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(220, 200, 165, 0.90);
  margin: 0 0 0.4rem;
}

.corridor-sign__rule {
  width: 16px;
  height: 1px;
  background: rgba(220, 200, 165, 0.45);
  margin: 0 auto 0.5rem;
}

.corridor-sign__title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.25rem, 2.5vw, 1.95rem);
  font-weight: 600;
  color: rgba(245, 238, 224, 0.97);
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

/* ── Schermata di uscita ──────────────────────────────────────────────────── */

.exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 24px clamp(16px, 4vh, 36px);
  background-image:
    linear-gradient(rgba(10, 7, 4, 0.12), rgba(10, 7, 4, 0.34)),
    var(--exit-bg, none);
  background-size: cover;
  background-position: center;
}

.exit-overlay__banner {
  width: min(90vw, 380px);
  text-align: center;
}

.exit-overlay__eyebrow {
  font-family: "Manrope", sans-serif;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(235, 222, 200, 0.92);
  margin: 0 0 0.45rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.6);
}

.exit-overlay__rule {
  width: 16px;
  height: 1px;
  background: rgba(230, 215, 185, 0.5);
  margin: 0 auto 0.55rem;
}

.exit-overlay__title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 600;
  color: rgba(248, 242, 230, 0.99);
  margin: 0 0 0.8rem;
  line-height: 1.08;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}

.exit-signup {
  margin: 0 0 0.9rem;
}

.exit-signup__label {
  margin: 0 0 0.5rem;
  font-family: "Manrope", sans-serif;
  font-size: 0.74rem;
  line-height: 1.35;
  color: rgba(245, 238, 224, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.exit-signup__row {
  display: flex;
  gap: 0.4rem;
}

.exit-signup__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(220, 200, 165, 0.4);
  background: rgba(20, 16, 11, 0.45);
  color: #f5eee0;
  font-family: "Manrope", sans-serif;
  /* 16px: sotto questa soglia iOS fa zoom automatico sul focus */
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.exit-signup__input::placeholder {
  color: rgba(245, 238, 224, 0.5);
}

.exit-signup__input:focus {
  outline: none;
  border-color: #789e4e;
  background: rgba(20, 16, 11, 0.62);
}

.exit-signup__submit {
  flex-shrink: 0;
  width: 44px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #789e4e;
  background: #789e4e;
  color: #fff;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.exit-signup__submit:hover {
  background: #6a8f43;
  transform: translateY(-1px);
}

.exit-signup__submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.exit-signup__feedback {
  margin: 0.5rem 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.exit-signup__feedback.is-ok {
  color: rgba(202, 232, 170, 0.98);
}

.exit-signup__feedback.is-error {
  color: rgba(244, 198, 180, 0.98);
}

.exit-guestbook {
  margin: 0 0 0.9rem;
  display: grid;
  gap: 0.4rem;
  text-align: left;
}

.exit-guestbook__text,
.exit-guestbook__name {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(220, 200, 165, 0.4);
  background: rgba(20, 16, 11, 0.45);
  color: #f5eee0;
  font-family: "Manrope", sans-serif;
  /* 16px: sotto questa soglia iOS fa zoom automatico sul focus */
  font-size: 16px;
  resize: none;
  -webkit-appearance: none;
  appearance: none;
}

.exit-guestbook__name {
  border-radius: 999px;
  min-height: 42px;
  padding: 0 14px;
}

.exit-guestbook__text::placeholder,
.exit-guestbook__name::placeholder {
  color: rgba(245, 238, 224, 0.5);
}

.exit-guestbook__text:focus,
.exit-guestbook__name:focus {
  outline: none;
  border-color: #789e4e;
  background: rgba(20, 16, 11, 0.62);
}

.exit-guestbook__row {
  display: flex;
  gap: 0.4rem;
}

.exit-guestbook__row .exit-guestbook__name {
  flex: 1;
  min-width: 0;
}

.exit-guestbook__send {
  flex-shrink: 0;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #789e4e;
  background: #789e4e;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.exit-guestbook__send:hover {
  background: #6a8f43;
  transform: translateY(-1px);
}

.exit-guestbook__send:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.exit-overlay__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.exit-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(220, 200, 165, 0.32);
  background: rgba(245, 238, 224, 0.08);
  color: rgba(245, 238, 224, 0.96);
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.exit-action:hover {
  background: rgba(245, 238, 224, 0.16);
  transform: translateY(-1px);
}

.exit-action--primary {
  background: #789e4e;
  border-color: #789e4e;
  color: #fff;
}

.exit-action--primary:hover {
  background: #6a8f43;
  border-color: #6a8f43;
}

.exit-action svg {
  flex-shrink: 0;
}

.exit-overlay__feedback {
  margin: 1rem 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(220, 232, 188, 0.95);
}

@media (max-width: 940px) and (orientation: portrait) {
  .exit-overlay {
    background-image:
      linear-gradient(rgba(10, 7, 4, 0.4), rgba(10, 7, 4, 0.6)),
      var(--exit-bg-mobile, var(--exit-bg, none));
  }
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 6, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lightboxIn 240ms ease;
}

@keyframes lightboxIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox.hidden {
  display: none !important;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: min(94vw, 1320px);
  max-height: 92svh;
  animation: lightboxImageIn 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox__image {
  flex-shrink: 0;
  max-width: min(72vw, 1020px);
  max-height: 88svh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
}

.lightbox__caption {
  flex: 0 0 auto;
  width: clamp(140px, 17vw, 210px);
  margin: 0;
  color: rgba(245, 238, 224, 0.82);
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.76rem, 1.1vw, 0.9rem);
  line-height: 1.68;
}

.lightbox__caption:empty {
  display: none;
}

@keyframes lightboxImageIn {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes lightboxImageOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.82); }
}

.lightbox.is-closing .lightbox__content {
  animation: lightboxImageOut 260ms cubic-bezier(0.4, 0, 1, 1) both;
}

.lightbox.is-closing .lightbox__overlay {
  animation: lightboxImageOut 260ms cubic-bezier(0.4, 0, 1, 1) both;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }

.lightbox__buy {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  max-width: min(84vw, 460px);
  border-radius: 22px;
  border: 1px solid rgba(220, 200, 165, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(245, 238, 224, 0.95);
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.18s ease, transform 0.18s ease;
}

.lightbox__buy:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(-50%) translateY(-1px);
}

/* ── Acquisto stampe ─────────────────────────────────────────────────────── */

.print-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: lightboxIn 220ms ease;
}

.print-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.print-modal__card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: 92svh;
  overflow-y: auto;
  padding: 26px 24px 22px;
  border-radius: 22px;
  background: #f6f1e8;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.print-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(120, 94, 63, 0.25);
  border-radius: 50%;
  background: transparent;
  color: #5a4228;
  cursor: pointer;
}

.print-modal__eyebrow {
  margin: 0 0 2px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a94b34;
}

.print-modal__title {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #241c15;
}

.print-modal__photo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(120, 94, 63, 0.18);
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.7);
  margin-bottom: 14px;
}

.print-modal__thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.print-modal__photoname {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3a2e23;
}

.print-modal__grouplabel {
  margin: 12px 0 7px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a40;
}

.print-modal__options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.print-option {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(120, 94, 63, 0.28);
  background: rgba(255, 252, 246, 0.7);
  color: #3a2e23;
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.print-option small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.75;
}

.print-option.is-selected {
  background: #a94b34;
  border-color: #a94b34;
  color: #f8f2e6;
}

.print-modal__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(120, 94, 63, 0.22);
  font-size: 0.82rem;
  font-weight: 600;
  color: #5a4228;
}

.print-modal__total strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: #a94b34;
}

.print-modal__charity {
  margin: 4px 0 12px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #75842e;
  font-weight: 600;
}

.print-modal__form {
  display: grid;
  gap: 8px;
}

.print-modal__input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(120, 94, 63, 0.3);
  background: #fffdf9;
  color: #241c15;
  font-family: "Manrope", sans-serif;
  /* 16px: evita lo zoom automatico di iOS sul focus */
  font-size: 16px;
}

.print-modal__input:focus {
  outline: none;
  border-color: #a94b34;
}

.print-modal__submit {
  min-height: 48px;
  border-radius: 999px;
  border: 0;
  background: #a94b34;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.print-modal__submit:hover {
  background: #93402c;
  transform: translateY(-1px);
}

.print-modal__submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.print-modal__note {
  margin: 2px 0 0;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #6f665d;
}

.print-modal__form .exit-signup__feedback {
  text-shadow: none;
}

.print-modal__form .exit-signup__feedback.is-ok {
  color: #5c7a1e;
}

.print-modal__form .exit-signup__feedback.is-error {
  color: #a94b34;
}

@media (max-width: 640px) {
  .lightbox__content {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 92vw;
    overflow-y: auto;
    padding-bottom: 10px;
  }

  .lightbox__image {
    max-width: 92vw;
    max-height: 58svh;
  }

  .lightbox__caption {
    width: 88vw;
    text-align: center;
  }

  .lightbox__nav {
    top: auto;
    bottom: 16px;
    transform: none;
    width: 42px;
    height: 42px;
  }

  .lightbox__nav--prev { left: 14px; }
  .lightbox__nav--next { right: 14px; }

  /* Tra le due frecce agli angoli: pillola stretta, testo su due righe */
  .lightbox__buy {
    bottom: 14px;
    max-width: 62vw;
    font-size: 0.72rem;
    padding: 8px 14px;
  }
}

/* ── Mobile portrait: full-screen card (Opzione C) ──────────────────────── */

.mobile-card { display: none; }

@media (max-width: 500px) and (orientation: portrait) {

  /* App container: usa l'altezza del viewport visibile (no spazio morto sotto) */
  .museum-app:not(.museum-app--tour) {
    min-height: 100svh;
    padding: 14px 8px 14px;
  }

  /* Tasti lingua: area di tocco ≥40px */
  .lang-btn {
    padding: 10px 14px;
    font-size: 0.68rem;
  }

  /* Menu: layout a pagine */
  .menu-screen {
    overflow: hidden;
    border-radius: 26px;
    min-height: 0;
    height: calc(100svh - 28px);
    padding: 14px 14px 12px;
    gap: 10px;
    display: flex;
    flex-direction: column;
  }

  /* Card Benvenuto compatta: tutto deve stare a schermo */
  .menu-card--guide {
    padding: 22px 20px 18px;
  }

  .logo__word {
    font-size: clamp(1.9rem, 7vw, 2.3rem);
  }

  .logo__sub {
    margin-top: 10px;
  }

  .logo__subtext {
    font-size: 0.78rem;
  }

  .menu-card--guide .menu-card__divider {
    margin: 12px 0 14px;
  }

  .menu-intro {
    margin-top: 14px;
  }

  .menu-card--guide .menu-card__intro {
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .menu-intro__toggle {
    margin-top: 8px;
  }

  .menu-card--guide .menu-guide {
    margin-top: 13px;
    padding-top: 12px;
  }

  .menu-card--guide .menu-screen__actions {
    margin-top: 13px;
    gap: 8px;
  }

  .menu-card--guide .menu-screen__actions .button {
    min-height: 48px;
  }

  .menu-card--guide .menu-card__meta {
    margin-top: 10px;
    padding-top: 10px;
  }

  .menu-card--guide .menu-meta-link {
    min-height: 42px;
    font-size: 0.8rem;
    padding: 0 16px;
  }

  /* Contenitore pagine: scroll orizzontale con snap */
  .menu-pages {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -14px;
  }

  .menu-pages::-webkit-scrollbar { display: none; }

  .menu-card--guide,
  .menu-card--areas {
    flex: 0 0 100%;
    width: 100%;
    min-height: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 14px;
  }

  .menu-card--areas .menu-areas {
    order: 1;
  }
  .menu-card--areas .menu-areas__footer {
    order: 3;
  }

  /* Pulsante ghost: solo mobile portrait */
  .button--ghost {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    border: 1.5px solid rgba(100, 76, 48, 0.35);
    border-radius: 999px;
    background: rgba(255, 252, 246, 0.45);
    color: #5a4228;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    margin-top: 10px;
  }

  /* Freccia ritorno a Benvenuto */
  .menu-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    padding: 7px 14px 7px 10px;
    margin-bottom: 14px;
    border: 1px solid rgba(120, 94, 63, 0.28);
    border-radius: 999px;
    background: rgba(255, 252, 246, 0.5);
    color: #5a4228;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
  }

}

/* ── Tour mobile/tablet portrait: card a schermo intero ───────────────────
   Fino a 940px in verticale (include iPad/iPad mini in portrait): il render
   3D del museo non regge queste proporzioni, si usa la card. */
@media (max-width: 940px) and (orientation: portrait) {

  /* Nascondi il render museo desktop e la topbar progress */
  .museum-app--tour .gallery-room,
  .travel-overlay {
    display: none !important;
  }

  .museum-app--tour {
    padding: 0;
  }

  .museum-app--tour .tour-screen {
    width: 100vw;
    margin: 0;
  }

  .museum-app--tour .tour-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: max(10px, env(safe-area-inset-top, 10px)) 16px 10px;
    z-index: 30;
    background: linear-gradient(180deg, rgba(20,15,10,0.55), transparent);
  }

  .museum-app--tour .topbar-link {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  }

  .tour-progress { display: none; }

  /* Card a schermo intero */
  .mobile-card {
    display: flex;
    flex-direction: column;
    height: 100svh;
    background: #f5f1ea;
  }

  /* Corridoio: hero a tutto schermo */
  .mobile-card--corridor .mobile-card__hero {
    flex: 1;
    height: auto;
    min-height: 0;
    background-position: center top;
  }

  .mobile-card--corridor .mobile-card__body {
    display: none;
  }

  /* Corridoio: banner centrato come desktop */
  .mobile-card--corridor .mobile-card__hero-grad {
    background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, rgba(20,14,9,0.34) 100%);
  }

  .mobile-card--corridor .mobile-card__hero-text {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 44%;
    transform: translate(-50%, -50%);
    width: min(78vw, 360px);
    text-align: center;
    padding: 1.3rem 1.7rem;
    background: rgba(14, 10, 6, 0.58);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(80, 60, 40, 0.25);
    border-radius: 3px;
  }

  .mobile-card--corridor .mobile-card__index {
    font-size: 0.66rem;
    letter-spacing: 0.16em;
  }

  .mobile-card--corridor .mobile-card__title {
    font-size: 2.3rem;
  }

  .mobile-card__hero-rule {
    display: none;
  }

  .mobile-card--corridor .mobile-card__hero-rule {
    display: block;
    width: 16px;
    height: 1px;
    margin: 0.5rem auto;
    background: rgba(220, 200, 165, 0.45);
  }

  /* Hero: foto stanza croppata in alto */
  .mobile-card__hero {
    position: relative;
    height: 35svh;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
  }

  .mobile-card__hero-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, transparent 38%, rgba(20,14,9,0.78) 100%);
  }

  .mobile-card__hero-text {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    color: #fff;
  }

  .mobile-card__index {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.62rem;
    font-weight: 800;
    color: rgba(245, 224, 190, 0.95);
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  }

  .mobile-card__title {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 2.1rem;
    line-height: 1;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.55);
  }

  /* Corpo scrollabile */
  .mobile-card__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 18px 12px;
  }

  /* Foto come card */
  .mobile-card__photos {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 12px -18px 0;
    padding: 0 18px 4px;
    scroll-snap-type: x mandatory;
  }

  .mobile-card__photos:empty {
    display: none;
  }

  /* Riga unica: scritta al centro, puntini a destra */
  .mobile-card__photonav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 14px;
    margin-top: 8px;
  }

  .mobile-card__photonav[hidden] {
    display: none;
  }

  .mobile-card__dots {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .mobile-card__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(100, 78, 50, 0.22);
    transition: background 220ms ease, transform 220ms ease;
    flex-shrink: 0;
  }

  .mobile-card__dot.is-active {
    background: rgba(100, 78, 50, 0.82);
    transform: scale(1.25);
  }

  .mobile-card__scroll-hint {
    margin: 0;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(90, 66, 40, 0.6);
  }

  .mobile-card__scroll-hint span {
    color: rgba(90, 66, 40, 0.82);
    font-weight: 800;
    padding: 0 2px;
  }

  .artwork-card {
    flex: 0 0 auto;
    width: 49vw;
    max-width: 200px;
    aspect-ratio: 3 / 4;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    position: relative;
    scroll-snap-align: start;
    box-shadow: 0 8px 20px rgba(40,30,20,0.22);
  }

  .artwork-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .artwork-card__hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px 5px 9px;
    border-radius: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
  }

  /* Testo descrittivo */
  .mobile-card__text {
    color: #2a231c;
  }

  .mobile-card__summary {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.62;
  }

  .mobile-card__details {
    margin: 10px 0 0;
    font-size: 0.92rem;
    line-height: 1.62;
    white-space: pre-line;
  }

  .mobile-card__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a6a40;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-card__toggle svg {
    transition: transform 260ms ease;
  }

  .mobile-card__toggle.is-open svg {
    transform: rotate(180deg);
  }

  /* Barra navigazione fissa in basso */
  .mobile-card__nav {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 14px max(8px, env(safe-area-inset-bottom, 8px));
    background: rgba(245, 241, 234, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(150, 130, 105, 0.14);
    flex-shrink: 0;
  }

  .mobile-card__nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(120, 94, 63, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: #2a231c;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-card__nav-btn:disabled {
    opacity: 0.32;
  }

  .mobile-card__nav-btn--next {
    background: linear-gradient(180deg, #2e2c29, #191816);
    color: #f7f4ef;
    border-color: transparent;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0 18px;
  }

  .mobile-card__nav-counter {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6f5c44;
    font-weight: 700;
  }
}
