@property --shine-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --stage: #07080b;
  --surface: #101218;
  --surface-2: #161922;
  --ink: #f2efe8;
  --muted: #8f8a82;
  --accent: #e4573d;
  --accent-ink: #fff;
  --line: rgba(242, 239, 232, 0.08);
  --line-strong: rgba(242, 239, 232, 0.16);
  --field: #12151c;
  --shine-a: rgba(255, 236, 220, 0.55);
  --shine-b: rgba(228, 87, 61, 0.55);
  --shine-c: rgba(150, 170, 255, 0.42);
  --shine-d: rgba(255, 255, 255, 0.18);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --ambient: radial-gradient(ellipse 70% 45% at 50% -8%, rgba(228, 87, 61, 0.1), transparent 55%);
  --frame: #0a0b0f;
  --glass: rgba(7, 8, 11, 0.62);
  --check-panel: #2c3038;
  --notice-bg: rgba(214, 164, 74, 0.16);
  --notice-ink: #f4e6c4;
  --notice-block-bg: rgba(214, 120, 74, 0.28);
  --text: 1rem;
  --text-sm: 0.875rem;
  --text-lg: 1.0625rem;
  --leading: 1.45;
}

[data-theme="light"] {
  color-scheme: light;
  --stage: #ece8e0;
  --surface: #f5f2eb;
  --surface-2: #ffffff;
  --ink: #16181f;
  --muted: #6b6570;
  --accent: #c83a2c;
  --accent-ink: #fff;
  --line: rgba(22, 24, 31, 0.09);
  --line-strong: rgba(22, 24, 31, 0.16);
  --field: #ffffff;
  --shine-a: rgba(255, 255, 255, 0.95);
  --shine-b: rgba(200, 58, 44, 0.45);
  --shine-c: rgba(100, 130, 210, 0.4);
  --shine-d: rgba(255, 210, 180, 0.55);
  --shadow: 0 16px 36px rgba(40, 30, 20, 0.08);
  --ambient: radial-gradient(ellipse 70% 45% at 50% -8%, rgba(200, 58, 44, 0.08), transparent 55%);
  --frame: #e4dfd6;
  --glass: rgba(236, 232, 224, 0.7);
  --check-panel: #f4f1ea;
  --notice-bg: #f6e4bc;
  --notice-ink: #3d2c12;
  --notice-block-bg: #f3d0b0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--stage);
  color: var(--ink);
  font-family: "Golos Text", system-ui, sans-serif;
  font-size: var(--text);
  line-height: var(--leading);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

/* Hidden tips must not widen the page. A box only exists while a tip is showing. */
html {
  overflow-x: clip;
}

body {
  position: relative;
  overflow-x: hidden;
  padding-top: var(--site-top-offset, 78px);
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--ambient);
  z-index: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 72px);
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 20px 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  min-width: 0;
}

.brand h1,
.brand-name {
  font-family: Unbounded, "Golos Text", sans-serif;
  font-size: clamp(1.55rem, 4.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 1.05;
  color: var(--ink);
  display: block;
}

a.brand-home {
  color: inherit;
  text-decoration: none;
}

.by {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.3;
}

.lead {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: var(--leading);
  color: var(--muted);
}

.service-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.45;
  text-align: center;
}

.service-banner {
  margin: 0;
  padding: 8px 28px 10px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--notice-bg), var(--notice-bg)),
    var(--stage);
  color: var(--notice-ink);
  font-size: var(--text-sm);
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

html.has-service-banner .service-banner {
  position: fixed;
  top: var(--site-header-height, 78px);
  left: 0;
  right: 0;
  z-index: 39;
}

.service-banner.is-blocked {
  background:
    linear-gradient(var(--notice-block-bg), var(--notice-block-bg)),
    var(--stage);
}

.pay-return {
  display: none;
  flex-direction: column;
  gap: 10px;
  max-width: 36rem;
  margin: 24px auto 8px;
  padding: 22px 22px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.pay-return h2 {
  margin: 0;
  font-family: Unbounded, "Golos Text", sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.pay-return p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lg);
}

.pay-return-to {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pay-return-to[hidden] {
  display: none !important;
}

html[data-pay-return="ok"] #payReturnOk,
html[data-pay-return="fail"] #payReturnFail,
html[data-studio-pay="ok"] #payReturnOk,
html[data-studio-pay="fail"] #payReturnFail,
html[data-studio-pay="sent"] #mailSent {
  display: flex;
}

html[data-studio-pay] .pay-return {
  margin: 0 auto;
  scroll-margin-top: 88px;
}

.pay-return-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-top: 4px;
}

.pay-return-actions .cta {
  align-self: center;
}

a.prepaid-download {
  align-self: stretch;
  width: 100%;
  margin-top: 4px;
  text-decoration: none;
}

a.prepaid-download[hidden] {
  display: none !important;
}

.pay-return-count {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

html[data-studio-pay] .pay-return-actions,
.pay-return-actions[hidden] {
  display: none;
}

html[data-pay-return] .lead,
html[data-pay-return] .service-note,
html[data-pay-return] .showcase,
html[data-pay-return] .canvas,
html[data-pay-return] .prompt-bar,
html[data-pay-return] .ultra-row,
html[data-pay-return] .ultra-hint,
html[data-pay-return] .upload-hint,
html[data-pay-return] .unlock,
html[data-pay-return] .captcha-modal,
html[data-pay-return] .captcha-box,
html[data-pay-return] .status,
html[data-pay-return] .foot {
  display: none !important;
}

.theme-toggle {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle:active { transform: scale(0.96); }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon {
  display: block;
}

[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }

.showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: stretch;
}

body.has-result .showcase,
body.has-result .lead {
  display: none;
}

.shot {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 4 / 3;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.shot.is-live {
  aspect-ratio: auto;
}

.shot.is-live::before {
  content: "";
  display: block;
  padding-top: 75%;
}

.shot.is-live img {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s ease, filter 0.3s ease;
}

.shot.is-live img.is-shown {
  opacity: 1;
  z-index: 1;
}

.shot:hover img {
  transform: scale(1.045);
  filter: brightness(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .shot.is-live img {
    transition: none;
  }
}

.canvas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.canvas-frame {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  background: var(--frame);
  border: 1px solid var(--line);
}

.canvas-frame[hidden] {
  display: none !important;
}

.canvas-atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.canvas-atmosphere[hidden] { display: none !important; }

.canvas-wash {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(ellipse 55% 45% at 28% 38%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 68%),
    radial-gradient(ellipse 50% 42% at 74% 62%, color-mix(in srgb, var(--shine-c) 50%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 36% at 52% 78%, color-mix(in srgb, var(--shine-d) 36%, transparent), transparent 72%),
    var(--frame);
}

.canvas-source {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.14);
  filter: blur(22px) saturate(1.08) brightness(0.55);
}

.canvas-source[hidden] { display: none !important; }

[data-theme="light"] .canvas-source {
  filter: blur(22px) saturate(1.05) brightness(0.94);
}

.canvas-loading {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: min(28rem, 88%);
  margin: 16px;
  padding: 18px 20px 16px;
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
  background: color-mix(in srgb, var(--frame) 68%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.canvas-loading[hidden] { display: none !important; }

.canvas-stage {
  margin: 0;
  color: var(--ink);
  font-size: var(--text);
  font-weight: 600;
  transition: opacity 0.16s ease;
}

.canvas-stage.is-out { opacity: 0; }

.canvas-prompt {
  margin: 0;
  max-width: 24rem;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.canvas-prompt[hidden] { display: none !important; }

.pulse {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
}

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

@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: spin 0.9s linear infinite; }

  .canvas.is-loading:not(.has-source) .canvas-wash {
    animation: wash-drift 9s ease-in-out infinite alternate;
  }

  .canvas.is-loading .canvas-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
      110deg,
      transparent 25%,
      color-mix(in srgb, var(--ink) 5%, transparent) 45%,
      transparent 65%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -80% 0; }
}

@keyframes wash-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}

.preview-hold {
  position: relative;
  width: 100%;
  z-index: 2;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.preview-hold:has(> .preview.hidden) {
  display: none;
}

.preview {
  width: 100%;
  display: block;
  max-height: min(72vh, 620px);
  object-fit: contain;
  background: #000;
  animation: fade-in 0.4s ease both;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Covers the picture so the menu is not Save image / Open image in a new tab. */
.preview-guard {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(transparent, transparent);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.unlock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.unlock-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unlock-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: var(--text);
  font-weight: 600;
  color: var(--ink);
}

.unlock-free {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
}

.unlock-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: 1.4;
}

body.send-next .unlock {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.consent-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 102px;
  margin: 0;
  padding: 16px 18px 16px 22px;
  border-radius: 12px;
  background: var(--check-panel);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  box-sizing: border-box;
}

.consent-row.hidden { display: none !important; }

.consent-row input {
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
  cursor: pointer;
}

.consent-row p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.consent-row a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.captcha-box {
  min-height: 102px;
  width: 100%;
  display: flex;
  border-radius: 12px;
  overflow: hidden;
}

.captcha-box iframe {
  width: 100%;
  min-height: 102px;
  border: 0;
  outline: none;
  /* The checkbox page never sets color-scheme, so it stays light.
     This page is often dark. When those disagree, the browser fills
     the iframe canvas with white, which shows in the rounded corners.
     Pinning the frame to light makes the schemes agree and that canvas
     transparent. Widget colors come from the Cloud style, not from this. */
  color-scheme: light;
}

.captcha-box.hidden {
  display: none;
}

.captcha-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: calc(100% - 32px);
  color: var(--ink);
}

.captcha-modal::backdrop {
  background: color-mix(in srgb, #000 55%, transparent);
}

.captcha-modal-card {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.captcha-modal-title {
  margin: 0;
  font-size: var(--text);
  font-weight: 600;
}

.captcha-modal .cta-secondary {
  align-self: flex-end;
}

.unlock-send {
  align-self: flex-end;
  min-width: 11rem;
}

.unlock-send .cta {
  width: 100%;
  padding-inline: 18px;
}

.prompt-bar {
  /* One text line plus the field's vertical padding. 48px is the floor so
     the 44px controls keep a 10px margin, matching the 10px side padding. */
  --composer-row: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "attach text go";
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 4;
  transition: height 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
}

/* A textarea's intrinsic height (rows, font metrics, field-sizing) is taller
   on some engines. That extra height is the bar, and the controls end up
   centered in it. The resting row is one line, on every system. */
.prompt-bar:not(.is-stacked) {
  --composer-row: max(48px, calc(1.4em + 24px));
  grid-template-rows: var(--composer-row);
}

.prompt-bar.is-stacked {
  grid-template-areas:
    "text text text"
    "attach . go";
  grid-template-rows: auto auto;
  padding-bottom: 10px;
}

.prompt-bar.is-coaching .upload,
.prompt-bar.is-coaching textarea {
  border-radius: 12px;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* One pixel tighter, so the prompt frame lands on the attachment frame
   instead of sitting beside it and doubling the shared edge. */
.prompt-bar.is-coaching textarea {
  outline-offset: 2px;
}

.hint :disabled {
  pointer-events: none;
}

.attach .hint:not(.detach) {
  display: block;
  width: 44px;
  height: 44px;
}

.hint {
  position: relative;
}

.hint::after {
  content: none;
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 15rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--stage);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.hint:hover::after,
.hint:focus-within::after,
.hint.is-pinned::after {
  content: attr(data-hint);
  opacity: 1;
  visibility: visible;
}

.hint-prompt:focus-within:not(.is-pinned)::after {
  content: none;
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 640px) {
  .hint:hover:not(.is-pinned)::after,
  .hint:focus-within:not(.is-pinned)::after {
    content: none;
    opacity: 0;
    visibility: hidden;
  }

  .prompt-bar.is-stacked .attach .hint.is-pinned::after {
    left: 0;
    right: auto;
    bottom: auto;
    top: calc(100% + 8px);
    transform: none;
    max-width: min(15rem, calc(100vw - 56px));
    text-align: left;
  }
}

.hint-below::after {
  bottom: auto;
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  transform: none;
}

.hint-below:focus-within:not(:hover):not(:focus-visible)::after {
  content: none;
  opacity: 0;
  visibility: hidden;
}

.hint-go {
  grid-area: go;
  display: flex;
  align-self: center;
  justify-self: end;
}

.prompt-bar.is-coaching .hint-go::after {
  content: none;
  opacity: 0;
  visibility: hidden;
}

.prompt-bar.is-resizing {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .prompt-bar {
    transition: border-color 0.2s ease;
  }
}

.prompt-bar.hot {
  border-color: var(--line-strong);
}

.shine {
  --shine-angle: 0deg;
  position: relative;
  isolation: isolate;
}

.shine > * {
  position: relative;
  z-index: 1;
}

.shine::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  z-index: 0;
  background: conic-gradient(
    from var(--shine-angle),
    transparent 0deg,
    var(--shine-d) 40deg,
    transparent 75deg,
    var(--shine-b) 130deg,
    transparent 170deg,
    var(--shine-c) 230deg,
    transparent 275deg,
    var(--shine-a) 320deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.2;
  transition: opacity 0.7s ease;
}

.shine:hover::before,
.shine:focus-within::before,
.shine.hot::before {
  opacity: 0.9;
}

@media (prefers-reduced-motion: no-preference) {
  .shine:hover::before,
  .shine:focus-within::before,
  .shine.hot::before {
    animation: shine-drift 14s linear infinite;
  }
}

@keyframes shine-drift {
  to { --shine-angle: 360deg; }
}

.attach {
  position: relative;
  grid-area: attach;
  width: 44px;
  height: 44px;
  align-self: center;
  justify-self: start;
}

.upload {
  appearance: none;
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.2s ease;
}

.upload:hover { border-color: var(--line-strong); }

.upload:disabled {
  opacity: 0.55;
  cursor: wait;
}

.upload:disabled:hover {
  border-color: var(--line);
}

.upload:disabled:hover .upload-icon {
  color: var(--muted);
}

.attach:has(.upload:disabled) {
  cursor: wait;
}

.upload.has-file {
  border-color: var(--line-strong);
}

.upload.has-file:disabled,
.upload.has-file:disabled:hover {
  border-color: var(--line-strong);
}

.upload-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
  line-height: 0;
  z-index: 0;
}

.upload .icon {
  width: 22px;
  height: 22px;
}

.upload:hover .upload-icon {
  color: var(--ink);
}

.upload-thumb {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
}

.upload-thumb[hidden] {
  display: none !important;
}

.detach {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.detach::before {
  content: "";
  position: absolute;
  inset: -8px;
}

.detach .icon {
  width: 12px;
  height: 12px;
}

.detach:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.detach:disabled,
.detach:disabled:hover {
  opacity: 0.55;
  cursor: wait;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.detach[hidden] {
  display: none !important;
}

.hint-prompt {
  grid-area: text;
  display: block;
  align-self: center;
  min-width: 0;
  /* The default min-size is the textarea's intrinsic height, which is what
     stretches the row on the engines where that height is too tall. */
  min-height: 0;
}

.prompt-bar:not(.is-stacked) .hint-prompt {
  align-self: stretch;
  max-height: var(--composer-row);
}

.prompt-bar textarea {
  appearance: none;
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  margin: 0;
  min-height: 48px;
  max-height: 168px;
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 12px 8px;
  font: inherit;
  line-height: 1.4;
  resize: none;
  overflow-y: auto;
  outline: none;
  /* Content sizing adds a phantom line on some engines and ignores a fixed
     height on others. The script sizes the stacked field; the resting row
     is the locked line above. */
  field-sizing: fixed;
}

.prompt-bar:not(.is-stacked) textarea {
  height: var(--composer-row);
  min-height: 0;
  max-height: var(--composer-row);
  overflow: hidden;
}

.prompt-bar .cta {
  align-self: center;
  justify-self: end;
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
}

.prompt-measure {
  position: fixed;
  left: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  z-index: -1;
}

.prompt-bar textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 88%, transparent);
}

.prompt-bar textarea:disabled {
  opacity: 0.55;
  cursor: wait;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

.field {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.7s ease;
}

.field:focus-within,
.field.shine.hot {
  border-color: transparent;
}

.field.shine.hot {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 42%, transparent);
}

.field input[type="email"] {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  position: relative;
  z-index: 1;
}

.field input[type="email"]::placeholder {
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}

.cta {
  appearance: none;
  position: relative;
  z-index: 1;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: var(--text);
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  align-self: stretch;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, filter 0.2s ease, opacity 0.2s ease;
}

.cta:hover:not(:disabled):not(.is-idle) { filter: brightness(1.06); }
.cta:active:not(:disabled):not(.is-idle) { transform: scale(0.985); }
.cta:disabled,
.cta.is-idle {
  opacity: 0.55;
  cursor: default;
}
.cta.is-idle { cursor: pointer; }
.cta.is-running:disabled {
  cursor: wait;
}

.cta-secondary {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
}

.ultra-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 12px 4px 0;
  color: var(--ink);
  font-size: var(--text-sm);
  cursor: pointer;
}

.ultra-row input {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.ultra-row:has(input:disabled) {
  opacity: 0.55;
  cursor: wait;
}

.ultra-row input:disabled {
  cursor: wait;
}

.ultra-hint {
  margin: 4px 4px 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.upload-hint {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

body.has-result .upload-hint {
  display: none;
}

.status {
  min-height: 1.25em;
  color: var(--muted);
  margin: 0;
  font-size: var(--text-sm);
}

.status.is-notice {
  color: var(--ink);
  font-weight: 600;
  font-size: var(--text);
}

.hidden { display: none !important; }

.foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.4;
  padding-top: 8px;
  text-align: center;
}

.foot-note,
.foot-links {
  margin: 0;
}

.foot a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.foot a:hover {
  border-bottom-color: color-mix(in srgb, var(--ink) 40%, transparent);
}

.foot-links {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.legal-note {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
}

.legal-note a,
.foot .legal-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  border-bottom: 0;
}

.legal-stage {
  max-width: 760px;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  font-size: var(--text-sm);
}

.legal-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.legal h1 {
  margin: 0 0 0.75rem;
  font-family: Unbounded, "Golos Text", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.legal h2 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}

.legal p,
.legal li {
  margin: 0 0 0.75rem;
}

.legal ul,
.legal ol {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.legal a {
  color: var(--accent);
}

.legal hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.legal-table {
  overflow-x: auto;
  margin: 0 0 1rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.legal th,
.legal td {
  border: 1px solid var(--line-strong);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}

.legal th {
  font-weight: 600;
}

html.has-cookie-banner body {
  padding-bottom: var(--cookie-banner-space, 0px);
}

.cookie-banner {
  position: fixed;
  z-index: 60;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 420px;
  margin-right: auto;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--accent);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow);
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.cookie-banner.is-in {
  opacity: 1;
  transform: none;
}

.cookie-banner-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cookie-banner-text {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.cookie-banner-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-close {
  appearance: none;
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.cookie-banner-close:hover {
  color: var(--ink);
  background: var(--line);
}

.cookie-banner .cta {
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
}

@media (min-width: 600px) {
  .cookie-banner {
    left: 24px;
    right: auto;
    bottom: max(24px, env(safe-area-inset-bottom));
    width: min(420px, calc(100vw - 48px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
    transform: none;
  }
}

@media print {
  .cookie-banner { display: none !important; }
  .service-banner { display: none !important; }
  .site-header { position: static; }
  body { padding-top: 0; }
}

@media (max-width: 640px) {
  .showcase {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .prompt-bar {
    grid-template-areas:
      "text text text"
      "attach . go";
    border-radius: 16px;
    padding-bottom: 10px;
  }

  .unlock-send {
    align-self: stretch;
  }
}

@media (max-width: 420px) {
  .stage { padding-top: 24px; }
  .brand h1 { font-size: 1.5rem; }
  .site-header-inner { padding: 10px 16px; }
  .service-banner { padding: 8px 16px 10px; }
}
