:root {
  --paper: #f7f5ef;
  --paper-strong: #fffdf8;
  --ink: #111827;
  --muted: #68707c;
  --line: #ded8ca;
  --teal: #14877f;
  --teal-dark: #0f5f5b;
  --coral: #ef6a4d;
  --violet: #6d5df6;
  --shadow: 0 22px 70px rgba(31, 41, 55, 0.14);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
}

body {
  min-height: 100%;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

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

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell {
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(20, 135, 127, 0.13), transparent 28%),
    linear-gradient(315deg, rgba(239, 106, 77, 0.13), transparent 28%),
    var(--paper);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto 22px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper-strong);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.22);
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.nav-actions a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.auth-topbar {
  width: 100%;
  margin-bottom: clamp(18px, 4vh, 42px);
}

.auth-layout {
  display: grid;
  width: 100%;
  max-width: 1180px;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.62fr);
  gap: 18px;
  margin: 0 auto;
  align-items: stretch;
}

.auth-hero {
  display: flex;
  min-height: 620px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(17, 24, 39, 0.09);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.97), rgba(255, 253, 248, 0.78)),
    repeating-linear-gradient(90deg, rgba(17, 24, 39, 0.04) 0 1px, transparent 1px 34px);
  box-shadow: var(--shadow);
  padding: clamp(26px, 4vw, 44px);
}

.auth-hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 0.94;
  letter-spacing: 0;
}

.auth-hero-copy p {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.auth-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.auth-proof-grid div {
  min-height: 112px;
  border-left: 3px solid var(--teal);
  background: rgba(20, 135, 127, 0.08);
  padding: 15px;
}

.auth-proof-grid strong,
.auth-proof-grid span {
  display: block;
}

.auth-proof-grid strong {
  font-size: 13px;
  text-transform: uppercase;
}

.auth-proof-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-card {
  display: grid;
  align-items: center;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr) minmax(260px, 0.72fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: stretch;
}

.intro-panel,
.builder-panel,
.preview-panel,
.output-card {
  border: 1px solid rgba(17, 24, 39, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.intro-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.78)),
    repeating-linear-gradient(90deg, rgba(17, 24, 39, 0.04) 0 1px, transparent 1px 34px);
}

.intro-copy h1 {
  max-width: 470px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.93;
  letter-spacing: 0;
}

.intro-copy p {
  max-width: 420px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.signal-grid {
  display: grid;
  gap: 10px;
}

.signal-grid div {
  padding: 15px;
  border-left: 3px solid var(--teal);
  background: rgba(20, 135, 127, 0.08);
}

.signal-grid strong,
.signal-grid span {
  display: block;
}

.signal-grid strong {
  font-size: 13px;
  text-transform: uppercase;
}

.signal-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.builder-panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-heading h2,
.output-copy h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.panel-heading p,
.output-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.step-pill,
.result-id {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.builder-form {
  display: grid;
  gap: 16px;
}

.dropzone {
  display: grid;
  min-height: 176px;
  place-items: center;
  padding: 22px;
  border: 1.5px dashed rgba(17, 24, 39, 0.25);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 135, 127, 0.08), rgba(255, 253, 248, 0.8));
  text-align: center;
  cursor: pointer;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
}

.dropzone strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone small {
  max-width: 310px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-row,
.control-strip,
.compression-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.control-strip {
  grid-template-columns: 1fr 0.9fr 74px;
  align-items: end;
}

.compression-strip {
  align-items: end;
  border: 1px solid rgba(20, 135, 127, 0.14);
  border-radius: var(--radius);
  background: rgba(20, 135, 127, 0.06);
  padding: 12px;
}

.compression-strip small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input[type="file"],
input[type="text"],
input:not([type]),
select {
  width: 100%;
}

input:not([type="checkbox"]):not([type="color"]):not([type="file"]),
select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

input[type="file"] {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.file-control {
  cursor: pointer;
}

.file-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-control strong {
  display: flex;
  min-height: 44px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input[type="color"] {
  width: 58px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  padding: 3px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: relative;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: #cfc8ba;
}

.switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.2);
  content: "";
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--teal);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.primary-action {
  width: 100%;
  background: var(--ink);
  color: white;
  box-shadow: 0 16px 35px rgba(17, 24, 39, 0.23);
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-action {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 0 14px;
}

.form-error {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.form-note {
  margin: -2px 0 0;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.preview-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 24px;
}

.phone-shell {
  width: min(100%, 250px);
  aspect-ratio: 9 / 18.5;
  margin: 0 auto;
  border: 8px solid #141923;
  border-radius: 34px;
  background: #141923;
  box-shadow: 0 26px 60px rgba(17, 24, 39, 0.26);
  overflow: hidden;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
}

.phone-screen video,
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-preview,
.audio-preview {
  display: grid;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.empty-preview svg,
.audio-preview svg {
  width: 46px;
  height: 46px;
}

.audio-preview + audio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.preview-caption {
  text-align: center;
}

.preview-caption strong,
.preview-caption span {
  display: block;
}

.preview-caption span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.output-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 1180px;
  margin: 18px auto 0;
  align-items: stretch;
}

.auth-band {
  max-width: 1180px;
  margin: 18px auto 0;
}

.auth-panel,
.history-panel {
  border: 1px solid rgba(17, 24, 39, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.login-panel {
  min-height: 560px;
  align-content: center;
  grid-template-columns: 1fr;
  padding: clamp(24px, 4vw, 34px);
}

.login-panel .auth-grid {
  grid-template-columns: 1fr;
}

.login-panel .secondary-action {
  width: 100%;
}

.login-panel label {
  display: block;
}

.auth-panel h2,
.history-panel h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.auth-panel p,
.history-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.output-copy {
  padding: 22px 0;
}

.output-card {
  min-height: 226px;
  padding: 22px;
}

.empty-output {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

.empty-output svg {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  color: var(--teal);
}

.empty-output strong {
  color: var(--ink);
}

.empty-output span {
  margin-top: 5px;
  font-size: 14px;
}

.result-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  align-items: center;
}

.qr-box {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  text-decoration: none;
}

.qr-box svg {
  width: 174px;
  height: 174px;
  stroke: none;
}

.qr-fallback {
  padding: 18px;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.result-details h3 {
  margin: 5px 0 8px;
  font-size: 28px;
}

.result-details p {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.history-panel {
  margin-top: 24px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  padding: 12px;
}

.history-row strong,
.history-row span {
  display: block;
}

.history-row strong {
  color: var(--ink);
  font-size: 14px;
}

.history-row span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.history-actions {
  display: flex;
  gap: 8px;
}

.danger-action {
  color: #b42318;
}

.flyer-maker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.flyer-controls {
  display: grid;
  gap: 16px;
  align-content: start;
}

.flyer-controls h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
}

.flyer-controls p {
  max-width: 470px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.flyer-fields {
  grid-template-columns: 1fr 1fr;
}

.theme-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-swatch {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.theme-swatch.is-active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal);
}

.theme-dot.night {
  background: var(--violet);
}

.theme-dot.pop {
  background: var(--coral);
}

.theme-dot.flame {
  background: #d5381f;
}

.theme-dot.golden {
  background: #f5c400;
}

.theme-dot.pizza {
  background: #1f8a4c;
}

.theme-dot.slice {
  background: #1d4ed8;
}

.flyer-preview-wrap {
  display: grid;
  place-items: center;
}

.flyer-preview {
  position: relative;
  display: flex;
  width: min(100%, 270px);
  aspect-ratio: 4 / 5;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
  padding: 22px;
}

.flyer-preview::before {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: var(--teal);
  content: "";
}

.flyer-preview::after {
  position: absolute;
  right: -58px;
  bottom: -72px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(20, 135, 127, 0.13);
  content: "";
}

.flyer-topline,
.flyer-bottom,
.flyer-code {
  position: relative;
  z-index: 1;
}

.flyer-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.flyer-brand-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.flyer-logo-text,
.flyer-logo-image {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.flyer-logo-text {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.flyer-logo-image {
  object-fit: contain;
  background: white;
}

.flyer-brand-lockup span:last-child {
  max-width: 108px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flyer-preview h4 {
  position: relative;
  z-index: 1;
  margin: 26px 0 0;
  color: var(--ink);
  font-size: 38px;
  line-height: 0.95;
}

.flyer-preview p {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.flyer-bottom {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 12px;
  align-items: end;
  margin-top: auto;
}

.flyer-code {
  border-radius: 8px;
  background: rgba(20, 135, 127, 0.08);
  padding: 12px;
}

.flyer-code span,
.flyer-preview small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.flyer-code strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flyer-qr {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 8px;
  background: white;
}

.flyer-qr svg {
  width: 82px;
  height: 82px;
  stroke: none;
}

.flyer-preview small {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

.flyer-preview.theme-night {
  background: #f7f5ef;
}

.flyer-preview.theme-night::before {
  background: var(--violet);
}

.flyer-preview.theme-night::after {
  background: rgba(109, 93, 246, 0.14);
}

.flyer-preview.theme-night .flyer-code {
  background: rgba(109, 93, 246, 0.1);
}

.flyer-preview.theme-pop::before {
  background: var(--coral);
}

.flyer-preview.theme-pop::after {
  background: rgba(239, 106, 77, 0.15);
}

.flyer-preview.theme-pop .flyer-code {
  background: rgba(239, 106, 77, 0.1);
}

.flyer-preview.theme-flame {
  background: #fff3cf;
}

.flyer-preview.theme-flame::before {
  background: #d5381f;
  height: 16px;
}

.flyer-preview.theme-flame::after {
  background: rgba(255, 184, 77, 0.38);
}

.flyer-preview.theme-flame .flyer-code {
  background: #ffd477;
}

.flyer-preview.theme-golden {
  background: #fff8d7;
}

.flyer-preview.theme-golden::before {
  height: 18px;
  background: #cf1f1f;
}

.flyer-preview.theme-golden::after {
  background: rgba(255, 215, 26, 0.42);
}

.flyer-preview.theme-golden .flyer-code {
  background: #ffe879;
}

.flyer-preview.theme-pizza {
  background: #fffaf0;
}

.flyer-preview.theme-pizza::before {
  height: 13px;
  background: #0f7a43;
}

.flyer-preview.theme-pizza::after {
  background: rgba(196, 43, 35, 0.24);
}

.flyer-preview.theme-pizza .flyer-code {
  background: #e7f5df;
}

.flyer-preview.theme-slice {
  background: #fbfdff;
}

.flyer-preview.theme-slice::before {
  height: 14px;
  background: #1d4ed8;
}

.flyer-preview.theme-slice::after {
  background: rgba(220, 38, 38, 0.2);
}

.flyer-preview.theme-slice .flyer-code {
  background: #e8f0ff;
}

.prank-stage {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  place-items: center;
  overflow: hidden;
  background: #020617;
}

.prank-media-frame {
  display: grid;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  place-items: center;
}

.prank-media-frame.has-meme-text {
  height: 100%;
}

.prank-media {
  width: 100%;
  height: 100%;
}

.prank-stage.is-concealed .prank-media-frame,
.prank-stage.is-concealed .meme-text,
.prank-stage.is-concealed .audio-only-stage {
  opacity: 0;
  visibility: hidden;
}

.meme-text {
  position: relative;
  z-index: 3;
  width: 100vw;
  background: #ffffff;
  color: #050505;
  padding: clamp(10px, 2.2vh, 24px) 14px;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(28px, 7vw, 72px);
  line-height: 0.95;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.08);
}

.tap-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  border: 0;
  background: inherit;
  color: white;
  cursor: pointer;
}

.tap-overlay.is-visible {
  display: grid;
}

.tap-overlay span {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.48);
  padding: 0 22px;
  color: white;
  font-size: 16px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.media-error {
  position: fixed;
  inset: auto 18px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #b42318;
  padding: 14px 16px;
  font-weight: 800;
  text-align: center;
}

.error-stage .media-error {
  position: static;
}

.audio-only-stage {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(239, 106, 77, 0.35), transparent 28%),
    radial-gradient(circle at 70% 70%, rgba(20, 135, 127, 0.42), transparent 32%),
    #020617;
}

.pulse-ring {
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}

.pulse-ring.small {
  position: absolute;
  width: 120px;
  height: 120px;
  animation-delay: 0.35s;
}

.loading-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@media (max-width: 1020px) {
  .workspace,
  .output-band,
  .auth-panel,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: auto;
    gap: 34px;
  }

  .auth-actions {
    justify-content: flex-start;
  }

  .intro-panel {
    min-height: auto;
    gap: 26px;
  }

  .preview-panel {
    min-height: 460px;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .nav-actions {
    display: none;
  }

  .intro-panel,
  .builder-panel,
  .preview-panel,
  .output-card {
    padding: 18px;
  }

  .intro-copy h1 {
    font-size: 42px;
  }

  .field-row,
  .control-strip,
  .compression-strip,
  .result-layout,
  .auth-grid,
  .auth-proof-grid,
  .history-row,
  .flyer-maker,
  .flyer-fields {
    grid-template-columns: 1fr;
  }

  .auth-hero-copy h1 {
    font-size: 42px;
  }

  .login-panel {
    min-height: auto;
  }

  .control-strip {
    align-items: stretch;
  }

  .result-actions {
    display: grid;
  }

  .secondary-action {
    width: 100%;
  }

  .history-actions,
  .auth-actions {
    display: grid;
    width: 100%;
  }

  .flyer-preview {
    width: min(100%, 310px);
  }
}

@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;
  }
}
