/* CasaNenos — CSS puro */

:root {
  --ivory: #fffefb;
  --paper: #f8f4ec;
  --paper-deep: #ece5d8;
  --ink: #222222;
  --ink-soft: #57524b;
  --green: #17261a;
  --green-mid: #24392a;
  --gold: #b08d57;
  --gold-deep: #8a6a3b;
  --gold-light: #d8c091;
  --gold-line: rgba(176, 141, 87, 0.55);
  --gold-line-soft: rgba(176, 141, 87, 0.28);
  --danger: #8e3b34;
  --ok: #2f5d45;
  --font-script: "Great Vibes", "Snell Roundhand", cursive;
  --font-caps: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --font-serif: "Cormorant Garamond", "Garamond", "Palatino Linotype", serif;
  --shadow-card: 0 1px 2px rgba(43, 38, 32, 0.06), 0 24px 48px -24px rgba(43, 38, 32, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(216, 192, 145, 0.32), transparent 65%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(31, 58, 47, 0.07), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--green);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* —— tipografia comum —— */
.eyebrow {
  margin: 0;
  font-family: var(--font-caps);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.couple {
  margin: 0.25rem 0 0;
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 13.5vw, 4.6rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--green);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.couple > span {
  white-space: nowrap;
}

.couple-amp {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.42em;
  line-height: 1;
  margin: 0.1em 0 0.15em;
  color: var(--gold);
}

.couple--sm {
  font-size: clamp(2.1rem, 8.5vw, 3rem);
  flex-direction: row;
  justify-content: center;
  column-gap: 0.3em;
  flex-wrap: wrap;
}

.couple--sm .couple-amp {
  font-size: 0.55em;
  margin: 0;
  vertical-align: 0.2em;
}

.ornament {
  display: block;
  width: min(15rem, 70%);
  height: auto;
  margin: 1.1rem auto;
  color: var(--gold);
}

.section-title {
  margin: 0;
  font-family: var(--font-caps);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.text-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-caps);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-deep);
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 2px;
}

/* —— monograma —— */
.monogram {
  display: block;
  width: auto;
  height: clamp(6.5rem, 30vw, 8.5rem);
  margin: 0 auto;
}

.monogram--sm {
  height: 2.6rem;
}

/* —— moldura com cantos —— */
.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M1 25V9a8 8 0 0 1 8-8h16' fill='none' stroke='%23b08d57' stroke-width='1'/%3E%3Cpath d='M5 25V11a6 6 0 0 1 6-6h14' fill='none' stroke='%23b08d57' stroke-opacity='.45' stroke-width='.8'/%3E%3Ccircle cx='9.5' cy='9.5' r='1.5' fill='%23b08d57'/%3E%3C/svg%3E") no-repeat center / contain;
}

.corner--tl { top: 10px; left: 10px; }
.corner--tr { top: 10px; right: 10px; transform: scaleX(-1); }
.corner--bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.corner--br { bottom: 10px; right: 10px; transform: scale(-1, -1); }

/* —— botões —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-caps);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--green);
  color: var(--ivory);
  box-shadow:
    inset 0 0 0 3px var(--green),
    inset 0 0 0 4px rgba(216, 192, 145, 0.55),
    0 14px 28px -14px rgba(31, 58, 47, 0.55);
}

.btn-primary:hover {
  background: var(--green-mid);
  box-shadow:
    inset 0 0 0 3px var(--green-mid),
    inset 0 0 0 4px rgba(216, 192, 145, 0.8),
    0 14px 28px -14px rgba(31, 58, 47, 0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--gold-line);
}

.btn-ghost:hover {
  background: rgba(255, 253, 248, 0.7);
  border-color: var(--gold);
}

.btn-lg {
  min-height: 3.6rem;
  font-size: 0.86rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.link-btn {
  padding: 0.25rem 0.1rem;
  border: 0;
  background: none;
  font: inherit;
  font-style: italic;
  color: var(--gold-deep);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ========== LANDPAGE ========== */
.home {
  width: min(34rem, 100%);
  margin: 0 auto;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.1rem 0;
}

.invite-card {
  position: relative;
  padding: 3rem 1.6rem 2.6rem;
  text-align: center;
  background: var(--ivory);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-card);
  animation: fade-rise 0.9s ease both;
}

.invite-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold-line-soft);
  pointer-events: none;
}

.invite-card .monogram {
  margin-bottom: 1.2rem;
}

.share-title {
  margin: 0.4rem 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 5.8vw, 1.85rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
}

.share-privacy,
.album-privacy {
  margin: 0 0 1.4rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--ink-soft, #5a6b5e);
}

.album-privacy {
  margin: 0.75rem auto 0;
  max-width: 22rem;
}

.steps {
  list-style: none;
  margin: 0 0 1.9rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--ink-soft);
}

.steps-num {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  font-family: var(--font-caps);
  font-size: 0.8rem;
  color: var(--gold-deep);
  background: var(--ivory);
}

.share-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.share-actions .btn {
  width: min(100%, 21rem);
}

.site-foot {
  padding: 2rem 1rem max(2rem, env(safe-area-inset-bottom));
  text-align: center;
}

.site-foot .ornament {
  width: 8rem;
  margin: 0 auto 0.6rem;
  opacity: 0.7;
}

.site-foot p {
  margin: 0;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
}

.site-foot .text-link {
  margin-top: 0.9rem;
}

.site-foot .credit {
  margin-top: 1.6rem;
  font-family: var(--font-caps);
  font-size: 0.62rem;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.credit a {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-line);
}

/* ========== ÁLBUM / ENVIO ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: max(0.6rem, env(safe-area-inset-top)) 1rem 0.6rem;
  background: rgba(246, 241, 231, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-line-soft);
}

.topbar-back,
.topbar-link {
  font-family: var(--font-caps);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--green);
  padding: 0.6rem 0;
}

.topbar-back span {
  font-size: 1.1rem;
  line-height: 0;
  margin-right: 0.15rem;
}

.topbar-link {
  justify-self: end;
}

.topbar-form {
  justify-self: end;
  margin: 0;
}

.topbar-form .topbar-link {
  border: 0;
  background: none;
  cursor: pointer;
}

.topbar-mono {
  display: block;
  text-decoration: none;
}

.album {
  width: min(60rem, 100%);
  margin: 0 auto;
  padding: 0 1.1rem max(3rem, env(safe-area-inset-bottom));
}

.album-head {
  padding: 1.8rem 0 0.2rem;
  text-align: center;
}

.panel {
  position: relative;
  width: min(32rem, 100%);
  margin: 0 auto 3.25rem;
  padding: 2.4rem 1.5rem 2rem;
  background: var(--ivory);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 5rem;
  animation: fade-rise 0.7s ease both;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold-line-soft);
  pointer-events: none;
}

.step-tag {
  margin: 0;
  text-align: center;
  font-family: var(--font-caps);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.panel-title {
  margin: 0.35rem 0 0.4rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.2;
  color: var(--green);
}

.panel-sub {
  margin: 0 auto 1.6rem;
  max-width: 22rem;
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.guest-step {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.guest-step .panel-sub {
  margin-bottom: 0.4rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-family: var(--font-caps);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(176, 141, 87, 0.45);
  border-radius: 2px;
  background: #fff;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
  color: #a89d8d;
  font-style: italic;
}

.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.18);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-hint {
  font-size: 0.98rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--ink-soft);
}

.suggest {
  list-style: none;
  margin: -0.15rem 0 0;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--gold-line);
  box-shadow: 0 16px 30px -18px rgba(43, 38, 32, 0.45);
}

.suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.9rem;
  padding: 0.5rem 0.7rem;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.suggest li + li .suggest-item {
  border-top: 1px solid var(--gold-line-soft);
}

.suggest-item:hover,
.suggest-item:focus-visible {
  background: var(--paper);
}

.suggest-name {
  font-size: 1.15rem;
}

.suggest-count {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gold-deep);
}

.form-error {
  margin: 0;
  min-height: 1.4em;
  text-align: center;
  font-size: 1.02rem;
  font-style: italic;
  color: var(--danger);
}

.form-error:empty {
  min-height: 0;
  margin-top: -1.1rem;
}

.guest-line {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.guest-line strong {
  font-weight: 600;
  color: var(--ink);
}

.pick-actions {
  display: grid;
  gap: 0.75rem;
}

.pick {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  width: 100%;
  padding: 1.25rem 1rem;
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  background: #fff;
  color: var(--green);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

.pick:hover {
  border-color: var(--gold);
}

.pick:active {
  transform: scale(0.985);
}

.pick--primary {
  padding: 1.7rem 1rem 1.5rem;
  background: var(--green);
  color: var(--ivory);
  border-color: var(--green);
  box-shadow:
    inset 0 0 0 4px var(--green),
    inset 0 0 0 5px rgba(216, 192, 145, 0.5),
    0 16px 30px -16px rgba(31, 58, 47, 0.6);
}

.pick--primary:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
  box-shadow:
    inset 0 0 0 4px var(--green-mid),
    inset 0 0 0 5px rgba(216, 192, 145, 0.75),
    0 16px 30px -16px rgba(31, 58, 47, 0.6);
}

.pick:not(.pick--primary) {
  grid-auto-flow: column;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
}

.pick-icon {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--gold);
}

.pick--primary .pick-icon {
  width: 2.3rem;
  height: 2.3rem;
  color: var(--gold-light);
}

.pick-title {
  font-family: var(--font-caps);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.pick-sub {
  font-size: 1.02rem;
  font-style: italic;
  color: rgba(255, 253, 248, 0.78);
}

.upload-summary {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 1.08rem;
  font-style: italic;
  color: var(--ink-soft);
}

.upload-summary:empty {
  display: none;
}

.upload-summary.is-ok {
  color: var(--ok);
}

.upload-summary.is-error {
  color: var(--danger);
}

.queue {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.queue:empty {
  display: none;
}

.queue-item {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0.6rem 0.45rem 0.45rem;
  background: #fff;
  border: 1px solid var(--gold-line-soft);
  animation: fade-rise 0.35s ease both;
}

.queue-thumb {
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  background: var(--paper-deep);
}

.queue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-body {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.queue-state {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-bar {
  height: 3px;
  background: var(--paper-deep);
  overflow: hidden;
}

.queue-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.2s ease;
}

.queue-icon {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  font-size: 0.95rem;
  color: var(--gold);
  border: 1px solid var(--gold-line-soft);
}

.queue-item.is-done .queue-icon {
  color: var(--ivory);
  background: var(--ok);
  border-color: var(--ok);
}

.queue-item.is-done .queue-state {
  color: var(--ok);
}

.queue-item.is-done .queue-bar,
.queue-item.is-failed .queue-bar {
  display: none;
}

.queue-item.is-failed .queue-state {
  color: var(--danger);
}

.queue-retry {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-caps);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  cursor: pointer;
}

/* —— galeria —— */
.gallery {
  scroll-margin-top: 4.5rem;
}

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--gold-line-soft);
}

.gallery-count {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.gallery-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(24rem, 100%);
  margin: -0.4rem auto 1.3rem;
  border: 1px solid var(--gold-line);
}

.gallery-tab {
  min-height: 2.8rem;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  font-family: var(--font-caps);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.gallery-tab.is-active {
  background: var(--green);
  color: var(--ivory);
}

.my-album-bar {
  margin: 0 0 1.3rem;
  text-align: center;
}

.gallery-more {
  margin: 1.6rem 0 0;
  text-align: center;
}

/* —— área dos noivos —— */
.admin-summary {
  text-align: center;
}

.admin-total {
  margin: 0.6rem 0 1.4rem;
  font-size: 1.3rem;
  color: var(--ink-soft);
}

.admin-total strong {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--green);
}

.admin-total span {
  margin: 0 0.4rem;
  color: var(--gold);
}

.admin-note {
  margin: 0.8rem 0 0;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
}

.album-index {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 2.5rem;
  max-width: 44rem;
}

.album-index a {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--gold-line);
  background: var(--ivory);
  font-size: 1.02rem;
  text-decoration: none;
  color: var(--ink);
}

.album-index a span {
  margin-left: 0.25rem;
  font-style: italic;
  color: var(--gold-deep);
}

.album-section {
  margin-bottom: 3rem;
}

.album-section .gallery-head {
  flex-wrap: wrap;
}

.album-section .text-link {
  margin-top: 0;
}

.gallery-empty {
  margin: 1rem auto;
  max-width: 22rem;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
}

.gallery-empty:empty {
  display: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }
}

@media (min-width: 960px) {
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* partial photo-card */
.photo-card {
  margin: 0;
  padding: 5px 5px 0;
  background: var(--ivory);
  border: 1px solid var(--gold-line-soft);
  box-shadow: 0 10px 22px -16px rgba(43, 38, 32, 0.45);
  animation: card-in 0.45s ease both;
}

.photo-card__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper-deep);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.photo-card__open:hover img {
  opacity: 0.92;
}

.photo-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.45rem 0.25rem 0.55rem;
  min-width: 0;
}

.photo-card__name {
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card__time {
  flex-shrink: 0;
  font-family: var(--font-caps);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
}

/* —— lightbox —— */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(22, 20, 17, 0.96);
  color: var(--ivory);
}

.lightbox::backdrop {
  background: rgba(22, 20, 17, 0.6);
}

.lightbox[open] {
  display: grid;
  place-items: center;
  animation: fade-in 0.25s ease both;
}

.lb-figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  padding: 3.5rem 0.75rem max(1.25rem, env(safe-area-inset-bottom));
  max-width: 100%;
}

.lb-figure img {
  max-width: min(100%, 72rem);
  max-height: calc(100dvh - 10rem);
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(216, 192, 145, 0.25);
}

.lb-caption {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  text-align: center;
}

.lb-name {
  font-size: 1.3rem;
  font-style: italic;
}

.lb-meta {
  font-family: var(--font-caps);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  color: var(--gold-light);
}

.lb-open {
  margin-top: 0.35rem;
  font-family: var(--font-caps);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity: 0.75;
}

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid rgba(216, 192, 145, 0.45);
  border-radius: 50%;
  background: rgba(22, 20, 17, 0.55);
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lb-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

.lb-close {
  top: max(0.75rem, env(safe-area-inset-top));
  right: 0.75rem;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev { left: 0.6rem; }
.lb-next { right: 0.6rem; }

@media (max-width: 639px) {
  .lb-prev,
  .lb-next {
    top: auto;
    bottom: max(1rem, env(safe-area-inset-bottom));
    transform: none;
  }
}

/* —— animações —— */
@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
