:root {
  --brand-blue: #6ec1e4;
  --brand-sky: #77c9dd;
  --brand-violet: #422c8e;
  --brand-indigo: #4054b2;
  --brand-text: #312c2c;
  --brand-muted: #5f6884;
  --surface: #ffffff;
  --border: rgba(66, 44, 142, 0.12);
  --shadow: 0 24px 60px rgba(50, 47, 112, 0.14);
  --shadow-soft: 0 14px 30px rgba(50, 47, 112, 0.1);
  --radius-xl: 34px;
  --container: min(1140px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Quicksand", sans-serif;
  color: var(--brand-text);
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background:
    radial-gradient(circle at top left, rgba(119, 201, 221, 0.22), transparent 22rem),
    linear-gradient(180deg, #fafdff 0, #ffffff 280px);
}

main {
  min-width: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.topbar {
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(119, 201, 221, 0.2);
}

.topbar__inner,
.site-header,
.hero__inner,
.section,
.site-footer {
  width: var(--container);
  margin: 0 auto;
}

.topbar__inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--brand-muted);
  font-size: 0.92rem;
}

.topbar__inner p {
  margin: 0;
}

.topbar__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(66, 44, 142, 0.1);
  color: var(--brand-violet);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar-badge[hidden] {
  display: none;
}

.topbar-button {
  border: 0;
  background: transparent;
  color: var(--brand-violet);
  cursor: pointer;
  font-weight: 700;
}

.app-update {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top, 0)) 20px max(24px, env(safe-area-inset-bottom, 0)) 20px;
}

.app-update__scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 17, 32, 0.52);
  backdrop-filter: blur(10px);
}

.app-update__card {
  position: relative;
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(66, 44, 142, 0.12);
  box-shadow: 0 28px 70px rgba(20, 24, 52, 0.24);
}

.app-update__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(66, 44, 142, 0.1);
  color: var(--brand-violet);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.app-update__card h2 {
  margin: 0;
  color: var(--brand-violet);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.app-update__lead,
.app-update__note {
  margin: 0;
  color: var(--brand-muted);
  line-height: 1.7;
}

.app-update__lead strong {
  color: var(--brand-violet);
}

.app-update__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.app-update__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(110, 193, 228, 0.1);
  color: var(--brand-violet);
  font-size: 0.84rem;
  font-weight: 700;
}

.app-update__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.app-update__actions .button {
  flex: 1 1 180px;
}

.header-logout {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(66, 44, 142, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.header-logout[hidden] {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  min-height: 92px;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.74);
}

.header-menu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.menu-toggle {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  gap: 5px;
  padding: 0;
  border: 1px solid rgba(66, 44, 142, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-violet);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.header-menu.is-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-menu.is-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.header-menu.is-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(66, 44, 142, 0.12);
  box-shadow: var(--shadow);
}

.site-menu[hidden] {
  display: none;
}

.site-menu__nav,
.site-menu__actions {
  display: grid;
  gap: 10px;
}

.site-menu__nav a,
.site-menu__actions a {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(110, 193, 228, 0.1);
  color: var(--brand-violet);
  font-weight: 700;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.site-menu__nav a:hover,
.site-menu__nav a:focus-visible,
.site-menu__actions a:hover,
.site-menu__actions a:focus-visible {
  transform: translateX(2px);
  background: rgba(66, 44, 142, 0.1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: clamp(112px, 15vw, 170px);
  height: auto;
  flex-shrink: 0;
}

.brand-mark {
  color: var(--brand-violet);
  font-family: "Comfortaa", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
}

.header-identity {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 14px;
  min-width: 0;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(66, 44, 142, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  max-width: 100%;
}

.profile-chip[hidden] {
  display: none;
}

.profile-chip__avatar,
.profile-preview {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-violet));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
}

.profile-chip__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-chip__avatar img,
.profile-preview img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.profile-chip__avatar span,
.profile-preview span {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-chip__text {
  display: grid;
  gap: 2px;
  text-align: left;
  min-width: 0;
}

.profile-chip__text strong {
  color: var(--brand-violet);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.profile-chip__text span {
  color: var(--brand-muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.header-action,
.button--primary {
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.header-action:hover,
.button--primary:hover {
  transform: translateY(-2px);
  background: var(--brand-indigo);
}

.button--light {
  background: #ffffff;
  color: var(--brand-violet);
  box-shadow: var(--shadow-soft);
}

.button--light:hover {
  transform: translateY(-2px);
}

.button--ghost,
.button--ghost-dark {
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #ffffff;
}

.button--ghost-dark {
  border-color: rgba(66, 44, 142, 0.18);
  color: var(--brand-violet);
}

.button--danger {
  border-color: rgba(190, 45, 62, 0.18);
  background: rgba(190, 45, 62, 0.08);
  color: #be2d3e;
}

.button--ghost:hover,
.button--ghost-dark:hover,
.button--danger:hover {
  transform: translateY(-2px);
}

.button:disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 24px;
  background: linear-gradient(127deg, var(--brand-indigo) 4%, var(--brand-blue) 61%);
  color: #ffffff;
}

.hero--compact {
  padding-bottom: 12px;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 16%, rgba(255, 255, 255, 0.22), transparent 18rem),
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.08), transparent 14rem);
  pointer-events: none;
}

.hero__pattern::before,
.hero__pattern::after {
  content: "";
  position: absolute;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.hero__pattern::before {
  top: 0;
  left: 0;
  width: clamp(220px, 28vw, 380px);
  aspect-ratio: 31 / 18;
  transform: translate(-28%, -22%);
  opacity: 0.66;
  background-image: url("/assets/hero-ornament-left.svg");
}

.hero__pattern::after {
  top: clamp(92px, 12vw, 156px);
  right: clamp(10px, 2vw, 36px);
  width: clamp(132px, 16vw, 220px);
  aspect-ratio: 5 / 7;
  opacity: 0.48;
  background-image: url("/assets/hero-ornament-right.svg");
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 42px;
  padding: 72px 0 120px;
}

.hero__inner--single {
  grid-template-columns: minmax(0, 1fr);
}

.eyebrow {
  margin: 0 0 14px;
  font-family: "Allura", cursive;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.eyebrow--dark {
  color: var(--brand-blue);
}

.hero h1,
.section-heading h2,
.upload-card h2,
.cta-card h2 {
  margin: 0;
}

.hero h1 {
  max-width: 10ch;
  font-family: "Comfortaa", sans-serif;
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 span {
  display: block;
}

.hero__lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.stat-pill {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.stat-pill strong,
.step-card span,
.orbit-card__icon {
  display: block;
}

.stat-pill strong {
  margin-bottom: 6px;
  font-size: 1rem;
}

.stat-pill span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.94rem;
  line-height: 1.55;
}

.hero__panel {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  width: min(470px, 100%);
  padding: 28px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 50px rgba(38, 28, 92, 0.24);
  backdrop-filter: blur(14px);
}

.hero-card__top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-card__top--solo {
  justify-content: center;
}

.hero-card__top img {
  width: 86px;
  flex: 0 0 auto;
}

.hero-card__label {
  margin: 0 0 4px;
  font-family: "Allura", cursive;
  font-size: 2rem;
}

.hero-card__top h2 {
  font-family: "Comfortaa", sans-serif;
  font-size: 1.4rem;
  text-transform: uppercase;
}

.hero-card__grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.hero-card__grid article {
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
}

.hero-card__grid span,
.step-card span {
  color: rgba(255, 255, 255, 0.72);
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.hero-card__grid h3,
.hero-card__grid p,
.step-card h3,
.step-card p,
.orbit-card h3,
.orbit-card p,
.side-card h3,
.side-card p,
.site-footer p,
.site-footer a {
  margin: 0;
}

.hero-card__grid h3 {
  margin-top: 8px;
  font-size: 1.08rem;
}

.hero-card__grid p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}

.hero-card__text {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.75;
}

.hero-card__actions {
  margin-top: 20px;
}

.hero-card__actions--center {
  display: flex;
  justify-content: center;
}

.hero-card__stack {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.start-pill,
.start-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.start-pill {
  padding: 16px 18px;
}

.start-pill strong,
.start-card strong {
  display: block;
}

.start-pill strong {
  font-size: 1rem;
}

.start-pill span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.hero-card--gallery .hero-card__actions .button {
  width: 100%;
}

.hero--start .hero__copy h1 {
  max-width: 12ch;
}

.section--start {
  padding-top: 48px;
}

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

.start-card {
  padding: 22px;
  background: #ffffff;
  border-color: rgba(66, 44, 142, 0.08);
  box-shadow: 0 18px 40px rgba(38, 28, 92, 0.08);
}

.start-card strong {
  color: var(--brand-violet);
  font-size: 1.02rem;
}

.start-card p {
  margin: 10px 0 0;
  color: var(--brand-muted);
  line-height: 1.7;
}

.hero__wave {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 125px;
}

.hero__wave svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: #ffffff;
}

.section {
  padding: 92px 0;
}

.section--upload {
  padding-top: 68px;
}

.section-heading {
  max-width: 760px;
}

.section-heading--center {
  margin: 0 auto;
  text-align: center;
}

.section-heading h2,
.upload-card h2 {
  color: var(--brand-violet);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.section-heading p:last-child {
  margin-top: 18px;
  color: var(--brand-muted);
  line-height: 1.8;
}

.upload-layout,
.admin-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-top: 34px;
}

.admin-shell {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 32px);
}

.upload-card,
.side-card,
.cta-card {
  min-width: 0;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.upload-card {
  padding: 34px;
  border: 1px solid rgba(110, 193, 228, 0.16);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.album-composer {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(119, 201, 221, 0.08);
  border: 1px solid rgba(66, 44, 142, 0.08);
}

.album-composer__head {
  display: grid;
  gap: 6px;
}

.album-composer__head strong {
  color: var(--brand-violet);
  font-size: 1rem;
}

.album-composer__head span {
  color: var(--brand-muted);
  line-height: 1.6;
}

.album-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.choice-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.choice-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(66, 44, 142, 0.12);
  color: var(--brand-violet);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.choice-pill input:checked + span {
  background: rgba(66, 44, 142, 0.1);
  border-color: rgba(66, 44, 142, 0.26);
  transform: translateY(-1px);
}

.choice-pill input:focus-visible + span {
  outline: 2px solid rgba(119, 201, 221, 0.8);
  outline-offset: 3px;
}

.album-panels {
  display: grid;
  gap: 14px;
}

.album-panel {
  margin: 0;
}

.presentation-composer {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(66, 44, 142, 0.05);
  border: 1px solid rgba(66, 44, 142, 0.08);
}

.presentation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.field--palette {
  grid-column: span 2;
}

.theme-picker {
  position: relative;
  width: 100%;
}

.theme-picker__button {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(66, 44, 142, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  color: var(--brand-text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.theme-picker__button:hover,
.theme-picker__button:focus-visible,
.theme-picker.is-open .theme-picker__button {
  border-color: rgba(66, 44, 142, 0.2);
  box-shadow: 0 18px 36px rgba(34, 25, 77, 0.1);
  transform: translateY(-1px);
}

.theme-picker__preview {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid rgba(66, 44, 142, 0.16);
  background: var(--theme-picker-swatch, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.theme-picker__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.theme-picker__copy strong {
  color: var(--brand-violet);
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.theme-picker__copy small {
  color: var(--brand-muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.theme-picker__chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(66, 44, 142, 0.7);
  border-bottom: 2px solid rgba(66, 44, 142, 0.7);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.theme-picker.is-open .theme-picker__chevron {
  transform: rotate(-135deg);
}

.theme-picker__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 12;
  width: min(280px, calc(100vw - 64px));
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(66, 44, 142, 0.12);
  box-shadow: var(--shadow);
}

.theme-picker__panel[hidden] {
  display: none;
}

.theme-picker--compact .theme-picker__button {
  padding: 10px 12px;
  border-radius: 16px;
  box-shadow: none;
}

.theme-picker--compact .theme-picker__preview {
  width: 24px;
  height: 24px;
  border-radius: 10px;
}

.theme-picker--compact .theme-picker__copy strong {
  font-size: 0.9rem;
}

.theme-picker--compact .theme-picker__copy small {
  font-size: 0.78rem;
}

.theme-picker--compact .theme-picker__panel {
  width: min(250px, calc(100vw - 72px));
}

.palette {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(66, 44, 142, 0.08);
}

.palette-swatch {
  position: relative;
  display: inline-flex;
  min-height: 0;
}

.palette-swatch input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.palette-swatch span {
  position: relative;
  width: 100%;
  height: 34px;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(66, 44, 142, 0.14);
  background: var(--palette-swatch-bg, #ffffff);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.palette-swatch input:checked + span {
  border-color: rgba(66, 44, 142, 0.34);
  box-shadow: 0 12px 24px rgba(34, 25, 77, 0.12);
  transform: translateY(-1px);
}

.palette-swatch input:checked + span::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 9px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(49, 44, 44, 0.08);
}

.palette--compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.palette--compact .palette-swatch span {
  height: 26px;
  border-radius: 10px;
}

.palette--compact .palette-swatch input:checked + span::after {
  inset: 5px;
  border-radius: 6px;
}

.theme-picker__custom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(66, 44, 142, 0.08);
  background: rgba(66, 44, 142, 0.03);
}

.theme-picker__custom-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.theme-picker__custom-color {
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.theme-picker__custom-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.theme-picker__custom-color::-webkit-color-swatch {
  border: 1px solid rgba(66, 44, 142, 0.16);
  border-radius: 18px;
}

.theme-picker__custom-color::-moz-color-swatch {
  border: 1px solid rgba(66, 44, 142, 0.16);
  border-radius: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--brand-violet);
  font-weight: 700;
}

.field input,
.field textarea,
.field select,
.search-input {
  width: 100%;
  border: 1px solid rgba(66, 44, 142, 0.12);
  border-radius: 18px;
  background: #fbfdff;
  padding: 15px 18px;
  color: var(--brand-text);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-input:focus {
  border-color: rgba(110, 193, 228, 0.8);
  box-shadow: 0 0 0 4px rgba(110, 193, 228, 0.16);
}

.field input:disabled,
.field textarea:disabled,
.field select:disabled {
  cursor: not-allowed;
  background: rgba(66, 44, 142, 0.06);
  color: rgba(53, 43, 76, 0.72);
  border-color: rgba(66, 44, 142, 0.08);
  box-shadow: none;
}

.field--textarea {
  margin-top: 18px;
}

.dropzone {
  margin-top: 22px;
  padding: 26px;
  border: 2px dashed rgba(66, 44, 142, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(110, 193, 228, 0.14), transparent 11rem),
    #fbfdff;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.dropzone.is-active {
  border-color: var(--brand-blue);
  transform: translateY(-2px);
}

.dropzone:focus-visible {
  outline: 3px solid rgba(110, 193, 228, 0.25);
  outline-offset: 4px;
}

.dropzone__content strong {
  display: block;
  color: var(--brand-violet);
  font-size: 1.12rem;
}

.dropzone__content p,
.dropzone__hint,
.form-note,
.form-message,
.side-list,
.site-footer p,
.site-footer a,
.submission-meta,
.submission-description {
  color: var(--brand-muted);
  line-height: 1.7;
}

.dropzone__content p {
  margin: 10px 0 0;
}

.dropzone__hint {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.95rem;
}

.file-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.file-list.is-empty {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(119, 201, 221, 0.08);
  color: var(--brand-muted);
}

.file-item {
  padding: 18px 20px;
  border-radius: 20px;
  background: #fbfdff;
  border: 1px solid rgba(119, 201, 221, 0.14);
}

.file-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.file-item__name {
  color: var(--brand-violet);
  font-weight: 700;
  word-break: break-word;
}

.file-item__meta {
  margin-top: 4px;
  color: var(--brand-muted);
  font-size: 0.94rem;
}

.file-item__status {
  margin-top: 12px;
  color: var(--brand-violet);
  font-size: 0.94rem;
  font-weight: 700;
}

.mini-button {
  flex: 0 0 auto;
  border: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(66, 44, 142, 0.08);
  color: var(--brand-violet);
  cursor: pointer;
}

.progress-panel {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(110, 193, 228, 0.08);
}

.progress-panel__head,
.admin-toolbar,
.admin-toolbar__actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.progress-track,
.file-item__progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(66, 44, 142, 0.08);
  overflow: hidden;
}

.progress-track span,
.file-item__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-sky), var(--brand-violet));
  border-radius: inherit;
  transition: width 0.25s ease;
}

.file-item__progress {
  margin-top: 10px;
}

.form-message {
  min-height: 28px;
  margin: 18px 0 0;
}

.form-message.is-error {
  color: #be2d3e;
}

.form-message.is-success {
  color: #217f54;
}

.form-actions {
  margin-top: 20px;
}

.form-actions--stacked {
  justify-content: flex-start;
}

.form-note {
  max-width: 320px;
  margin: 0;
  font-size: 0.95rem;
}

.upload-side {
  display: grid;
  gap: 20px;
}

.side-card {
  padding: 28px;
}

.side-card h3 {
  margin-top: 8px;
  color: var(--brand-violet);
  font-size: 1.45rem;
}

.side-card p {
  margin-top: 14px;
}

.side-card--soft {
  background: linear-gradient(180deg, rgba(119, 201, 221, 0.1), rgba(66, 44, 142, 0.05));
}

.side-list {
  margin: 0;
  padding-left: 18px;
}

.side-list li + li {
  margin-top: 10px;
}

.feature-orbits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: 36px;
}

.orbit-card {
  padding: 30px 24px;
  text-align: center;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-indigo));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.orbit-card__icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  font-family: "Poppins", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.orbit-card h3 {
  font-size: 1.18rem;
}

.orbit-card p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
}

.section--steps {
  padding-top: 70px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
}

.step-card {
  padding: 28px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(110, 193, 228, 0.14);
}

.step-card span {
  color: var(--brand-blue);
}

.step-card h3 {
  margin-top: 10px;
  color: var(--brand-violet);
  font-size: 1.28rem;
}

.step-card p {
  margin-top: 12px;
  color: var(--brand-muted);
}

.section--cta {
  padding-top: 18px;
}

.cta-card {
  padding: 42px;
  background: linear-gradient(127deg, var(--brand-indigo) 4%, var(--brand-blue) 61%);
  color: #ffffff;
  text-align: center;
}

.cta-card h2 {
  max-width: 880px;
  margin: 0 auto;
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.18;
}

.cta-card .button {
  margin-top: 24px;
}

.site-footer {
  padding: 88px 0 52px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-logo {
  width: 240px;
  margin-bottom: 18px;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: var(--brand-violet);
  font-size: 1.22rem;
}

.site-footer a {
  display: block;
}

.site-footer a + a,
.site-footer p + p {
  margin-top: 10px;
}

.admin-page .hero h1 {
  max-width: 12ch;
}

.admin-login {
  width: 100%;
  max-width: 320px;
  position: sticky;
  top: 120px;
}

.admin-sidebar-card {
  display: grid;
  gap: 18px;
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-nav__button {
  width: 100%;
  border: 1px solid rgba(66, 44, 142, 0.12);
  border-radius: 18px;
  background: #fbfdff;
  padding: 14px 16px;
  color: var(--brand-violet);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.admin-nav__button:hover,
.admin-nav__button:focus-visible,
.admin-nav__button.is-active {
  border-color: rgba(66, 44, 142, 0.28);
  box-shadow: 0 14px 28px rgba(34, 25, 77, 0.08);
  transform: translateY(-1px);
}

.admin-content {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.admin-panel {
  min-width: 0;
}

.admin-toolbar {
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 24px;
}

.admin-toolbar__actions {
  flex-wrap: wrap;
  width: min(100%, 520px);
  margin-left: auto;
}

.search-input {
  min-width: min(280px, 100%);
  max-width: 100%;
}

.admin-stats,
.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.admin-stats {
  margin-bottom: 22px;
}

.admin-stat,
.admin-overview-card {
  padding: 18px;
  border-radius: 22px;
  background: #fbfdff;
  border: 1px solid rgba(66, 44, 142, 0.08);
}

.admin-stat {
  display: grid;
  gap: 8px;
}

.admin-stat strong {
  color: var(--brand-violet);
  font-size: 1.45rem;
}

.admin-stat__label,
.admin-overview-card strong {
  color: var(--brand-violet);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-stat__hint,
.admin-overview-card p,
.admin-overview-card span {
  color: var(--brand-muted);
  line-height: 1.6;
}

.admin-overview-card {
  display: grid;
  gap: 10px;
}

.admin-overview-card p,
.admin-overview-card span {
  margin: 0;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-filter {
  border: 1px solid rgba(66, 44, 142, 0.12);
  border-radius: 999px;
  background: #ffffff;
  padding: 10px 16px;
  color: var(--brand-violet);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-filter.is-active,
.admin-filter:hover,
.admin-filter:focus-visible {
  background: rgba(66, 44, 142, 0.1);
  border-color: rgba(66, 44, 142, 0.24);
}

.submission-list {
  display: grid;
  gap: 18px;
}

.submission-card {
  min-width: 0;
  padding: 22px;
  border-radius: 24px;
  background: #fbfdff;
  border: 1px solid rgba(66, 44, 142, 0.1);
}

.submission-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.submission-card h3 {
  margin: 0;
  color: var(--brand-violet);
  font-size: 1.24rem;
  overflow-wrap: anywhere;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(110, 193, 228, 0.14);
  color: var(--brand-violet);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.submission-meta,
.submission-description {
  margin-top: 12px;
}

.submission-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.submission-files {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.submission-file {
  --admin-file-bg: #ffffff;
  --admin-file-text: var(--brand-text);
  --admin-file-muted: var(--brand-muted);
  --admin-file-border: rgba(66, 44, 142, 0.1);
  --admin-file-preview: #eef7fd;
  display: grid;
  grid-template-columns: minmax(240px, 0.88fr) minmax(0, 1.12fr);
  align-items: stretch;
  gap: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--admin-file-border);
  background: var(--admin-file-bg);
  box-shadow: 0 18px 32px rgba(34, 25, 77, 0.07);
}

.submission-file--theme-white {
  --admin-file-bg: #ffffff;
  --admin-file-text: var(--brand-text);
  --admin-file-muted: var(--brand-muted);
  --admin-file-border: rgba(66, 44, 142, 0.1);
  --admin-file-preview: #eef7fd;
}

.submission-file--theme-sand {
  --admin-file-bg: #fff9f1;
  --admin-file-text: #4e3a27;
  --admin-file-muted: #7b6855;
  --admin-file-border: rgba(120, 92, 58, 0.16);
  --admin-file-preview: #efe2d1;
}

.submission-file--theme-sky {
  --admin-file-bg: #f4fbff;
  --admin-file-text: #24455e;
  --admin-file-muted: #5a7b93;
  --admin-file-border: rgba(45, 115, 163, 0.16);
  --admin-file-preview: #dcefff;
}

.submission-file--theme-mint {
  --admin-file-bg: #f3fffb;
  --admin-file-text: #244c40;
  --admin-file-muted: #55796e;
  --admin-file-border: rgba(44, 121, 93, 0.16);
  --admin-file-preview: #d9f3e8;
}

.submission-file--theme-rose {
  --admin-file-bg: #fff7fa;
  --admin-file-text: #5f3040;
  --admin-file-muted: #8a6170;
  --admin-file-border: rgba(166, 74, 109, 0.16);
  --admin-file-preview: #f8dfe8;
}

.submission-file--theme-night {
  --admin-file-bg: #232439;
  --admin-file-text: #f3efff;
  --admin-file-muted: #cbc4e5;
  --admin-file-border: rgba(196, 187, 255, 0.14);
  --admin-file-preview: #343656;
}

.submission-file--size-compact {
  grid-template-columns: minmax(200px, 0.72fr) minmax(0, 1.28fr);
}

.submission-file--size-feature {
  grid-template-columns: minmax(300px, 1.05fr) minmax(0, 0.95fr);
}

.submission-file__preview-wrap {
  min-width: 0;
}

.submission-file__preview {
  min-height: 250px;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(110, 193, 228, 0.16), transparent 12rem),
    var(--admin-file-preview);
}

.submission-file--size-compact .submission-file__preview {
  min-height: 210px;
}

.submission-file--size-feature .submission-file__preview {
  min-height: 320px;
}

.submission-file__preview img,
.submission-file__preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.submission-file__content {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.submission-file__info {
  min-width: 0;
  color: var(--admin-file-text);
}

.submission-file__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.submission-file__info h4 {
  margin: 12px 0 0;
  color: var(--admin-file-text);
  font-size: 1.14rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.submission-file__meta-row,
.submission-file__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.submission-file__meta-row {
  color: var(--admin-file-muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.submission-file__filename,
.submission-file__date-note {
  margin: 8px 0 0;
  color: var(--admin-file-muted);
  line-height: 1.6;
}

.submission-file__filename {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.submission-file__owner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.submission-file__owner-avatar {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(110, 193, 228, 0.22), rgba(66, 44, 142, 0.18));
  color: var(--brand-violet);
  font-weight: 700;
  font-size: 0.96rem;
}

.submission-file__owner-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.submission-file__owner-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.submission-file__owner-body strong {
  color: var(--admin-file-text);
  overflow-wrap: anywhere;
}

.submission-file__owner-body span {
  color: var(--admin-file-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.gallery-visibility {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.gallery-visibility.is-visible {
  background: rgba(33, 127, 84, 0.12);
  color: #217f54;
}

.gallery-visibility.is-hidden {
  background: rgba(190, 45, 62, 0.1);
  color: #be2d3e;
}

.submission-album-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(66, 44, 142, 0.08);
  color: var(--brand-violet);
  font-size: 0.84rem;
  font-weight: 700;
}

.submission-file__album-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.submission-file__meta-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  align-items: start;
  gap: 12px;
}

.submission-file__album-field {
  min-width: 0;
  flex: 1;
}

.submission-file__date-field {
  min-width: 0;
}

.submission-file__theme-field,
.submission-file__size-field,
.submission-file__text-field {
  min-width: 0;
}

.submission-file__theme-field {
  grid-column: 1 / -1;
}

.submission-file__save {
  justify-self: start;
}

.submission-file__tile,
.submission-file__audio {
  height: 100%;
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  color: var(--admin-file-text);
}

.submission-file__tile strong,
.submission-file__audio strong {
  color: inherit;
}

.submission-file__tile span {
  color: var(--admin-file-muted);
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.submission-file__audio audio {
  width: min(100%, 360px);
}

.empty-state {
  padding: 28px;
  border-radius: 24px;
  background: rgba(119, 201, 221, 0.08);
  color: var(--brand-muted);
  text-align: center;
}

.gallery-summary {
  margin-top: 26px;
}

.gallery-status {
  margin: 0;
  color: var(--brand-muted);
  line-height: 1.7;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 24px;
}

.gallery-grid > * {
  min-width: 0;
  width: 100%;
}

.gallery-directory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.gallery-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 22px;
}

.gallery-directory-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px;
  border: 1px solid rgba(66, 44, 142, 0.1);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: left;
  min-width: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.gallery-directory-card:hover,
.gallery-directory-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(66, 44, 142, 0.22);
  box-shadow: 0 20px 36px rgba(34, 25, 77, 0.12);
}

.gallery-directory-card__cover {
  width: 92px;
  height: 92px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(110, 193, 228, 0.2), rgba(66, 44, 142, 0.16));
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-directory-card__cover img,
.gallery-directory-card__cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-directory-card__fallback {
  color: var(--brand-violet);
  font-size: 1.5rem;
  font-weight: 700;
}

.gallery-directory-card__body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.gallery-directory-card__body strong {
  color: var(--brand-violet);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.gallery-directory-card__body span,
.gallery-directory-card__body small {
  color: var(--brand-muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.gallery-album {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.gallery-album__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 18px;
}

.gallery-album__eyebrow {
  margin: 0 0 8px;
  color: var(--brand-blue);
  font-family: "Poppins", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-album__head h3 {
  margin: 0;
  color: var(--brand-violet);
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}

.gallery-album__count {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(66, 44, 142, 0.08);
  color: var(--brand-violet);
  font-size: 0.88rem;
  font-weight: 700;
}

.gallery-album__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 22px;
  width: 100%;
  min-width: 0;
}

.gallery-card {
  --gallery-card-bg: #ffffff;
  --gallery-card-text: var(--brand-text);
  --gallery-card-muted: var(--brand-muted);
  --gallery-card-border: rgba(66, 44, 142, 0.1);
  --gallery-card-preview: #eef7fd;
  overflow: hidden;
  border-radius: 28px;
  background: var(--gallery-card-bg);
  border: 1px solid var(--gallery-card-border);
  box-shadow: var(--shadow-soft);
  min-width: 0;
  width: 100%;
}

.gallery-card--theme-sand {
  --gallery-card-bg: #fff9f1;
  --gallery-card-text: #4e3a27;
  --gallery-card-muted: #7b6855;
  --gallery-card-border: rgba(120, 92, 58, 0.16);
  --gallery-card-preview: #efe2d1;
}

.gallery-card--theme-sky {
  --gallery-card-bg: #f4fbff;
  --gallery-card-text: #24455e;
  --gallery-card-muted: #5a7b93;
  --gallery-card-border: rgba(45, 115, 163, 0.16);
  --gallery-card-preview: #dcefff;
}

.gallery-card--theme-mint {
  --gallery-card-bg: #f3fffb;
  --gallery-card-text: #244c40;
  --gallery-card-muted: #55796e;
  --gallery-card-border: rgba(44, 121, 93, 0.16);
  --gallery-card-preview: #d9f3e8;
}

.gallery-card--theme-rose {
  --gallery-card-bg: #fff7fa;
  --gallery-card-text: #5f3040;
  --gallery-card-muted: #8a6170;
  --gallery-card-border: rgba(166, 74, 109, 0.16);
  --gallery-card-preview: #f8dfe8;
}

.gallery-card--theme-night {
  --gallery-card-bg: #232439;
  --gallery-card-text: #f3efff;
  --gallery-card-muted: #cbc4e5;
  --gallery-card-border: rgba(196, 187, 255, 0.12);
  --gallery-card-preview: #343656;
}

.gallery-card--size-feature {
  display: grid;
  grid-column: span 1;
  grid-template-columns: 1fr;
}

.gallery-card--size-feature .gallery-preview {
  min-height: 280px;
}

.gallery-card--size-feature.gallery-card--text-left .gallery-preview {
  order: 2;
}

.gallery-card--size-feature.gallery-card--text-left .gallery-card__body {
  order: 1;
}

.gallery-card--size-feature.gallery-card--text-below {
  grid-template-columns: 1fr;
}

.gallery-card--size-feature.gallery-card--text-below .gallery-preview {
  min-height: 300px;
}

.gallery-card--size-compact .gallery-preview {
  aspect-ratio: 4 / 3;
}

.gallery-preview {
  aspect-ratio: 16 / 11;
  background:
    radial-gradient(circle at top right, rgba(110, 193, 228, 0.14), transparent 12rem),
    var(--gallery-card-preview);
  overflow: hidden;
}

.gallery-preview img,
.gallery-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card--kind-video .gallery-preview {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top right, rgba(110, 193, 228, 0.12), transparent 12rem),
    linear-gradient(180deg, rgba(17, 22, 42, 0.98), rgba(25, 33, 60, 0.96));
}

.gallery-card--kind-video .gallery-preview video {
  object-fit: contain;
  object-position: center;
  background: #0f1428;
}

.gallery-card__body {
  min-width: 0;
  padding: 20px;
  background: var(--gallery-card-bg);
  color: var(--gallery-card-text);
}

.gallery-card__body h3,
.gallery-file-tile strong,
.gallery-audio strong {
  margin: 0;
  color: var(--gallery-card-text);
}

.gallery-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--gallery-card-muted);
  font-size: 0.92rem;
}

.gallery-card__meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gallery-card__body h3 {
  margin-top: 12px;
  font-size: 1.08rem;
  line-height: 1.45;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card__desc {
  margin: 10px 0 0;
  color: var(--gallery-card-muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.gallery-card__owner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  min-width: 0;
}

.gallery-user-chip__avatar,
.gallery-comment__avatar {
  width: 42px;
  height: 42px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-violet));
  color: #ffffff;
  font-weight: 700;
  flex: 0 0 auto;
}

.gallery-user-chip__avatar img,
.gallery-comment__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.gallery-user-chip__body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.gallery-user-chip__body strong {
  color: var(--gallery-card-text);
  overflow-wrap: anywhere;
}

.gallery-user-chip__body span {
  color: var(--gallery-card-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.gallery-album-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(110, 193, 228, 0.12);
  color: var(--gallery-card-text);
  font-size: 0.84rem;
  font-weight: 700;
}

.gallery-card--text-right .gallery-card__body {
  text-align: right;
}

.gallery-card--text-right .gallery-card__meta,
.gallery-card--text-right .gallery-card__actions {
  justify-content: flex-end;
}

.gallery-card--text-right .gallery-card__owner {
  flex-direction: row-reverse;
}

.gallery-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  min-width: 0;
}

.gallery-comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(66, 44, 142, 0.12);
  border-radius: 999px;
  background: rgba(110, 193, 228, 0.08);
  color: var(--brand-violet);
  font-weight: 700;
  max-width: 100%;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.gallery-comment-toggle:hover,
.gallery-comment-toggle:focus-visible,
.gallery-comment-toggle.is-open {
  transform: translateY(-1px);
  background: rgba(66, 44, 142, 0.08);
  border-color: rgba(66, 44, 142, 0.2);
}

.gallery-comment-toggle__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.gallery-comment-toggle__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.gallery-comments {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(66, 44, 142, 0.08);
  display: grid;
  gap: 16px;
  min-width: 0;
}

.gallery-comments__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--brand-muted);
  font-size: 0.92rem;
}

.gallery-comments__head strong {
  color: var(--brand-violet);
}

.gallery-comment-list {
  display: grid;
  gap: 12px;
}

.gallery-comment {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(110, 193, 228, 0.08);
  min-width: 0;
}

.gallery-comment.is-own {
  background: rgba(66, 44, 142, 0.07);
}

.gallery-comment__body {
  min-width: 0;
  flex: 1;
}

.gallery-comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  color: var(--brand-muted);
  font-size: 0.86rem;
}

.gallery-comment__author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gallery-comment__author strong {
  color: var(--brand-violet);
  overflow-wrap: anywhere;
}

.gallery-comment__role {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-violet);
  font-size: 0.78rem;
  font-weight: 700;
}

.gallery-comment__body p {
  margin: 8px 0 0;
  color: var(--brand-text);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.gallery-comment-empty {
  padding: 18px;
  border-radius: 20px;
  background: rgba(110, 193, 228, 0.08);
}

.gallery-comment-empty strong {
  display: block;
  color: var(--brand-violet);
}

.gallery-comment-empty p {
  margin: 8px 0 0;
  color: var(--brand-muted);
  line-height: 1.6;
}

.gallery-comment-form {
  display: grid;
  gap: 12px;
}

.gallery-comment-form__field {
  display: block;
}

.gallery-comment-form textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
}

.gallery-comment-form__actions {
  display: flex;
  justify-content: flex-end;
}

.gallery-comment-message {
  margin: 0;
  font-size: 0.92rem;
}

.gallery-comment-message.is-error {
  color: #be2d3e;
}

.gallery-comment-message.is-success {
  color: #247a48;
}

.gallery-file-tile,
.gallery-audio {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.gallery-file-tile span {
  color: var(--brand-muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.gallery-audio audio {
  width: min(320px, 100%);
}

.gallery-empty {
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: 28px;
  background: rgba(119, 201, 221, 0.08);
  text-align: center;
}

.gallery-empty strong {
  display: block;
  color: var(--brand-violet);
}

.gallery-empty p {
  margin: 10px 0 0;
  color: var(--brand-muted);
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 26px;
}

.chat-sidebar,
.chat-thread {
  min-width: 0;
}

.chat-sidebar__card,
.chat-thread__card {
  height: 100%;
}

.chat-sidebar__card {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.chat-sidebar__head,
.chat-thread__person,
.chat-contact,
.chat-contact__top,
.chat-contact__meta,
.chat-thread__meta,
.chat-bubble__meta {
  display: flex;
  align-items: center;
}

.chat-sidebar__head {
  justify-content: space-between;
  gap: 16px;
}

.chat-sidebar__head h3 {
  margin: 6px 0 0;
  color: var(--brand-violet);
}

.chat-badge,
.chat-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(66, 44, 142, 0.1);
  color: var(--brand-violet);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-contact-list {
  display: grid;
  gap: 12px;
}

.chat-contact {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(66, 44, 142, 0.08);
  border-radius: 22px;
  background: #fbfdff;
  text-align: left;
  cursor: pointer;
  gap: 14px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.chat-contact:hover,
.chat-contact:focus-visible,
.chat-contact.is-active {
  border-color: rgba(66, 44, 142, 0.18);
  background: rgba(110, 193, 228, 0.12);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.chat-contact__avatar,
.chat-thread__avatar {
  width: 58px;
  height: 58px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-violet));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.chat-contact__avatar,
.chat-thread__avatar {
  display: grid;
  place-items: center;
}

.chat-contact__avatar img,
.chat-thread__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.chat-contact__avatar span,
.chat-thread__avatar span {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.avatar-stack {
  position: relative;
  display: inline-grid;
  flex-shrink: 0;
}

.avatar-stack--chat {
  isolation: isolate;
}

.avatar-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 10px 20px rgba(50, 47, 112, 0.16);
}

.avatar-badge--admin {
  right: -3px;
  bottom: -2px;
  width: 23px;
  height: 23px;
  background: linear-gradient(135deg, var(--brand-indigo), var(--brand-violet));
  color: #ffffff;
}

.avatar-badge--admin svg {
  width: 12px;
  height: 12px;
  display: block;
}

.avatar-badge--birthday {
  top: -7px;
  right: -6px;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  font-size: 0.88rem;
  line-height: 1;
}

.avatar-badge--today {
  background: linear-gradient(135deg, #ff9f43, #ff5f6d);
  animation: birthdayBadgePulse 1.8s ease-in-out infinite;
}

.avatar-badge--soon {
  background: linear-gradient(135deg, #ffd166, #f6b73c);
}

@keyframes birthdayBadgePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 20px rgba(50, 47, 112, 0.16);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(255, 159, 67, 0.16);
  }
}

.chat-contact__body {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px;
}

.chat-contact__top,
.chat-contact__meta,
.chat-thread__meta,
.chat-bubble__meta {
  justify-content: space-between;
  gap: 10px;
}

.chat-contact__name {
  color: var(--brand-violet);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.chat-contact__meta,
.chat-contact__preview,
.chat-thread__meta,
.chat-bubble__meta {
  color: var(--brand-muted);
  font-size: 0.88rem;
}

.chat-contact__meta span,
.chat-thread__meta span {
  overflow-wrap: anywhere;
}

.chat-contact__preview {
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-unread {
  align-self: flex-start;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-violet);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.chat-thread__card {
  display: grid;
  gap: 16px;
}

.chat-thread__header {
  min-height: 84px;
}

.chat-thread__person {
  gap: 16px;
}

.chat-thread__person strong {
  display: block;
  color: var(--brand-violet);
  font-size: 1.12rem;
  overflow-wrap: anywhere;
}

.chat-thread__meta {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 8px;
}

.chat-message-list {
  min-height: 380px;
  max-height: 62vh;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  overflow-y: auto;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(110, 193, 228, 0.14), transparent 12rem),
    #f7fbff;
  border: 1px solid rgba(66, 44, 142, 0.08);
}

.chat-bubble {
  max-width: min(540px, 100%);
  padding: 14px 16px;
  border-radius: 22px 22px 22px 8px;
  background: #ffffff;
  border: 1px solid rgba(66, 44, 142, 0.08);
  box-shadow: 0 10px 24px rgba(50, 47, 112, 0.08);
}

.chat-bubble.is-own {
  margin-left: auto;
  border-radius: 22px 22px 8px 22px;
  background: linear-gradient(135deg, rgba(110, 193, 228, 0.18), rgba(64, 84, 178, 0.1));
}

.chat-bubble__meta {
  margin-bottom: 10px;
}

.chat-bubble p {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-composer {
  display: grid;
  gap: 14px;
}

.chat-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 180px;
  padding: 24px;
  border-radius: 24px;
  text-align: center;
  color: var(--brand-muted);
  background: rgba(255, 255, 255, 0.65);
}

.chat-empty strong {
  color: var(--brand-violet);
}

.chat-empty p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.auth-locked header,
.auth-locked main,
.auth-locked footer {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.auth-overlay {
  --auth-origin-x: 50%;
  --auth-origin-y: 48%;
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(250, 253, 255, 0.82);
  backdrop-filter: blur(14px);
}

.auth-overlay[hidden] {
  display: none;
}

.auth-overlay::before,
.auth-overlay::after {
  content: "";
  position: absolute;
  inset: -14%;
  pointer-events: none;
}

.auth-overlay::before {
  background:
    radial-gradient(circle at var(--auth-origin-x) var(--auth-origin-y), rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.16) 11%, rgba(110, 193, 228, 0.16) 23%, transparent 44%),
    radial-gradient(circle at 18% 18%, rgba(110, 193, 228, 0.22), transparent 20rem),
    radial-gradient(circle at 82% 20%, rgba(66, 44, 142, 0.16), transparent 21rem),
    radial-gradient(circle at 50% 88%, rgba(64, 84, 178, 0.14), transparent 19rem);
  opacity: 0.95;
  filter: blur(2px);
  animation: authAuroraDrift 11s ease-in-out infinite alternate;
}

.auth-overlay::after {
  background:
    conic-gradient(from 180deg at var(--auth-origin-x) var(--auth-origin-y), rgba(66, 44, 142, 0), rgba(66, 44, 142, 0.14), rgba(110, 193, 228, 0.26), rgba(255, 255, 255, 0), rgba(66, 44, 142, 0));
  opacity: 0.5;
  filter: blur(36px);
  animation: authHaloSpin 16s linear infinite;
}

.auth-shell {
  width: min(420px, 100%);
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  isolation: isolate;
}

.auth-cosmos {
  position: absolute;
  inset: -118px -90px -96px;
  z-index: 0;
  pointer-events: none;
}

.auth-cosmos__ring,
.auth-cosmos__spark {
  position: absolute;
  display: block;
}

.auth-cosmos__ring {
  left: 50%;
  top: 52%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 42px rgba(110, 193, 228, 0.18);
  transform: translate(-50%, -50%);
}

.auth-cosmos__ring--one {
  width: 290px;
  height: 290px;
  animation: authRingOrbitOne 8.6s ease-in-out infinite;
}

.auth-cosmos__ring--two {
  width: 390px;
  height: 390px;
  border-style: dashed;
  border-width: 1.5px;
  border-color: rgba(66, 44, 142, 0.18);
  animation: authRingOrbitTwo 11s linear infinite;
}

.auth-cosmos__ring--three {
  width: 490px;
  height: 490px;
  border-color: rgba(110, 193, 228, 0.14);
  animation: authRingOrbitThree 13s ease-in-out infinite;
}

.auth-cosmos__spark {
  width: 118px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95), rgba(110, 193, 228, 0));
  opacity: 0.55;
  transform-origin: left center;
}

.auth-cosmos__spark--one {
  left: 6%;
  top: 32%;
  transform: rotate(-12deg);
  animation: authSparkDriftOne 7.4s ease-in-out infinite;
}

.auth-cosmos__spark--two {
  right: 4%;
  top: 26%;
  transform: rotate(18deg);
  animation: authSparkDriftTwo 8.2s ease-in-out infinite;
}

.auth-cosmos__spark--three {
  left: 10%;
  bottom: 20%;
  transform: rotate(24deg);
  animation: authSparkDriftThree 7.8s ease-in-out infinite;
}

.auth-cosmos__spark--four {
  right: 12%;
  bottom: 14%;
  transform: rotate(-22deg);
  animation: authSparkDriftFour 9.1s ease-in-out infinite;
}

.auth-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-violet));
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 22px 44px rgba(50, 47, 112, 0.2);
  z-index: 2;
  animation: authMarkFloat 5.5s ease-in-out infinite;
}

.auth-mark img {
  width: 38px;
  height: auto;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding:
    calc(24px + env(safe-area-inset-top, 0))
    calc(24px + env(safe-area-inset-right, 0))
    calc(24px + env(safe-area-inset-bottom, 0))
    calc(24px + env(safe-area-inset-left, 0));
}

.profile-modal[hidden] {
  display: none;
}

.profile-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(49, 44, 44, 0.34);
  backdrop-filter: blur(10px);
}

.profile-modal__card {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 34px;
  border-radius: 34px;
  background: #ffffff;
  border: 1px solid rgba(110, 193, 228, 0.16);
  box-shadow: var(--shadow);
  z-index: 1;
}

.profile-modal__card h2 {
  margin: 0;
  color: var(--brand-violet);
}

.profile-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(66, 44, 142, 0.08);
  color: var(--brand-violet);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.profile-editor {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.profile-preview {
  width: min(220px, 100%);
  aspect-ratio: 1;
  border-radius: 32px;
}

.profile-preview span {
  font-size: 3rem;
}

.profile-editor__content {
  display: grid;
  gap: 16px;
}

.profile-settings[hidden],
.profile-readonly[hidden],
.profile-onetime-note[hidden] {
  display: none;
}

.profile-settings {
  display: grid;
  gap: 16px;
}

.profile-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-readonly {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(110, 193, 228, 0.12);
  color: var(--brand-violet);
  font-weight: 600;
  line-height: 1.6;
}

.profile-onetime-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(66, 44, 142, 0.08);
  border: 1px solid rgba(66, 44, 142, 0.08);
  color: var(--brand-violet);
  font-weight: 600;
  line-height: 1.6;
}

.profile-editor__content strong {
  color: var(--brand-violet);
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.profile-editor__meta {
  margin: -8px 0 0;
  color: var(--brand-muted);
  overflow-wrap: anywhere;
}

.profile-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-card {
  width: 100%;
  max-height: calc(100dvh - 126px);
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.98));
  border: 1px solid rgba(110, 193, 228, 0.16);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  transform-origin: center calc(100% + 36px);
  backface-visibility: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(110, 193, 228, 0.2), rgba(66, 44, 142, 0.18));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(28px - 1px);
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

.auth-card h2,
.auth-panel h3 {
  color: var(--brand-violet);
}

.auth-card .eyebrow {
  margin-bottom: 4px;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.auth-card h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.12;
}

.auth-note,
.auth-help {
  color: var(--brand-muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(110, 193, 228, 0.1);
}

.auth-switch__button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--brand-violet);
  font-weight: 700;
  cursor: pointer;
}

.auth-switch__button.is-active {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.auth-stack {
  margin-top: 0;
}

.auth-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: #fbfdff;
  border: 1px solid rgba(66, 44, 142, 0.08);
}

.auth-panel[hidden] {
  display: none !important;
}

.auth-panel h3,
.auth-note,
.auth-help {
  margin: 0;
}

.auth-panel h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.auth-panel .field {
  gap: 6px;
}

.auth-panel .field span {
  font-size: 0.92rem;
}

.auth-panel input,
.auth-panel select {
  padding: 12px 14px;
  border-radius: 14px;
}

.auth-panel .button {
  min-height: 46px;
  margin-top: 2px;
  padding: 12px 18px;
}

.auth-card .form-message {
  min-height: 20px;
  margin-top: 0;
}

.auth-help {
  margin-top: 0;
  font-size: 0.86rem;
}

body.auth-entering .auth-overlay {
  animation: authOverlayWarp 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
  pointer-events: none;
}

body.auth-entering .auth-mark {
  animation: authMarkAscend 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-card {
  animation: authCardCollapse 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-overlay::before {
  animation: authPortalBloom 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-overlay::after {
  animation: authPortalSpiral 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-cosmos__ring--one {
  animation: authRingBurstOne 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-cosmos__ring--two {
  animation: authRingBurstTwo 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-cosmos__ring--three {
  animation: authRingBurstThree 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-cosmos__spark--one {
  animation: authSparkLaunchOne 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-cosmos__spark--two {
  animation: authSparkLaunchTwo 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-cosmos__spark--three {
  animation: authSparkLaunchThree 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering .auth-cosmos__spark--four {
  animation: authSparkLaunchFour 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) forwards;
}

body.auth-entering header,
body.auth-entering main,
body.auth-entering footer {
  animation: authPageReveal 1.22s cubic-bezier(0.18, 0.84, 0.18, 1) both;
}

@keyframes authAuroraDrift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }

  50% {
    transform: translate3d(2%, 1%, 0) scale(1.04);
  }

  100% {
    transform: translate3d(-1%, 2%, 0) scale(1.02);
  }
}

@keyframes authHaloSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  100% {
    transform: rotate(360deg) scale(1.06);
  }
}

@keyframes authMarkFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-6px) rotate(3deg);
  }
}

@keyframes authRingOrbitOne {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translate(-50%, -50%) rotate(24deg) scale(1.04);
    opacity: 1;
  }
}

@keyframes authRingOrbitTwo {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(0.98);
  }

  100% {
    transform: translate(-50%, -50%) rotate(-360deg) scale(1.03);
  }
}

@keyframes authRingOrbitThree {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 0.44;
  }

  50% {
    transform: translate(-50%, -50%) rotate(-18deg) scale(1.05);
    opacity: 0.72;
  }
}

@keyframes authSparkDriftOne {
  0%,
  100% {
    opacity: 0.28;
    transform: rotate(-12deg) translateX(0);
  }

  50% {
    opacity: 0.82;
    transform: rotate(-12deg) translateX(18px);
  }
}

@keyframes authSparkDriftTwo {
  0%,
  100% {
    opacity: 0.32;
    transform: rotate(18deg) translateX(0);
  }

  50% {
    opacity: 0.86;
    transform: rotate(18deg) translateX(-16px);
  }
}

@keyframes authSparkDriftThree {
  0%,
  100% {
    opacity: 0.3;
    transform: rotate(24deg) translateX(0);
  }

  50% {
    opacity: 0.88;
    transform: rotate(24deg) translateX(14px);
  }
}

@keyframes authSparkDriftFour {
  0%,
  100% {
    opacity: 0.3;
    transform: rotate(-22deg) translateX(0);
  }

  50% {
    opacity: 0.8;
    transform: rotate(-22deg) translateX(-18px);
  }
}

@keyframes authOverlayWarp {
  0% {
    opacity: 1;
    filter: saturate(1);
  }

  70% {
    opacity: 1;
    filter: saturate(1.12);
  }

  100% {
    opacity: 0;
    filter: saturate(1.32);
  }
}

@keyframes authMarkAscend {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }

  34% {
    opacity: 1;
    transform: translateY(-14px) scale(1.12) rotate(8deg);
  }

  100% {
    opacity: 0;
    transform: translateY(-92px) scale(1.95) rotate(28deg);
  }
}

@keyframes authCardCollapse {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0);
  }

  34% {
    opacity: 1;
    transform: translateY(-18px) scale(0.985) rotateX(6deg) rotateY(-2deg);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(-78px) scale(0.82) rotateX(24deg) rotateY(-8deg);
  }
}

@keyframes authPortalBloom {
  0% {
    opacity: 0.95;
    filter: blur(2px);
    transform: scale(1);
  }

  38% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1.08);
  }

  100% {
    opacity: 0;
    filter: blur(14px);
    transform: scale(1.36);
  }
}

@keyframes authPortalSpiral {
  0% {
    opacity: 0.5;
    transform: rotate(0deg) scale(1);
  }

  52% {
    opacity: 0.9;
    transform: rotate(180deg) scale(1.18);
  }

  100% {
    opacity: 0;
    transform: rotate(460deg) scale(1.52);
  }
}

@keyframes authRingBurstOne {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.85) rotate(120deg);
  }
}

@keyframes authRingBurstTwo {
  0% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.56) rotate(-160deg);
  }
}

@keyframes authRingBurstThree {
  0% {
    opacity: 0.34;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.34) rotate(96deg);
  }
}

@keyframes authSparkLaunchOne {
  0% {
    opacity: 0.55;
    transform: rotate(-12deg) translateX(0) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: rotate(-12deg) translateX(210px) translateY(-64px) scaleX(1.8);
  }
}

@keyframes authSparkLaunchTwo {
  0% {
    opacity: 0.55;
    transform: rotate(18deg) translateX(0) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: rotate(18deg) translateX(-200px) translateY(-74px) scaleX(1.85);
  }
}

@keyframes authSparkLaunchThree {
  0% {
    opacity: 0.55;
    transform: rotate(24deg) translateX(0) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: rotate(24deg) translateX(220px) translateY(86px) scaleX(1.7);
  }
}

@keyframes authSparkLaunchFour {
  0% {
    opacity: 0.55;
    transform: rotate(-22deg) translateX(0) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: rotate(-22deg) translateX(-215px) translateY(98px) scaleX(1.78);
  }
}

@keyframes authPageReveal {
  0% {
    opacity: 0.72;
    transform: translateY(22px) scale(0.972);
    filter: saturate(0.92) brightness(0.98);
  }

  40% {
    opacity: 1;
    transform: translateY(-6px) scale(1.008);
    filter: saturate(1.08) brightness(1.02);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1) brightness(1);
  }
}

.section--app-placeholder {
  padding-top: 30px;
}

.app-placeholder {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 24px;
  justify-items: center;
  padding: 36px 32px;
  border-radius: 34px;
  background: #ffffff;
  border: 1px solid rgba(66, 44, 142, 0.1);
  box-shadow: var(--shadow);
  text-align: center;
}

.app-platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.app-platform {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(110, 193, 228, 0.12);
  color: var(--brand-violet);
  font-weight: 700;
}

.app-platform__icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
}

.app-platform__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.app-placeholder h2 {
  margin: 0;
  color: var(--brand-violet);
  font-family: "Comfortaa", sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-placeholder p {
  max-width: 34rem;
  margin: 0;
  color: var(--brand-muted);
  line-height: 1.8;
}

.app-build-status {
  max-width: 42rem;
}

.app-beta-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.app-beta-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(66, 44, 142, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 255, 0.94));
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.app-beta-card--android {
  background:
    radial-gradient(circle at top right, rgba(110, 193, 228, 0.18), transparent 12rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(241, 252, 255, 0.95));
}

.app-beta-card--ios {
  background:
    radial-gradient(circle at top right, rgba(66, 44, 142, 0.12), transparent 12rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 247, 255, 0.96));
}

.app-beta-card--loading,
.app-beta-card--error {
  grid-column: 1 / -1;
  justify-items: center;
  text-align: center;
}

.app-beta-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.app-beta-card h3 {
  margin: 10px 0 0;
  color: var(--brand-violet);
  font-size: 1.35rem;
}

.app-beta-badge,
.app-beta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.app-beta-badge {
  padding: 8px 12px;
  background: rgba(110, 193, 228, 0.14);
  color: var(--brand-violet);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.app-beta-chip {
  padding: 8px 12px;
  background: rgba(66, 44, 142, 0.08);
  color: var(--brand-violet);
  font-size: 0.82rem;
  white-space: nowrap;
}

.app-beta-card__lead {
  max-width: none;
  color: var(--brand-text);
  font-weight: 600;
  line-height: 1.7;
}

.app-beta-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.app-beta-meta div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(66, 44, 142, 0.08);
}

.app-beta-meta dt {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.app-beta-meta dd {
  margin: 0;
  color: var(--brand-violet);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.app-beta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.app-beta-actions .button {
  min-width: min(260px, 100%);
}

.app-beta-steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--brand-text);
  line-height: 1.7;
}

.app-beta-note {
  max-width: none;
  color: var(--brand-muted);
  font-size: 0.94rem;
}

@media (max-width: 1100px) {
  .site-header {
    justify-content: space-between;
    padding: 18px 0;
  }

  .header-identity {
    width: auto;
    justify-content: flex-start;
  }

  .hero__inner,
  .upload-layout,
  .feature-orbits,
  .steps-grid,
  .footer-grid,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .hero__panel {
    justify-content: flex-start;
  }

  .hero__pattern::before {
    width: clamp(200px, 34vw, 300px);
    transform: translate(-30%, -24%);
    opacity: 0.56;
  }

  .hero__pattern::after {
    top: clamp(126px, 18vw, 188px);
    right: -10px;
    width: clamp(108px, 15vw, 160px);
    opacity: 0.3;
  }

  .admin-login {
    max-width: none;
    position: static;
  }

  .admin-stats,
  .admin-overview-grid,
  .presentation-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-album__grid {
    grid-template-columns: 1fr;
  }

  .gallery-card--size-feature {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .gallery-card--size-feature .gallery-preview,
  .gallery-card--size-feature.gallery-card--text-below .gallery-preview {
    min-height: 260px;
  }

  .submission-file,
  .submission-file--size-compact,
  .submission-file--size-feature {
    grid-template-columns: 1fr;
  }

  .submission-file__preview {
    min-height: 260px;
  }

  .submission-file--size-compact .submission-file__preview {
    min-height: 220px;
  }

  .submission-file--size-feature .submission-file__preview {
    min-height: 290px;
  }

  .chat-shell {
    grid-template-columns: 1fr;
  }

  .profile-editor {
    grid-template-columns: 1fr;
  }

  .profile-preview {
    justify-self: center;
  }

  .profile-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 980px) {
  .gallery-card--size-feature {
    grid-column: span 2;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.95fr);
  }

  .gallery-card--size-feature.gallery-card--text-below {
    grid-template-columns: 1fr;
  }

  .gallery-card--size-feature .gallery-preview {
    min-height: 320px;
  }

  .gallery-card--size-feature.gallery-card--text-below .gallery-preview {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  [data-session-label] {
    display: none !important;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 0;
    padding: 12px 0;
    flex-wrap: nowrap;
  }

  .topbar__inner,
  .progress-panel__head,
  .file-item__head,
  .form-actions,
  .submission-card__head,
  .submission-file,
  .submission-actions,
  .submission-file__actions,
  .admin-toolbar,
  .admin-toolbar__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-identity {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand-mark {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    line-height: 1;
  }

  .brand img {
    width: clamp(88px, 22vw, 114px);
  }

  .header-menu {
    margin-left: auto;
  }

  .hero__stats,
  .field-grid,
  .presentation-grid,
  .gallery-directory,
  .gallery-album__grid {
    grid-template-columns: 1fr;
  }

  .hero__panel,
  .hero__stats,
  .site-footer,
  .chat-sidebar .form-note,
  .admin-sidebar-card .form-note {
    display: none;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: clamp(2.2rem, 10vw, 3rem);
    line-height: 1.02;
  }

  .hero__lead {
    margin-top: 16px;
    max-width: 34ch;
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .hero__actions {
    display: grid;
    gap: 10px;
    margin-top: 22px;
  }

  .hero__actions .button {
    width: 100%;
  }

  .chat-thread__person,
  .chat-contact {
    align-items: flex-start;
  }

  .gallery-card__actions,
  .gallery-card__owner,
  .gallery-album__head,
  .gallery-comments__head,
  .gallery-comment__meta,
  .album-choice,
  .palette,
  .admin-filters,
  .admin-nav,
  .submission-file__album-editor,
  .submission-file__meta-editor,
  .gallery-comment-form__actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .gallery-directory-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .gallery-directory-card__body {
    justify-items: center;
    text-align: center;
  }

  .gallery-card__actions > *,
  .gallery-comment-form__actions .button,
  .gallery-comment-toggle {
    width: 100%;
    justify-content: center;
  }

  .theme-picker__button {
    min-height: 56px;
    padding: 12px 14px;
  }

  .theme-picker__panel,
  .theme-picker--compact .theme-picker__panel {
    width: min(100%, calc(100vw - 48px));
  }

  .theme-picker__copy small {
    font-size: 0.78rem;
  }

  .palette,
  .palette--compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .theme-picker__custom-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .gallery-summary {
    margin-top: 18px;
  }

  .gallery-status {
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .gallery-directory-actions,
  .gallery-directory-actions .button {
    width: 100%;
  }

  .gallery-directory {
    gap: 16px;
  }

  .gallery-directory-card {
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
  }

  .gallery-directory-card__cover {
    width: 76px;
    height: 76px;
  }

  .gallery-album {
    gap: 14px;
  }

  .gallery-album__head {
    align-items: flex-start;
  }

  .gallery-album__count {
    align-self: flex-start;
  }

  .gallery-album__grid {
    gap: 16px;
  }

  .gallery-card {
    border-radius: 24px;
  }

  .gallery-preview,
  .gallery-card--size-compact .gallery-preview,
  .gallery-card--size-feature .gallery-preview,
  .gallery-card--size-feature.gallery-card--text-below .gallery-preview {
    aspect-ratio: 4 / 3;
    min-height: clamp(190px, 52vw, 250px);
  }

  .gallery-card--size-feature.gallery-card--text-left .gallery-preview {
    order: 1;
  }

  .gallery-card--size-feature.gallery-card--text-left .gallery-card__body {
    order: 2;
  }

  .gallery-card--kind-video .gallery-preview,
  .gallery-card--kind-video.gallery-card--size-compact .gallery-preview,
  .gallery-card--kind-video.gallery-card--size-feature .gallery-preview,
  .gallery-card--kind-video.gallery-card--size-feature.gallery-card--text-below .gallery-preview {
    aspect-ratio: auto;
    min-height: clamp(320px, 72vw, 520px);
    max-height: 72dvh;
    padding: 10px;
  }

  .gallery-card--kind-video .gallery-preview video {
    width: 100%;
    height: auto;
    max-height: calc(72dvh - 20px);
    border-radius: 18px;
  }

  .gallery-card__body {
    padding: 18px;
  }

  .gallery-card__meta,
  .gallery-card--text-right .gallery-card__meta {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
  }

  .gallery-card--text-right .gallery-card__body {
    text-align: left;
  }

  .gallery-card--text-right .gallery-card__actions {
    justify-content: flex-start;
  }

  .gallery-card--text-right .gallery-card__owner {
    flex-direction: row;
  }

  .gallery-comments {
    gap: 14px;
  }

  .gallery-comment {
    padding: 12px;
    border-radius: 18px;
  }

  .gallery-comment__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .admin-toolbar__actions {
    width: 100%;
    margin-left: 0;
  }

  .search-input {
    min-width: 0;
  }

  .admin-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-filter,
  .admin-nav__button,
  .submission-file__actions .button,
  .submission-actions .button {
    width: 100%;
  }

  .submission-file__preview {
    min-height: 210px;
  }

  .submission-file--size-feature .submission-file__preview,
  .submission-file--size-compact .submission-file__preview {
    min-height: 210px;
  }

  .submission-file__owner {
    align-items: flex-start;
  }

  .gallery-card--size-feature {
    grid-column: span 1;
  }

  .hero__inner {
    gap: 22px;
    padding: 38px 0 72px;
  }

  .hero__pattern {
    background:
      radial-gradient(circle at 84% 14%, rgba(255, 255, 255, 0.14), transparent 10rem),
      radial-gradient(circle at 6% 0%, rgba(255, 255, 255, 0.08), transparent 9rem);
  }

  .hero__pattern::before {
    width: clamp(150px, 50vw, 220px);
    transform: translate(-30%, -28%);
    opacity: 0.42;
  }

  .hero__pattern::after {
    display: none;
  }

  .hero-card,
  .upload-card,
  .side-card,
  .cta-card {
    padding: 20px;
  }

  .orbit-card {
    border-radius: 36px;
  }

  .section,
  .site-footer {
    padding-top: 64px;
    padding-bottom: 44px;
  }

  .section--upload {
    padding-top: 34px;
  }

  .section-heading {
    margin-bottom: 20px;
  }

  .section-heading h2,
  .upload-card h2 {
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.12;
  }

  .gallery-summary {
    margin-top: 10px;
  }

  .upload-layout,
  .admin-shell,
  .chat-shell {
    gap: 18px;
    margin-top: 22px;
  }

  .brand img {
    width: 132px;
  }

  .profile-chip {
    padding: 4px;
    gap: 0;
    min-width: 0;
    width: auto;
    box-shadow: none;
    justify-content: center;
    flex-shrink: 0;
  }

  .profile-chip__text {
    display: none;
  }

  .profile-chip__avatar {
    width: 40px;
    height: 40px;
  }

  .header-action {
    justify-self: end;
    padding: 10px 14px;
    font-size: 0.84rem;
    text-align: center;
    box-shadow: none;
  }

  .profile-modal__card {
    width: 100%;
    max-height: calc(100dvh - 12px - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0));
    min-height: min(720px, calc(100dvh - 12px - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0)));
    padding:
      calc(18px + env(safe-area-inset-top, 0))
      18px
      calc(22px + env(safe-area-inset-bottom, 0))
      18px;
    border-radius: 26px;
  }

  .auth-overlay,
  .profile-modal {
    padding: 12px;
  }

  .auth-shell {
    width: min(390px, 100%);
    gap: 12px;
  }

  .auth-cosmos {
    inset: -92px -44px -76px;
  }

  .auth-mark {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  .auth-mark img {
    width: 32px;
  }

  .auth-cosmos__ring--one {
    width: 246px;
    height: 246px;
  }

  .auth-cosmos__ring--two {
    width: 320px;
    height: 320px;
  }

  .auth-cosmos__ring--three {
    width: 390px;
    height: 390px;
  }

  .auth-card {
    width: 100%;
    max-height: calc(100dvh - 110px);
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
  }

  .auth-card h2 {
    font-size: 1.28rem;
  }

  .auth-card .eyebrow {
    font-size: 1.32rem;
  }

  .auth-panel {
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
  }

  .auth-switch {
    gap: 6px;
    padding: 4px;
  }

  .auth-switch__button {
    min-height: 40px;
    font-size: 0.92rem;
  }

  .auth-note {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .auth-help {
    font-size: 0.8rem;
  }

  .auth-cosmos__spark {
    width: 78px;
  }

  .menu-toggle {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    box-shadow: none;
  }

  .site-menu {
    top: calc(100% + 10px);
    width: min(280px, calc(100vw - 24px));
    padding: 16px;
  }

  .chat-message-list {
    min-height: 300px;
    max-height: none;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .avatar-badge--admin {
    width: 21px;
    height: 21px;
  }

  .avatar-badge--admin svg {
    width: 11px;
    height: 11px;
  }

  .avatar-badge--birthday {
    top: -6px;
    right: -4px;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    font-size: 0.8rem;
  }

  .app-placeholder {
    padding: 28px 22px;
    border-radius: 26px;
  }

  .app-beta-grid,
  .app-beta-meta {
    grid-template-columns: 1fr;
  }

  .app-platform {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .topbar__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
  }

  .topbar__inner p {
    min-width: 0;
    line-height: 1.35;
  }

  .topbar__actions {
    width: auto;
    justify-content: flex-end;
    gap: 8px;
  }

  .topbar-badge {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .profile-chip {
    width: auto;
    justify-content: center;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header-identity {
    gap: 8px;
  }

  .brand {
    gap: 6px;
  }

  .brand img {
    width: 84px;
  }

  .header-logout {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
  }

  .brand-mark {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 11vw, 2.45rem);
  }

  .hero__lead {
    font-size: 0.92rem;
    line-height: 1.58;
  }

  .hero__inner {
    padding: 30px 0 56px;
  }

  .profile-modal {
    padding:
      calc(6px + env(safe-area-inset-top, 0))
      calc(6px + env(safe-area-inset-right, 0))
      calc(6px + env(safe-area-inset-bottom, 0))
      calc(6px + env(safe-area-inset-left, 0));
  }

  .profile-modal__card {
    min-height: calc(100dvh - 12px - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0));
    max-height: calc(100dvh - 12px - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0));
    padding:
      calc(16px + env(safe-area-inset-top, 0))
      14px
      calc(20px + env(safe-area-inset-bottom, 0))
      14px;
    border-radius: 22px;
  }

  .profile-modal__close {
    top: 12px;
    right: 12px;
  }

  .profile-editor {
    gap: 16px;
    margin-top: 18px;
  }

  .profile-settings {
    gap: 14px;
  }

  .profile-editor__actions .button {
    width: 100%;
  }

  .gallery-directory-card {
    padding: 14px;
    gap: 10px;
    border-radius: 20px;
  }

  .gallery-directory-card__cover {
    width: 68px;
    height: 68px;
  }

  .gallery-card {
    border-radius: 22px;
  }

  .gallery-card__body {
    padding: 16px;
  }

  .gallery-card__body h3 {
    font-size: 1rem;
    -webkit-line-clamp: 4;
  }

  .gallery-card--kind-video .gallery-preview,
  .gallery-card--kind-video.gallery-card--size-compact .gallery-preview,
  .gallery-card--kind-video.gallery-card--size-feature .gallery-preview,
  .gallery-card--kind-video.gallery-card--size-feature.gallery-card--text-below .gallery-preview {
    min-height: min(62dvh, 460px);
    max-height: 62dvh;
    padding: 8px;
  }

  .gallery-card--kind-video .gallery-preview video {
    max-height: calc(62dvh - 16px);
    border-radius: 16px;
  }

  .gallery-user-chip__avatar,
  .gallery-comment__avatar {
    width: 38px;
    height: 38px;
    font-size: 0.88rem;
  }

  .gallery-comment {
    padding: 12px;
  }

  .gallery-comment-form textarea {
    min-height: 78px;
  }

  .gallery-card__body,
  .gallery-comment,
  .chat-contact,
  .chat-bubble,
  .submission-card,
  .submission-file,
  .upload-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .chat-sidebar__card,
  .chat-thread__card,
  .admin-sidebar-card,
  .admin-panel {
    padding: 16px;
  }
}
