:root {
  color-scheme: light;
  --bg: #f3ece3;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --card: rgba(255, 255, 255, 0.84);
  --card-strong: rgba(255, 255, 255, 0.94);
  --text: #183542;
  --text-soft: rgba(24, 53, 66, 0.72);
  --line: rgba(24, 53, 66, 0.1);
  --accent: #ff7e6b;
  --accent-strong: #f45847;
  --secondary: #2cc0b7;
  --shadow: 0 18px 44px rgba(24, 53, 66, 0.1);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-display: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  --font-cute: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  --font-handwritten: "Segoe Script", "Brush Script MT", "Comic Sans MS", cursive;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 194, 174, 0.42), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(170, 221, 216, 0.28), transparent 24%),
    linear-gradient(180deg, #f8f2eb 0%, #efe6dc 100%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

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

code {
  padding: 0.12rem 0.38rem;
  border-radius: 0.55rem;
  background: rgba(24, 53, 66, 0.08);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.94em;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.45;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}

.ambient-one {
  top: -8rem;
  left: -6rem;
  width: 20rem;
  height: 20rem;
  background: rgba(255, 126, 107, 0.25);
}

.ambient-two {
  top: 20%;
  right: -7rem;
  width: 18rem;
  height: 18rem;
  background: rgba(44, 192, 183, 0.2);
  animation-delay: 3s;
}

.ambient-three {
  bottom: -7rem;
  left: 25%;
  width: 22rem;
  height: 22rem;
  background: rgba(255, 231, 138, 0.22);
  animation-delay: 6s;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: clamp(0.9rem, 2vw, 1.25rem);
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: max(0.6rem, env(safe-area-inset-top));
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin: 0 auto 1rem;
  max-width: 1400px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(24, 53, 66, 0.06);
  transition: opacity 220ms ease, transform 220ms ease;
}

.topbar.is-hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #ff8f7c 0%, #2cc0b7 100%);
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(244, 88, 71, 0.2);
}

.eyebrow,
.panel-eyebrow,
.section-kicker {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-title,
.panel-header h3,
.screen-copy h2,
.modal-header h3 {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  line-height: 1;
}

.progress-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.progress-pill {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-soft);
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.progress-pill.is-active,
.progress-pill.is-complete {
  color: var(--text);
}

.progress-pill.is-active {
  background: rgba(255, 126, 107, 0.16);
  transform: translateY(-1px);
}

.progress-pill.is-complete {
  background: rgba(44, 192, 183, 0.18);
}

.screens {
  display: grid;
  align-items: start;
  max-width: 1400px;
  min-height: calc(100vh - 8rem);
  margin: 0 auto;
}

.screen {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms ease;
}

.screen.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  max-height: none;
  overflow: visible;
  pointer-events: auto;
}

.screen-copy {
  max-width: 44rem;
}

.screen-copy.compact p {
  max-width: 36rem;
}

.screen-copy h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.screen-copy p,
.hero-text,
.support-text {
  margin: 0.65rem 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 2rem;
  min-height: calc(100vh - 10rem);
}

.hero-copy {
  max-width: 42rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text-soft);
  font-size: 0.88rem;
  box-shadow: 0 14px 30px rgba(24, 53, 66, 0.06);
}

.hero-copy h2 {
  margin: 1.1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.hero-actions,
.capture-actions,
.screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.hero-actions {
  margin-top: 1.6rem;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.hero-features span {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--text-soft);
  font-size: 0.86rem;
}

.primary-button,
.ghost-button,
.filter-chip,
.effect-chip,
.sticker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.filter-chip:hover,
.effect-chip:hover,
.sticker-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.ghost-button:active,
.filter-chip:active,
.effect-chip:active,
.sticker-button:active {
  transform: translateY(1px) scale(0.99);
}

.primary-button:focus-visible,
.ghost-button:focus-visible,
.filter-chip:focus-visible,
.effect-chip:focus-visible,
.sticker-button:focus-visible,
.progress-pill:focus-visible,
.gradient-swatch:focus-visible,
.segmented button:focus-visible,
.shot-actions button:focus-visible,
.layout-card:focus-visible,
.field input:focus-visible,
.toggle-field input:focus-visible {
  outline: 3px solid rgba(44, 192, 183, 0.44);
  outline-offset: 3px;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  padding: 0.95rem 1.45rem;
  box-shadow: 0 14px 28px rgba(244, 88, 71, 0.28);
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.large-button {
  padding: 1rem 2rem;
  font-size: 1.08rem;
}

.ghost-button {
  padding: 0.95rem 1.35rem;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.ghost-button.danger {
  color: #a23434;
}

.ghost-button.icon-button {
  padding: 0.75rem 1rem;
}

.hero-preview {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40rem;
}

.mock-strip {
  position: absolute;
  width: min(19rem, 70vw);
  padding: 0.8rem;
  border: 1px solid rgba(24, 53, 66, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 44px rgba(24, 53, 66, 0.12);
  display: grid;
  gap: 0.65rem;
}

.mock-strip-back {
  transform: rotate(-9deg) translate(-3rem, 1rem);
}

.mock-strip-front {
  transform: rotate(7deg) translate(3rem, -1rem);
}

.mock-frame,
.layout-preview-slot,
.shot-thumb,
.photo-slot img,
.replay-image {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #ff9988 0%, #ffd3bc 44%, #79ddd6 100%);
}

.mock-frame {
  min-height: 6.8rem;
  border-radius: 0;
}

.mock-caption {
  height: 0.85rem;
  width: 65%;
  border-radius: 0;
  background: rgba(24, 53, 66, 0.12);
}

.mock-caption.long {
  width: 78%;
}

.floating-chip {
  position: absolute;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 24px rgba(24, 53, 66, 0.08);
  color: var(--text);
  font-size: 0.9rem;
}

.chip-top {
  top: 10%;
  right: 0;
}

.chip-bottom {
  bottom: 12%;
  left: 0;
}

.seo-stack {
  display: grid;
  gap: 1rem;
}

.seo-panel {
  padding: 1.25rem;
}

.feature-grid,
.how-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
}

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

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

.mini-card,
.faq-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.5);
}

.mini-card h3,
.faq-card h3 {
  margin: 0;
  font-size: 1rem;
}

.mini-card p,
.faq-card p {
  margin: 0.5rem 0 0;
  color: var(--text-soft);
}

.adsense-note {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  background: rgba(24, 53, 66, 0.06);
  color: var(--text-soft);
}

.layout-grid,
.shot-slots,
.editor-controls,
.output-actions-column {
  display: grid;
  gap: 1rem;
}

.layout-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.layout-card,
.card {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-lg);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.layout-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.layout-card:hover {
  transform: translateY(-4px);
}

.layout-card.is-selected {
  border-color: rgba(244, 88, 71, 0.42);
  box-shadow: 0 24px 50px rgba(244, 88, 71, 0.18);
}

.layout-preview {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(249, 245, 239, 0.86));
  overflow: hidden;
}

.layout-preview-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: #faf7f2;
}

.layout-preview-slot {
  position: absolute;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(24, 53, 66, 0.05);
}

.layout-card footer {
  margin-top: 1rem;
}

.layout-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.layout-card p {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.card {
  padding: 1rem;
}

.capture-layout,
.output-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.camera-panel,
.preview-panel,
.control-card,
.output-preview {
  padding: 1.1rem;
}

.camera-panel,
.preview-panel,
.control-card,
.output-preview,
.preview-stage {
  display: grid;
  gap: 1rem;
}

.camera-stage,
.replay-stage {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  min-height: clamp(22rem, 58vh, 31rem);
  background: linear-gradient(135deg, rgba(24, 53, 66, 0.14), rgba(24, 53, 66, 0.04));
}

.camera-stage {
  display: grid;
  place-items: center;
}

#cameraFeed,
.camera-empty,
.camera-effect-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#cameraFeed {
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0;
  transition: opacity 220ms ease;
}

#cameraFeed.is-ready {
  opacity: 1;
}

.camera-empty {
  display: grid;
  place-content: center;
  gap: 0.6rem;
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(135deg, rgba(24, 53, 66, 0.5), rgba(24, 53, 66, 0.25));
}

.camera-empty span {
  color: rgba(255, 255, 255, 0.74);
}

.camera-effect-canvas {
  z-index: 2;
  pointer-events: none;
  display: block;
  transform: scaleX(-1);
  transform-origin: center;
  will-change: transform;
}

.camera-status-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  backdrop-filter: blur(8px);
  z-index: 3;
}

.countdown,
.replay-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  color: white;
  text-shadow: 0 10px 30px rgba(24, 53, 66, 0.3);
  opacity: 0;
  z-index: 3;
  transition: opacity 180ms ease, transform 180ms ease;
}

.countdown.is-visible,
.replay-countdown.is-visible {
  opacity: 1;
  transform: scale(1);
}

.flash-overlay,
.replay-flash {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.flash-overlay.is-active,
.replay-flash.is-active {
  animation: flash 320ms ease;
}

.capture-toolbars {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.toolbar-group {
  display: grid;
  gap: 0.6rem;
}

.toolbar-label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.effect-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.filter-chip,
.effect-chip {
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

.filter-chip.is-active,
.effect-chip.is-active {
  background: rgba(255, 126, 107, 0.16);
  color: var(--accent-strong);
}

.capture-actions {
  margin-top: 1rem;
}

.panel-header,
.preview-toolbar,
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.panel-count {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.shot-slots {
  margin-top: 1rem;
}

.shot-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid transparent;
}

.shot-card.is-target {
  border-color: rgba(44, 192, 183, 0.45);
}

.shot-thumb {
  width: 88px;
  height: 118px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-meta {
  min-width: 0;
}

.shot-meta h4 {
  margin: 0;
  font-size: 1rem;
}

.shot-meta p {
  margin: 0.28rem 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.shot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.shot-actions button {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 0;
  background: rgba(24, 53, 66, 0.08);
  color: var(--text);
  cursor: pointer;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.editor-preview-column {
  position: sticky;
  top: 7rem;
}

.preview-stage {
  padding: 1rem;
}

.preview-toolbar {
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.live-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #31c56b;
  box-shadow: 0 0 0 0 rgba(49, 197, 107, 0.4);
  animation: pulse 2.2s infinite;
}

.strip-preview-shell {
  display: grid;
  place-items: center;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.5rem 0;
}


.strip-stage {
  position: relative;
  width: min(100%, var(--stage-width, 220px));
  max-width: 100%;
  aspect-ratio: var(--stage-ratio, 0.58);
  border-radius: var(--stage-radius, 0);
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(24, 53, 66, 0.12), 0 0 0 1px rgba(24, 53, 66, 0.08);
  background: var(--stage-background, linear-gradient(135deg, #fff8f5, #ecfbf8));
}

.stage-shot {
  position: absolute;
}

.photo-slot {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(24, 53, 66, 0.08), rgba(24, 53, 66, 0.02));
}

.photo-slot.shape-square {
  border-radius: 0;
}

.photo-slot.shape-rounded {
  border-radius: 1.3rem;
}

.photo-slot.shape-circle {
  border-radius: 999px;
}

.photo-slot.shape-polaroid {
  border-radius: 1rem;
  background: white;
  padding: 0.7rem 0.7rem 1.7rem;
  box-shadow: 0 14px 24px rgba(24, 53, 66, 0.12);
}

.photo-slot.shape-polaroid img {
  border-radius: 0.6rem;
}

.photo-slot.placeholder {
  display: grid;
  place-items: center;
  color: rgba(24, 53, 66, 0.45);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  background: rgba(24, 53, 66, 0.06);
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-caption {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  color: var(--text);
}

.stage-caption.font-minimal {
  font-family: var(--font-display);
}

.stage-caption.font-cute {
  font-family: var(--font-cute);
  letter-spacing: 0.02em;
}

.stage-caption.font-handwritten {
  font-family: var(--font-handwritten);
}

.caption-main {
  font-size: clamp(0.82rem, 2vw, 1rem);
  line-height: 1.2;
  font-weight: 600;
}

.caption-date {
  font-size: 0.64rem;
  opacity: 0.72;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-watermark {
  position: absolute;
  right: 0.75rem;
  bottom: 0.65rem;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(24, 53, 66, 0.56);
}

.stage-sticker {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  transform: translate(-50%, -50%);
  transform-origin: center;
  line-height: 1;
  user-select: none;
  touch-action: none;
  cursor: grab;
  filter: drop-shadow(0 10px 14px rgba(24, 53, 66, 0.14));
}

.stage-sticker.is-selected {
  outline: 2px dashed rgba(44, 192, 183, 0.8);
  outline-offset: 4px;
}

.swatch-row,
.segmented,
.sticker-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.gradient-swatch,
.segmented button {
  border: 1px solid rgba(24, 53, 66, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.gradient-swatch {
  width: 2.8rem;
  height: 2.8rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.gradient-swatch.is-active,
.segmented button.is-active {
  outline: 2px solid rgba(244, 88, 71, 0.45);
}

.segmented button {
  padding: 0.75rem 0.95rem;
  cursor: pointer;
}

.sticker-button {
  min-width: 3rem;
  min-height: 3rem;
  font-size: 1.35rem;
  background: rgba(255, 255, 255, 0.72);
}

.field,
.toggle-field {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.field-note,
.inline-support {
  margin: 0;
  color: var(--text-soft);
}

.field-note {
  font-size: 0.92rem;
  line-height: 1.55;
}

.inline-support {
  margin-top: 0.75rem;
}

.field span {
  font-size: 0.96rem;
  font-weight: 600;
}

.field input[type="text"],
.field input[type="color"] {
  width: 100%;
  border: 1px solid rgba(24, 53, 66, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.85rem 1rem;
  color: var(--text);
}

.field input[type="color"] {
  min-height: 3.25rem;
  padding: 0.45rem;
}

.field input[type="range"] {
  accent-color: var(--accent-strong);
}

.segmented button {
  flex: 1 1 8rem;
}

.toggle-field {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.toggle-field input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent-strong);
}

.output-actions-column {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
}

.output-actions-column .primary-button,
.output-actions-column .ghost-button {
  width: 100%;
}

.subtle-card {
  background: rgba(255, 255, 255, 0.58);
}

.final-preview-frame {
  display: grid;
  place-items: center;
  margin-top: 0.5rem;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.5rem 0;
}

#renderedOutputImage {
  width: 220px;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 0;
  box-shadow: 0 18px 34px rgba(24, 53, 66, 0.12), 0 0 0 1px rgba(24, 53, 66, 0.08);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 120%);
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: rgba(24, 53, 66, 0.86);
  color: white;
  box-shadow: 0 16px 28px rgba(24, 53, 66, 0.16);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  z-index: 40;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  max-width: 1400px;
  margin: 1.25rem auto 0;
  padding: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.footer-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.95rem;
  font-size: 1.1rem;
}

.footer-copy,
.footer-meta {
  margin: 0;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem 1rem;
  align-items: center;
}

.footer-links a,
.link-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.footer-links a:hover,
.link-button:hover,
.footer-links a:focus-visible,
.link-button:focus-visible {
  color: var(--accent-strong);
}

.footer-meta {
  grid-column: 1 / -1;
}

.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  display: flex;
  justify-content: center;
}

.consent-banner[hidden] {
  display: none !important;
}

.consent-panel {
  width: min(100%, 1020px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 48px rgba(24, 53, 66, 0.18);
}

.consent-copy h3 {
  margin: 0.15rem 0 0;
}

.consent-copy p {
  margin: 0.6rem 0 0;
  color: var(--text-soft);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.legal-shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

.legal-page {
  display: grid;
  gap: 1rem;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.legal-hero,
.legal-card {
  padding: 1.25rem;
}

.legal-hero p,
.legal-card p {
  color: var(--text-soft);
}

.legal-hero p,
.legal-card p,
.legal-card ul,
.legal-card ol {
  margin: 0.75rem 0 0;
}

.legal-card h2,
.legal-card h3 {
  margin: 0;
  font-family: var(--font-display);
}

.legal-card ul,
.legal-card ol {
  padding-left: 1.25rem;
  color: var(--text-soft);
}

.legal-card li + li {
  margin-top: 0.45rem;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.legal-nav a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  color: var(--accent-strong);
}

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

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 50;
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 26, 32, 0.55);
  backdrop-filter: blur(10px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 760px);
  padding: 1.25rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 32px 70px rgba(24, 53, 66, 0.2);
}

.download-modal-dialog {
  width: min(92vw, 420px);
  text-align: center;
}

.download-stage {
  margin-top: 1rem;
  padding: 1.5rem 0;
}

.download-message {
  margin-bottom: 1.5rem;
}

.download-message p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.download-hint {
  font-size: 0.9rem !important;
  color: var(--text-soft) !important;
  margin-top: 0.5rem !important;
}

.download-ad-container {
  min-height: 90px;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.download-ad-container ins.adsbygoogle {
  min-height: 90px;
}

.download-progress {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 1.5rem 0 0.5rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.download-timer {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0;
}

.download-actions {
  margin-top: 1rem;
}

.download-actions .ghost-button {
  width: 100%;
}

.preparing-modal-dialog {
  width: min(92vw, 420px);
  text-align: center;
}

.preparing-stage {
  margin-top: 1rem;
  padding: 1.5rem 0;
}

.preparing-message {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--text);
}

.preparing-ad-container {
  min-height: 90px;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preparing-ad-container ins.adsbygoogle {
  min-height: 90px;
}

.replay-stage {
  margin-top: 1rem;
  display: grid;
  place-items: center;
  min-height: 26rem;
  background: linear-gradient(160deg, rgba(24, 53, 66, 0.92), rgba(52, 88, 108, 0.84));
}

.replay-image {
  width: min(100%, 360px);
  max-height: 22rem;
  object-fit: cover;
  border-radius: 1.5rem;
  opacity: 0;
  transform: scale(0.98);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  transition: opacity 200ms ease, transform 200ms ease;
}

.replay-image.is-visible {
  opacity: 1;
  transform: scale(1);
}

.review-stage {
  margin-top: 1rem;
  display: grid;
  place-items: center;
  min-height: 26rem;
  background: linear-gradient(160deg, rgba(24, 53, 66, 0.92), rgba(52, 88, 108, 0.84));
}

.review-image {
  width: min(100%, 360px);
  max-height: 22rem;
  object-fit: cover;
  border-radius: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.review-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.review-actions .primary-button {
  flex: 1;
  max-width: 200px;
}

.review-actions .ghost-button {
  flex: 1;
  max-width: 200px;
}

.centered {
  text-align: center;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(1.25rem, -1rem, 0) scale(1.08);
  }
}

@keyframes flash {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(49, 197, 107, 0.35);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(49, 197, 107, 0);
  }
}

@media (max-width: 1100px) {
  .landing-grid,
  .capture-layout,
  .editor-layout,
  .output-layout {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    min-height: 28rem;
  }

  .editor-preview-column {
    position: static;
  }

  .editor-controls {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

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

  .site-footer,
  .consent-panel {
    grid-template-columns: 1fr;
  }

  .footer-links,
  .consent-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 1rem;
  }

  .topbar {
    padding: 0.9rem 1rem;
    border-radius: 1.4rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .progress-nav::-webkit-scrollbar {
    display: none;
  }

  .progress-pill {
    flex: 0 0 auto;
  }

  .hero-copy h2 {
    font-size: clamp(2.6rem, 12vw, 4rem);
  }

  .hero-actions,
  .capture-actions,
  .screen-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions > *,
  .capture-actions > *,
  .screen-actions > * {
    width: 100%;
  }

  .camera-stage,
  .replay-stage {
    min-height: clamp(19rem, 56svh, 24rem);
  }

  .shot-card {
    grid-template-columns: 1fr;
  }

  .shot-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .strip-preview-shell,
  .final-preview-frame {
    min-height: 0;
    padding: 0.5rem 0;
  }

  .panel-header,
  .preview-toolbar,
  .modal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .layout-grid,
  .editor-controls,
  .feature-grid,
  .how-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .screen {
    padding-bottom: 5rem;
  }

  .footer-brand {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .consent-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .consent-panel,
  .site-footer,
  .legal-hero,
  .legal-card {
    padding: 1rem;
  }
}

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