:root {
  --bg: #070707;
  --bg-soft: #0d0c0c;
  --panel: #111010;
  --panel-2: #171414;
  --ink: #f0ece6;
  --muted: #aba39b;
  --red: #c11419;
  --red-bright: #f12a25;
  --red-dark: #6f080b;
  --line: rgba(255, 255, 255, 0.12);
  --line-red: rgba(229, 29, 31, 0.45);
  --gold: #b59663;
  --shell: 1180px;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 42%, rgba(140, 0, 0, 0.12), transparent 31rem),
    radial-gradient(circle at 82% 78%, rgba(113, 0, 0, 0.13), transparent 32rem),
    var(--bg);
  font-family: "Inter", Arial, sans-serif;
  overflow-x: hidden;
}

body.editor-fullscreen-open {
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

.shell {
  width: min(calc(100% - 32px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 10000;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red-bright);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero {
  position: relative;
  min-height: min(900px, 100svh);
  display: grid;
  align-content: space-between;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line-red);
}

.hero__media,
.hero__veil,
.hero__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__media {
  z-index: -4;
  background-image: url("assets/hero-munas_-ROKCupki.jpg");
  background-position: center 36%;
  background-size: cover;
  transform: scale(1.015);
}

.hero__veil {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(4, 4, 4, 0.94) 0%, rgba(4, 4, 4, 0.72) 42%, rgba(4, 4, 4, 0.28) 73%, rgba(4, 4, 4, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 27%, rgba(0, 0, 0, 0.18) 58%, #070707 100%);
}

.hero__grain {
  z-index: -2;
  opacity: 0.27;
  mix-blend-mode: screen;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, transparent 0 1px, rgba(255,255,255,.035) 1px 2px),
    repeating-linear-gradient(115deg, transparent 0 5px, rgba(255,255,255,.01) 5px 6px);
  background-size: 7px 7px, 11px 11px;
}

.topbar {
  position: relative;
  z-index: 3;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.brand span {
  display: grid;
}

.brand strong,
.brand small {
  font-family: "Barlow Condensed", Impact, sans-serif;
  line-height: 0.9;
  letter-spacing: 0.08em;
}

.brand strong {
  font-size: 1.18rem;
  font-weight: 900;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 7px;
}

.topbar__link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--red-bright);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-block: clamp(68px, 12vh, 150px) clamp(110px, 16vh, 180px);
}

.hero__logos {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 30px;
}

.hero__logo {
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55));
}

.hero__logo--munas {
  width: clamp(78px, 9vw, 126px);
  max-height: 126px;
}

.hero__logo--offo {
  width: clamp(125px, 14vw, 210px);
  max-height: 112px;
}

.hero__divider {
  width: 1px;
  height: 62px;
  background: linear-gradient(transparent, rgba(255,255,255,.42), transparent);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(3.3rem, 8vw, 7.3rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.035em;
  text-transform: none;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.58);
}

.hero h1 span {
  display: inline-block;
  margin-top: 0.08em;
  color: transparent;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(240, 236, 230, 0.82);
  text-stroke: 1px rgba(240, 236, 230, 0.82);
}

.hero__lead {
  max-width: 680px;
  margin: 28px 0 0;
  color: #d2ccc4;
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  line-height: 1.72;
}

.hero__actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 24px;
}

.button {
  min-height: 54px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  cursor: pointer;
  text-decoration: none;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.button:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.button:focus-visible,
.frame-choice:focus-visible,
.tool-button:focus-visible,
.fullscreen-button:focus-visible,
.text-button:focus-visible,
.upload-card:focus-within {
  outline: 3px solid rgba(241, 42, 37, 0.9);
  outline-offset: 3px;
}

.button:disabled,
.tool-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
  filter: grayscale(1);
}

.button--hero {
  min-width: 190px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), #8f070b 72%);
  box-shadow: 0 14px 42px rgba(160, 0, 5, 0.32);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.privacy-note {
  color: #c3bbb3;
  font-size: 0.78rem;
}

.privacy-note span {
  margin-right: 8px;
  color: var(--red-bright);
  text-shadow: 0 0 16px var(--red-bright);
}

.hero__event-mark {
  position: absolute;
  z-index: -1;
  right: clamp(-120px, -4vw, -40px);
  bottom: 70px;
  width: min(39vw, 510px);
  opacity: 0.12;
  filter: grayscale(1) contrast(1.3);
  transform: rotate(-4deg);
}

.intro {
  padding-block: clamp(76px, 11vw, 130px) 52px;
  position: relative;
}

.intro__line {
  width: 86px;
  height: 4px;
  margin-bottom: 24px;
  background: linear-gradient(90deg, var(--red-bright), transparent);
}

.intro h2,
.howto h2 {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.intro > p:last-child {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.generator {
  padding-bottom: clamp(90px, 13vw, 160px);
}

.frame-picker {
  position: relative;
  padding-top: 24px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 26px;
}

.section-title__index {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 900;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.section-title p {
  margin: 0 0 4px;
  color: var(--red-bright);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.section-title h3 {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.01em;
}

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

.frame-choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 12px 12px 18px;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008)),
    #0d0c0c;
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.frame-choice::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--red-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.frame-choice:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.22);
}

.frame-choice.is-active {
  border-color: rgba(241, 42, 37, 0.78);
  background:
    radial-gradient(circle at 100% 0, rgba(190, 8, 14, 0.24), transparent 43%),
    #121010;
  box-shadow: 0 20px 50px rgba(0,0,0,.35), inset 0 0 0 1px rgba(241,42,37,.16);
}

.frame-choice.is-active::after {
  transform: scaleX(1);
}

.frame-choice__preview {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    linear-gradient(45deg, #0e0e0e 25%, #151515 25%, #151515 50%, #0e0e0e 50%, #0e0e0e 75%, #151515 75%);
  background-size: 22px 22px;
  overflow: hidden;
}

.frame-choice__preview img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 16px 25px rgba(0,0,0,.62));
}

.frame-choice__meta {
  display: grid;
  padding-inline: 4px;
}

.frame-choice__meta strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.frame-choice__meta small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.frame-choice__check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 180ms ease, transform 180ms ease;
}

.frame-choice.is-active .frame-choice__check {
  opacity: 1;
  transform: scale(1);
}

.upload-block {
  margin-top: clamp(74px, 10vw, 120px);
}

.upload-card--standalone {
  width: 100%;
}

.editor-block {
  margin-top: clamp(74px, 10vw, 120px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: start;
  gap: clamp(26px, 5vw, 64px);
}

.stage-column {
  min-width: 0;
}

.canvas-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, #252121, #090909 72%),
    #080808;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow), inset 0 0 80px rgba(0,0,0,.52);
  touch-action: none;
  user-select: none;
  overscroll-behavior: contain;
}

.canvas-shell::before,
.canvas-shell::after {
  content: "";
  position: absolute;
  z-index: 4;
  pointer-events: none;
}

.canvas-shell::before {
  inset: 0;
  border: 1px solid rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 8px rgba(0,0,0,.12);
}

.canvas-shell::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
  opacity: 0.68;
}

#editorCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

#editorCanvas.is-dragging {
  cursor: grabbing;
}

.empty-state {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.empty-state.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.empty-state__camera {
  width: 54px;
  height: 42px;
  position: relative;
  margin-bottom: 10px;
  border: 2px solid rgba(255,255,255,.68);
  border-radius: 8px;
}

.empty-state__camera::before {
  content: "";
  position: absolute;
  left: 11px;
  top: -9px;
  width: 22px;
  height: 9px;
  border: 2px solid rgba(255,255,255,.68);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.empty-state__camera span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 2px solid var(--red-bright);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.empty-state strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.empty-state small {
  color: #bcb4ad;
}

.gesture-badge {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 16px;
  display: flex;
  gap: 12px;
  padding: 9px 12px;
  color: #dbd5cf;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  white-space: nowrap;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.gesture-badge.is-visible {
  opacity: 1;
}

.fullscreen-button {
  position: absolute;
  z-index: 6;
  top: 14px;
  right: 14px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.canvas-shell.is-fullscreen {
  position: fixed;
  z-index: 9998;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  aspect-ratio: auto;
  border: 0;
  background: #050505;
  padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

.canvas-shell.is-fullscreen #editorCanvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.canvas-shell.is-fullscreen .fullscreen-button {
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
}

.stage-hint {
  margin: 14px 0 0;
  color: #8f8882;
  font-size: 0.75rem;
  line-height: 1.55;
}

.control-panel {
  position: sticky;
  top: 20px;
  min-width: 0;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.04), transparent 42%),
    var(--panel);
  border-left: 3px solid var(--red);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}

.upload-card {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  cursor: pointer;
  background: rgba(255,255,255,.035);
  border: 1px dashed rgba(255,255,255,.25);
  transition: border-color 160ms ease, background 160ms ease;
}

.upload-card:hover {
  border-color: var(--red-bright);
  background: rgba(190, 8, 14, 0.08);
}

.upload-card__icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  font-size: 1.5rem;
}

.upload-card span:last-child {
  display: grid;
  min-width: 0;
}

.upload-card strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.upload-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

.control-group {
  margin-top: 22px;
  display: grid;
  gap: 22px;
}

.range-control {
  display: grid;
  gap: 10px;
}

.range-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d7d0ca;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.76rem;
  letter-spacing: .07em;
}

.range-control output {
  color: var(--red-bright);
}

input[type="range"] {
  width: 100%;
  height: 32px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--red) var(--range-progress, 0%), #383434 var(--range-progress, 0%));
}

input[type="range"]::-moz-range-track {
  height: 4px;
  background: #383434;
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  background: var(--red);
}

input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -9px;
  appearance: none;
  border: 3px solid #e7e0da;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(193,20,25,.18);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #e7e0da;
  border-radius: 50%;
  background: var(--red);
}

input[type="range"]:disabled {
  cursor: not-allowed;
  opacity: .3;
}

.tool-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tool-button {
  min-height: 48px;
  padding: 0 10px;
  color: #d8d1cb;
  border: 1px solid rgba(255,255,255,.14);
  background: transparent;
  cursor: pointer;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.tool-button:hover:not(:disabled) {
  border-color: rgba(241,42,37,.7);
  background: rgba(193,20,25,.08);
}

.output-info {
  margin-top: 24px;
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 0.76rem;
  letter-spacing: .05em;
}

.output-info span {
  color: var(--muted);
}

.output-info strong {
  color: #fff;
}

.button--download,
.button--share {
  width: 100%;
  margin-top: 14px;
}

.button--download {
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), #86070a 75%);
}

.button--share {
  color: #e4ded8;
  border: 1px solid rgba(255,255,255,.18);
  background: #1b1818;
}

.local-note {
  margin: 15px 0 0;
  color: #89827d;
  font-size: 0.67rem;
  line-height: 1.5;
  text-align: center;
}

.local-note span {
  color: var(--red-bright);
}

.caption-section {
  position: relative;
  padding-block: clamp(88px, 13vw, 150px);
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(101, 0, 4, 0.32), transparent 46%),
    radial-gradient(circle at 80% 50%, rgba(126, 0, 4, 0.22), transparent 31rem),
    #ece7df;
  color: #111;
}

.caption-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    repeating-linear-gradient(118deg, transparent 0 7px, rgba(0,0,0,.035) 7px 8px),
    repeating-radial-gradient(circle, rgba(0,0,0,.055) 0 1px, transparent 1px 4px);
}

.caption-section__skull {
  position: absolute;
  right: -40px;
  bottom: -80px;
  width: min(46vw, 620px);
  opacity: .12;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.3);
  pointer-events: none;
}

.caption-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(36px, 7vw, 90px);
  align-items: center;
}

.section-title--light .section-title__index {
  background: #111;
}

.section-title--light p {
  color: #a30a0e;
}

.caption-copy > p {
  max-width: 500px;
  margin: 0;
  color: #4d4742;
  line-height: 1.72;
}

.caption-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.button--copy {
  min-width: 200px;
  color: #fff;
  background: #111;
}

.text-button {
  min-height: 46px;
  padding: 0;
  color: #2d2824;
  border: 0;
  border-bottom: 1px solid #8f8780;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

.caption-preview {
  position: relative;
  max-height: 370px;
  padding: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 25px 65px rgba(36, 22, 17, 0.16);
  transition: max-height 300ms ease;
}

.caption-preview[data-expanded="true"] {
  max-height: 850px;
  overflow: auto;
}

.caption-preview__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.12);
  color: #7c736c;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.caption-preview pre {
  margin: 18px 0 0;
  color: #26211e;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.76rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.caption-preview__fade {
  position: absolute;
  inset: auto 0 0;
  height: 100px;
  background: linear-gradient(transparent, rgba(255,255,255,.97));
  pointer-events: none;
}

.caption-preview[data-expanded="true"] .caption-preview__fade {
  display: none;
}

.howto {
  padding-block: clamp(90px, 13vw, 150px);
}

.howto__heading {
  max-width: 750px;
}

.howto__steps {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.howto article {
  min-height: 210px;
  padding: 28px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.howto article:first-child {
  border-left: 1px solid var(--line);
}

.howto article > span {
  color: var(--red-bright);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: .82rem;
  font-weight: 900;
}

.howto article strong {
  display: block;
  margin-top: 40px;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.howto article p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: .86rem;
}

.footer {
  border-top: 1px solid var(--line-red);
  background: #030303;
}

.footer__inner {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer__inner > div {
  display: grid;
  gap: 6px;
}

.footer strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.1rem;
  letter-spacing: .07em;
}

.footer span,
.footer a {
  color: #8c8580;
  font-size: .76rem;
}

.footer__credit {
  margin: 0;
  color: #8c8580;
  font-size: .76rem;
  line-height: 1.6;
}

.footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 1px solid #5a5450;
}

.toast {
  position: fixed;
  z-index: 10001;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: min(calc(100% - 32px), 460px);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: #fff;
  background: rgba(10,10,10,.94);
  border: 1px solid rgba(255,255,255,.16);
  border-left: 4px solid var(--red-bright);
  box-shadow: 0 16px 50px rgba(0,0,0,.45);
  backdrop-filter: blur(14px);
  transform: translate(-50%, 30px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  font-size: .82rem;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .hero {
    min-height: 900px;
  }

  .hero__media {
    background-position: 57% 40%;
  }

  .hero__veil {
    background:
      linear-gradient(90deg, rgba(4,4,4,.92), rgba(4,4,4,.56) 70%, rgba(4,4,4,.72)),
      linear-gradient(180deg, rgba(0,0,0,.6), transparent 24%, rgba(0,0,0,.12) 54%, #070707 100%);
  }

  .frame-choice__preview {
    min-height: 210px;
  }

  .frame-choice__preview img {
    max-height: 220px;
  }

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

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

  .control-panel {
    position: static;
  }

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

  .caption-section__skull {
    width: 70vw;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(calc(100% - 24px), var(--shell));
  }

  .topbar {
    min-height: 82px;
  }

  .brand img {
    width: 58px;
    height: 58px;
  }

  .brand strong {
    font-size: .98rem;
  }

  .brand small {
    font-size: .62rem;
  }

  .topbar__link {
    font-size: .72rem;
  }

  .hero {
    min-height: 820px;
  }

  .hero__content {
    padding-block: 62px 125px;
  }

  .hero__logos {
    gap: 14px;
    margin-bottom: 26px;
  }

  .hero__divider {
    height: 48px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .hero__lead {
    font-size: .92rem;
    line-height: 1.62;
  }

  .hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button--hero {
    width: 100%;
  }

  .privacy-note {
    text-align: center;
  }

  .intro {
    padding-top: 76px;
  }

  .section-title {
    gap: 12px;
  }

  .section-title__index {
    min-width: 40px;
    min-height: 40px;
  }

  .frame-list {
    width: auto;
    margin-left: 0;
    padding: 0;
    gap: 12px;
  }

  .frame-choice {
    min-width: 0;
  }

  .frame-choice__preview {
    min-height: 250px;
  }

  .frame-choice__preview img {
    max-height: 250px;
  }

  .upload-block,
  .editor-block {
    margin-top: 78px;
  }

  .canvas-shell {
    width: calc(100% + 24px);
    margin-left: -12px;
    border-left: 0;
    border-right: 0;
  }

  .gesture-badge {
    bottom: 12px;
    gap: 8px;
    padding: 8px 10px;
    font-size: .58rem;
  }

  .control-panel {
    margin-inline: -4px;
    padding: 18px;
    border-left-width: 2px;
  }

  .upload-card {
    min-height: 78px;
  }

  .tool-row {
    gap: 8px;
  }

  .button--download,
  .button--share {
    min-height: 58px;
  }

  .caption-section {
    padding-block: 82px;
  }

  .caption-section__skull {
    right: -80px;
    bottom: -30px;
    width: 100vw;
  }

  .caption-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button--copy {
    width: 100%;
  }

  .text-button {
    align-self: flex-start;
  }

  .caption-preview {
    padding: 16px;
  }

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

  .howto article,
  .howto article:first-child {
    min-height: 170px;
    border-left: 1px solid var(--line);
  }

  .howto article strong {
    margin-top: 24px;
  }

  .footer__inner {
    padding-block: 30px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
