﻿:root {
  --bg: #0b0f14;
  --bg-soft: #131a22;
  --surface: #171f2b;
  --text: #e9eef7;
  --muted: #a4b0c2;
  --line: #2b3545;
  --accent: #44bfa3;
  --accent-dark: #2da488;
  --max-width: 1120px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 700px at 8% 8%, rgba(56, 132, 132, 0.22), transparent 62%),
    radial-gradient(950px 640px at 92% 92%, rgba(214, 170, 99, 0.16), transparent 58%),
    linear-gradient(165deg, var(--bg), var(--bg-soft));
}

body.public-site {
  /* Public theme variables. JS sets --public-bg / --public-text / --public-accent
     / --public-on-accent from saved data; the rest derive from those. Defaults
     here reproduce the original look so a reset/blank theme always falls back. */
  --public-bg: #000000;
  --public-text: #f3f3f3;
  --public-accent: #1f1f1f;
  --public-accent-dark: color-mix(in srgb, var(--public-accent) 82%, #000);
  --public-accent-border: color-mix(in srgb, var(--public-accent) 80%, #fff 20%);
  --public-muted: color-mix(in srgb, var(--public-text) 55%, var(--public-bg));
  --public-on-accent: #f3f3f3;
  /* Derived surfaces for the header ribbon and side drawer so they follow the
     chosen background/text instead of staying a fixed dark. */
  --public-surface: color-mix(in srgb, var(--public-text) 5%, var(--public-bg));
  --public-surface-2: color-mix(in srgb, var(--public-text) 10%, var(--public-bg));
  --public-line: color-mix(in srgb, var(--public-text) 16%, var(--public-bg));
  background: var(--public-bg);
  color: var(--public-text);
}

a {
  color: inherit;
}

body.page-fixed {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.page-fixed main.container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body.page-fill {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.page-fill main.container {
  flex: 1;
}

.hero-main {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.hero-fullscreen {
  position: absolute;
  inset: 0;
}

.hero-fullscreen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 10, 18, 0.58);
}

.hero-overlay h2 {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  line-height: 1.08;
}

.hero-overlay p {
  margin: 0;
  color: rgba(220, 230, 248, 0.88);
  line-height: 1.65;
  max-width: 66ch;
}

.hero-split {
  display: flex;
  flex-direction: column;
}

.hero-top {
  flex: 1 1 50%;
  min-height: 0;
  overflow: hidden;
  background: #000;
}

.hero-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-top img.is-loaded {
  opacity: 1;
}

.hero-bottom {
  flex: 1 1 50%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 6vw, 5rem);
}

.hero-bottom-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-signature {
  margin: 0;
  font-family: "Parisienne", cursive;
  font-weight: 400;
  font-size: clamp(2.6rem, 1.5rem + 5vw, 6rem);
  line-height: 1.05;
  text-align: center;
}

.hero-bottom-right {
  display: flex;
  align-items: center;
}

.hero-scroll-hint {
  display: none;
  position: absolute;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(200, 200, 200, 0.45);
  animation: hero-scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes hero-scroll-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(4px);
  }
}

.hero-bottom-right p {
  margin: 0;
  color: rgba(230, 230, 230, 0.85);
  line-height: 1.75;
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem);
  max-width: 52ch;
}

@media (max-width: 700px) {
  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }

  .hero-bottom-right {
    justify-content: center;
  }

  .hero-bottom-right p {
    text-align: center;
  }
}

@media (max-width: 860px) {
  /* On small screens keep the image cropped to the top half of the viewport,
     the handwritten name filling the visible bottom half, and the description
     just below the fold (reached by scrolling). The sticky header (~56px)
     is subtracted from both halves so the name stays visually centered. */
  .hero-split .hero-top {
    flex: 0 0 auto;
    height: calc(50dvh - 28px);
  }

  .hero-split .hero-bottom {
    flex: 0 0 auto;
    display: block;
    padding: 0;
  }

  .hero-split .hero-bottom-left {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(50dvh - 28px);
    padding: 1.5rem;
    position: relative;
  }

  .hero-split .hero-bottom-right {
    padding: 0 1.5rem 2.5rem;
  }

  .hero-scroll-hint {
    display: flex;
  }
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

body.public-site .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: clamp(1rem, 4vw, 3rem);
  padding-right: clamp(1rem, 4vw, 3rem);
}

main.container {
  padding-top: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 15, 20, 0.72);
  border-bottom: 1px solid rgba(51, 63, 82, 0.85);
}

body.public-site .site-header {
  background: color-mix(in srgb, var(--public-bg) 92%, transparent);
  border-bottom: 1px solid var(--public-line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem);
  letter-spacing: 0.03em;
  font-weight: 700;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.menu-toggle {
  border: none;
  background: transparent;
  color: #f3f3f3;
  padding: 0.4rem;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  cursor: pointer;
}

.menu-toggle:hover {
  opacity: 0.7;
}

body.public-site .menu-toggle {
  color: var(--public-text);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 70;
}

.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(330px, 88vw);
  height: 100vh;
  background: #050505;
  border-left: 1px solid #1c1c1c;
  transform: translateX(100%);
  transition: transform 200ms ease;
  z-index: 80;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}

.menu-drawer-top {
  display: grid;
  gap: 0.5rem;
  margin-top: 3.2rem;
}

.menu-drawer-top a {
  text-decoration: none;
  border: 1px solid #1f1f1f;
  background: #0d0d0d;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font-weight: 700;
}

.menu-drawer-top a:hover,
.menu-drawer-top a.active {
  background: #181818;
}

body.public-site .menu-drawer {
  background: var(--public-surface);
  border-left: 1px solid var(--public-line);
}

body.public-site .menu-drawer-top a {
  border-color: var(--public-line);
  background: var(--public-surface-2);
  color: var(--public-text);
}

body.public-site .menu-drawer-top a:hover,
body.public-site .menu-drawer-top a.active {
  background: var(--public-surface);
}

.menu-drawer-bottom {
  margin-bottom: 1rem;
}

body.menu-open .menu-drawer {
  transform: translateX(0);
}

body.menu-open .menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.auth-btn {
  border: 1px solid #3f4e66;
  background: #1b2534;
  color: #eaf1ff;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.auth-btn:hover {
  background: #253349;
}

body.public-site .auth-btn {
  width: 100%;
  border: 1px solid var(--public-line);
  background: var(--public-surface-2);
  color: var(--public-text);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font-size: 1rem;
  text-align: center;
}

body.public-site .auth-btn:hover {
  background: var(--public-surface);
}

.site-nav a {
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #c3cfdf;
}

.site-nav a:hover,
.site-nav a.active {
  background: #1f2a3b;
  color: #f5f8ff;
}

.hero {
  margin: 1.3rem 0 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

.hero-body {
  padding: clamp(1rem, 2vw, 2rem);
}

.hero-body h2 {
  margin: 0 0 0.55rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  line-height: 1.08;
}

.hero-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 66ch;
}

.section {
  margin-bottom: 2rem;
}

.section-title {
  margin: 0 0 0.8rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(1.3rem, 1.2rem + 0.7vw, 1.8rem);
}

.page-heading {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1.2rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

body.public-site .card {
  background: #090909;
  border-color: #191919;
  box-shadow: none;
}

.card:hover {
  transform: translateY(-2px);
  transition: transform 180ms ease;
}

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

.card-body {
  padding: 0.8rem 0.9rem 1rem;
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.meta {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.content-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

body.public-site .content-box {
  background: #090909;
  border-color: #191919;
  box-shadow: none;
}

.content-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.2fr 1fr;
  align-items: start;
}

.detail-image {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 220px);
  object-fit: contain;
  cursor: zoom-in;
}

body.public-site .detail-image {
  background: transparent;
  border: none;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.image-viewer.is-open {
  display: block;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
}

.image-viewer-shell {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 1.5rem));
  margin: 0.8rem auto;
  height: calc(100% - 1.6rem);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.65rem;
}

.image-viewer-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.image-viewer-toolbar button {
  min-width: 50px;
  padding: 0.58rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #0d0d0d;
  color: #f3f3f3;
}

.image-viewer-toolbar button:hover {
  background: #1a1a1a;
  border-color: #444;
}

.image-viewer-canvas {
  border: 1px solid #1a1a1a;
  border-radius: var(--radius);
  background: #050505;
  overflow: auto;
  display: grid;
  place-items: safe center;
  padding: 1rem;
}

.image-viewer-image {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  transition: width 120ms ease, height 120ms ease;
  cursor: grab;
}

.image-viewer-image:active {
  cursor: grabbing;
}

.detail-list {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
}

.detail-list strong {
  display: inline-block;
  width: 110px;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  margin-bottom: 0.6rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #c3cddd;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  border: 1px solid #39465b;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #0f1621;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: #7f8aa0;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

body.public-site button:not(.auth-btn):not(.menu-toggle):not(.lang-btn):not(.back-btn) {
  background: var(--public-accent);
  border: 1px solid var(--public-accent-border);
  color: var(--public-on-accent);
}

body.public-site button:not(.auth-btn):not(.menu-toggle):not(.lang-btn):not(.back-btn):hover {
  background: var(--public-accent-dark);
  border-color: var(--public-accent-border);
}

.site-footer {
  margin: 2rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

body.public-site .site-footer {
  color: var(--public-muted);
}

.gallery-main {
  padding-bottom: 2rem;
}

.gallery-carousel {
  position: relative;
  width: 100vw;
  margin-left: 50%;
  margin-top: 0;
  margin-bottom: 2.6rem;
  transform: translateX(-50%);
  isolation: isolate;
}

.gallery-carousel-stage {
  position: relative;
  height: clamp(240px, 52vh, 480px);
  overflow: hidden;
  border-radius: 0;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  left: 50%;
  width: min(66vw, 640px);
  height: 100%;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  overflow: hidden;
  clip-path: inset(0 round 16px);
  background: #0a0a0a;
  transform: translateX(-50%) scale(0.7);
  opacity: 0;
  transition: transform 520ms ease, opacity 520ms ease;
  pointer-events: none;
}

.gallery-slide.is-active,
.gallery-slide.is-prev,
.gallery-slide.is-next {
  opacity: 1;
  pointer-events: auto;
}

.gallery-slide.is-active {
  z-index: 4;
  transform: translateX(-50%) scale(1);
  cursor: pointer;
}

.gallery-slide.is-prev {
  z-index: 3;
  transform: translateX(calc(-50% - min(34vw, 335px))) scale(0.82);
  cursor: pointer;
}

.gallery-slide.is-next {
  z-index: 3;
  transform: translateX(calc(-50% + min(34vw, 335px))) scale(0.82);
  cursor: pointer;
}

.gallery-slide.is-hidden {
  z-index: 1;
  transform: translateX(-50%) scale(0.62);
  opacity: 0;
  pointer-events: none;
}

.gallery-slide img,
.gallery-slide-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.gallery-slide-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(540px 280px at 22% 14%, rgba(255, 255, 255, 0.08), transparent 65%),
    linear-gradient(135deg, #101010, #060606);
}

.gallery-slide-placeholder span {
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 1px solid #363636;
  color: #dedede;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.gallery-slide-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.6rem 1rem 0.95rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 55%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 55%);
}

.gallery-slide-title h3 {
  margin: 0;
  font-size: clamp(0.95rem, 0.75rem + 0.7vw, 1.2rem);
  letter-spacing: 0.03em;
}
.gallery-slide-view-hint {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  opacity: 0;
  transition: opacity 200ms ease;
}

.gallery-slide.is-active:hover .gallery-slide-view-hint {
  opacity: 1;
}

.section-detail-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #1a1a1a;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: transparent;
  color: #f3f3f3;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 150ms ease, border-color 150ms ease;
  cursor: pointer;
}

.back-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.back-btn:hover {
  background: #1a1a1a;
  border-color: #444;
}

.section-detail-header .back-btn {
  position: absolute;
  left: 0;
}

.section-detail-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  font-weight: 800;
}

.section-banner {
  position: relative;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  height: clamp(200px, 40vh, 400px);
  overflow: hidden;
  margin-bottom: 1.4rem;
  background: #050505;
  transition: height 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.section-banner.is-expanded {
  height: clamp(360px, 66vh, 620px);
}

.section-banner-media,
.section-banner-media img,
.section-banner-media .gallery-slide-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-banner-media img,
.section-banner-media .gallery-slide-placeholder {
  transition: filter 0.42s ease, transform 0.42s ease;
}

.section-banner.is-expanded .section-banner-media img,
.section-banner.is-expanded .section-banner-media .gallery-slide-placeholder {
  filter: blur(16px) brightness(0.42);
  transform: scale(1.08);
}

.section-banner-back {
  position: absolute;
  top: clamp(0.8rem, 2vw, 1.2rem);
  left: clamp(1rem, 4vw, 3rem);
  z-index: 4;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.section-banner-back:hover {
  background: rgba(0, 0, 0, 0.72);
  border-color: #555;
}

.section-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
}

.section-banner-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  transition: background 0.42s ease;
  z-index: 0;
}

.section-banner.is-expanded .section-banner-overlay::before {
  background: rgba(0, 0, 0, 0.45);
}

.section-banner-content {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 0 clamp(1rem, 4vw, 3rem);
  text-align: center;
  transition: top 0.42s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.section-banner.is-expanded .section-banner-content {
  top: clamp(1rem, 3vw, 1.6rem);
  transform: translateY(0);
}

.section-banner-content h2 {
  margin: 0;
  font-size: clamp(1.4rem, 1rem + 1.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.section-banner-toggle {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.section-banner-toggle:hover {
  background: rgba(0, 0, 0, 0.72);
  border-color: #555;
}

.section-banner-toggle svg {
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.section-banner.is-expanded .section-banner-toggle svg {
  transform: rotate(180deg);
}

.section-banner-desc {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(7rem, 18vh, 9.5rem) clamp(1.5rem, 6vw, 5rem) clamp(1.6rem, 4vh, 2.4rem);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease;
}

.section-banner.is-expanded .section-banner-desc {
  opacity: 1;
  pointer-events: auto;
}

.section-banner-desc p {
  margin: 0;
  max-width: 70ch;
  color: rgba(240, 240, 240, 0.92);
  line-height: 1.7;
  text-align: center;
  white-space: pre-wrap;
}

::view-transition-group(section-cover) {
  animation-duration: 460ms;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 320ms;
}

.gallery-collage {
  column-count: 5;
  column-gap: 0.8rem;
}

.gallery-collage.is-row-major {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  column-count: initial;
  column-gap: 0;
  gap: 0.8rem;
}

.gallery-collage.is-row-major .gallery-collage-item {
  margin: 0;
}

.gallery-collage-item {
  display: block;
  margin: 0 0 0.8rem;
  break-inside: avoid;
  overflow: hidden;
}

.gallery-collage-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* Group (series) tile: one stacked card standing in for several pieces. */
.gallery-collage-item.is-group {
  position: relative;
  padding: 0 8px 8px 0;
  transition: transform 0.25s ease;
}

.gallery-collage-item.is-group:hover {
  transform: translateY(-3px);
}

.gallery-group-stack {
  position: absolute;
  inset: 0 8px 8px 0;
  pointer-events: none;
}

.gallery-group-stack::before,
.gallery-group-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--public-text) 16%, var(--public-bg));
  border: 1px solid color-mix(in srgb, var(--public-text) 30%, var(--public-bg));
}

.gallery-group-stack::before {
  transform: translate(8px, 8px);
}

.gallery-group-stack::after {
  transform: translate(4px, 4px);
}

.gallery-group-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.gallery-group-media .gallery-slide-placeholder {
  position: relative;
  aspect-ratio: 4 / 3;
}

.gallery-group-overlay {
  position: absolute;
  left: 0;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.6rem 0.85rem 0.7rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  color: #fff;
  pointer-events: none;
}

.gallery-group-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

.gallery-group-meta {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.82;
}

.section-banner-count {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.detail-group {
  margin: -0.35rem 0 0.9rem;
}

.detail-group-link {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.detail-group-link:hover {
  opacity: 1;
}

.status-success {
  color: #83d9be;
}

.status-error {
  color: #ee9aa4;
}

@media (max-width: 860px) {
  /* On small screens, allow fixed-height pages to grow and scroll so their
     content is never cropped behind the mobile browser UI bars. */
  body.page-fixed {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  body.page-fixed main.container {
    overflow: visible;
    min-height: 0;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-image {
    max-height: 60vh;
  }

  .gallery-collage {
    column-count: 4;
  }

  .gallery-slide {
    width: min(74vw, 520px);
  }

  .gallery-slide.is-prev {
    transform: translateX(calc(-50% - min(26vw, 190px))) scale(0.8);
  }

  .gallery-slide.is-next {
    transform: translateX(calc(-50% + min(26vw, 190px))) scale(0.8);
  }
}

@media (max-width: 560px) {
  .gallery-carousel-stage {
    height: clamp(220px, 58vw, 300px);
  }

  .gallery-slide {
    width: min(82vw, 420px);
  }

  .gallery-slide.is-prev {
    transform: translateX(calc(-50% - min(20vw, 118px))) scale(0.8);
  }

  .gallery-slide.is-next {
    transform: translateX(calc(-50% + min(20vw, 118px))) scale(0.8);
  }

  .gallery-collage {
    column-count: 3;
  }

  .gallery-group-overlay {
    padding: 1.1rem 0.5rem 0.45rem;
  }

  .gallery-group-name {
    font-size: 0.78rem;
  }

  .gallery-group-meta {
    font-size: 0.62rem;
  }
}

/* Language toggle (public drawer + admin ribbon) */
.menu-drawer-lang {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lang-toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #8d8d8d;
}

body.public-site .lang-toggle-label {
  color: var(--public-muted);
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

body.public-site .lang-toggle {
  border-color: var(--public-line);
}

.lang-toggle .lang-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  color: #bdbdbd;
  padding: 0.4rem 0.85rem;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

body.public-site .lang-toggle .lang-btn {
  color: var(--public-muted);
}

.lang-toggle .lang-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

body.public-site .lang-toggle .lang-btn:hover {
  background: var(--public-surface-2);
  color: var(--public-text);
}

.lang-toggle .lang-btn.is-active {
  background: #f3f3f3;
  color: #0a0a0a;
}

body.public-site .lang-toggle .lang-btn.is-active {
  background: var(--public-accent);
  color: var(--public-on-accent);
}
