:root {
  --bg: #fbfaf7;
  --bg-warm: #f3f1ec;
  --bg-deep: #e8e6e0;
  --ink: #18181b;
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --faint: #8a8a8a;
  --line: #e8e8e4;
  --card: #ffffff;
  --brand: #7678ed;
  --brand-dark: #5a5bd6;
  --brand-soft: rgba(118, 120, 237, 0.12);
  --red: #dc2626;
  --orange: #ffbf47;
  --green: #16a34a;
  --ocean: #0077b6;
  --teal: #2a9d8f;
  --cream: #efebce;
  --max: 42rem;
  --wide: 70rem;
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Nunito", "Segoe UI", system-ui, sans-serif;
  --brand-font: "Sigmar One", "Nunito", system-ui, sans-serif;
  --radius: 1.35rem;
  --radius-sm: 0.9rem;
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-soft: 0 18px 40px rgba(24, 24, 27, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

html[lang="en"] [data-tr] {
  display: none !important;
}

html[lang="tr"] [data-en] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 8% -8%, #ffe8cc88, transparent 58%),
    radial-gradient(820px 380px at 96% 4%, #ddd6fe77, transparent 52%),
    radial-gradient(700px 360px at 70% 18%, #a5f3fc33, transparent 48%),
    var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

body.is-legal {
  background:
    radial-gradient(900px 360px at 10% -10%, #ffe8cc55, transparent 55%),
    radial-gradient(700px 300px at 90% 0%, #ddd6fe44, transparent 50%),
    var(--bg);
}

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

a {
  color: var(--brand-dark);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.wrap {
  width: min(100% - 2rem, 52rem);
  margin-inline: auto;
}

.wrap-wide {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 80;
  padding: 0.55rem 0.85rem;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

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

/* ——— Brand pill (app BrandPill: LISTERIUM as one word) ——— */

.brand-pill {
  display: inline-flex;
  align-items: stretch;
  text-decoration: none;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 3px 3px 0 rgba(24, 24, 27, 0.18);
}

.brand-pill-left,
.brand-pill-right {
  display: flex;
  align-items: center;
  font-family: var(--brand-font);
  font-weight: 400;
  letter-spacing: 0.1em;
  font-size: 0.92rem;
  line-height: 1;
}

.brand-pill-left {
  justify-content: flex-end;
  background: var(--red);
  color: #fff;
  padding: 0.4rem 0.08rem 0.3rem 0.72rem;
  border-right: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.brand-pill-right {
  justify-content: flex-start;
  background: #fff;
  color: var(--ink);
  padding: 0.4rem 0.72rem 0.3rem 0;
}

.brand-pill.lg {
  margin: 0 0 0.55rem;
}

.brand-pill.lg .brand-pill-left,
.brand-pill.lg .brand-pill-right {
  font-size: clamp(1.45rem, 3.8vw, 2.05rem);
  letter-spacing: 0.1em;
}

.brand-pill.lg .brand-pill-left {
  padding: 0.52rem 0.1rem 0.4rem 0.95rem;
}

.brand-pill.lg .brand-pill-right {
  padding: 0.52rem 0.95rem 0.4rem 0;
}

/* Legacy wordmark still used as fallback */
.brand {
  font-family: var(--brand-font);
  font-weight: 400;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  color: var(--red);
}

/* ——— Header ——— */

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

.site-header.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  padding: 0.75rem 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.site-header.sticky-bar .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.05rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
}

.lang-switch,
.lang-btn {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.lang-btn:hover,
.lang-switch:hover {
  background: var(--orange);
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0.28rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.lang-flag img {
  width: 1.45rem;
  height: 1rem;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.18);
}

.lang-flag:hover,
.lang-flag.is-active {
  border-color: var(--ink);
}

.lang-flag.is-active {
  background: var(--orange);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--ink);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 1.05rem;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

/* ——— Buttons / chips ——— */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
}

.btn-soon {
  background: var(--orange);
  color: var(--ink);
  cursor: default;
}

.btn-soon:hover {
  transform: none;
  box-shadow: none;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.pill {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.pill:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1.5px solid rgba(118, 120, 237, 0.28);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

/* Module title pills (app ModuleTitlePill) */
.module-pill {
  display: inline-flex;
  align-items: stretch;
  align-self: flex-start;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  line-height: 1;
  white-space: nowrap;
  margin: 0 0 0.85rem;
  box-shadow: 3px 3px 0 rgba(24, 24, 27, 0.14);
}

.module-pill-left,
.module-pill-right {
  display: flex;
  align-items: center;
  font-family: var(--brand-font);
  font-weight: 400;
  letter-spacing: 0;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  line-height: 1;
}

.module-pill-left {
  justify-content: flex-end;
  background: var(--red);
  color: #fff;
  padding: 0.55rem 0.22rem 0.42rem 0.95rem;
}

.module-pill-right {
  justify-content: flex-start;
  background: #fff;
  color: var(--ink);
  padding: 0.55rem 0.95rem 0.42rem 0.22rem;
}

.module-pill.sm {
  margin: 0.85rem 0 0.4rem;
  box-shadow: 2px 2px 0 rgba(24, 24, 27, 0.12);
}

.module-pill.sm .module-pill-left,
.module-pill.sm .module-pill-right {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.module-pill.sm .module-pill-left {
  padding: 0.42rem 0.16rem 0.32rem 0.78rem;
}

.module-pill.sm .module-pill-right {
  padding: 0.42rem 0.78rem 0.32rem 0.16rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin: 0 0 0.7rem;
}

.hero-tagline {
  margin: 0 0 1.15rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ——— Hero ——— */

.hero-market {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding: 2.2rem 0 1.2rem;
}

@media (min-width: 900px) {
  .hero-market {
    grid-template-columns: 1.05fr 0.95fr;
    padding: 3rem 0 1.5rem;
  }
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5.4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.tag-line {
  display: block;
}

.tag-line.green {
  color: var(--green);
}

.tag-line.ocean {
  color: var(--ocean);
}

.tag-line.red {
  color: var(--red);
}

.hero-lead {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36rem;
}

.hero-stage {
  position: relative;
  min-height: 28rem;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-blob {
  position: absolute;
  inset: 8% 12% 6%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, #ffe8cc, transparent 55%),
    radial-gradient(circle at 80% 70%, #ddd6fe, transparent 50%),
    #c7f9cc55;
  filter: blur(8px);
  z-index: 0;
}

/* ——— Phone frames ——— */

.phone[hidden],
.feature-visual[hidden] {
  display: none !important;
}

.phone {
  position: relative;
  margin: 0;
  width: min(100%, 17.2rem);
  aspect-ratio: 9 / 19.4;
  border-radius: 2rem;
  border: 3px solid var(--ink);
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow-hard);
  z-index: 1;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone.is-shot {
  cursor: zoom-in;
}

.phone.is-shot:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.phone.is-shot::after {
  content: "+";
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 2rem;
  text-align: center;
  box-shadow: 0 0 0 2px #fff, 3px 3px 0 rgba(24, 24, 27, 0.35);
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}

.phone-sm {
  width: min(100%, 14.6rem);
}

.phone-float {
  animation: phone-float 6s ease-in-out infinite;
}

.phone-tilt-left {
  transform: rotate(-6deg);
}

.phone-tilt-right {
  transform: rotate(5deg);
}

.hero-phone-main {
  width: min(72%, 17.4rem);
  z-index: 2;
}

.hero-phone-back {
  position: absolute;
  width: min(58%, 14rem);
  right: 4%;
  top: 6%;
  z-index: 1;
  animation-delay: -2s;
}

@keyframes phone-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.phone-tilt-left.phone-float {
  animation-name: phone-float-left;
}

.phone-tilt-right.phone-float {
  animation-name: phone-float-right;
}

@keyframes phone-float-left {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(-6deg) translateY(-10px);
  }
}

@keyframes phone-float-right {
  0%,
  100% {
    transform: rotate(5deg) translateY(0);
  }
  50% {
    transform: rotate(5deg) translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-float,
  .phone-tilt-left.phone-float,
  .phone-tilt-right.phone-float {
    animation: none;
  }
}

/* ——— Trust / strip ——— */

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.5rem auto 2.5rem;
}

@media (min-width: 720px) {
  .trust-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(10.5rem, 14.5rem));
    justify-content: center;
    justify-items: stretch;
  }
}

.trust-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  text-align: center;
  width: min(100%, 22rem);
}

@media (min-width: 720px) {
  .trust-card {
    width: auto;
  }
}

.trust-card strong {
  display: block;
  font-size: 0.95rem;
}

.trust-card span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

/* ——— Sections ——— */

.section {
  padding: 3.2rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 1.8rem;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.55rem, 3.4vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.band {
  border-block: 2px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.band-todo {
  background: linear-gradient(180deg, #ddd6fe66, transparent 70%);
}

.band-shopping {
  background: linear-gradient(180deg, #ffd6c966, transparent 70%);
}

.band-notes {
  background: linear-gradient(180deg, #fde68a55, transparent 70%);
}

.band-watch {
  background: linear-gradient(180deg, #a5f3fc55, transparent 70%);
}

.band-today {
  background: linear-gradient(180deg, #86efac44, transparent 72%);
}

.band-connected {
  background: linear-gradient(180deg, #93c5fd55, transparent 70%);
}

.band-settings {
  background: linear-gradient(180deg, #d4d4d855, transparent 70%);
}

.band-pages {
  background: linear-gradient(180deg, #c7d2fe44, #fcd34d22);
}

.band-cta {
  background: linear-gradient(160deg, #f9a8d455, #ffe8cc88);
}

.feature-row {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .feature-row {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .feature-row.reverse .feature-visual {
    order: 2;
  }

  .feature-row.no-visual {
    grid-template-columns: 1fr;
  }
}

.feature-copy h3 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.02em;
}

.feature-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.15rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand);
}

.feature-visual {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: flex-end;
}

.feature-visual.pair .phone:last-child {
  display: none;
}

@media (min-width: 520px) {
  .feature-visual.pair .phone:last-child {
    display: block;
  }
}

/* ——— Pages grid ——— */

.pages-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .pages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.page-card {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 1.5rem;
  padding: 1.1rem 1.1rem 1.25rem;
  box-shadow: 4px 4px 0 rgba(24, 24, 27, 0.12);
}

.page-card h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 1.15rem;
}

.page-card .module-pill {
  display: flex;
  width: fit-content;
  margin: 0.95rem auto 0.45rem;
}

.page-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-card .phone {
  width: 100%;
  max-width: 16rem;
  margin-inline: auto;
  box-shadow: 4px 4px 0 var(--ink);
}

/* ——— Privacy / values ——— */

.values {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .values {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1.4rem;
}

.value-card .emoji {
  font-size: 1.6rem;
}

.value-card h3 {
  margin: 0.55rem 0 0.35rem;
  font-size: 1.1rem;
}

.value-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ——— CTA ——— */

.cta-box {
  border: 2.5px solid var(--ink);
  border-radius: 1.75rem;
  background: #fff;
  padding: 1.8rem 1.4rem;
  box-shadow: var(--shadow-hard);
}

@media (min-width: 720px) {
  .cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 2.1rem;
  }
}

.cta-box h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.cta-box p {
  margin: 0;
  color: var(--muted);
}

/* ——— Reveal ——— */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.7s ease forwards;
}

.reveal-d1 {
  animation-delay: 0.08s;
}
.reveal-d2 {
  animation-delay: 0.16s;
}
.reveal-d3 {
  animation-delay: 0.24s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ——— Legal (existing pages) ——— */

.legal {
  width: min(100% - 2rem, var(--max));
  margin: 1.5rem auto 3rem;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem 2rem;
}

@media (min-width: 640px) {
  .legal {
    padding: 2rem 2.25rem 2.5rem;
  }
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.legal h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  line-height: 1.25;
}

.legal h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.1rem;
}

.legal p,
.legal li {
  color: var(--text);
  font-size: 0.98rem;
}

.legal ul {
  padding-left: 1.2rem;
  margin: 0.4rem 0 0.8rem;
}

.legal li + li {
  margin-top: 0.35rem;
}

/* ——— Footer ——— */

.site-footer {
  margin-top: auto;
  padding: 2rem 0 2.5rem;
  border-top: 2px solid color-mix(in srgb, var(--ink) 12%, transparent);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap,
.site-footer .wrap-wide {
  display: grid;
  gap: 0.75rem;
}

.site-footer strong {
  color: var(--ink);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.footer-nav a:hover {
  color: var(--ink);
}

.tmdb-note {
  font-size: 0.82rem;
}

/* ——— Mobile nav ——— */

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-header.sticky-bar .nav {
    display: none;
    width: 100%;
    padding: 0.4rem 0 0.7rem;
  }

  .site-header.sticky-bar.is-open .nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stage {
    min-height: 22rem;
  }

  .hero-phone-back {
    display: none;
  }
}

/* ——— Screenshot gallery ——— */

.gallery {
  width: min(98vw, 38rem);
  max-width: 98vw;
  height: min(96vh, 64rem);
  max-height: 96vh;
  margin: auto;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 1.35rem;
  background: #111;
  color: #fff;
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.gallery::backdrop {
  background: rgba(12, 12, 14, 0.78);
  backdrop-filter: blur(8px);
}

.gallery-inner {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  height: 100%;
  min-height: 0;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: #1a1a1d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.gallery-counter {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

.gallery-close,
.gallery-nav {
  border: 2px solid #fff;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
}

.gallery-close {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
}

.gallery-close:hover,
.gallery-nav:hover {
  background: var(--red);
}

.gallery-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0.45rem 3.1rem 0.25rem;
}

.gallery-stage img {
  width: auto;
  height: 100%;
  max-width: min(100%, 28rem);
  max-height: 100%;
  object-fit: contain;
  border-radius: 1.5rem;
  border: 3px solid #fff;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
  background: #000;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 2;
}

.gallery-nav.prev {
  left: 0.55rem;
}

.gallery-nav.next {
  right: 0.55rem;
}

.gallery-caption {
  margin: 0;
  padding: 0 1rem 0.55rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.gallery-thumbs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.65rem 0.85rem 0.85rem;
  background: #1a1a1d;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  scrollbar-width: thin;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 3.1rem;
  height: 6.2rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  opacity: 0.55;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.gallery-thumb.is-active {
  opacity: 1;
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--red);
}

.gallery-thumb:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .gallery {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border-width: 0;
  }

  .gallery-stage {
    padding: 0.5rem 2.7rem;
  }

  .gallery-nav {
    width: 2.2rem;
    height: 2.2rem;
  }
}
