:root { --ink: #261650; --paper: #fffcf5; --mint: #caf7f1; --yellow: #ffcc33; --muted: #61576e; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Nunito", system-ui, sans-serif; line-height: 1.6; }
body.viewer-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #9563dc; outline-offset: 4px; }
h1, h2, h3 { font-family: "Fredoka", system-ui, sans-serif; line-height: 1.15; font-weight: 600; }
p { margin: 0 0 1rem; }
.container { width: min(1160px, calc(100% - 3rem)); margin-inline: auto; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.2em; height: 1.2em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; padding: 1rem; background: var(--yellow); }
.topbar { background: #fff; border-bottom: 2px solid var(--ink); }
.navigation { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand img { display: block; width: auto; height: 76px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 1.5rem; align-items: center; }
.nav-links a { font-weight: 800; text-decoration: none; padding: .4rem 0; }
.nav-links a:hover { text-decoration: underline; }
.nav-links .active { padding: .5rem 1rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); }
.hero { padding: 4.5rem 0 5rem; background: radial-gradient(circle at 78% 18%, #fff9 0 7rem, transparent 7.1rem), linear-gradient(120deg, #caf7f1, #e4d8ff 65%, #ffd8e9); border-bottom: 2px solid var(--ink); overflow: hidden; }
.hero-layout { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 5rem; }
.eyebrow { color: #62418c; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 900; }
h1 { margin: 0 0 1.5rem; font-size: clamp(2.7rem, 5.2vw, 4.5rem); letter-spacing: -.025em; }
h1 span { color: #6a3bc2; }
.hero-lead { max-width: 36rem; margin-bottom: 1.8rem; font-size: 1.1rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 44px; padding: .65rem 1rem; border: 2px solid var(--ink); border-radius: .8rem; color: var(--ink); background: #fff; text-decoration: none; font-weight: 900; font-size: .9rem; line-height: 1.3; }
.button:hover { background: #f0e9fb; }
.button.primary { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.button.primary:hover { background: #ffdd70; }
.event-card { position: relative; padding: 2.6rem 1.6rem 2rem; text-align: center; background: #fffdf6; border: 3px solid var(--ink); border-radius: 1.5rem; box-shadow: 10px 10px 0 #b99bff; transform: rotate(3deg); }
.event-card > img { display: block; width: 100%; height: auto; margin: 1rem auto 1.4rem; padding: 1rem; border-radius: .8rem; background: var(--ink); }
.event-card p { margin: .3rem 0; font-size: .85rem; font-weight: 800; }
.card-tag { position: absolute; top: -1rem; left: 1.5rem; padding: .3rem 1.1rem; border: 2px solid var(--ink); border-radius: .6rem; background: var(--yellow); font-weight: 900; transform: rotate(-6deg); }
.memory-tag { position: relative; display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.6rem; color: #5a329f; font-family: "Fredoka", sans-serif; font-size: 1.2rem; }
.gallery-section { padding-block: 4rem; min-height: 30rem; }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.gallery-heading h2 { max-width: 38rem; margin: .4rem 0 .8rem; font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
.event-reference { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.photo-count { flex-shrink: 0; padding: .5rem 1rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--mint); font-size: .85rem; font-weight: 900; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-bottom: 2rem; padding: 1.3rem; border: 2px solid var(--ink); border-radius: 1rem; background: #fff; }
.search-field { flex: 1; max-width: 32rem; }
.search-field label { display: block; margin-bottom: .35rem; font-size: .82rem; font-weight: 900; }
.input-wrap { display: flex; gap: .5rem; align-items: center; padding: .7rem; border: 1px solid #b3a6c5; border-radius: .6rem; }
.input-wrap:focus-within { outline: 3px solid #b99bff; }
.input-wrap input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; color: var(--ink); background: transparent; font-size: .9rem; }
.toolbar > p { margin: 0; color: var(--muted); font-size: .85rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.photo-card { overflow: hidden; background: #fff; border: 2px solid var(--ink); border-radius: 1.2rem; box-shadow: 4px 5px 0 var(--ink); }
.photo-preview { position: relative; display: block; width: 100%; padding: 0; border: 0; color: var(--ink); background: var(--mint); aspect-ratio: 4 / 3; overflow: hidden; }
.photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease; }
.photo-preview:hover img { transform: scale(1.04); }
.photo-preview .expand { position: absolute; bottom: .7rem; right: .7rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--ink); border-radius: 50%; background: #fffffff0; }
.image-error { padding: 1rem; }
.photo-info { padding: 1.1rem; }
.photo-info h3 { margin: 0 0 .5rem; font-size: 1.25rem; overflow-wrap: anywhere; }
.photo-info p { margin: 0 0 1rem; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.photo-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.photo-card .button { flex: 1; padding: .6rem .65rem; font-size: .75rem; }
.photo-card .button.primary { flex-basis: 100%; }
.button.whatsapp { background: #dcf8e7; }
.button.whatsapp:hover { background: #c1f2d4; }
.button.instagram { background: #ffe0ed; }
.button.instagram:hover { background: #ffcce0; }
.button.is-busy { cursor: progress; opacity: .65; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 2rem); margin: 0; padding: .8rem 1.1rem; border: 2px solid var(--yellow); border-radius: .8rem; color: #fff; background: var(--ink); box-shadow: 4px 4px 0 #b99bff; font-size: .85rem; font-weight: 800; transform: translateX(-50%); }
.empty-state { padding: 4rem 1.5rem; border: 2px dashed #bcaaca; border-radius: 1.3rem; text-align: center; background: #fff; }
.empty-state > .icon { width: 3.5rem; height: 3.5rem; padding: .7rem; border-radius: 1rem; background: #e4d8ff; }
.empty-state h3 { margin: 1.2rem 0 .7rem; font-size: 1.6rem; }
.empty-state p { max-width: 31rem; margin: 0 auto; color: var(--muted); }
.empty-state button { margin-top: 1.5rem; }
.sharing-help { display: flex; gap: 1.5rem; align-items: center; padding: 2rem; margin-bottom: 4rem; border: 2px solid var(--ink); border-radius: 1.2rem; background: #fff2a8; }
.sharing-help h2 { margin: 0 0 .7rem; font-size: 1.6rem; }
.sharing-help p { margin: 0; font-size: .9rem; }
.help-symbol { font-size: 3rem; color: #b63570; }
footer { padding-block: 2.5rem; color: #fff; background: var(--ink); }
.footer-layout { display: flex; gap: 2rem; justify-content: space-between; }
footer strong { font-family: "Fredoka", sans-serif; font-size: 1.2rem; font-weight: 500; }
footer p { margin: .4rem 0 0; color: #dfd3f0; font-size: .85rem; }
footer nav { display: flex; flex-wrap: wrap; align-content: center; gap: 1rem; font-size: .85rem; color: #fff2a8; }
dialog { width: min(960px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; overflow-y: auto; border: 2px solid var(--ink); border-radius: 1.2rem; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #1c102be6; }
.viewer-top { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1rem; background: #fff; font-size: .8rem; font-weight: 900; }
.close-button { width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); background: #fff; }
.viewer-image { position: relative; display: grid; place-items: center; min-height: 12rem; background: #170e2b; color: #fff; }
.viewer-image img { display: block; width: 100%; max-height: 58dvh; object-fit: contain; }
.viewer-image p { padding: 2rem; }
.viewer-content { padding: 1.5rem; }
.viewer-content h2 { margin: 0 0 .6rem; font-size: 1.7rem; overflow-wrap: anywhere; }
.share-hint { margin: 1rem 0; font-size: .85rem; color: var(--muted); }
.viewer-navigation { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid #ded4e8; }
.viewer-navigation > span { font-size: .75rem; color: var(--muted); }
.notice { padding: 1rem; border: 2px solid var(--ink); border-radius: .7rem; background: #fff2a8; }
@media (max-width: 900px) { .hero-layout { gap: 2.5rem; } .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toolbar { align-items: flex-start; } .toolbar > p { max-width: 15rem; } }
@media (max-width: 640px) {
  .container { width: calc(100% - 2rem); }
  .navigation { min-height: 86px; }
  .brand img { height: 65px; }
  .nav-links { gap: .3rem .8rem; max-width: 17rem; font-size: .75rem; }
  .nav-links .active { padding: .35rem .65rem; }
  .hero { padding: 2.5rem 0 3rem; }
  .hero-layout { grid-template-columns: 1fr; gap: 3rem; }
  .event-card { width: min(340px, 95%); margin: auto; padding: 1.5rem; }
  .hero-lead { font-size: 1rem; }
  .event-card > img { max-width: 250px; margin-block: .8rem; }
  .memory-tag { margin-top: .8rem; }
  .gallery-section { padding-block: 3rem; }
  .gallery-heading { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .toolbar { flex-direction: column; gap: 1rem; }
  .toolbar > p { max-width: none; }
  .search-field { width: 100%; }
  .gallery-grid { grid-template-columns: 1fr; }
  .sharing-help { gap: 1rem; align-items: flex-start; padding: 1.3rem; }
  .help-symbol { font-size: 2rem; }
  .footer-layout { flex-direction: column; }
  .viewer-content { padding: 1rem; }
  .viewer-navigation > span { display: none; }
  .viewer-content .photo-actions .primary { flex-basis: 100%; }
  .viewer-content .photo-actions > * { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
