/* Arte — the gallery shop: Terceira in azulejo, sold as digital files: artworks, tiles, lettered plaques and family emblems.
   Follows the site's rules: whole tiles, no gradients, shadows, pills or hairlines; type tokens only. */
.arte { background: var(--paper, #F8F9FB); color: var(--ink, #10285C); padding: var(--gap, 140px) var(--m, 24px); }
.arte-head, .placa-head { display: flex; flex-wrap: wrap; align-items: center; gap: 24px clamp(32px, 5vw, 80px); max-width: 1280px; margin: 0 auto 40px; }
.arte-head .lead, .placa-head .lead { flex: 1 1 320px; max-width: 42ch; }

/* series: plain words, the current one underlined like a ruled ledger */
.arte-series { display: flex; flex-wrap: wrap; gap: 6px 26px; max-width: 1280px; margin: 0 auto 36px; padding: 0; list-style: none; }
.arte-series button {
  font: 500 var(--t-small, 18px)/1.3 var(--f, Georgia, serif); color: var(--muted, #3D4966); background: none; border: 0;
  padding: 10px 0; cursor: pointer; text-decoration: none; border-bottom: 3px solid transparent;
}
.arte-series button[aria-pressed="true"] { color: var(--ink, #10285C); border-bottom-color: var(--cobalt, #1C4597); }

.arte-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 40px 28px; max-width: 1280px; margin: 0 auto; }
.obra { display: grid; gap: 12px; align-content: start; }
.obra-ver { display: block; padding: 0; border: 0; background: var(--grout, #C9D0DC); cursor: zoom-in; }
.obra-ver img { display: block; width: 100%; height: auto; aspect-ratio: var(--r, 1.5); object-fit: cover; }
.obra-tit { margin: 0; font-size: var(--t-lead, 24px); font-weight: 600; line-height: 1.2; }
.obra-sobre { margin: 0; font-size: var(--t-small, 18px); line-height: 1.5; color: var(--muted, #3D4966); }
.obra[hidden] { display: none; }

/* the viewer: the piece large, then on a wall, then how to buy it */
.arte-viewer { width: min(1180px, 100vw - 24px); max-height: calc(100svh - 24px); padding: 0; border: 0; background: var(--paper, #F8F9FB); color: var(--ink, #10285C); }
.arte-viewer::backdrop { background: rgba(14, 34, 80, .86); }
.av-in { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); }
.av-fig { margin: 0; background: var(--grout, #C9D0DC); display: grid; place-items: center; min-height: 320px; }
.av-fig img { width: 100%; height: auto; max-height: calc(100svh - 24px); object-fit: contain; }
.av-parede { position: relative; width: 100%; }
.av-parede > img { width: 100%; height: auto; display: block; }
.av-parede .av-quadro { position: absolute; object-fit: cover; }
.av-txt { padding: 32px; display: grid; gap: 18px; align-content: start; }
.av-txt h3 { margin: 0; font-size: var(--t-h2, 44px); line-height: 1.05; font-weight: 600; letter-spacing: -.015em; }
.av-txt p { margin: 0; font-size: var(--t-body, 20px); line-height: 1.55; }
.av-vistas { display: flex; gap: 22px; }
.av-vistas button { font: 600 var(--t-small, 18px) var(--f, Georgia, serif); color: var(--muted, #3D4966); background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 0; cursor: pointer; }
.av-vistas button[aria-pressed="true"] { color: var(--ink, #10285C); border-bottom-color: var(--cobalt, #1C4597); }
.av-formatos { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.av-formatos label { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px; padding: 0 16px; background: var(--wall, #E8ECF2); cursor: pointer; font-size: var(--t-body, 20px); }
.av-formatos input { accent-color: var(--cobalt, #1C4597); width: 22px; height: 22px; margin: 0 12px 0 0; }
.av-formatos b { font-weight: 600; white-space: nowrap; }
.av-acoes { display: flex; flex-wrap: wrap; gap: 12px; }
.av-fechar { justify-self: start; }

/* the custom plaque */
.placa-studio { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 32px; max-width: 1280px; margin: clamp(64px, 8vw, 120px) auto 0; }
.placa-prev { margin: 0; align-self: start; position: sticky; top: 96px; }
.placa-prev canvas { display: block; width: 100%; height: auto; }
.placa-form { display: grid; gap: 22px; align-content: start; }
.placa-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.placa-form legend, .placa-form .field-label { font-size: var(--t-small, 18px); font-weight: 600; margin-bottom: 8px; padding: 0; }
.placa-modelos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.placa-modelos label { position: relative; cursor: pointer; display: block; background: var(--grout, #C9D0DC); }
.placa-modelos input { position: absolute; opacity: 0; inset: 0; }
.placa-modelos img { display: block; width: 100%; height: auto; outline: 4px solid transparent; outline-offset: -4px; }
.placa-modelos input:checked + img { outline-color: var(--cobalt, #1C4597); }
.placa-modelos input:focus-visible + img { outline-color: var(--navy, #0E2250); outline-offset: 2px; }
.placa-form input[type="text"] {
  font: 400 var(--t-body, 20px)/1.2 var(--f, Georgia, serif); color: var(--ink, #10285C); background: var(--wall, #E8ECF2);
  border: 0; min-height: 56px; padding: 0 16px; width: 100%; box-sizing: border-box;
}
.placa-cores { display: flex; gap: 12px; flex-wrap: wrap; }
.placa-cores label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; background: var(--wall, #E8ECF2); cursor: pointer; font-size: var(--t-small, 18px); }
.placa-cores i { width: 22px; height: 22px; display: inline-block; background: var(--c); }
.placa-nota { margin: 0; font-size: var(--t-small, 18px); color: var(--muted, #3D4966); }

@media (max-width: 900px) {
  .av-in, .placa-studio { grid-template-columns: 1fr; }
  .placa-prev { position: static; }
  .av-txt { padding: 22px; }
  .av-txt h3 { font-size: 32px; }
}
@media (prefers-reduced-motion: no-preference) {
  .obra-ver img { transition: opacity .2s var(--ease, ease); }
  @media (hover: hover) and (pointer: fine) { .obra-ver:hover img { opacity: .92; } }
}

/* registos: the prayers, one tap each */
.placa-grupo { grid-column: 1 / -1; margin: 10px 0 0; font-size: var(--t-small, 18px); font-weight: 600; }
.placa-oracoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.placa-oracoes button {
  font: 400 var(--t-small, 18px)/1.3 var(--f, Georgia, serif); color: var(--ink, #10285C); text-align: left;
  background: var(--wall, #E8ECF2); border: 0; padding: 12px 14px; cursor: pointer; min-height: 56px;
}
.placa-oracoes button:hover { background: var(--grout, #C9D0DC); }

/* previews stay previews: no long-press save, no drag, no selection on the art */
.arte img, .arte canvas, .arte-viewer img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.av-fig, .placa-prev, .obra-ver { position: relative; }
.av-fig::after, .placa-prev::after { content: ""; position: absolute; inset: 0; }

/* ---- A sua família: the shop's second feature, its own section after the catalogue (praca.html) ---- */
.familia { background: var(--paper, #F8F9FB); color: var(--ink, #10285C); padding: var(--gap, 140px) var(--m, 24px); }
.familia-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 24px clamp(32px, 5vw, 80px); max-width: 1280px; margin: 0 auto 40px; }
.familia-cab .lead { flex: 1 1 320px; max-width: 42ch; }
.familia-rotulo, .familia-campo, .familia-todos { display: block; max-width: 1280px; margin-inline: auto; }
.familia-rotulo { font-size: var(--t-small, 18px); font-weight: 600; margin-bottom: 4px; }
/* the field stays in reach while the surname's panel scrolls under it (a direct child of the section, so it sticks through it) */
.familia-campo { position: sticky; top: 0; z-index: 3; background: var(--paper, #F8F9FB); padding: 10px 0; }
.familia-todos { margin-bottom: 36px; }
.familia-campo input {
  font: 400 var(--t-lead, 24px)/1.2 var(--f, Georgia, serif); color: var(--ink, #10285C); background: var(--wall, #E8ECF2);
  border: 0; border-bottom: 3px solid var(--cobalt, #1C4597); border-radius: 0; -webkit-appearance: none; appearance: none;
  min-height: 64px; padding: 0 18px; width: 100%; box-sizing: border-box;
}
.familia-campo input::placeholder { color: var(--muted, #3D4966); opacity: .75; }
.familia-campo input:focus-visible { outline: 3px solid var(--navy, #0E2250); outline-offset: 2px; }
.familia-estado { margin: 10px 0 0; font-size: var(--t-small, 18px); line-height: 1.4; color: var(--muted, #3D4966); }
.familia-estado:empty { display: none; }
.familia-res { list-style: none; margin: 10px 0 0; padding: var(--joint, 3px); display: grid; gap: var(--joint, 3px); background: var(--grout, #C9D0DC); max-height: min(56svh, 540px); overflow-y: auto; overscroll-behavior: contain; }
.familia-res:empty { display: none; }
.fr {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; width: 100%; min-height: 76px; padding: 6px 14px 6px 6px;
  background: var(--paper, #F8F9FB); border: 0; color: var(--ink, #10285C); text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fr img { width: 64px; height: 64px; display: block; }
.fr-txt { display: grid; gap: 2px; min-width: 0; }
.fr-txt b { font-size: var(--t-body, 20px); font-weight: 600; line-height: 1.25; }
.fr-txt span { font-size: var(--t-small, 18px); line-height: 1.35; color: var(--muted, #3D4966); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr[aria-selected="true"] b { color: var(--cobalt, #1C4597); text-decoration: underline; text-underline-offset: 5px; }
.fr:focus-visible { outline: 3px solid var(--cobalt, #1C4597); outline-offset: -3px; }
.fr:active { background: var(--wall, #E8ECF2); }
.fr-novo { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; background: var(--wall, #E8ECF2); }
.fr-novo .fr-txt span { white-space: normal; }
@media (hover: hover) and (pointer: fine) { .fr:hover { background: var(--wall, #E8ECF2); } .fr:hover b { color: var(--cobalt, #1C4597); } }
/* every surname, A to Z, for browsing */
.familia-todos summary { display: inline-block; font-size: var(--t-small, 18px); font-weight: 600; color: var(--cobalt, #1C4597); cursor: pointer; padding: 10px 0; text-decoration: underline; text-underline-offset: 5px; list-style: none; }
.familia-todos summary::-webkit-details-marker { display: none; }
.familia-todos ul { list-style: none; margin: 6px 0 0; padding: 0; columns: 4 150px; column-gap: 24px; }
.familia-todos li { break-inside: avoid; }
.familia-todos a { display: block; padding: 6px 0; font-size: var(--t-small, 18px); color: var(--ink, #10285C); text-underline-offset: 4px; }

/* the surname's own panel: the emblem large, then what the name means, where it is known, what the emblem shows */
.familia-ficha { display: grid; grid-template-columns: minmax(0, 5fr) minmax(300px, 6fr); gap: 40px clamp(32px, 4vw, 64px); max-width: 1280px; margin: 0 auto; scroll-margin-top: 104px; }
.familia-prev { margin: 0; align-self: start; position: sticky; top: 104px; }
.familia-prev::after { content: ""; position: absolute; inset: 0; }
.familia-prev canvas { display: block; width: 100%; height: auto; }
.ficha-txt { display: grid; gap: 22px; align-content: start; min-width: 0; }
.ficha-nome { margin: 0; font-size: var(--t-h2, 44px); line-height: 1.05; font-weight: 600; letter-spacing: -.015em; }
.ficha-dl { margin: 0; display: grid; gap: 4px; }
.ficha-dl dt { margin: 16px 0 0; font-size: var(--t-small, 18px); font-weight: 600; color: var(--cobalt, #1C4597); }
.ficha-dl dt:first-child { margin-top: 0; }
.ficha-dl dd { margin: 0; font-size: var(--t-body, 20px); line-height: 1.55; max-width: 52ch; }
.ficha-fonte, .ficha-p { margin: 0; line-height: 1.5; max-width: 56ch; }
.ficha-fonte { font-size: var(--t-small, 18px); color: var(--muted, #3D4966); font-style: italic; margin-top: -10px; }
[data-ficha-texto] { display: grid; gap: 22px; }
.ficha-p { font-size: var(--t-body, 20px); }
.ficha-novo { display: grid; gap: 14px; justify-items: start; }
.ficha-preco { margin: 0; font-size: var(--t-body, 20px); font-weight: 600; color: var(--cobalt, #1C4597); }
.ficha-txt fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.ficha-txt legend, .ficha-txt .field-label { font-size: var(--t-small, 18px); font-weight: 600; margin-bottom: 8px; padding: 0; }
.ficha-txt > label { display: grid; }
.ficha-txt input[type="text"] {
  font: 400 var(--t-body, 20px)/1.2 var(--f, Georgia, serif); color: var(--ink, #10285C); background: var(--wall, #E8ECF2);
  border: 0; border-radius: 0; min-height: 56px; padding: 0 16px; width: 100%; box-sizing: border-box;
}
.familia-gen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.familia-gen label { position: relative; cursor: pointer; display: grid; gap: 6px; font-size: var(--t-small, 18px); line-height: 1.25; }
.familia-gen input { position: absolute; opacity: 0; inset: 0; }
.familia-gen img { display: block; width: 100%; height: auto; outline: 4px solid transparent; outline-offset: -4px; }
.familia-gen input:checked + img { outline-color: var(--cobalt, #1C4597); }
.familia-gen input:focus-visible + img { outline-color: var(--navy, #0E2250); outline-offset: 2px; }
/* a surname whose new emblem is still being drawn */
.familia-prep { display: grid; place-items: center; aspect-ratio: 3 / 4; padding: 24px; box-sizing: border-box; background: var(--wall, #E8ECF2); color: var(--muted, #3D4966); font-size: var(--t-lead, 24px); text-align: center; }
.familia-prep[hidden] { display: none; }
.fr-prep { width: 64px; height: 64px; background: var(--wall, #E8ECF2); display: block; }
.familia img, .familia canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
@media (max-width: 900px) {
  .familia-ficha { grid-template-columns: 1fr; gap: 24px; scroll-margin-top: 96px; }
  .familia-prev { position: relative; top: auto; }
  .familia-prev canvas { max-width: 520px; margin: 0 auto; }
  .familia-gen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ficha-nome { font-size: 34px; }
}

/* the catalogue (praca.html): the family card second and large, the plaques card wide (loja.css lays out the rest) */
.cat-familia { grid-column: 1 / -1; }
.cat-familia .cartao img { aspect-ratio: 4 / 3; object-position: 50% 50%; }
.cat-familia .cartao-txt { padding: 18px 18px 20px; gap: 8px; }
.cat-familia .cartao-nome { font-size: var(--t-h2, 44px); line-height: 1.1; letter-spacing: -.015em; }
.cat-familia .cartao-desc { font-size: var(--t-body, 20px); color: var(--ink, #10285C); max-width: 44ch; }
.cat-familia .cartao-btn { margin-top: 10px; width: 100%; }
.cat-largo { grid-column: 1 / -1; }
.cat-largo .cartao img { aspect-ratio: 3 / 2; }
@media (min-width: 1000px) {
  .cat-familia { grid-column: span 2; grid-row: span 2; }
  .cat-familia .cartao { grid-template-rows: minmax(0, 1fr) auto; }
  .cat-familia .cartao img { height: 100%; aspect-ratio: auto; min-height: 0; }
  .cat-familia .cartao-btn { width: auto; justify-self: start; }
  /* the two features side by side, the same height, their pictures held to the screen */
  .cat-lista:has(> .cat-familia) > :is(.cat-destaque, .cat-familia) .cartao img { max-height: 62svh; }
  .cat-largo { grid-column: span 2; }
  .cat-largo .cartao img { aspect-ratio: 2 / 1; }
}

/* the shop's four doors, under the hero (praca.html) */
.loja-escolha {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--joint, 3px);
  background: var(--grout, #C9D0DC); max-width: 1280px; margin: clamp(32px, 5vw, 64px) auto; padding: var(--joint, 3px);
}
.loja-escolha a { display: grid; grid-template-rows: auto auto 1fr; gap: 6px; background: var(--paper, #F8F9FB); color: var(--ink, #10285C); text-decoration: none; padding: 0 0 18px; }
.loja-escolha img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.loja-escolha .le-t { font-size: var(--t-lead, 24px); font-weight: 600; line-height: 1.2; padding: 10px 16px 0; }
.loja-escolha .le-d { font-size: var(--t-small, 18px); line-height: 1.4; color: var(--muted, #3D4966); padding: 0 16px; }
@media (hover: hover) and (pointer: fine) { .loja-escolha a:hover .le-t { color: var(--cobalt, #1C4597); text-decoration: underline; text-underline-offset: 5px; } }
@media (max-width: 900px) { .loja-escolha { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: var(--m, 16px); } }
