/* adolfozilli.com — tema "tavolo": carte minimal su un tavolo da gioco, tutto il resto pulito */
:root {
  --felt: #255a74;        /* panno blu petrolio (dal campione di tessuto) */
  --felt-light: #2f7392;
  --felt-dark: #143a4c;
  --rail: #10303f;
  --card: #ffffff;
  --card-2: #f3f1ec;
  --ink: #111111;
  --text: #3b3b3b;
  --muted: #6c7474;
  --line: #e1e6e6;
  --paper: #ffffff;
  --paper-2: #f1f6f6;
  --red: #ff6100;          /* arancione: secondo seme e accento */
  --orange-dark: #c94c00;  /* arancione leggibile su bianco */
  --gold: #ff6100;
  --on-felt: #ffffff;
  --on-felt-muted: #cfe2ec;
  --wrap: 1120px;
  --serif: 'Montserrat', system-ui, sans-serif;  /* titoli: Montserrat pieno */
  --sans: 'Poppins', system-ui, sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; } /* i link interni non finiscono sotto la barra in alto */
body { margin: 0; background: var(--paper); color: var(--text); font: 400 16px/1.8 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 4px; }
a:hover { color: var(--orange-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 600; text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 600; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 760px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--felt-dark); }
.is-home .site-header { position: fixed; left: 0; right: 0; background: rgba(14, 40, 54, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 70px; }
.logo { font: 600 1.45rem/1 var(--serif); text-transform: lowercase; color: var(--on-felt); text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.logo:hover { color: #fff; }
.menu { display: flex; align-items: center; gap: 26px; }
.menu ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 0; padding: 0; }
.menu a { color: var(--on-felt); text-decoration: none; font: 400 .8rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 8px 0; display: inline-block; border-bottom: 1px solid transparent; }
.menu a:hover, .menu a[aria-current] { color: #fff; border-bottom-color: var(--gold); }
.menu .lang { border: 1px solid rgba(238,232,218,.4); padding: 6px 10px; border-radius: 3px; }
.menu-toggle { display: none; background: none; border: 1px solid rgba(238,232,218,.5); color: var(--on-felt); font: 400 .78rem var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 8px 14px; border-radius: 3px; cursor: pointer; }
@media (max-width: 899px) {
  .menu-toggle { display: block; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--felt-dark); flex-direction: column; align-items: flex-start; padding: 8px 16px 24px; gap: 12px; }
  .menu ul { flex-direction: column; gap: 0; width: 100%; }
  .menu li a { padding: 14px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.07); }
  .menu-open .menu { display: flex; }
  .menu-open .site-header { background: var(--felt-dark); }
}

/* ---------- il tavolo (home) */
.table { position: relative; padding: 140px 0 110px; color: var(--on-felt); overflow: hidden;
  background: var(--noise), radial-gradient(ellipse 75% 65% at 50% 38%, var(--felt-light) 0%, var(--felt) 55%, var(--felt-dark) 100%);
  border-bottom: 12px solid var(--rail); box-shadow: inset 0 -8px 18px rgba(0,0,0,.35); }
.table::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(184,149,90,.5), transparent); }
.lamp { position: absolute; left: 50%; top: -30%; width: 120%; height: 90%; transform: translateX(-50%); pointer-events: none; background: radial-gradient(ellipse at center, rgba(255, 242, 210, .10), transparent 60%); }
.table-inner { position: relative; }
.table-head { text-align: center; max-width: 720px; margin: 0 auto; }
.table-head h1 { color: #f7f2e5; font-size: clamp(2.6rem, 6.5vw, 4.4rem); letter-spacing: .01em; margin-bottom: .15em; }
.table-head .lead { font: 500 clamp(1.25rem, 2.4vw, 1.55rem)/1.45 var(--serif); color: #dcd5c3; margin-bottom: 1.1em; }
.roles { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin: 0; padding: 0; font: 400 .72rem/1.6 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--on-felt-muted); }
.roles li + li::before { content: "·"; margin: 0 12px; color: var(--gold); }

.hand { list-style: none; margin: 64px auto 0; padding: 0; max-width: 960px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
@media (min-width: 760px) { .hand { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 34px 28px; } .hand > li { grid-column: span 2; } .hand > li:nth-child(4n+1):nth-last-child(1) { grid-column: 4 / span 2; } }

.pcard { --suit: var(--ink); position: relative; display: block; aspect-ratio: 5 / 7; border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--ink);
  background: linear-gradient(160deg, var(--card) 0%, var(--card-2) 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0,0,0,.35), 0 12px 24px rgba(0,0,0,.32);
  transform: rotate(var(--r, 0deg)); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.pcard.pc-red { --suit: var(--red); }
.pcard::before { content: ""; position: absolute; inset: 9px; border: 1px solid color-mix(in srgb, var(--suit) 30%, transparent); border-radius: 6px; pointer-events: none; }
.pcard:hover, .pcard:focus-visible { color: var(--ink); transform: translateY(-10px) rotate(0deg); box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(0,0,0,.3), 0 26px 40px rgba(0,0,0,.4); }
.pc-corner { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--suit); font: 700 .78rem/1 var(--serif); }
.pc-tl { top: 13px; left: 12px; }
.pc-br { bottom: 13px; right: 12px; transform: rotate(180deg); }
.sym { display: block; }
.sym-s { width: 13px; height: 13px; stroke-width: 1.6; }
.pc-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 34px 30px 30px; text-align: center; }
.pc-img { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; border-radius: 4px; background: var(--felt); color: var(--on-felt); }
.pc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fx, 50%) var(--fy, 50%); transform-origin: var(--fx, 50%) var(--fy, 50%); transform: scale(var(--z, 1)); filter: saturate(.3) contrast(1.03) brightness(.97); transition: filter .6s, transform 1s cubic-bezier(.2, .8, .2, 1); }
.pcard:hover .pc-img img, .pcard:focus-visible .pc-img img { filter: none; transform: scale(calc(var(--z, 1) * 1.05)); }
.sym-l { width: 40%; height: auto; }
.pc-name { flex: none; min-height: 2.8em; display: flex; align-items: center; justify-content: center; font: 700 clamp(.7rem, 1.1vw, .84rem)/1.25 var(--serif); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.pc-glint { position: absolute; inset: -20%; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.75) 50%, transparent 60%); transform: translateX(-110%); }
.pcard:hover .pc-glint, .pcard.glint .pc-glint { animation: glint 1.1s ease-out; }
@keyframes glint { to { transform: translateX(110%); } }

/* ---------- sezioni semplici */
.plain { padding: 84px 0; }
.plain-alt { background: var(--paper-2); }
.small-title { font-size: clamp(1.5rem, 3vw, 2rem); text-transform: uppercase; margin-bottom: 1.1em; }
.small-title::after { content: ""; display: block; width: 90px; height: 3px; background: var(--red); margin-top: 18px; }
.plain .prose { font-size: 1.05rem; }
.about { max-width: 760px; }
.about.has-photo { max-width: 1020px; display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .about.has-photo { grid-template-columns: 360px minmax(0, 1fr); gap: 64px; } }
.about-photo { margin: 0; justify-self: center; max-width: 380px; }
.about-photo img { border: 9px solid #fff; border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 18px 34px rgba(0,0,0,.14); transform: rotate(-1.6deg); }
.about-photo figcaption { margin-top: 14px; text-align: center; font: 500 1rem var(--serif); color: var(--muted); }
.plain .prose p:first-child { font: 500 1.25rem/1.6 var(--serif); color: var(--ink); }

.works { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.works li { border-bottom: 1px solid var(--line); }
.works a { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px; row-gap: 1px; align-items: center; padding: 14px 0; text-decoration: none; color: var(--ink); transition: padding .25s; }
.works a:hover { padding-left: 6px; }
.works a:hover .w-title { color: var(--orange-dark); }
.w-thumb { grid-row: span 3; display: grid; place-items: center; width: 64px; height: 48px; overflow: hidden; border-radius: 4px; background: var(--noise), var(--felt); color: var(--on-felt); }
.w-thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.3); transition: filter .4s; }
.works a:hover .w-thumb img { filter: none; }
.w-thumb .sym { width: 20px; height: 20px; }
.w-year { font-size: .78rem; color: var(--muted); letter-spacing: .03em; }
.w-title { font: 600 1.02rem/1.4 var(--serif); }
.w-client { font-size: .8rem; color: var(--muted); }
@media (min-width: 760px) {
  .works a { grid-template-columns: 76px 96px minmax(0, 1fr) minmax(0, 30%); }
  .w-thumb { grid-row: auto; width: 76px; height: 56px; }
  .w-client { text-align: right; }
}
.more-link { margin-top: 26px; font-size: .9rem; }
.contact-line { text-align: center; }
.contact-text { font: 500 clamp(1.5rem, 3vw, 2rem)/1.35 var(--serif); color: var(--ink); }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; font-size: 1rem; }
.contact-links span { color: var(--gold); }

/* ---------- pagine interne (classi condivise con il tema classico) */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 20px auto 0; padding: 0; font-size: .8rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: #c9c1b1; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.page-head { padding: 48px 0 26px; }
.page-head h1::after { content: ""; display: block; width: 90px; height: 3px; background: var(--red); margin-top: 18px; }
.page-head .lead { font: 500 1.35rem/1.5 var(--serif); color: var(--muted); max-width: 780px; margin-top: 4px; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--gold); }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: 6px; }
.prose figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose blockquote { margin: 1.5em 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--gold); font: 500 1.2rem var(--serif); color: var(--ink); }
.callout { background: var(--paper-2); border-left: 2px solid var(--gold); padding: 16px 20px; margin: 1.5em 0; border-radius: 0 6px 6px 0; }
.callout-title { font-family: var(--serif); font-weight: 600; color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 1.5em 0; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
hr { border: 0; text-align: center; margin: 2.5em 0; }
hr::after { content: ""; display: inline-block; width: 60px; height: 3px; background: var(--red); }
code { background: var(--paper-2); padding: 2px 6px; border-radius: 3px; font-size: .9em; }
mark { background: #f0e2c4; }

.section { padding: 72px 0; }
.section.alt { background: var(--paper-2); }
.section.dark { background: var(--noise), var(--felt); color: var(--on-felt); }
.section.dark h2, .section.dark h3 { color: #f7f2e5; }
.section-title { text-transform: uppercase; }
.section-title::after { content: ""; display: block; width: 90px; height: 3px; background: var(--red); margin-top: 18px; }
.section-lead { max-width: 720px; margin-bottom: 36px; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 22px; }
.service { display: block; padding: 28px 24px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); transition: transform .3s, box-shadow .3s; }
.service:hover { color: var(--text); transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,.08); }
.service h3 { font-size: 1.35rem; }
.service p { font-size: .92rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 26px; }
.card { position: relative; background: #fff; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.05); transition: transform .3s, box-shadow .3s; overflow: hidden; }
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 18px 34px rgba(0,0,0,.1); }
.card-link { display: flex; flex-direction: column; height: 100%; padding: 10px; text-decoration: none; color: var(--text); }
.card-link:hover { color: var(--text); }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: var(--felt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform .6s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; padding: 18px; text-align: center; font: 600 1.15rem var(--serif); color: var(--on-felt); background: var(--noise), radial-gradient(ellipse at 50% 40%, var(--felt-light), var(--felt-dark)); }
.card-body { padding: 18px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card-body h2, .card-body h3 { font-size: 1.3rem; }
.card-body p { font-size: .9rem; }
.card-meta { font-size: .75rem !important; letter-spacing: .05em; color: var(--muted); margin-bottom: .4em !important; }
.more { margin-top: auto; font-size: .82rem; color: var(--orange-dark); }
.more::after { content: " →"; }
.section.dark .card { background: var(--card); }

.project { display: grid; gap: 40px; padding-bottom: 64px; }
@media (min-width: 960px) { .project { grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; } }
.project-hero { margin: 0 0 32px; }
.project-hero img { width: 100%; max-height: 72vh; object-fit: cover; border-radius: 8px; }
.project-side { align-self: start; position: sticky; top: 96px; }
.facts { position: relative; margin: 0; padding: 24px 22px; background: #fff; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 22px rgba(0,0,0,.06); font-size: .9rem; }
.facts::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(163,57,43,.2); border-radius: 6px; pointer-events: none; }
.facts dt { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 14px; color: var(--ink); }
.facts dd:last-child { margin-bottom: 0; }
.facts a { word-break: break-word; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag { font-size: .78rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 30px; text-decoration: none; color: var(--ink); background: #fff; }
.tag:hover { border-color: var(--gold); color: var(--red); }

.yt { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; margin: 2em 0; color: #fff; text-decoration: none; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.yt-play { position: absolute; top: 50%; left: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%; background: var(--card); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.yt-play::after { content: ""; position: absolute; left: 26px; top: 21px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent var(--ink); }
.yt-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px; font-size: .82rem; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cta { padding: 72px 0; color: var(--on-felt); background: var(--noise), radial-gradient(ellipse at 50% 0%, var(--felt-light), var(--felt) 60%, var(--felt-dark)); }
.cta h2 { color: #f7f2e5; }
.cta p { max-width: 680px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cta .btn { display: inline-block; padding: 13px 22px; border-radius: 4px; font-size: .88rem; text-decoration: none; color: var(--ink); background: var(--card); transition: background .2s; }
.cta .btn:hover { background: #fff; color: var(--red); }
.cta .btn-ghost { background: transparent; color: var(--on-felt); border: 1px solid rgba(238,232,218,.45); }
.cta .btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }

.site-footer { background: var(--felt-dark); color: var(--on-felt-muted); padding: 40px 0 32px; font-size: .86rem; }
.site-footer p { margin: 0 0 .6em; }
.site-footer strong { color: var(--on-felt); font: 600 1.05rem var(--serif); }
.site-footer a { color: var(--on-felt); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.legal { font-size: .76rem; opacity: .7; margin-top: 1.4em !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- scena 3D (attiva solo se il browser ha WebGL: classe .has-3d messa da tavolo3d.js) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stage { display: none; }
.table3d { padding-top: 110px; }
.has-3d .table3d { height: calc(var(--segments) * 85vh); padding: 0; overflow: visible; background: var(--felt-dark); }
.has-3d .table3d .table-inner { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.has-3d .stage { display: block; position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stage-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }

.stage-caption { position: absolute; left: max(16px, 6vw); bottom: 10vh; max-width: 360px; padding: 22px 24px 20px; border-radius: 6px; color: var(--ink); background: #fff; box-shadow: 0 18px 40px rgba(0, 30, 30, .35); opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .45s; pointer-events: none; }
.stage-caption.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cap-rank { margin: 0 0 6px; font: 700 .8rem/1 var(--serif); letter-spacing: .12em; color: var(--ink); }
.stage-caption[data-suit="red"] .cap-rank { color: var(--red); }
.cap-name { margin: 0; font: 700 1.3rem/1.2 var(--serif); text-transform: uppercase; color: var(--ink); }
.cap-name::after { content: ""; display: block; width: 60px; height: 3px; background: var(--red); margin: 12px 0; }
.cap-text { margin: 0 0 12px; font-size: .88rem; line-height: 1.6; color: var(--text); }
.cap-link { font: 700 .76rem var(--serif); text-transform: uppercase; letter-spacing: .08em; color: var(--orange-dark); text-decoration: none; }
.cap-link:hover { color: var(--ink); }

.stage-dots { position: absolute; right: max(14px, 3vw); top: 50%; transform: translateY(-50%); list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stage-dots li { font: 700 .7rem/1 var(--serif); color: rgba(255, 255, 255, .5); text-align: right; transition: color .3s, transform .3s; }
.stage-dots li.is-active { color: var(--gold); transform: translateX(-4px) scale(1.25); }

.stage-hint { position: absolute; left: 0; right: 0; bottom: 1.6vh; margin: 0; text-align: center; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--on-felt-muted); transition: opacity .5s; }
.stage-hint::after { content: ""; display: block; width: 1px; height: 34px; margin: 12px auto 0; background: linear-gradient(var(--gold), transparent); animation: hint 2s ease-in-out infinite; transform-origin: top; }
.stage-hint.is-hidden { opacity: 0; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 700px) {
  .stage-caption { left: 16px; right: 16px; bottom: 3vh; max-width: none; padding: 16px 18px 14px; }
  .cap-name { font-size: 1.05rem; }
  .stage-dots { display: none; }
}

/* il campo da gioco nella versione 2D: cornice bianca con il nome del sito nel bordo */
.field { position: relative; max-width: 1000px; margin: 40px auto 0; padding: 44px 22px 30px; border: 2px solid rgba(255,255,255,.75); border-radius: 22px; box-shadow: inset 0 0 0 6px transparent, inset 0 0 0 7px rgba(255,255,255,.3); }
.field .hand { margin-top: 0; }
.mat-text { position: absolute; top: -.72em; left: 44px; margin: 0; padding: 0 14px; font: 700 clamp(1rem, 2.4vw, 1.5rem)/1.4 var(--serif); letter-spacing: .08em; color: #fff; background: var(--felt); }
.mat-text::after { content: ""; display: inline-block; width: .32em; height: .32em; margin-left: .55em; vertical-align: middle; background: var(--red); transform: rotate(45deg); }

/* galleria: più immagini ![[...]] su righe consecutive */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 22px 18px; margin: 2em 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery figcaption { margin-top: 8px; font-size: .82rem; line-height: 1.4; }

/* riquadri da espandere: callout di Obsidian "> [!tipo]- Titolo" */
.callout.fold { padding: 0; border-left: 0; border-radius: 6px; background: var(--paper-2); overflow: hidden; margin: 14px 0; }
.fold > summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; flex: none; width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--red); transition: transform .25s ease; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary:hover { color: var(--red); }
.fold > summary:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.fold-body { padding: 0 20px 14px; }
.fold-body .table-wrap { margin: 0; }
.gallery-free { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: start; }
.gallery-free img { aspect-ratio: auto; object-fit: contain; }

/* lettori audio: ![[brano.mp3|Titolo]] su righe consecutive */
.playlist { display: grid; gap: 4px; margin: 1em 0; }
.track { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 48%); align-items: center; gap: 4px 16px; margin: 0; padding: 6px 0; border-bottom: 1px solid rgba(127,127,127,.18); }
.track figcaption { font-size: .92rem; font-weight: 500; }
.track audio { width: 100%; height: 36px; }
@media (max-width: 600px) { .track { grid-template-columns: 1fr; } }
/* immagini verticali: non più alte dello schermo; galleria libera compatta */
.prose figure > img, .prose figure > picture img { width: auto; max-width: 100%; max-height: 82vh; margin-left: auto; margin-right: auto; }
.gallery-free { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); }
.gallery-free figure { text-align: center; }
.prose .gallery-free figure > img, .gallery-free figure > img { width: auto; max-width: 100%; max-height: 280px; margin: 0 auto; }
/* galleria di pagine verticali (tavole) e immagini cliccabili */
.gallery-tall { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); align-items: start; }
.gallery-tall figure > a > img, .prose .gallery-tall figure > a > img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; max-height: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.gallery .zoom { display: block; cursor: zoom-in; }
.gallery .zoom img { transition: transform .3s; }
.gallery .zoom:hover img { transform: translateY(-3px); }
.prose .gallery-free figure > a > img { width: auto; max-width: 100%; max-height: 280px; margin: 0 auto; }

/* breve descrizione sotto le carte 2D (nella scena 3D la stessa frase compare nella didascalia) */
.pc-desc { margin: 12px 2px 0; font-size: .8rem; line-height: 1.45; color: rgba(255, 255, 255, .86); text-align: center; }
.footer-text { max-width: 640px; margin-left: auto; margin-right: auto; }
/* ultima riga incompleta delle carte 2D: al centro (2 o 3 carte) */
@media (min-width: 760px) {
  .hand > li:nth-child(4n+1):nth-last-child(2) { grid-column: 3 / span 2; }
  .hand > li:nth-child(4n+1):nth-last-child(3) { grid-column: 2 / span 2; }
}
