:root {
  /* lvh = «большой» вьюпорт: не прыгает при появлении/скрытии UI браузера */
  --app-h: 100lvh;
  --scene-height: 140lvh;
  --char-size: calc(var(--app-h) * 0.34);
  --char-bottom: calc(var(--app-h) * 0.025 + 10px);
  --sky: #6ec4e8;

  /* Medusmo palette */
  --med-bg: #f3f3f1;
  --med-ink: #1c1c1a;
  --med-soft: #b7b7b2;
  --med-muted: #6f6f6a;
  --med-line: #e0e0dc;
  --med-card: #fafaf8;
  --med-lime: #dafb71;
  --med-lime-hot: #e6ff27;
  --med-charcoal: #31312f;

  --font: "Onest", sans-serif;
  --radius: 1rem;
  --radius-pill: 999px;
  --header-h: 4.5rem;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  min-height: 100lvh;
  background: var(--sky);
  overflow-x: hidden;
}

body.is-booting {
  overflow: hidden;
  height: 100%;
}

/* Site header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: max(0.55rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px)) 0.55rem
    max(1rem, env(safe-area-inset-left, 0px));
  background: rgba(250, 250, 248, 0.82);
  border-bottom: 1px solid rgba(224, 224, 220, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.is-booting .site-header {
  opacity: 0;
  pointer-events: none;
}

.site-logo {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.site-logo-mark {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.site-logo:hover .site-logo-mark {
  transform: scale(1.06);
}

.site-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--med-line);
  background: var(--med-card);
}

.nav-link {
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--med-muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.nav-link:hover {
  color: var(--med-ink);
}

.nav-link.is-active {
  background: var(--med-charcoal);
  color: #fff;
}

.lang-switch {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--med-line);
  background: var(--med-card);
}

.lang-btn {
  min-width: 2.4rem;
  min-height: 1.85rem;
  padding: 0.25rem 0.55rem;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--med-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--med-lime);
  color: var(--med-charcoal);
}

.lang-btn:focus-visible,
.nav-link:focus-visible,
.site-logo:focus-visible,
.site-burger:focus-visible {
  outline: 2px solid var(--med-lime);
  outline-offset: 2px;
}

.site-burger {
  display: none;
  position: relative;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--med-line);
  border-radius: 0.75rem;
  background: var(--med-card);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.site-burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 1.1rem;
  height: 2px;
  margin-left: -0.55rem;
  border-radius: 1px;
  background: var(--med-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-burger span:nth-child(1) {
  transform: translateY(-0.34rem);
}

.site-burger span:nth-child(2) {
  transform: translateY(0);
}

.site-burger span:nth-child(3) {
  transform: translateY(0.34rem);
}

.site-burger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg);
}

.site-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.site-burger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg);
}

.site-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.site-menu .site-nav {
  pointer-events: auto;
}

.site-menu .lang-switch {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  margin: 0;
}

@media (max-width: 860px) {
  :root {
    --header-h: 3.6rem;
  }

  .site-header {
    display: flex;
    grid-template-columns: none;
    grid-template-areas: none;
  }

  .site-logo-mark {
    width: 2.25rem;
    height: 2.25rem;
  }

  .site-burger {
    display: inline-flex;
    margin-left: auto;
  }

  .site-menu {
    display: none;
    position: fixed;
    top: calc(max(0.55rem, env(safe-area-inset-top, 0px)) + 2.9rem);
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    left: auto;
    bottom: auto;
    width: min(16.5rem, calc(100vw - 1.5rem));
    height: auto;
    padding: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.65rem;
    border: 1px solid var(--med-line);
    border-radius: var(--radius);
    background: rgba(250, 250, 248, 0.98);
    box-shadow: 0 14px 40px rgba(28, 28, 26, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 130;
    pointer-events: auto;
  }

  .site-menu.is-open {
    display: flex;
  }

  .site-menu .lang-switch {
    position: static;
    transform: none;
    width: 100%;
    justify-content: stretch;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.15rem;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .nav-link {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 0.88rem;
    text-align: left;
  }

  .lang-btn {
    flex: 1;
    min-height: 2.2rem;
  }
}

/* Boot loader */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 20050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--med-bg);
  font-family: var(--font);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.boot-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-inner {
  width: min(18rem, calc(100% - 3rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.boot-track {
  width: 100%;
  height: 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--med-charcoal);
  background: var(--med-card);
  overflow: hidden;
  box-sizing: border-box;
}

.boot-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--med-lime);
  transition: width 0.15s linear;
}

.boot-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--med-muted);
}

html.is-site,
body.is-site {
  overflow: hidden;
  height: 100%;
  background: var(--med-bg);
}

.city-strip {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  background: var(--sky);
}

body.is-site .city-strip {
  visibility: hidden;
}

.city-segment {
  position: absolute;
  left: 0;
  bottom: 0;
  top: auto;
  width: 100vw;
  height: var(--app-h);
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: left bottom;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}

.city-segment.is-ready {
  opacity: 1;
}

.welcome-tip {
  position: absolute;
  top: calc(var(--header-h) + clamp(1.25rem, 6vh, 3.5rem));
  left: 50vw;
  transform: translateX(-50%);
  z-index: 2;
  width: max-content;
  max-width: calc(100vw - 1.5rem);
  padding: 1.15rem 1.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--med-line);
  background: var(--med-card);
  font-family: var(--font);
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.45s ease;
}

.welcome-tip.is-hiding {
  opacity: 0;
}

.welcome-title {
  margin: 0;
  font-size: clamp(1.25rem, 3.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--med-ink);
}

.welcome-sub {
  margin: 0.45rem 0 0;
  font-size: clamp(0.92rem, 1.7vw, 1.05rem);
  font-weight: 500;
  color: var(--med-muted);
}

.speech-tip {
  position: fixed;
  left: 50%;
  bottom: calc(var(--char-bottom) + var(--char-size) * 1.02);
  transform: translateX(-50%) translateY(8px);
  z-index: 25;
  width: max-content;
  max-width: calc(100vw - 1.5rem);
  padding: 1rem 1.5rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--med-line);
  background: var(--med-card);
  font-family: var(--font);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s;
}

.speech-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.45rem;
  width: 0.75rem;
  height: 0.75rem;
  border-right: 1px solid var(--med-line);
  border-bottom: 1px solid var(--med-line);
  background: var(--med-card);
  transform: translateX(-50%) rotate(45deg);
}

.speech-tip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.speech-tip p {
  margin: 0;
  font-size: clamp(0.9rem, 1.25vw, 1.05rem);
  line-height: 1.45;
  font-weight: 500;
  color: var(--med-ink);
  hyphens: none;
  -webkit-hyphens: none;
}

.speech-line {
  display: block;
  white-space: nowrap;
}

body.is-site .speech-tip {
  opacity: 0;
  visibility: hidden;
}

.walk-track {
  position: relative;
  z-index: 1;
}

.scene {
  height: var(--scene-height);
}

.character {
  position: fixed;
  left: 50%;
  bottom: var(--char-bottom);
  top: auto;
  width: var(--char-size);
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  image-rendering: auto;
  pointer-events: none;
  user-select: none;
  z-index: 20;
  transition: opacity 0.15s linear;
}

.character.idle {
  background-image: url("/assets/character.png");
}

.character.walk-right {
  background-image: url("/assets/right.png");
}

.character.walk-left {
  background-image: url("/assets/left.png");
}

.character.is-moving {
  animation: toy-bob 0.26s ease-in-out infinite;
}

@keyframes toy-bob {
  0%,
  100% {
    transform: translateX(-50%);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

.cover-spacer {
  height: 120lvh;
  pointer-events: none;
}

.cover-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 100%;
  height: var(--app-h, 100lvh);
  min-height: var(--app-h, 100lvh);
  background: var(--med-bg);
  color: var(--med-ink);
  transform: translateX(100%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  pointer-events: none;
  visibility: visible;
  padding: 0;
  box-sizing: border-box;
}

.cover-panel .med-frame {
  min-height: 100%;
  height: 100%;
}

.cover-panel.is-in {
  transform: translateX(0);
  pointer-events: auto;
}

.site-rest {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: var(--app-h, 100lvh);
  min-height: var(--app-h, 100lvh);
  background: var(--med-bg);
  visibility: hidden;
  pointer-events: none;
  box-sizing: border-box;
}

.site-rest.is-revealed {
  visibility: visible;
  pointer-events: auto;
}

.site-scroller {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}

.site-scroller::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.site-block {
  box-sizing: border-box;
  width: 100%;
  flex: 0 0 100%;
  height: 100%;
  min-height: 100%;
  background: var(--med-bg);
  color: var(--med-ink);
  padding: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.site-block[hidden],
.nav-link[hidden] {
  display: none !important;
}

/* Medusmo-like: soft light, lime accent, big caps, quiet cards */
.med-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 3rem);
  padding-top: calc(var(--header-h) + 0.85rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.8vh, 1.35rem);
  background: var(--med-bg);
  font-family: var(--font);
}

.med-eyebrow {
  font-size: clamp(0.78rem, 1.3vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--med-muted);
  flex: 0 0 auto;
}

.med-title {
  display: flex;
  flex-direction: column;
  gap: 0.05em;
  font-weight: 800;
  font-size: clamp(2.1rem, 6.8vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  max-width: 16ch;
  flex: 0 1 auto;
  min-height: 0;
}

.med-title-strong {
  color: var(--med-ink);
}

.med-title-soft {
  color: var(--med-soft);
}

.med-lead {
  max-width: 36rem;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.5;
  font-weight: 400;
  color: var(--med-muted);
  flex: 0 0 auto;
}

.med-lead-wide {
  max-width: 28rem;
}

.med-grid {
  list-style: none;
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--med-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--med-line);
  min-height: 0;
  flex: 1 1 auto;
}

.med-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.med-grid-skills {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.med-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  padding: clamp(0.95rem, 2vw, 1.45rem);
  border: none;
  background: var(--med-card);
  min-height: 0;
}

.med-card h3 {
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--med-ink);
  flex: 0 0 auto;
}

.med-card p {
  font-size: clamp(0.9rem, 1.35vw, 1.02rem);
  line-height: 1.45;
  color: var(--med-muted);
}

.med-frame-contact {
  justify-content: center;
  gap: 1.25rem;
}

.med-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.med-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.med-btn-lime {
  background: var(--med-lime);
  color: var(--med-charcoal);
}

.med-btn-lime:hover {
  background: var(--med-lime-hot);
}

.med-btn-dark {
  background: var(--med-charcoal);
  color: #ffffff;
}

.med-place {
  font-size: 0.95rem;
  color: var(--med-muted);
}

/* 404 */
body.page-404 {
  background: var(--med-bg);
  min-height: 100lvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.err-frame {
  width: min(40rem, calc(100% - 2rem));
  padding: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-family: var(--font);
}

.err-code {
  font-size: clamp(4.5rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--med-lime);
}

.err-title {
  display: flex;
  flex-direction: column;
  gap: 0.05em;
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .med-grid,
  .med-grid-3,
  .med-grid-skills {
    grid-template-columns: 1fr 1fr;
  }

  .med-grid-skills {
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
}

/* Низкие экраны: чуть меньше только заголовок, карточки остаются читаемыми */
@media (max-height: 820px) {
  .med-frame {
    padding-top: calc(var(--header-h) + 0.55rem);
    padding-bottom: 1.1rem;
    gap: 0.65rem;
  }

  .med-title {
    font-size: clamp(1.85rem, 5.8vh, 3.2rem);
  }
}

@media (max-width: 640px) {
  .speech-tip {
    width: max-content;
    max-width: calc(100vw - 1.25rem);
    padding: 0.75rem 0.85rem 0.85rem;
    bottom: calc(var(--char-bottom) + var(--char-size) * 0.95);
  }

  .speech-tip p {
    /* Длинные строки реплик — чуть мельче, чтобы nowrap влезал */
    font-size: clamp(0.68rem, 3.35vw, 0.82rem);
    line-height: 1.38;
    text-align: center;
  }

  .speech-line {
    display: block;
    white-space: nowrap;
  }

  .med-frame {
    overflow: hidden;
    padding: 1.2rem 0.85rem calc(1rem + env(safe-area-inset-bottom, 0px));
    padding-top: calc(var(--header-h) + 0.45rem);
    gap: 0.75rem;
  }

  .med-title {
    font-size: clamp(1.55rem, 9vw, 2.1rem);
    max-width: none;
    margin-bottom: 0.15rem;
  }

  .med-lead {
    font-size: 0.84rem;
    line-height: 1.35;
    max-width: none;
    margin-bottom: 0.2rem;
  }

  .med-grid,
  .med-grid-3 {
    grid-template-columns: 1fr;
  }

  /* 6 карточек в 2 колонки, полный текст */
  .med-grid-skills {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
    flex: 1 1 auto;
    min-height: 0;
  }

  .med-grid-skills .med-card {
    padding: 0.6rem 0.65rem;
    gap: 0.35rem;
    justify-content: flex-start;
  }

  .med-grid-skills .med-card h3 {
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .med-grid-skills .med-card p {
    font-size: 0.7rem;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cover-panel {
    transition: none;
  }
}

/* Cookie consent */
.cookie-banner {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  left: auto;
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  width: min(24rem, calc(100vw - 2rem));
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--med-line);
  border-radius: var(--radius);
  background: rgba(250, 250, 248, 0.98);
  box-shadow: 0 12px 40px rgba(28, 28, 26, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.cookie-banner.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.75rem);
}

.cookie-text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--med-ink);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.cookie-link {
  margin-right: auto;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--med-muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.cookie-link:hover {
  color: var(--med-ink);
}

.cookie-actions .med-btn {
  min-height: 2.35rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
}

/* Privacy popup */
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
}

.privacy-modal.is-hidden {
  display: none;
}

.privacy-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(28, 28, 26, 0.45);
  cursor: pointer;
}

.privacy-sheet {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-height: min(70vh, 32rem);
  overflow: auto;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--med-line);
  border-radius: var(--radius);
  background: rgba(250, 250, 248, 0.98);
  box-shadow: 0 18px 50px rgba(28, 28, 26, 0.2);
  font-family: var(--font);
}

.privacy-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.privacy-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--med-ink);
}

.privacy-close {
  flex: 0 0 auto;
  border: 1px solid var(--med-line);
  border-radius: var(--radius-pill);
  background: var(--med-card);
  color: var(--med-ink);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.privacy-close:hover {
  border-color: var(--med-charcoal);
}

.privacy-text {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--med-muted);
}

.privacy-text:last-child {
  margin-bottom: 0;
}

body.privacy-open {
  overflow: hidden;
}

@media (min-width: 720px) {
  .privacy-modal {
    align-items: center;
  }
}

@media (max-width: 640px) {
  .cookie-banner {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 4.5rem));
    width: auto;
    z-index: 300;
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-link {
    margin-right: 0;
    width: 100%;
    text-align: left;
  }

  .cookie-actions .med-btn {
    flex: 1;
  }
}
