/*
 * Lino Marzulli — il museo.
 * Pareti chiare, nessuna cornice, un'opera alla volta con il cartellino.
 * Colori e larghezza arrivano dal Configuratore Tema (variabili qui sotto).
 * Caratteri: Archivo (titoli, numeri delle sale, cartellini), Newsreader (testi).
 */

:root {
	--wall: #ECEBE7;
	--surface: #F6F5F1;
	--card: #FAFAF8;
	--line: #D3D1CA;
	--ink: #1A1A1C;
	--muted: #55555B;
	--accent: #2A3FB8;
	--dark: #1A1A1C;
	--night: #141415;
	--on-dark: #ECEBE7;
	--on-dark-muted: #A9A8A2;
	--container: 1280px;
	--font-h: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--font-b: "Newsreader", Georgia, "Times New Roman", serif;
	--gutter: max(20px, 4vw);
	--section: clamp(64px, 9vw, 104px);
	--hang: 0 1px 2px rgba(0, 0, 0, .14), 0 30px 60px -30px rgba(0, 0, 0, .5);
	--ease: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--wall); color: var(--ink); font-family: var(--font-b); font-size: 19px; line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-h); margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 1em; }
button { font: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--ink); color: var(--wall); }
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section); padding-bottom: var(--section); }
.section-tight { padding-top: 24px; padding-bottom: var(--section); }
.muted { color: var(--muted); }

/* Tipografia */
.eyebrow { font-family: var(--font-h); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.eyebrow.on-dark { color: var(--on-dark-muted); }
.display { font-stretch: 72%; font-weight: 700; font-size: clamp(40px, 6vw, 72px); line-height: .94; letter-spacing: -.005em; }
.display-xl { font-size: clamp(56px, 9vw, 112px); line-height: .9; }
.display-sm { font-size: clamp(30px, 4vw, 44px); margin-bottom: 28px; }
.lede { font-size: 20px; line-height: 1.55; max-width: 60ch; color: #2B2B2F; }
.body-lg { font-size: 20px; line-height: 1.6; max-width: 58ch; }
.note { display: flex; gap: 8px; align-items: center; font-family: var(--font-h); font-size: 13px; color: var(--muted); margin: 24px auto 0; }
.crumbs { font-family: var(--font-h); font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* Pulsanti e link */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--font-h); font-size: 15px; letter-spacing: .03em; text-decoration: none; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.btn:hover { background: var(--ink); color: var(--wall); }
.btn-solid { background: var(--ink); color: #F6F5F1; }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-on-dark { border-color: var(--on-dark); color: var(--on-dark); }
.btn-on-dark:hover { background: var(--on-dark); color: var(--dark); }
.btn-light { background: var(--on-dark); color: var(--night); border-color: var(--on-dark); }
.btn-light:hover { background: #fff; color: var(--night); }
.btn .icon { flex: none; }
.link-arrow { font-family: var(--font-h); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); font-family: var(--font-h); font-size: 13px; text-decoration: none; color: var(--ink); background: var(--card); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--wall); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Header */
.topbar { border-bottom: 1px solid var(--line); background: var(--wall); position: relative; z-index: 50; }
.topbar.is-sticky { position: sticky; top: 0; }
.admin-bar .topbar.is-sticky { top: 32px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { font-family: var(--font-h); font-stretch: 118%; font-weight: 700; font-size: 17px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand-small { font-size: 15px; }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; font-family: var(--font-h); font-size: 14px; letter-spacing: .04em; }
.menu-list li { position: relative; display: flex; align-items: center; gap: 4px; }
.menu-list a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.menu-list .current-menu-item > a, .menu-list .current-menu-ancestor > a, .menu-list .current_page_item > a { border-bottom-color: var(--accent); }
.menu-list .sub-menu { list-style: none; margin: 0; padding: 10px 0; position: absolute; top: 100%; left: -16px; min-width: 220px; background: var(--card); border: 1px solid var(--line); display: none; }
.menu-list li:hover > .sub-menu, .menu-list li.is-open > .sub-menu, .menu-list li:focus-within > .sub-menu { display: block; }
.menu-list .sub-menu a { display: block; padding: 8px 16px; }
.submenu-toggle { background: none; border: 0; padding: 4px; cursor: pointer; color: inherit; }
.topbar-tools { display: flex; gap: 8px; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.menu-toggle { display: none; flex-direction: column; gap: 4px; }
.menu-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; }
.search-panel { border-top: 1px solid var(--line); padding: 18px 0; background: var(--wall); }
.search-form { display: flex; gap: 8px; max-width: 640px; }
.search-form input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--ink); background: #fff; font: inherit; font-size: 17px; }

@media (max-width: 900px) {
	.menu-toggle { display: inline-flex; }
	.menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--wall); border-bottom: 1px solid var(--line); display: none; }
	.menu.is-open { display: block; }
	.menu-list { flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; font-size: 17px; }
	.menu-list li { flex-wrap: wrap; }
	.menu-list a { padding: 12px 0; }
	.menu-list .sub-menu { position: static; display: none; border: 0; background: none; padding: 0 0 8px 16px; width: 100%; }
}

/* Ingresso */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 72px); align-items: end; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero-opera { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.hero-opera .opera-link { display: block; box-shadow: var(--hang); }
.hero-opera img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; background: var(--surface); }
.hero-vuota { aspect-ratio: 4 / 3; }
.hero-text { display: flex; flex-direction: column; gap: 26px; padding-bottom: 40px; }
.quote { margin: 0; font-style: italic; font-size: 22px; line-height: 1.45; color: #2B2B2F; max-width: 30ch; }
.quote p { margin: 0; }
.quote cite { display: block; margin-top: 10px; font-style: normal; font-family: var(--font-h); font-size: 13px; color: var(--muted); }
.band-light { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-dark { background: var(--dark); color: var(--on-dark); }
.band-dark a { color: var(--on-dark); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head .lede { margin: 0; max-width: 46ch; }
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.split-rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split-main { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.split-main .eyebrow { margin: 0; }
.big-quote { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; font-style: italic; font-weight: 300; margin: 0; text-wrap: balance; }
.quote-author { font-family: var(--font-h); font-size: 14px; color: var(--on-dark-muted); margin: 0; }
.critici { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; font-family: var(--font-h); font-size: 15px; }
.critici li { padding: 12px 0; border-bottom: 1px solid #3A3A3E; }
.critici a { text-decoration: none; }
.critici a:hover { color: #fff; text-decoration: underline; }
.bio-foto img, .bio-foto .opera-vuota { width: 100%; aspect-ratio: 1276 / 1190; object-fit: cover; }

/* Linea del tempo delle mostre */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.timeline li { padding: 18px 16px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.4; }
.timeline a { text-decoration: none; }
.timeline-year { font-family: var(--font-h); font-stretch: 72%; font-weight: 700; font-size: 32px; line-height: 1; }

/* Pianta del museo */
.pianta { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 168px; gap: 3px; background: var(--ink); border: 3px solid var(--ink); }
.stanza { background: var(--surface); text-decoration: none; padding: 18px; display: flex; gap: 16px; align-items: stretch; min-width: 0; transition: background .2s var(--ease); }
.stanza:hover { background: #fff; color: var(--ink); }
.stanza-opera { width: 96px; flex: none; background: var(--line); overflow: hidden; }
.stanza-opera img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.stanza:hover .stanza-opera img { transform: scale(1.04); }
.stanza-testo { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.stanza-num { font-family: var(--font-h); font-stretch: 72%; font-weight: 700; font-size: 34px; line-height: 1; color: var(--accent); }
.stanza-nome { font-family: var(--font-h); font-size: 16px; font-weight: 600; line-height: 1.25; }
.stanza-conta { font-family: var(--font-h); font-size: 12px; color: var(--muted); }
.stanza-grande { flex-direction: column; background: #fff; }
.stanza-grande .stanza-opera { width: auto; flex: 1; }
.stanza-grande .stanza-testo { flex-direction: row; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.stanza-grande .stanza-nome { font-size: 18px; order: -1; }
.stanza-grande .stanza-conta { width: 100%; order: 3; }
@media (max-width: 820px) {
	.pianta { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
	.pianta .stanza { grid-column: auto !important; grid-row: auto !important; min-height: 132px; }
	.stanza-grande { flex-direction: row; background: var(--surface); }
	.stanza-grande .stanza-opera { width: 96px; flex: none; }
	.stanza-grande .stanza-testo { flex-direction: column; align-items: flex-start; }
	.stanza-grande .stanza-nome { order: 0; font-size: 16px; }
}

/* Intestazioni di pagina */
.page-head { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.page-head .eyebrow, .page-head .crumbs { margin: 0; }
.page-head .lede { margin: 0; }

/* Sala */
.sala-head { padding-top: 48px; padding-bottom: 48px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: end; border-bottom: 1px solid var(--line); }
.sala-name { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.sala-num { font-family: var(--font-h); font-stretch: 62%; font-weight: 800; font-size: clamp(96px, 13vw, 168px); line-height: .8; color: var(--accent); }
.sala-num-sm { font-size: 48px; min-width: 2.2ch; display: inline-block; }
.sala-intro { display: flex; flex-direction: column; gap: 22px; }
.sala-intro .prose { font-size: 19px; }
.sala-tools { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; font-family: var(--font-h); font-size: 14px; }
.sala-tools .btn { margin-left: auto; min-height: 44px; }
.toggle { display: inline-flex; border: 1px solid var(--ink); }
.toggle button { min-height: 44px; padding: 0 18px; border: 0; background: transparent; color: var(--ink); font-family: var(--font-h); font-size: 14px; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: #F6F5F1; }
.parete { min-height: min(760px, 92vh); display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.parete-inner { display: flex; align-items: flex-end; justify-content: center; gap: 40px; padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(48px, 7vw, 80px); }
.opera { display: block; width: var(--w, min(640px, 60vw)); max-width: min(100%, calc(100vw - 2 * var(--gutter) - 240px)); max-height: 76vh; box-shadow: var(--hang); background: var(--surface); cursor: zoom-in; position: relative; }
.opera img { width: 100%; height: 100%; object-fit: contain; }
.cartellino { width: 200px; flex: none; background: var(--card); padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; font-family: var(--font-h); font-size: 13px; line-height: 1.45; color: #3A3A3E; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.cartellino .c-num { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #6B6B70; }
.cartellino .c-titolo { font-weight: 700; font-size: 15px; color: var(--ink); }
.cartellino-riga { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-family: var(--font-h); font-size: 13px; color: var(--muted); margin: 0; }
.cartellino-riga .c-titolo { font-weight: 600; color: var(--ink); font-size: 15px; width: 100%; }
.hero-opera .cartellino-riga .c-titolo { width: auto; }
@media (max-width: 820px) {
	.sala-head { grid-template-columns: minmax(0, 1fr); }
	.sala-tools .btn { margin-left: 0; }
	.parete { min-height: 0; }
	.parete-inner { flex-direction: column; align-items: center; gap: 18px; }
	.opera { max-width: 100%; }
	.cartellino { width: 100%; max-width: 420px; }
}
.griglia { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; align-items: start; }
.card-opera { display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.card-img { display: block; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 18px 40px -22px rgba(0, 0, 0, .45); }
.card-img img { width: 100%; height: auto; }
.card-opera:hover .cartellino-riga .c-titolo { color: var(--accent); }
@media (max-width: 900px) { .griglia { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; } }
.sala-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 64px; padding-bottom: 96px; }
.sala-nav a { text-decoration: none; border-top: 1px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 6px; font-family: var(--font-h); }
.sala-nav .next { align-items: flex-end; text-align: right; }
.sala-nav-name { font-stretch: 72%; font-weight: 700; font-size: clamp(22px, 3vw, 34px); line-height: 1.05; }
.sala-nav .muted { font-size: 13px; }
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }

/* Pianta: elenco delle sale */
.elenco-sale { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 0; }
.elenco-sale li { border-top: 1px solid var(--line); padding: 22px 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: baseline; }
.elenco-sale a { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; text-decoration: none; font-family: var(--font-h); }
.elenco-nome { font-weight: 600; font-size: 20px; }
.elenco-sale p { margin: 0; color: #2B2B2F; }
@media (max-width: 820px) { .elenco-sale li { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* Scheda dell'opera: luce di sala */
body.is-night { background: var(--night); color: var(--on-dark); }
body.is-night .topbar { background: var(--night); border-bottom-color: #2A2A2D; }
body.is-night .brand, body.is-night .menu-list a, body.is-night .icon-btn { color: var(--on-dark); }
body.is-night .icon-btn { border-color: #3A3A3E; }
body.is-night .menu { background: var(--night); }
body.is-night .search-panel { background: var(--night); border-top-color: #2A2A2D; }
body.is-night a { color: var(--on-dark); }
body.is-night a:hover { color: #fff; }
.night-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; font-family: var(--font-h); font-size: 14px; border-bottom: 1px solid #2A2A2D; }
.night-bar a { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; }
.night-bar .muted, body.is-night .muted { color: var(--on-dark-muted); }
.opera-scheda { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 4vw, 48px); padding-top: 40px; padding-bottom: 56px; align-items: center; }
.opera-stage { display: flex; align-items: center; gap: 20px; min-width: 0; }
.opera-full { margin: 0; flex: 1; min-width: 0; display: flex; justify-content: center; }
.opera-full a { display: block; cursor: zoom-in; }
.opera-full img { max-height: 76vh; width: auto; max-width: 100%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 40px 90px -30px rgba(0, 0, 0, .9); }
.night-nav { width: 52px; height: 52px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #3A3A3E; }
.night-nav.is-off { visibility: hidden; }
.opera-info { display: flex; flex-direction: column; gap: 20px; border-left: 1px solid #2A2A2D; padding-left: 32px; }
.opera-info .eyebrow { margin: 0; }
.opera-info .display { font-size: clamp(34px, 3.6vw, 48px); }
.opera-author { font-family: var(--font-h); font-size: 14px; color: var(--on-dark-muted); margin: -8px 0 0; }
.cartellino-scheda { margin: 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); row-gap: 10px; font-family: var(--font-h); font-size: 14px; }
.cartellino-scheda dt { color: var(--on-dark-muted); }
.cartellino-scheda dd { margin: 0; }
.prose-dark { color: #CFCDC7; font-size: 17px; }
.night-section { padding-bottom: 48px; }
.night-section .eyebrow { margin-bottom: 16px; }
.dettagli, .stessa-sala { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.dettagli img, .stessa-sala img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; opacity: .9; transition: opacity .2s; }
.dettagli a:hover img, .stessa-sala a:hover img { opacity: 1; }
@media (max-width: 960px) {
	.opera-scheda { grid-template-columns: minmax(0, 1fr); }
	.opera-info { border-left: 0; padding-left: 0; border-top: 1px solid #2A2A2D; padding-top: 24px; }
	.night-nav { width: 44px; height: 44px; }
}
@media (max-width: 560px) { .opera-stage { gap: 8px; } .opera-stage .night-nav { display: none; } }

/* Visore a schermo pieno e proiezione */
.viewer { position: fixed; inset: 0; z-index: 100000; /* sopra la barra di amministrazione di WordPress (99999) */ background: var(--night); color: var(--on-dark); display: flex; flex-direction: column; }
.viewer[hidden] { display: none; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: env(safe-area-inset-top, 0) max(16px, env(safe-area-inset-right, 0)) 0 max(16px, env(safe-area-inset-left, 0)); border-bottom: 1px solid #2A2A2D; font-family: var(--font-h); font-size: 14px; }
.viewer-context { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-count { color: var(--on-dark-muted); letter-spacing: .08em; font-size: 13px; }
.viewer-tools { display: flex; gap: 8px; }
.viewer-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #3A3A3E; background: transparent; color: var(--on-dark); cursor: pointer; }
.viewer-btn:hover { border-color: var(--on-dark); }
.viewer-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px 320px; align-items: center; gap: 0; }
.viewer-nav { justify-self: center; width: 52px; height: 52px; }
.viewer-figure { margin: 0; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px 0; overflow: hidden; }
.viewer-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9); transition: opacity .35s var(--ease); }
.viewer-img.is-loading { opacity: .15; }
.viewer.is-zoom .viewer-figure { overflow: auto; display: block; cursor: zoom-out; }
.viewer.is-zoom .viewer-img { max-width: none; max-height: none; }
.viewer-figure { cursor: zoom-in; }
.viewer-card { align-self: stretch; border-left: 1px solid #2A2A2D; padding: 40px 28px; display: flex; flex-direction: column; gap: 10px; font-family: var(--font-h); }
.viewer-num { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-muted); min-height: 1em; }
.viewer-title { font-stretch: 72%; font-size: clamp(28px, 3vw, 40px); line-height: .98; }
.viewer-meta { color: #CFCDC7; font-size: 14px; line-height: 1.6; margin: 0; white-space: pre-line; }
.viewer-link { font-size: 14px; margin-top: auto; }
.viewer-progress { height: 2px; background: #2A2A2D; }
.viewer-progress span { display: block; height: 100%; width: 0; background: var(--on-dark); }
.viewer.is-playing .viewer-card, .viewer.is-playing .viewer-nav { opacity: .35; }
@media (max-width: 960px) {
	.viewer-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
	.viewer-nav { display: none; }
	.viewer-figure { padding: 12px; }
	.viewer-card { border-left: 0; border-top: 1px solid #2A2A2D; padding: 16px max(16px, env(safe-area-inset-left, 0)) max(16px, env(safe-area-inset-bottom, 0)); gap: 4px; }
	.viewer-title { font-size: 24px; }
	.viewer-link { margin-top: 6px; }
}
body.has-viewer { overflow: hidden; }

/* Mostre */
.mostre-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.card-mostra { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.card-mostra .card-img img, .card-mostra .opera-vuota { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-mostra .card-img { margin-bottom: 8px; }
.card-title { font-family: var(--font-h); font-weight: 600; font-size: 18px; }
.mostra-cover { margin: 0 auto 24px; }
.mostra-cover img { width: 100%; max-height: 70vh; object-fit: contain; background: var(--surface); }
.foto-mostra { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.foto-mostra img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 820px) { .mostre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Antologia critica */
.antologia { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.antologia li { border-top: 1px solid var(--line); }
.antologia a { display: flex; flex-direction: column; gap: 6px; padding: 24px 0 28px; text-decoration: none; }
.antologia-autore { font-family: var(--font-h); font-stretch: 72%; font-weight: 700; font-size: 30px; line-height: 1.05; }
.antologia-titolo { font-style: italic; font-size: 18px; }
.antologia-estratto { color: #3A3A3E; font-size: 17px; }
.antologia a:hover .antologia-autore { color: var(--accent); }
.antologia .muted { font-family: var(--font-h); font-size: 13px; }
@media (max-width: 820px) { .antologia { grid-template-columns: minmax(0, 1fr); } }

/* Testi (pagine, articoli) */
.article { max-width: calc(760px + 2 * var(--gutter)); }
.article .page-head { padding-left: 0; padding-right: 0; }
.article-cover { margin: 0 0 32px; }
.article-cover img { width: 100%; height: auto; }
.prose { max-width: 68ch; font-size: 19px; line-height: 1.65; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 30px; font-stretch: 80%; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 22px; margin: 1.4em 0 .4em; }
.prose img, .prose figure { margin: 1.5em 0; height: auto; }
.prose figure img { width: auto; }
.prose figcaption, .prose .wp-caption-text { font-family: var(--font-h); font-size: 13px; color: var(--muted); margin-top: 8px; }
.prose blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 2px solid var(--ink); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose a { color: var(--accent); }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose .alignleft { float: left; margin: .4em 1.4em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .4em 0 1em 1.4em; max-width: 50%; }
.prose-list { columns: 2 320px; column-gap: 48px; font-size: 17px; }
.prose-list p { break-inside: avoid; }
.lista { list-style: none; margin: 0 0 32px; padding: 0; }
.lista li { border-top: 1px solid var(--line); }
.lista a { display: flex; gap: 20px; padding: 20px 0; text-decoration: none; align-items: flex-start; }
.lista-img img { width: 96px; height: 96px; object-fit: cover; }
.lista-testo { display: flex; flex-direction: column; gap: 4px; }
.lista-testo .eyebrow { margin: 0; }
.lista-titolo { font-family: var(--font-h); font-weight: 600; font-size: 20px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--font-h); }
.pagination .page-numbers { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--ink); color: var(--wall); border-color: var(--ink); }

/* Segnaposto quando manca un'immagine */
.opera-vuota { display: flex; align-items: flex-end; padding: 14px; width: 100%; min-height: 160px; background: #CFCDC5; font-family: var(--font-h); font-size: 13px; color: #3A3A3E; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; padding-top: 64px; padding-bottom: 48px; font-family: var(--font-h); font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-title { font-weight: 600; margin: 0; }
.footer-col p { margin: 0; }
.footer-links, .site-footer .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; position: static; background: none; border: 0; }
.footer-links li { display: block; }
.newsletter-form { width: 100%; }
.newsletter-form input[type="email"], .newsletter-form input[type="text"] { height: 46px; border: 1px solid var(--ink); background: #fff; padding: 0 14px; font: inherit; }
@media (max-width: 820px) { .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* Ingresso e pagine: telefono */
@media (max-width: 820px) {
	body { font-size: 18px; }
	.hero, .split, .split-rev { grid-template-columns: minmax(0, 1fr); }
	.hero-text { padding-bottom: 0; }
	.timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
	.critici { grid-template-columns: minmax(0, 1fr); }
	.split-rev .bio-foto { order: 2; }
}

/* Footer del nuovo tema nelle pagine del vecchio sito (convivenza) */
.ct-old-footer .site-footer { font-family: var(--font-h); }
body.is-night .site-footer { background: var(--night); border-top-color: #2A2A2D; color: var(--on-dark); }
body.is-night .site-footer .muted { color: var(--on-dark-muted); }
body.is-night .site-footer .brand { color: var(--on-dark); }
body.is-night .btn-solid { background: var(--on-dark); color: var(--night); border-color: var(--on-dark); }

/* Contatti: testo a sinistra, modulo a destra; sul telefono uno sotto l'altro */
.contact-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact-layout > .contact:only-child { grid-column: 1 / -1; max-width: 760px; }
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; margin: 0; }
.form-field { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form-wide { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-h); font-size: 14px; letter-spacing: .03em; color: var(--ink); }
.form-req { color: var(--muted); font-size: 13px; }
.form-field input[type="text"], .form-field input[type="email"], .form-field textarea { width: 100%; box-sizing: border-box; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-bottom-color: var(--ink); background: var(--card); color: var(--ink); font: inherit; font-size: 17px; border-radius: 0; transition: border-color .2s var(--ease), background .2s var(--ease); }
.form-field textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
.form-field.has-error input, .form-field.has-error textarea { border-color: #B3261E; }
.form-msg { font-family: var(--font-h); font-size: 13px; color: #B3261E; }
.form-check label { flex-direction: row; display: flex; gap: 10px; align-items: flex-start; font-family: var(--font-b); font-size: 15px; letter-spacing: 0; }
.form-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ink); }
.form-actions { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.form-note { font-family: var(--font-h); font-size: 13px; color: var(--muted); }
.form-ok, .form-error { margin: 0 0 24px; padding: 16px 18px; font-family: var(--font-h); font-size: 15px; line-height: 1.5; border-left: 3px solid var(--accent); background: var(--card); }
.form-error { border-left-color: #B3261E; }
.form-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 820px) {
	.contact-layout, .contact-form { grid-template-columns: minmax(0, 1fr); }
}
