@font-face {
  font-family: "CaptionBar Android Emoji";
  src: url("assets/fonts/Noto-COLRv1.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
  unicode-range: U+200D, U+2190-21FF, U+2300-23FF, U+2600-27BF, U+2B00-2BFF, U+FE0E-FE0F, U+1F000-1FAFF;
}

/* Picker glyphs contain only emoji, so this unrestricted alias can cover
   keycaps, legacy symbols, and tag flags without changing caption spacing. */
@font-face {
  font-family: "CaptionBar Android Emoji Picker";
  src: url("assets/fonts/Noto-COLRv1.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --ink: #1d1f1c;
  --ink-soft: #383b37;
  --muted: #70746d;
  --subtle: #9a9e97;
  --line: #dedfd8;
  --line-strong: #c9cbc3;
  --page: #f7f6f1;
  --paper: #ffffff;
  --paper-soft: #fbfaf6;
  --stage: #20221f;
  --stage-deep: #171916;
  --yellow: #ffdf43;
  --yellow-hover: #ffe76f;
  --yellow-soft: #fff7c4;
  --on-yellow: #1d1f1c;
  --green: #258654;
  --green-soft: #e8f5ed;
  --focus: #5f53cf;
  --shadow: 0 28px 70px rgba(39, 40, 34, 0.12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 223, 67, 0.16), transparent 23rem),
    radial-gradient(circle at 92% 28%, rgba(211, 223, 255, 0.2), transparent 25rem),
    var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled, textarea:disabled { cursor: not-allowed; }
img, canvas, svg { display: block; }
h1, h2, h3, p { margin-top: 0; }
a { color: inherit; }

.page-width,
.header-inner {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(211, 212, 205, 0.8);
  background: rgba(247, 246, 241, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 780;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border: 1.5px solid var(--on-yellow);
  border-radius: 10px;
  background: var(--yellow);
  box-shadow: 0 2px 0 var(--on-yellow);
}

.brand-mark::before {
  content: "";
  width: 18px;
  height: 13px;
  border: 1.5px solid var(--on-yellow);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.5);
}

.brand-mark span {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 15px;
  height: 4px;
  border-radius: 1px;
  background: var(--on-yellow);
}

.header-actions,
.privacy-note,
.hero-points,
.hero-points span,
.local-only,
.editor-identity,
.text-button,
.empty-privacy,
.preview-footer,
.drag-hint,
.field-heading,
.action-row,
.privacy-detail,
.footer-inner {
  display: flex;
  align-items: center;
}

.header-actions { gap: 12px; }

.privacy-note {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-note svg,
.privacy-detail svg,
.empty-privacy svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.theme-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 11px;
  font-weight: 720;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--paper-soft);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow-soft);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: opacity 160ms ease, transform 220ms ease;
}

.theme-icon-sun { opacity: 0; transform: rotate(-35deg) scale(0.65); }
html[data-theme="dark"] .theme-icon-moon { opacity: 0; transform: rotate(35deg) scale(0.65); }
html[data-theme="dark"] .theme-icon-sun { opacity: 1; transform: rotate(0) scale(1); }

.header-cta {
  padding: 9px 14px;
  border: 1px solid var(--on-yellow);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}

.header-cta:hover { background: #333630; transform: translateY(-1px); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(50px, 8vw, 110px);
  align-items: center;
  padding-block: 48px 38px;
}

.hero-copy { max-width: 700px; }

.eyebrow,
.section-label {
  margin-bottom: 12px;
  color: #6f5d08;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.145em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow > span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #ad8c00;
}

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(43px, 5vw, 64px);
  font-weight: 790;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-description {
  max-width: 615px;
  margin-bottom: 21px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.hero-points {
  flex-wrap: wrap;
  gap: 9px 18px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 640;
}

.hero-points span { gap: 5px; }
.hero-points svg { width: 15px; height: 15px; fill: none; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.hero-demo {
  position: relative;
  width: 318px;
  height: 220px;
  justify-self: end;
}

.demo-photo {
  position: absolute;
  inset: 0 15px 8px 0;
  overflow: hidden;
  border: 7px solid #fff;
  border-radius: 24px;
  background: linear-gradient(145deg, #c6d8e7 0%, #f4d5ac 62%, #b68b62 100%);
  box-shadow: 0 24px 45px rgba(73, 69, 55, 0.18);
  transform: rotate(2.5deg);
}

.demo-sun {
  position: absolute;
  top: 29px;
  right: 47px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 244, 198, 0.9);
  box-shadow: 0 0 30px rgba(255, 244, 198, 0.55);
}

.demo-hill {
  position: absolute;
  right: -40px;
  bottom: -55px;
  width: 320px;
  height: 190px;
  border-radius: 50% 50% 0 0;
  transform: rotate(-9deg);
}

.demo-hill-back { right: 60px; bottom: -92px; background: #839684; }
.demo-hill-front { background: #536b5e; }

.demo-caption {
  position: absolute;
  top: 54%;
  left: 0;
  width: 100%;
  padding: 12px 8px 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  text-align: center;
}

.demo-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 11px 9px 13px;
  border: 1px solid var(--on-yellow);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 4px 0 var(--on-yellow);
  color: var(--on-yellow);
  font-size: 11px;
  font-weight: 750;
  transform: rotate(-2deg);
}

.demo-badge > span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--on-yellow);
  color: #fff;
}

.workspace-wrap {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  scroll-margin-top: 88px;
}

.editor-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.75fr);
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: clip;
  border: 1px solid #d8dad2;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.editor-topbar {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 1fr) auto minmax(110px, 1fr);
  min-height: 68px;
  align-items: center;
  gap: 20px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.editor-identity { gap: 10px; }

.editor-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--yellow-soft);
  color: var(--ink);
}

.editor-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.editor-identity h2 { margin-bottom: 2px; font-size: 14px; letter-spacing: -0.025em; }
.editor-identity p { margin: 0; color: var(--subtle); font-size: 10px; }

.workflow {
  display: flex;
  gap: 0;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow li {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: center;
  color: #a0a39d;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.workflow li:not(:last-child)::after {
  content: "";
  width: 26px;
  height: 1px;
  margin-inline: 8px;
  background: var(--line);
}

.workflow li > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 9px;
}

.workflow li.is-active { color: var(--ink); }
.workflow li.is-active > span { border-color: var(--on-yellow); color: var(--on-yellow); background: var(--yellow); }
.workflow li.is-complete { color: var(--green); }
.workflow li.is-complete > span { border-color: var(--green); background: var(--green-soft); }
.workflow li.is-complete:not(:last-child)::after { background: #8cc8a7; }

.local-only {
  justify-self: end;
  gap: 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 680;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #48a66f;
  box-shadow: 0 0 0 3px rgba(72, 166, 111, 0.13);
}

.preview-column {
  min-width: 0;
  padding: 18px 20px 17px;
  color: #fff;
  background: var(--stage);
}

.preview-header {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.preview-file { min-width: 0; }
.section-label { margin-bottom: 4px; color: #777b74; }
.preview-column .section-label { color: #adb1a9; }

.file-name,
.controls-hint {
  margin: 0;
  color: var(--subtle);
  font-size: 11px;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls-hint {
  line-height: 1.35;
}

.preview-column .file-name { max-width: 420px; color: #777c75; }
.editor-card.has-image .preview-column .file-name { color: #d2d5cf; }

.text-button,
.reset-button {
  gap: 6px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: #d4d7d1;
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
  font-weight: 720;
  transition: color 150ms ease, background 150ms ease;
}

.text-button:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.text-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }

.preview-frame {
  position: relative;
  display: grid;
  min-height: 500px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%),
    var(--stage-deep);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
  transition: border-color 160ms ease, background 160ms ease;
}

.preview-frame.is-dragging { border-color: var(--yellow); background-color: #303025; }
.editor-card:not(.has-image) .preview-frame { cursor: pointer; }
.preview-frame canvas { display: block; max-width: 100%; max-height: 650px; object-fit: contain; touch-action: none; box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32); }
.editor-card.has-caption .preview-frame canvas { cursor: ns-resize; }
.preview-frame canvas.is-positioning { cursor: grabbing; }

.empty-state {
  display: grid;
  width: min(420px, calc(100% - 34px));
  padding: 42px 28px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.17);
  border-radius: 17px;
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid #6e5c00;
  border-radius: 17px;
  background: var(--yellow);
  color: var(--on-yellow);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
}

.upload-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.empty-kicker { margin-bottom: 7px; color: #aeb2aa; font-size: 9px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.empty-state h3 { margin-bottom: 9px; color: #fff; font-size: 21px; letter-spacing: -0.035em; }
.empty-copy { max-width: 310px; margin-bottom: 22px; color: #8f948c; font-size: 12px; line-height: 1.5; }

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 760;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, opacity 150ms ease;
}

.primary-button {
  padding: 0 18px;
  border: 1px solid var(--on-yellow);
  color: var(--on-yellow);
  background: var(--yellow);
  box-shadow: 0 3px 0 var(--on-yellow);
}

.primary-button:hover:not(:disabled) { background: var(--yellow-hover); transform: translateY(-1px); box-shadow: 0 4px 0 var(--on-yellow); }
.primary-button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--on-yellow); }
.primary-button svg, .secondary-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.choose-button { min-width: 158px; }

.empty-privacy { gap: 5px; margin-top: 19px; color: #737970; font-size: 9px; }

.drop-overlay {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  border: 2px solid var(--yellow);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 239, 144, 0.92);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.985);
  transition: opacity 140ms ease, transform 140ms ease;
}

.drop-overlay span { display: flex; gap: 9px; align-items: center; font-size: 14px; font-weight: 780; }
.drop-overlay svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.preview-frame.is-dragging .drop-overlay { opacity: 1; transform: scale(1); }

.preview-footer {
  min-height: 34px;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  color: #72776f;
  font-size: 9px;
}

.drag-hint { gap: 5px; color: #b7bbb4; }
.drag-hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }

.controls-column {
  min-width: 0;
  padding: 25px 27px 21px;
  background: var(--paper);
}

.controls-heading {
  display: flex;
  min-height: 42px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.controls-heading .section-label { color: #595d56; }
.controls-hint { max-width: 240px; }

.reset-button {
  flex: 0 0 auto;
  color: var(--muted);
  background: var(--paper-soft);
}

.reset-button:hover:not(:disabled) { color: var(--ink); background: #f1f0ea; }
.reset-button:disabled { opacity: 0.38; }

.field-block {
  padding-block: 16px 15px;
  border-bottom: 1px solid #ebece6;
  transition: opacity 180ms ease;
}

.caption-field { padding-top: 9px; }
.editor-card:not(.has-image) .field-block,
.editor-card:not(.has-image) .action-row { opacity: 0.48; }

.field-heading { justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.field-label { color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.field-value { color: var(--subtle); font-size: 9px; }

.value-pill {
  min-width: 45px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1f1ec;
  color: #6d716a;
  text-align: center;
}

textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 13px 14px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: var(--paper-soft);
  font-size: 14px;
  line-height: 1.45;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea::placeholder { color: #afb2ac; }
textarea:hover:not(:disabled) { border-color: var(--line-strong); }
textarea:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(255, 223, 67, 0.36); }
textarea:disabled { background: #f5f4ef; }
.field-help { margin: 7px 0 0; color: #a0a39d; font-size: 9px; line-height: 1.4; }

.caption-toolbar {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}

.caption-toolbar .field-help { margin: 0; }

.emoji-button {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  font-size: 10px;
  font-weight: 730;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.emoji-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--yellow-soft);
  transform: translateY(-1px);
}

.emoji-button[aria-expanded="true"] {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--yellow-soft);
}

.emoji-button:disabled { opacity: 0.55; }

.emoji-button-icon {
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.emoji-picker {
  position: fixed;
  z-index: 120;
  inset: auto;
  display: none;
  width: min(420px, calc(100vw - 24px));
  max-height: min(650px, calc(100dvh - 24px));
  margin: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 48px rgba(39, 40, 34, 0.22);
}

.emoji-picker:popover-open,
.emoji-picker.is-open {
  display: flex;
  flex-direction: column;
}
.emoji-picker::backdrop { background: transparent; }

.emoji-picker-header,
.emoji-style-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.emoji-picker-header { flex: 0 0 auto; margin-bottom: 12px; }
.emoji-picker-header h3 { margin: 0; font-size: 14px; letter-spacing: -0.025em; }
.emoji-picker-kicker { margin: 0 0 3px; color: #8b7509; font-size: 8px; font-weight: 820; letter-spacing: 0.13em; text-transform: uppercase; }

.emoji-close-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--paper-soft);
}

.emoji-close-button:hover { border-color: var(--line-strong); color: var(--ink); background: var(--yellow-soft); }
.emoji-close-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }

.emoji-style-block {
  flex: 0 0 auto;
  padding: 11px;
  border: 1px solid #ebece6;
  border-radius: 12px;
  background: var(--paper-soft);
}

.emoji-style-heading { margin-bottom: 8px; }
.emoji-style-label { color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.emoji-style-value { color: var(--muted); font-size: 9px; }
.emoji-style-toggle.segmented-control { grid-template-columns: repeat(2, 1fr); margin-bottom: 7px; }
.emoji-style-button { min-height: 31px; }
.emoji-style-toggle .emoji-style-button { color: #62665f; }
.emoji-style-toggle .emoji-style-button[data-emoji-unavailable="true"] {
  opacity: 0.42;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.emoji-style-note { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.45; }

.emoji-search-block {
  position: relative;
  flex: 0 0 auto;
  margin-top: 10px;
}

.emoji-search-icon {
  position: absolute;
  top: 50%;
  left: 11px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.emoji-search-icon svg,
.emoji-search-clear svg,
.emoji-state-icon svg,
.emoji-variants-close svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.emoji-search-input {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 9px 42px 9px 36px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: var(--paper-soft);
  font-size: 11px;
  line-height: 1.3;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.emoji-search-input::-webkit-search-cancel-button { display: none; }
.emoji-search-input::placeholder { color: var(--subtle); }
.emoji-search-input:hover { border-color: var(--line-strong); }
.emoji-search-input:focus {
  border-color: var(--ink);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(255, 223, 67, 0.34);
}

.emoji-search-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 9px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.emoji-search-clear:hover { color: var(--ink); background: var(--yellow-soft); }

.emoji-category-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  margin-top: 8px;
  padding: 1px 1px 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
}

.emoji-category-nav::-webkit-scrollbar { display: none; }

.emoji-category-button {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  scroll-snap-align: start;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.emoji-category-button:hover {
  border-color: var(--line);
  background: var(--paper-soft);
  transform: translateY(-1px);
}

.emoji-category-button.is-selected,
.emoji-category-button[aria-pressed="true"] {
  border-color: #ead452;
  background: var(--yellow-soft);
}

.emoji-category-icon {
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.emoji-scroll {
  min-height: 0;
  flex: 1 1 auto;
  max-height: min(320px, 44dvh);
  margin-top: 7px;
  padding: 1px 5px 3px 1px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.emoji-scroll:focus-visible { outline: 3px solid rgba(95, 83, 207, 0.28); outline-offset: 2px; border-radius: 8px; }
.emoji-results-heading {
  position: sticky;
  z-index: 2;
  top: -1px;
  display: flex;
  min-height: 29px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  padding: 4px 3px 6px;
  background: var(--paper);
}

.emoji-results-heading h4 { margin: 0; color: var(--ink-soft); font-size: 10px; font-weight: 780; }
.emoji-results-heading span { color: var(--subtle); font-size: 8px; }

.emoji-picker-state {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 92px;
  margin: 4px 2px 8px;
  padding: 13px;
  border: 1px solid #ebece6;
  border-radius: 12px;
  color: var(--muted);
  background: var(--paper-soft);
}

.emoji-picker-state strong,
.emoji-picker-state small { display: block; }
.emoji-picker-state strong { margin-bottom: 3px; color: var(--ink-soft); font-size: 10px; }
.emoji-picker-state small { font-size: 8px; line-height: 1.45; }

.emoji-state-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 7px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--paper);
}

.emoji-loading-spinner {
  width: 23px;
  height: 23px;
  justify-self: center;
  border: 2px solid var(--line);
  border-top-color: #a48900;
  border-radius: 50%;
  animation: emoji-spinner 750ms linear infinite;
}

.emoji-error-state {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  border-color: #ecd1d1;
  background: #fff8f7;
}

.emoji-error-state .emoji-state-icon { color: #9a3f3f; }

.emoji-retry-button,
.emoji-load-more {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 9px;
  font-weight: 740;
}

.emoji-retry-button:hover,
.emoji-load-more:hover { border-color: var(--line-strong); color: var(--ink); background: var(--yellow-soft); }

.emoji-load-more {
  display: block;
  width: calc(100% - 4px);
  margin: 10px 2px 2px;
}

@keyframes emoji-spinner { to { transform: rotate(1turn); } }

.emoji-group + .emoji-group { margin-top: 14px; }
.emoji-group { content-visibility: auto; contain-intrinsic-size: auto 240px; }
.emoji-group-title { margin: 0 0 7px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

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

.emoji-cell {
  position: relative;
  display: grid;
  min-width: 0;
}

.emoji-option {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  place-items: center;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.emoji-option:hover {
  border-color: var(--line);
  background: var(--yellow-soft);
  transform: translateY(-1px) scale(1.04);
}

.emoji-variant-trigger {
  position: absolute;
  right: 1px;
  bottom: 1px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px 2px 7px 7px;
  color: var(--muted);
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(39, 40, 34, 0.12);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.emoji-variant-trigger:hover,
.emoji-variant-trigger:focus-visible {
  border-color: #d5bf3c;
  color: var(--ink);
  background: var(--yellow-soft);
}

.emoji-variant-trigger span { transform: translateY(-1px); }

.emoji-variants {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  max-height: min(390px, calc(100% - 20px));
  flex-direction: column;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(39, 40, 34, 0.28);
}

.emoji-variants-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.emoji-variants-header h4 { margin: 0; font-size: 12px; letter-spacing: -0.02em; }
.emoji-variants-kicker { margin: 0 0 2px; color: #8b7509; font-size: 7px; font-weight: 820; letter-spacing: 0.12em; text-transform: uppercase; }

.emoji-variants-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--paper-soft);
}

.emoji-variants-close:hover { border-color: var(--line-strong); color: var(--ink); background: var(--yellow-soft); }

.emoji-variants-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 5px;
  padding: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.emoji-variants-grid .emoji-option { min-height: 44px; }

html[data-emoji-style="iphone"] .emoji-glyph,
html[data-emoji-style="iphone"] .emoji-button-icon {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", Inter, ui-sans-serif, sans-serif;
}

html[data-emoji-style="android"] .emoji-glyph,
html[data-emoji-style="android"] .emoji-button-icon {
  font-family: "CaptionBar Android Emoji Picker", "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", ui-sans-serif, sans-serif;
}

html[data-emoji-style="iphone"] #captionInput {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, system-ui, ui-sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

html[data-emoji-style="android"] #captionInput {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, system-ui, ui-sans-serif, "CaptionBar Android Emoji Picker", "Noto Color Emoji", sans-serif;
}

input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: #d9dbd4; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 999px; background: #d9dbd4; }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 999px; background: #454943; }
input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 2px 5px rgba(0, 0, 0, 0.22);
}
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 2px 5px rgba(0, 0, 0, 0.22); }
input[type="range"]:disabled { opacity: 0.55; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(95, 83, 207, 0.25); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(95, 83, 207, 0.25); }

.range-labels { display: flex; justify-content: space-between; margin-top: 1px; color: #a6aaa3; font-size: 8px; }

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 10px;
  padding: 3px;
  border-radius: 10px;
  background: #eeeee9;
}

.segment-button {
  min-height: 34px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  color: #8a8d87;
  background: transparent;
  font-size: 10px;
  font-weight: 730;
}

.segment-button:hover:not(:disabled) { color: var(--ink); }
.segment-button.is-selected { color: var(--ink); background: #fff; box-shadow: 0 2px 5px rgba(38, 39, 34, 0.09); }

.action-row { gap: 9px; margin-top: 21px; }
.secondary-button { padding: 0 13px; border: 1px solid var(--line); color: #62665f; background: #fff; }
.secondary-button:hover:not(:disabled) { border-color: var(--line-strong); color: var(--ink); background: var(--paper-soft); }
.download-button { flex: 1; }
.primary-button:disabled, .secondary-button:disabled { opacity: 0.4; box-shadow: none; }
.download-button[aria-busy="true"] { opacity: 0.7; }

.iphone-save-options { margin-top: 21px; }
.iphone-save-options .primary-button { width: 100%; }
.iphone-save-options [aria-busy="true"] { opacity: 0.7; }
.iphone-save-options p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.privacy-detail {
  gap: 7px;
  margin: 15px 0 0;
  color: #92968f;
  font-size: 9px;
  line-height: 1.4;
}

.privacy-detail svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--green); }

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(95, 83, 207, 0.28);
  outline-offset: 2px;
}

.benefits { padding-block: 100px 82px; }
.benefits-heading { display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 60px; align-items: end; margin-bottom: 40px; }
.benefits-heading .eyebrow { align-self: start; }
.benefits-heading h2,
.how-copy h2 { margin-bottom: 0; font-size: clamp(31px, 3.8vw, 48px); letter-spacing: -0.058em; line-height: 1.02; }
.benefits-heading h2 { max-width: 660px; }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.benefit-card {
  min-height: 218px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.benefit-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 34px;
  place-items: center;
  border-radius: 12px;
  background: var(--yellow-soft);
  color: var(--ink);
}

.benefit-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.benefit-card h3 { margin-bottom: 9px; font-size: 15px; letter-spacing: -0.025em; }
.benefit-card p { max-width: 285px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.how-it-works {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 75px;
  padding-block: 78px 96px;
  border-top: 1px solid var(--line);
}

.how-copy h2 { max-width: 440px; }
.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step:first-child { padding-top: 2px; }
.step > span { padding-top: 2px; color: #967b00; font-size: 10px; font-weight: 820; letter-spacing: 0.1em; }
.step h3 { margin-bottom: 6px; font-size: 14px; letter-spacing: -0.025em; }
.step p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.site-footer { border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.45); }
.footer-inner { min-height: 104px; justify-content: space-between; gap: 24px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 10px; }
.footer-inner nav { flex-shrink: 0; color: var(--muted); font-size: 10px; }
.footer-inner nav a { color: inherit; font-weight: 680; text-decoration: none; }
.footer-inner nav a:hover { color: var(--ink); }

.privacy-page { max-width: 760px; margin: 64px auto; padding: 0 24px; line-height: 1.7; }
.privacy-page h1 { font-size: 36px; line-height: 1.2; letter-spacing: -1px; }
.privacy-page h2 { margin-top: 28px; font-size: 20px; }
.privacy-page a { color: var(--ink); }
.privacy-page nav { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.contact-address { overflow-wrap: anywhere; font-size: 22px; font-weight: 700; }
.skip-link { position: absolute; z-index: 110; top: 8px; left: 8px; transform: translateY(-160%); padding: 12px 16px; color: var(--ink); background: var(--yellow); border-radius: 8px; }
.skip-link:focus { transform: none; }
.footer-brand { font-size: 12px; }
.footer-brand .brand-mark { width: 27px; height: 27px; border-radius: 8px; box-shadow: none; }
.footer-brand .brand-mark::before { width: 15px; height: 11px; }
.footer-brand .brand-mark span { left: 5px; right: 5px; top: 13px; height: 3px; }

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  background: #252824;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #862f2f; }
.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; }
.noscript-message { margin: 0; padding: 12px; color: #fff; background: #842f2f; text-align: center; font-size: 12px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr) 270px; gap: 35px; }
  .hero-demo { width: 260px; height: 185px; }
  .demo-photo { border-width: 6px; border-radius: 20px; }
  .demo-caption { font-size: 14px; }
  .editor-card { grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr); }
  .workflow li:not(:last-child)::after { width: 14px; margin-inline: 6px; }
  .preview-column { padding-inline: 16px; }
  .controls-column { padding-inline: 20px; }
}

@media (max-width: 820px) {
  .page-width, .header-inner, .workspace-wrap { width: min(620px, calc(100% - 28px)); }
  .header-inner { min-height: 64px; }
  .privacy-note { display: none; }
  .hero { display: block; padding-block: 37px 30px; }
  .hero-copy { max-width: 620px; }
  .hero-demo { display: none; }
  h1 { max-width: 610px; font-size: clamp(42px, 9vw, 58px); }
  .hero-description { max-width: 560px; }
  .editor-card { display: block; border-radius: 21px; }
  .editor-topbar { display: flex; min-height: 64px; justify-content: space-between; padding-inline: 14px; }
  .workflow { display: none; }
  .preview-column { padding: 15px 15px 14px; }
  .preview-frame { min-height: 390px; }
  .preview-frame canvas { max-height: 68vh; }
  .controls-column { padding: 22px 22px 18px; border-top: 1px solid var(--line); }
  .editor-card:not(.has-image) .controls-column { display: none; }
  .editor-card.has-image .controls-column { display: block; }
  .emoji-picker {
    top: auto !important;
    right: 14px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    left: 14px !important;
    width: auto !important;
    max-height: min(84dvh, 680px);
    border-radius: 19px;
    box-shadow: 0 24px 70px rgba(20, 21, 18, 0.34);
  }
  .emoji-picker::backdrop { background: rgba(17, 19, 15, 0.32); backdrop-filter: blur(2px); }
  .emoji-scroll { min-height: 110px; max-height: none; }
  .emoji-search-input { min-height: 44px; font-size: 16px; }
  .emoji-category-button { width: 44px; min-width: 44px; height: 44px; flex-basis: 44px; }
  .emoji-variants { right: 8px; bottom: 8px; left: 8px; max-height: calc(100% - 16px); border-radius: 16px; }
  .action-row { position: sticky; z-index: 20; bottom: 10px; margin: 22px -8px 0; padding: 9px; border: 1px solid rgba(208, 210, 202, 0.9); border-radius: 14px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 28px rgba(38, 40, 34, 0.15); backdrop-filter: blur(12px); }
  .benefits { padding-block: 76px 64px; }
  .benefits-heading { display: block; margin-bottom: 30px; }
  .benefits-heading .eyebrow { margin-bottom: 18px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .benefit-card { min-height: 0; }
  .benefit-icon { margin-bottom: 24px; }
  .how-it-works { display: block; padding-block: 62px 72px; }
  .how-copy { margin-bottom: 40px; }
}

@media (max-width: 520px) {
  .page-width, .header-inner, .workspace-wrap { width: calc(100% - 24px); }
  .site-header { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .header-inner { min-height: 60px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 29px; height: 29px; border-radius: 9px; }
  .header-actions { gap: 8px; }
  .theme-toggle { width: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .theme-toggle-label { display: none; }
  .header-cta { padding: 8px 12px; font-size: 10px; }
  .hero { padding-block: 31px 25px; }
  .eyebrow { margin-bottom: 14px; font-size: 9px; }
  h1 { margin-bottom: 14px; font-size: clamp(38px, 11.5vw, 49px); line-height: 0.99; }
  .hero-description { margin-bottom: 17px; font-size: 14px; line-height: 1.52; }
  .hero-points { gap: 8px 13px; font-size: 10px; }
  .editor-card { border-radius: 18px; box-shadow: 0 18px 45px rgba(39, 40, 34, 0.11); }
  .editor-topbar { min-height: 58px; padding: 9px 11px; }
  .editor-icon { width: 34px; height: 34px; border-radius: 10px; }
  .editor-identity h2 { font-size: 13px; }
  .editor-identity p { font-size: 9px; }
  .local-only { font-size: 9px; }
  .preview-column { padding: 12px; }
  .preview-header { min-height: 39px; margin-bottom: 9px; }
  .preview-column .file-name { max-width: 190px; }
  .text-button { padding: 7px; font-size: 0; }
  .text-button svg { width: 17px; height: 17px; }
  .preview-frame { min-height: 330px; border-radius: 15px; }
  .empty-state { width: calc(100% - 20px); padding: 31px 19px; border-radius: 14px; }
  .upload-icon { width: 50px; height: 50px; margin-bottom: 16px; }
  .empty-state h3 { font-size: 19px; }
  .empty-copy { max-width: 260px; margin-bottom: 20px; font-size: 11px; }
  .empty-privacy { margin-top: 16px; }
  .preview-footer { min-height: 31px; padding-top: 10px; }
  .drag-hint { font-size: 0; }
  .drag-hint svg { width: 16px; height: 16px; }
  .controls-column { padding: 19px 17px 15px; }
  .controls-heading { margin-bottom: 5px; }
  .controls-hint { max-width: 210px; }
  .reset-button { padding-inline: 7px; font-size: 9px; }
  .field-block { padding-block: 15px 14px; }
  textarea { min-height: 96px; font-size: 16px; }
  .caption-toolbar { gap: 8px; }
  .emoji-button { min-height: 38px; padding-inline: 10px; }
  .emoji-close-button { width: 44px; height: 44px; border-radius: 11px; }
  .emoji-option { min-height: 44px; font-size: 26px; }
  .emoji-variants-close { width: 44px; height: 44px; border-radius: 11px; padding: 12px; }
  .segment-button { min-height: 39px; }
  input[type="range"] { height: 28px; }
  .action-row { bottom: 8px; }
  .secondary-button { width: 46px; padding: 0; font-size: 0; }
  .secondary-button svg { width: 20px; height: 20px; }
  .primary-button, .secondary-button { min-height: 48px; }
  .privacy-detail { padding-inline: 2px; }
  .benefits { padding-block: 66px 56px; }
  .benefits-heading h2, .how-copy h2 { font-size: 34px; }
  .benefit-card { padding: 22px; }
  .how-it-works { padding-block: 54px 62px; }
  .how-copy { margin-bottom: 30px; }
  .step { grid-template-columns: 42px 1fr; gap: 10px; }
  .footer-inner { min-height: 130px; flex-wrap: wrap; align-content: center; gap: 8px 18px; }
  .footer-inner p { order: 3; width: 100%; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100% - 24px); }
}

@media (max-width: 820px) and (max-height: 620px) {
  .emoji-picker {
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 16px);
    padding: 10px;
  }
  .emoji-picker-header { margin-bottom: 7px; }
  .emoji-picker-kicker,
  .emoji-style-note { display: none; }
  .emoji-style-block { padding: 7px; }
  .emoji-style-heading { margin-bottom: 4px; }
  .emoji-style-toggle.segmented-control { margin-bottom: 0; }
  .emoji-search-block { margin-top: 7px; }
  .emoji-search-input { min-height: 40px; }
  .emoji-category-nav { margin-top: 4px; padding-bottom: 2px; }
  .emoji-category-button { width: 38px; min-width: 38px; height: 38px; flex-basis: 38px; }
  .emoji-scroll { min-height: 76px; margin-top: 4px; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f1ea;
  --ink-soft: #d5d8d0;
  --muted: #adb1a9;
  --subtle: #92978f;
  --line: #353932;
  --line-strong: #4d5249;
  --page: #11130f;
  --paper: #1b1e19;
  --paper-soft: #22251f;
  --stage: #171a16;
  --stage-deep: #0f110e;
  --yellow-soft: #393417;
  --green: #67cc91;
  --green-soft: #173a27;
  --focus: #b4aaff;
  --shadow: 0 28px 78px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 223, 67, 0.08), transparent 23rem),
    radial-gradient(circle at 92% 28%, rgba(95, 83, 207, 0.1), transparent 25rem),
    var(--page);
}

html[data-theme="dark"] .site-header {
  border-bottom-color: rgba(63, 68, 60, 0.88);
  background: rgba(17, 19, 15, 0.88);
}

html[data-theme="dark"] .header-cta {
  border-color: var(--yellow);
  color: var(--on-yellow);
  background: var(--yellow);
}

html[data-theme="dark"] .header-cta:hover { background: var(--yellow-hover); }
html[data-theme="dark"] .eyebrow { color: #d8bc3d; }
html[data-theme="dark"] .eyebrow > span { background: #c6a61d; }
html[data-theme="dark"] .demo-photo { border-color: #30342e; box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42); }
html[data-theme="dark"] .editor-card { border-color: #393d36; }
html[data-theme="dark"] .editor-card:not(.has-image) .field-block,
html[data-theme="dark"] .editor-card:not(.has-image) .action-row { opacity: 0.66; }
html[data-theme="dark"] .editor-card:not(.has-image) input[type="range"]:disabled { opacity: 0.72; }
html[data-theme="dark"] .workflow li { color: #7f857b; }
html[data-theme="dark"] .workflow li.is-active { color: var(--ink); }
html[data-theme="dark"] .workflow li.is-complete:not(:last-child)::after { background: #447a59; }
html[data-theme="dark"] .controls-heading .section-label { color: #b8bcb4; }
html[data-theme="dark"] .reset-button:hover:not(:disabled) { background: #2c3029; }
html[data-theme="dark"] .field-block { border-bottom-color: #2e322c; }
html[data-theme="dark"] .value-pill { color: #babeb6; background: #292d27; }
html[data-theme="dark"] textarea::placeholder { color: #737970; }
html[data-theme="dark"] textarea:focus { border-color: var(--yellow); background: #252922; }
html[data-theme="dark"] textarea:disabled { background: #1e211c; }
html[data-theme="dark"] .field-help,
html[data-theme="dark"] .range-labels { color: #7e847a; }
html[data-theme="dark"] .emoji-button,
html[data-theme="dark"] .emoji-close-button { background: #232720; }
html[data-theme="dark"] .emoji-button:hover:not(:disabled),
html[data-theme="dark"] .emoji-button[aria-expanded="true"],
html[data-theme="dark"] .emoji-close-button:hover { background: var(--yellow-soft); }
html[data-theme="dark"] .emoji-picker { border-color: #393d36; box-shadow: 0 22px 55px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .emoji-picker-kicker { color: #d8bc3d; }
html[data-theme="dark"] .emoji-style-block { border-color: #30342e; }
html[data-theme="dark"] .emoji-search-input { border-color: #393d36; background: #22251f; }
html[data-theme="dark"] .emoji-search-input:focus { border-color: var(--yellow); background: #252922; }
html[data-theme="dark"] .emoji-category-button:hover { border-color: #42473f; background: #272b25; }
html[data-theme="dark"] .emoji-category-button.is-selected,
html[data-theme="dark"] .emoji-category-button[aria-pressed="true"] { border-color: #716727; background: var(--yellow-soft); }
html[data-theme="dark"] .emoji-results-heading { background: var(--paper); }
html[data-theme="dark"] .emoji-picker-state { border-color: #30342e; }
html[data-theme="dark"] .emoji-state-icon,
html[data-theme="dark"] .emoji-retry-button,
html[data-theme="dark"] .emoji-load-more { background: #252922; }
html[data-theme="dark"] .emoji-error-state { border-color: #5a3434; background: #2b2020; }
html[data-theme="dark"] .emoji-error-state .emoji-state-icon { color: #e49191; }
html[data-theme="dark"] .emoji-variants { border-color: #464b42; box-shadow: 0 22px 58px rgba(0, 0, 0, 0.58); }
html[data-theme="dark"] .emoji-variants-kicker { color: #d8bc3d; }
html[data-theme="dark"] .emoji-variants-close { background: #232720; }
html[data-theme="dark"] .emoji-option:hover { border-color: #42473f; background: #2c3029; }
html[data-theme="dark"] input[type="range"]::-webkit-slider-runnable-track { background: #3a3f37; }
html[data-theme="dark"] input[type="range"]::-moz-range-track { background: #3a3f37; }
html[data-theme="dark"] input[type="range"]::-moz-range-progress { background: var(--yellow); }
html[data-theme="dark"] input[type="range"]::-webkit-slider-thumb {
  border-color: var(--paper);
  background: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow), 0 2px 5px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] input[type="range"]::-moz-range-thumb {
  border-color: var(--paper);
  background: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow), 0 2px 5px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .segmented-control { background: #252922; }
html[data-theme="dark"] .segment-button { color: #92988f; }
html[data-theme="dark"] .segment-button.is-selected { color: var(--ink); background: #353a32; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .secondary-button { color: #c9ccc4; background: #232720; }
html[data-theme="dark"] .benefit-card { background: rgba(30, 33, 28, 0.74); }
html[data-theme="dark"] .step > span { color: #d8bb36; }
html[data-theme="dark"] .site-footer { background: rgba(24, 27, 22, 0.72); }
html[data-theme="dark"] .action-row {
  border-color: rgba(69, 74, 65, 0.94);
  background: rgba(27, 30, 25, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.36);
}
html[data-theme="dark"] .toast { border-color: rgba(255, 255, 255, 0.16); background: #31352e; }
html[data-theme="dark"] .toast.is-error { background: #862f2f; }

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