* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #1f2937;
  background: #f8fafc;
}

.landing-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.22), transparent 34rem),
    linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

.landing-card {
  width: min(760px, 100%);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.landing-kicker {
  margin: 0 0 14px;
  color: #0f766e;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.landing-card h1 {
  margin-bottom: 18px;
  max-width: 640px;
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 0.98;
  color: #0f172a;
}

.landing-copy {
  max-width: 620px;
  margin: 0 0 14px;
  color: #334155;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 13px 18px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.24);
}

.landing-cta:hover {
  background: #115e59;
}

.landing-credits {
  margin: 18px 0 0;
  color: #94a3b8;
  font-size: 0.78rem;
  text-align: center;
}

.landing-credits a {
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
}

.landing-credits a:hover {
  text-decoration: underline;
}

.landing-version {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.viewer {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px;
}

.item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}

h1 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  line-height: 1.3;
}

.description {
  margin: 0 0 14px;
  color: #334155;
}

.meta p {
  margin: 0 0 6px;
}

.downloads {
  margin: 14px 0;
}

.downloads a {
  display: inline-block;
  margin-right: 12px;
  color: #0f766e;
  text-decoration: none;
  font-weight: 600;
}

.downloads a:hover {
  text-decoration: underline;
}

.content-html {
  margin: 14px 0;
}

.content-frame {
  margin-top: 14px;
}

.content-frame iframe {
  width: 100%;
  min-height: 70vh;
  border: 0;
}

.error p {
  margin: 0;
  color: #991b1b;
}

.memoria-summary {
  margin: 8px 0 0;
  color: #475569;
  font-size: 0.95rem;
}

.memoria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.memoria-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.memoria-image-btn {
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #e2e8f0;
  display: block;
}

.memoria-image-btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.memoria-image-fallback {
  display: grid;
  place-content: center;
  min-height: 180px;
  color: #64748b;
}

.memoria-video-frame,
.memoria-video-embed iframe,
.memoria-video-embed object,
.memoria-video-embed embed,
.memoria-video-embed video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  border: 0;
}

.memoria-video-thumb {
  position: relative;
}

.memoria-video-html {
  width: 100%;
  overflow: hidden;
}

.memoria-video-link {
  position: relative;
  display: grid;
  place-content: center;
  min-height: 220px;
  color: #fff;
  text-decoration: none;
  background: #111827;
}

.memoria-video-link img,
.memoria-video-poster {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.82;
}

.memoria-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  font-size: 28px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.memoria-video-note {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 7px 10px;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.58);
}

.memoria-video-empty {
  display: grid;
  place-content: center;
  min-height: 220px;
  color: #cbd5e1;
}

.memoria-caption {
  padding: 10px 12px 12px;
}

.memoria-caption-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.memoria-caption-meta {
  margin: 6px 0 0;
  color: #475569;
  font-size: 0.85rem;
}

.memoria-caption a,
.memoria-lightbox-link {
  color: #0f766e;
  text-decoration: none;
  font-weight: 600;
}

.memoria-caption a:hover,
.memoria-lightbox-link:hover {
  text-decoration: underline;
}

.memoria-pagination {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.memoria-pagination a,
.memoria-pagination span {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-decoration: none;
  color: #1e293b;
}

.memoria-pagination span[aria-disabled="true"] {
  opacity: 0.5;
}

.memoria-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(2, 6, 23, 0.92);
  display: block;
  padding: 16px;
  overflow: hidden;
}

.memoria-lightbox[hidden] {
  display: none;
}

.memoria-lightbox-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100% - 48px));
  max-height: calc(100vh - 72px);
}

.memoria-lightbox img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 8px;
  background: #0f172a;
}

.memoria-lightbox-video {
  width: min(920px, 100%);
  margin: 0 auto;
  background: #020617;
  border-radius: 8px;
  overflow: hidden;
}

.memoria-lightbox-video iframe,
.memoria-lightbox-video object,
.memoria-lightbox-video embed,
.memoria-lightbox-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 150px);
  border: 0;
}

.memoria-lightbox-video .memoria-video-link {
  min-height: min(520px, calc(100vh - 150px));
}

.memoria-lightbox-caption {
  color: #f8fafc;
  margin-top: 10px;
}

.memoria-lightbox-title {
  margin: 0;
  font-weight: 700;
}

.memoria-lightbox-meta {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.memoria-lightbox-close,
.memoria-lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
}

.memoria-lightbox-close {
  top: -18px;
  right: -18px;
  z-index: 2;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.memoria-lightbox-prev,
.memoria-lightbox-next {
  top: calc(50% - 20px);
  font-size: 28px;
  line-height: 1;
}

.memoria-lightbox-prev {
  left: 10px;
}

.memoria-lightbox-next {
  right: 10px;
}

.memoria-lock-scroll {
  overflow: hidden;
}
