/* RC88 · Sezione Arte
   Un foglio solo per la pagina dell'arte e per i pezzi che aggiunge alla
   scheda opera (il nome dell'autore come comando, i rimandi fra opere).
   Palette della casa: carta color crema, inchiostro bruno, oro e verde.
   Nessuna ombra pesante, nessun gradiente viola: deve sembrare un catalogo
   stampato bene, non una dashboard. */

.arte-page {
  --arte-carta: #fffaf1;
  --arte-carta-2: #f7efe2;
  --arte-bordo: rgba(83, 61, 32, .16);
  --arte-bordo-forte: rgba(83, 61, 32, .3);
  --arte-inchiostro: #33291f;
  --arte-testo-2: #6f6052;
  --arte-oro: #a56a18;
  --arte-verde: #28724e;
  --arte-ombra: 0 10px 28px rgba(51, 35, 17, .1);
  min-height: 100vh;
  padding: 0 0 72px;
  background: linear-gradient(180deg, #fdf7ec 0%, #f6ecdc 100%);
  color: var(--arte-inchiostro);
}

.arte-page[hidden],
.arte-panel[hidden],
.arte-periodo-body[hidden] {
  display: none !important;
}

.arte-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 3vw, 34px) clamp(12px, 3vw, 30px) 0;
}

/* ------------------------------------------------------------------ testata */

.arte-head {
  position: relative;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--arte-bordo);
  border-radius: 20px;
  background: var(--arte-carta);
  box-shadow: var(--arte-ombra);
}

.arte-head::after {
  content: '';
  position: absolute;
  inset: auto clamp(18px, 3vw, 30px) 0;
  height: 3px;
  background: linear-gradient(90deg, var(--arte-oro), rgba(165, 106, 24, 0));
  border-radius: 3px;
}

.arte-home {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-bottom: 12px;
  padding: 0 13px;
  border: 1px solid var(--arte-bordo);
  border-radius: 999px;
  background: transparent;
  color: #5c4326;
  font: 800 12px/1 system-ui, sans-serif;
  cursor: pointer;
}

.arte-home:hover { background: #fff; }

.arte-eyebrow {
  margin: 0 0 8px;
  color: var(--arte-oro);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .18em;
}

.arte-head h1 {
  margin: 0;
  font: 900 clamp(1.7rem, 5.6vw, 2.9rem)/1.03 Georgia, 'Times New Roman', serif;
  letter-spacing: -.01em;
}

.arte-lead {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--arte-testo-2);
  font-size: clamp(.94rem, 2.4vw, 1.03rem);
  line-height: 1.6;
}

/* --------------------------------------------------------------- linguette */

.arte-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.arte-tab {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--arte-bordo);
  border-radius: 999px;
  background: var(--arte-carta);
  color: #5c4326;
  font: 850 13px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease;
}

.arte-tab:hover { background: #fff; transform: translateY(-1px); }

.arte-tab.is-on {
  border-color: #463c32;
  background: #463c32;
  color: #fffaf0;
}

.arte-tab:focus-visible,
.arte-chip:focus-visible,
.arte-button:focus-visible,
.arte-autore:focus-visible,
.arte-place-button:focus-visible,
.arte-periodo-head:focus-visible,
.arte-sorprendi:focus-visible,
.arte-home:focus-visible {
  outline: 3px solid rgba(194, 120, 36, .38);
  outline-offset: 2px;
}

.arte-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--arte-testo-2);
  font-size: .84rem;
  font-weight: 750;
}

.arte-panel { margin-top: 14px; }

.arte-panel-lead {
  max-width: 70ch;
  margin: 0 0 12px;
  color: var(--arte-testo-2);
  font-size: .93rem;
  line-height: 1.55;
}

.arte-panel-note {
  color: #7c6a58;
  font-size: .8rem;
  font-weight: 800;
}

.arte-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 14px;
}

.arte-empty {
  padding: 22px;
  border: 1px dashed var(--arte-bordo-forte);
  border-radius: 16px;
  background: rgba(255, 255, 255, .6);
  color: var(--arte-testo-2);
  font-size: .92rem;
  text-align: center;
}

/* ------------------------------------------------------- filtri e pulsanti */

.arte-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}

.arte-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--arte-bordo);
  border-radius: 999px;
  background: var(--arte-carta);
  color: #4f3c26;
  font: 800 12.5px/1 system-ui, sans-serif;
  cursor: pointer;
}

.arte-chip:hover { background: #fff; }

.arte-chip.is-on {
  border-color: var(--arte-oro);
  background: linear-gradient(135deg, #fff0bd, #f6bf4d 62%, #d88422);
  color: #3f270c;
  font-weight: 950;
}

.arte-chip-count {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(70, 60, 50, .1);
  font-size: .72rem;
  font-weight: 900;
}

.arte-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--arte-bordo-forte);
  border-radius: 12px;
  background: var(--arte-carta);
  color: #4f3c26;
  font: 850 13px/1 system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.arte-button:hover { background: #fff; transform: translateY(-1px); }
.arte-button.is-primary {
  border-color: #a56a18;
  background: linear-gradient(135deg, #fff0bd, #f6bf4d 58%, #d88422);
  color: #3f270c;
  font-weight: 950;
}
.arte-button.is-ghost { background: transparent; }

/* ------------------------------------------------------------ griglia opere */

.arte-grid { margin-top: 4px; }

/* --------------------------------------------------------------- autori */

.arte-autori-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 12px;
}

.arte-autore {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--arte-bordo);
  border-left: 4px solid var(--arte-oro);
  border-radius: 14px;
  background: var(--arte-carta);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}

.arte-autore:hover {
  transform: translateY(-2px);
  box-shadow: var(--arte-ombra);
}

.arte-autore-name {
  font: 900 1.02rem/1.2 Georgia, 'Times New Roman', serif;
}

.arte-autore-job {
  color: var(--arte-oro);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.arte-autore-count {
  color: var(--arte-testo-2);
  font-size: .8rem;
  font-weight: 800;
}

.arte-autore-places {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.arte-place-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--arte-carta-2);
  color: #5f4a2e;
  font-size: .72rem;
  font-weight: 800;
}

.arte-place-tag.is-more { background: #efe2cd; color: #7a5a20; }

/* -------------------------------------------------------------- periodi */

.arte-periodi {
  display: grid;
  gap: 8px;
}

.arte-periodo {
  border: 1px solid var(--arte-bordo);
  border-radius: 14px;
  background: var(--arte-carta);
  overflow: hidden;
}

.arte-periodo-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.arte-periodo-head:hover { background: var(--arte-carta-2); }

.arte-periodo-label {
  font: 900 1.02rem/1 Georgia, 'Times New Roman', serif;
}

.arte-periodo-count {
  color: var(--arte-testo-2);
  font-size: .8rem;
  font-weight: 800;
}

.arte-periodo-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--arte-carta-2);
  color: #6b4d1c;
  font: 900 1rem/28px system-ui, sans-serif;
  text-align: center;
}

.arte-periodo-body {
  padding: 6px 12px 14px;
  border-top: 1px solid var(--arte-bordo);
}

/* ------------------------------------------------------------- intrecci */

.arte-intrecci-top {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}

.arte-sorprendi {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #a56a18;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff6d8, #ffe3a2 60%, #f6bf4d);
  color: #3f270c;
  text-align: left;
  cursor: pointer;
}

.arte-sorprendi:hover { filter: brightness(1.03) saturate(1.05); }
.arte-sorprendi strong { font: 950 1.05rem/1.2 system-ui, sans-serif; }
.arte-sorprendi span { font-size: .84rem; font-weight: 750; line-height: 1.45; }

.arte-intrecci {
  display: grid;
  gap: 10px;
}

.arte-intreccio {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--arte-bordo);
  border-radius: 14px;
  background: var(--arte-carta);
}

.arte-intreccio-name {
  justify-self: start;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid var(--arte-oro);
  background: transparent;
  color: inherit;
  font: 900 1.05rem/1.2 Georgia, 'Times New Roman', serif;
  cursor: pointer;
}

.arte-intreccio-note {
  margin: 0;
  color: var(--arte-testo-2);
  font-size: .84rem;
  font-weight: 750;
  line-height: 1.5;
}

.arte-intreccio-places,
.arte-artist-places {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.arte-place-button {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--arte-bordo);
  border-radius: 11px;
  background: var(--arte-carta-2);
  color: #4b3823;
  font: 850 12.5px/1.2 system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.arte-place-button:hover { background: #fff; border-color: var(--arte-oro); }
.arte-place-button small { color: #7c6a58; font-size: .72rem; font-weight: 700; }

/* --------------------------------------------------- scheda dell'autore */

.arte-artist-sheet {
  width: min(720px, calc(100vw - 24px));
  max-height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--arte-carta, #fffaf1);
  color: #33291f;
  box-shadow: 0 30px 80px rgba(43, 28, 15, .34);
  overflow: auto;
}

.arte-artist-sheet::backdrop {
  background: rgba(31, 22, 15, .5);
  backdrop-filter: blur(3px);
}

.arte-artist-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3.5vw, 30px);
}

.arte-artist-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(83, 61, 32, .2);
  border-radius: 50%;
  background: #fff;
  color: #4f3c26;
  font: 800 1.3rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.arte-artist-kicker {
  margin: 0 0 6px;
  color: #a56a18;
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .18em;
}

.arte-artist-head h2 {
  margin: 0;
  padding-right: 44px;
  font: 900 clamp(1.4rem, 4.6vw, 2rem)/1.06 Georgia, 'Times New Roman', serif;
}

.arte-artist-meta {
  margin: 6px 0 0;
  color: #a56a18;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.arte-artist-count {
  margin: 8px 0 0;
  color: #6f6052;
  font-size: .88rem;
  font-weight: 800;
}

.arte-artist-block h3 {
  margin: 0 0 9px;
  font: 900 .95rem/1.2 system-ui, sans-serif;
  letter-spacing: .02em;
}

.arte-sheet-opere {
  display: grid;
  gap: 8px;
}

.arte-sheet-opera {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(83, 61, 32, .16);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.arte-sheet-opera:hover { border-color: #a56a18; }
.arte-sheet-opera-photo {
  display: block;
  width: 74px;
  height: 62px;
  border-radius: 9px;
  background: #efe6d8;
  overflow: hidden;
}

.arte-sheet-opera-body { display: grid; gap: 2px; }
.arte-sheet-opera-body strong { font-size: .92rem; font-weight: 900; }
.arte-sheet-opera-body small { color: #6f6052; font-size: .76rem; font-weight: 750; }
.arte-sheet-opera-place { color: #8a7761 !important; }

/* ------------------------------- rimandi dentro la scheda opera (opera.css) */

.opera-sheet-artist-button {
  padding: 0;
  border: 0;
  border-bottom: 2px solid rgba(165, 106, 24, .5);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.opera-sheet-artist-button:hover { border-bottom-color: #a56a18; }

.opera-sheet-related {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(83, 61, 32, .14);
}

.opera-sheet-related h3 {
  margin: 0;
  color: #6f6052;
  font: 900 .74rem/1.2 system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.opera-sheet-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.opera-related-chip {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(83, 61, 32, .16);
  border-radius: 11px;
  background: #fff;
  color: #3f3122;
  text-align: left;
  cursor: pointer;
}

.opera-related-chip:hover { border-color: #a56a18; background: #fffdf6; }
.opera-related-chip strong { font-size: .88rem; font-weight: 900; line-height: 1.25; }
.opera-related-chip small { color: #6f6052; font-size: .74rem; font-weight: 750; }

@media (max-width: 620px) {
  .arte-autori-grid { grid-template-columns: 1fr; }
  .arte-periodo-head { grid-template-columns: 1fr auto; }
  .arte-periodo-mark { display: none; }
  .arte-tab { flex: 1 1 46%; justify-content: center; }
  .arte-sheet-opera { grid-template-columns: 62px 1fr; }
  .arte-sheet-opera-photo { width: 62px; height: 54px; }
}
