/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f4f5f9;
  color: #111827;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.studio-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.studio-card {
  width: min(1120px, 100%);
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.studio-header h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
  font-weight: 700;
}

.studio-header p {
  margin: 0;
  color: #4b5563;
  font-size: 1.05rem;
}

.studio-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.studio-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 240px;
}

.toolbar-field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
}

.toolbar-field select {
  padding: 0.7rem 1rem;
  border: 1px solid #d5d9e4;
  border-radius: 12px;
  font-size: 1rem;
  background: #f8f9fc;
  color: inherit;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
}

.studio-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.studio-panel--controls {
  min-height: 100%;
}

.studio-panel--preview {
  background: linear-gradient(140deg, rgba(79, 70, 229, 0.12), rgba(129, 140, 248, 0.08));
  border-radius: 20px;
  padding: 1.5rem;
  position: relative;
}

.file-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.file-field label {
  font-weight: 600;
}

.file-field input[type="file"] {
  padding: 0.75rem;
  border: 1px dashed #c7cbe0;
  border-radius: 12px;
  background: #fbfcff;
  font-size: 0.95rem;
}

.preview-card {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 16px;
  padding: 1rem;
}

.preview-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1rem;
  color: #1f2937;
}

.effects-section,
.adjustments-section,
.prompt-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.effects-loading {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.effects-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.9rem;
}

.effects-error__message {
  flex: 1 1 auto;
  min-width: 0;
}

.effects-error__retry {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.effects-error__retry:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
}

.effects-error__retry:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.effects-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 130px;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scroll-snap-type: x proximity;
}

.effects-strip::-webkit-scrollbar,
.adjustments-strip::-webkit-scrollbar {
  height: 6px;
}

.effects-strip::-webkit-scrollbar-thumb,
.adjustments-strip::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}

.effect-card {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 16px;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
  background: #e0e7ff;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  scroll-snap-align: center;
}

.effect-card img,
.effect-card__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.effect-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(30, 64, 175, 0.85);
  background: linear-gradient(180deg, rgba(165, 180, 252, 0.45), rgba(59, 130, 246, 0.45));
}

.effect-card__label {
  position: relative;
  display: block;
  width: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.9));
  color: #ffffff;
  padding: 0.6rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
}

.effect-card:is(:hover, :focus-visible) {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.25);
}

.effect-card.is-active {
  border-color: #4f46e5;
  box-shadow: 0 16px 32px rgba(79, 70, 229, 0.35);
}

.adjustments-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.adjustment-chip {
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.1);
  color: #312e81;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.adjustment-chip:is(:hover, :focus-visible) {
  background: rgba(79, 70, 229, 0.22);
  transform: translateY(-1px);
}

.prompt-input {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.prompt-input textarea {
  flex: 1;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  resize: vertical;
}

.prompt-history {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.25rem;
}

.prompt-history__empty {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.prompt-history__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(79, 70, 229, 0.14);
  color: #312e81;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.prompt-history__remove {
  border: none;
  background: rgba(49, 46, 129, 0.12);
  color: #1f2937;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  padding: 0;
}

.prompt-history__remove:hover {
  background: rgba(49, 46, 129, 0.24);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.primary-button {
  padding: 0.85rem 1.9rem;
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(79, 70, 229, 0.35);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary-button {
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(79, 70, 229, 0.35);
  background: rgba(99, 102, 241, 0.1);
  color: #312e81;
}

.secondary-button:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.18);
}

.ghost-button {
  padding: 0.65rem 1.1rem;
  border: 1px solid rgba(100, 116, 139, 0.35);
  background: #ffffff;
  color: #1f2937;
}

.ghost-button:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.12);
}

.ghost-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.link-button {
  padding: 0.45rem 0.75rem;
  border: none;
  background: none;
  color: #4f46e5;
  text-decoration: underline;
}

.progress {
  min-height: 1.25rem;
  font-size: 0.95rem;
  color: #475569;
}

.status {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  min-height: 1.5rem;
  font-weight: 600;
  background: #eef2ff;
  color: #3730a3;
}

.status--info {
  background-color: #eef2ff;
  color: #3730a3;
}

.status--success {
  background-color: #ecfdf5;
  color: #047857;
}

.status--error {
  background-color: #fef2f2;
  color: #b91c1c;
}

.comparison {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.comparison-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: #0f172a;
  --comparison-split: 50%;
}

.comparison-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-stage [data-upload-target="comparisonProcessed"] {
  z-index: 1;
}

.comparison-stage [data-upload-target="comparisonOriginal"] {
  z-index: 2;
  clip-path: inset(0 0 calc(100% - var(--comparison-split, 50%)) 0);
  box-shadow: inset 0 -40px 60px rgba(15, 23, 42, 0.35);
}

.comparison-slider {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  height: 70%;
  writing-mode: bt-lr;
  -webkit-appearance: slider-vertical;
  background: transparent;
}

.comparison-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4f46e5;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}

.comparison-slider::-webkit-slider-runnable-track {
  width: 2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.comparison-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4f46e5;
  border: 2px solid #ffffff;
}

.comparison-slider::-moz-range-track {
  width: 2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.comparison-footer {
  display: flex;
  justify-content: flex-end;
}

.comparison-footer a {
  color: #312e81;
  font-weight: 600;
  text-decoration: none;
}

.comparison-footer a:hover {
  text-decoration: underline;
}

.empty-result {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  font-size: 1.05rem;
  text-align: center;
  padding: 2rem;
}

.hidden {
  display: none !important;
}

/* Native-parity Rollip editor */
.rollip-app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

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

.image-stage,
.landing-state,
.processing-overlay {
  position: absolute;
  inset: 0;
}

.image-stage {
  overflow: hidden;
  background: #000;
  cursor: grab;
}

.image-stage:active { cursor: grabbing; }

.main-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  transform-origin: center;
  pointer-events: none;
  will-change: transform;
}

.landing-state {
  z-index: 2;
  background-image: var(--landing-image);
  background-position: center;
  background-size: cover;
}

.landing-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.05) 40%, rgba(0,0,0,.82) 100%),
    linear-gradient(90deg, rgba(8,4,18,.5), transparent 55%);
}

.landing-brand {
  position: absolute;
  z-index: 1;
  top: max(22px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.04em;
  text-shadow: 0 2px 18px rgba(0,0,0,.4);
}

.landing-copy {
  position: absolute;
  z-index: 1;
  top: clamp(240px, 41vh, 470px);
  left: 50%;
  width: min(94vw, 980px);
  transform: translate(-50%, -50%);
  text-align: center;
}

.landing-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.landing-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(52px, 7vw, 102px);
  line-height: .88;
  letter-spacing: -.065em;
  font-weight: 900;
  text-shadow: 0 4px 34px rgba(0,0,0,.3);
}

.landing-copy h1 span {
  background: linear-gradient(90deg, #77e7ff, #c99cff 50%, #ffbf78);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-copy p {
  max-width: 640px;
  margin: 0 auto 26px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.5;
  text-wrap: balance;
}

.choose-photo {
  width: 270px;
  height: 56px;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(90deg, #00d4ff, #a855f7, #ff8c00);
  color: #fff;
  font-size: 23px;
  font-weight: 600;
  cursor: pointer;
}

.take-selfie {
  display: block;
  margin: 20px auto 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 19px;
  cursor: pointer;
}

.take-selfie strong { color: #9aadff; }
.choose-photo:active, .take-selfie:active { opacity: 0.7; }

.editor-tools { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.tool-rail { position: absolute; top: max(12px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 15px; pointer-events: auto; }
.tool-rail--left { left: max(20px, env(safe-area-inset-left)); }
.tool-rail--right { right: max(20px, env(safe-area-inset-right)); align-items: flex-end; }
.tool-pair { display: flex; gap: 15px; }

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
}

.icon-button svg,
.reward-panel header svg,
.instruction-bar svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button:disabled { opacity: 0.45; cursor: default; }
.aspect-button { height: 56px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.aspect-button small { color: #fff; font-size: 10px; font-weight: 600; }
.aspect-shape { display: block; width: 23px; height: 23px; border: 2px dashed #fff; border-radius: 4px; }

.edits-balance { min-width: 50px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-shadow: 0 1px 3px #000; }
.edits-balance strong { font-size: 20px; line-height: 24px; }
.edits-balance span { margin-top: 2px; font-size: 13px; font-weight: 700; }

.combine-control { display: flex; flex-direction: column; align-items: center; padding-block: 8px; cursor: pointer; text-shadow: 0 1px 2px #000; }
.combine-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 34px; height: 20px; border-radius: 12px; background: rgba(255,255,255,.25); transition: background .15s; }
.switch-track span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.combine-control input:checked + .switch-track { background: #007aff; }
.combine-control input:checked + .switch-track span { transform: translateX(14px); }
.combine-control b { margin-top: 5px; font-size: 11px; }

.processing-overlay { z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.35); pointer-events: auto; }
.minimal-spinner { width: 42px; height: 42px; border: 3px solid rgba(255,255,255,.25); border-top-color: rgba(255,255,255,.92); border-radius: 50%; animation: rollip-spin .7s linear infinite; }
.processing-overlay p { margin: 14px 0 0; font-size: 16px; font-weight: 600; opacity: .85; }
@keyframes rollip-spin { to { transform: rotate(360deg); } }

.bottom-ui { position: absolute; z-index: 6; right: 0; bottom: 0; left: 0; pointer-events: none; background: linear-gradient(180deg, transparent 0, rgba(0,0,0,.82) 116px, #000 180px); }
.bottom-ui > * { pointer-events: auto; }
.catalog-panel { width: 100%; }
.effects-row, .categories-row, .adjustments-row { display: flex; overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain; }
.effects-row::-webkit-scrollbar, .categories-row::-webkit-scrollbar, .adjustments-row::-webkit-scrollbar { display: none; }
.effects-row { width: min(1200px, 100%); gap: 16px; margin: 0 auto; padding: 0 20px 10px; align-items: center; justify-content: safe center; cursor: grab; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.effects-row.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.effect-thumb { position: relative; flex: 0 0 88px; width: 88px; height: 116px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.1); cursor: pointer; }
.effect-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.effect-thumb.is-active { border: 3px solid #fff; border-radius: 11px; }
.effect-thumb:disabled { opacity: .5; }
.effect-thumb--add { display: grid; place-items: center; color: #fff; font-size: 32px; background: rgba(255,255,255,.2); }
.adjustments-row { width: min(1200px, 100%); gap: 6px; margin: 0 auto; padding: 0 20px 8px; justify-content: safe center; }
.adjustment-pill { flex: none; padding: 5px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; }
.categories-gradient { height: 35px; display: flex; align-items: center; background: linear-gradient(transparent, #000); }
.categories-row { width: min(1200px, 100%); margin: 0 auto; padding: 0 12px; align-items: center; justify-content: safe center; }
.category-pill { flex: none; padding: 6px 13px; border: 1px solid transparent; border-radius: 20px; background: transparent; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.category-pill.is-active { border-color: #555; background: rgba(0,0,0,.8); }

.instruction-bar { width: min(1200px, 100%); display: flex; align-items: center; gap: 8px; margin: 0 auto; padding: 14px 20px 10px; background: #000; }
.instruction-bar input { flex: 1; min-width: 0; height: 45px; padding: 0 58px 0 20px; border: 0; border-radius: 23px; outline: none; background: rgba(255,255,255,.15); color: #fff; font-size: 15px; user-select: text; }
.instruction-bar input::placeholder { color: rgba(255,255,255,.4); }
.instruction-bar input:focus { background: #3c3c3c; }
.instruction-bar button { width: 38px; height: 38px; display: grid; place-items: center; margin-left: -51px; border: 0; border-radius: 50%; background: #007aff; color: #fff; cursor: pointer; }
.instruction-bar button:disabled { opacity: .5; }
.instruction-bar svg { width: 20px; height: 20px; }

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 12px max(9px, env(safe-area-inset-bottom));
  background: #000;
  color: rgba(255,255,255,.72);
  font-size: 10px;
  line-height: 1;
}
.legal-footer a { color: inherit; text-decoration: none; }
.legal-footer a:hover { color: #fff; }

.status-card { width: min(800px, calc(100% - 32px)); margin: 0 auto 12px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 8px; background: rgba(0,0,0,.85); color: #fff; font-size: 14px; }
.status-card button { padding: 8px 16px; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }

.rollip-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; }
.rollip-dialog::backdrop { background: rgba(0,0,0,.6); }
.aspect-dialog { background: rgba(0,0,0,.6); }
.aspect-options { position: absolute; top: 50%; left: 50%; width: min(320px, calc(100% - 48px)); transform: translate(-50%,-50%); padding: 12px 0; border-radius: 12px; background: rgba(20,20,20,.96); }
.aspect-option { width: 100%; display: flex; align-items: center; gap: 16px; padding: 10px 18px; border: 0; background: transparent; color: #fff; font-size: 14px; cursor: pointer; }
.aspect-option.is-active { background: rgba(110,193,255,.12); color: #6ec1ff; }
.aspect-preview { width: 56px; height: 34px; display: grid; place-items: center; }
.aspect-preview span { display: block; border: 2px solid currentColor; border-radius: 5px; }
.camera-dialog { background: #000; }
.camera-panel { height: 100%; display: flex; flex-direction: column; }
.camera-panel video { width: 100%; min-height: 0; flex: 1; object-fit: cover; transform: scaleX(-1); }
.camera-actions { height: 110px; display: flex; align-items: center; justify-content: center; gap: 48px; background: #000; }
.camera-actions button { border: 0; background: transparent; color: #fff; font-size: 16px; }
.camera-actions .camera-shutter { width: 68px; height: 68px; border: 5px solid #fff; border-radius: 50%; box-shadow: inset 0 0 0 4px #000; background: #fff; }

.reward-dialog { display: none; align-items: flex-end; }
.reward-dialog[open] { display: flex; }
.reward-panel { width: min(1200px, 100%); margin-inline: auto; padding: 20px 20px max(40px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: #1a1a1a; box-shadow: 0 -12px 40px rgba(0,0,0,.45); }
.reward-panel header, .reward-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.reward-panel h2 { margin: 0; font-size: 21px; }
.reward-panel header button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; }
.reward-panel header svg { width: 18px; height: 18px; }
.reward-panel > p { color: rgba(255,255,255,.7); line-height: 1.5; }
.reward-progress { margin: 20px 0; padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.05); }
.reward-dots { display: grid; gap: 8px; margin-top: 14px; }
.reward-dot { height: 8px; border-radius: 5px; background: rgba(255,255,255,.18); }
.reward-progress strong { color: #ffd76a; }
.reward-dot.is-filled { background: #ffd76a; }
.reward-dot.is-next { box-shadow: 0 0 0 2px rgba(110,193,255,.5); }
.reward-error { color: #ff7777 !important; }
.watch-ad { width: 100%; min-height: 70px; display: grid; grid-template-columns: 42px 1fr 24px; align-items: center; gap: 12px; padding: 10px 16px; border: 0; border-radius: 14px; background: #1688f8; color: #fff; text-align: left; cursor: pointer; box-shadow: 0 8px 24px rgba(0,122,255,.22); transition: background .15s, transform .15s; }
.watch-ad:hover { background: #2998ff; }
.watch-ad:active { transform: scale(.99); }
.watch-ad-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.18); }
.watch-ad-icon svg, .watch-ad-arrow { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.watch-ad-icon svg { margin-left: 2px; }
.watch-ad-copy { display: flex; min-width: 0; flex-direction: column; }
.watch-ad-copy strong { font-size: 17px; line-height: 1.2; }
.watch-ad-copy > span { margin-top: 4px; font-size: 12px; font-weight: 600; opacity: .82; }
.watch-ad-arrow { opacity: .8; }
.watch-ad:disabled { opacity: .55; }
.reward-panel > small { display: block; margin-top: 16px; color: rgba(255,255,255,.55); text-align: center; }

.toast { position: absolute; z-index: 20; top: max(20px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: min(90vw, 520px); padding: 10px 16px; border-radius: 20px; background: rgba(20,20,20,.92); color: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.35); }

@media (max-height: 720px) {
  .tool-rail { gap: 9px; }
  .icon-button { width: 40px; height: 40px; }
  .effect-thumb { flex-basis: 76px; width: 76px; height: 100px; }
  .landing-copy { top: 38%; }
  .landing-copy h1 { font-size: clamp(42px, 7vw, 72px); }
  .landing-copy p { margin-bottom: 18px; }
  .choose-photo { height: 50px; font-size: 20px; }
  .take-selfie { margin-top: 12px; }
}

@media (min-width: 541px) {
  .tool-rail { padding-top: 15px; }
}

@media (max-width: 540px) {
  .tool-rail--left { left: 12px; }
  .tool-rail--right { right: 12px; }
  .tool-pair { gap: 8px; }
  .landing-copy { top: 38%; }
  .landing-copy h1 { font-size: clamp(48px, 15vw, 70px); }
  .landing-copy p { max-width: 360px; }
  .effects-row { gap: 11px; padding-inline: 12px; }
  .instruction-bar { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .minimal-spinner { animation-duration: 1.5s; }
  .switch-track, .switch-track span { transition: none; }
}

.empty-state {
  font-size: 1.1rem;
  color: #475569;
  background-color: #eef2ff;
  border: 1px dashed #6366f1;
  padding: 1.25rem;
  border-radius: 12px;
}

/* Content page styles for policy/legal pages */
.content-page-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.content-page {
  line-height: 1.7;
  font-size: 1rem;
  color: #374151;
}

.content-meta {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4338ca;
  margin-bottom: 2rem;
  border: 1px solid #c7d2fe;
}

.content-page h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #1f2937;
  line-height: 1.3;
}

.content-page h2:first-of-type {
  margin-top: 1.5rem;
}

.content-page h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  color: #374151;
  line-height: 1.3;
}

.content-page p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.content-page ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  list-style-type: disc;
}

.content-page li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
  line-height: 1.6;
}

.content-page li::marker {
  color: #6366f1;
}

.content-page strong {
  font-weight: 600;
  color: #1f2937;
}

.content-page a {
  color: #4f46e5;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.content-page a:hover {
  color: #6366f1;
}

.content-divider {
  margin: 2.5rem 0;
  border: none;
  border-top: 2px solid #e5e7eb;
}

.info-callout {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-left: 4px solid #4f46e5;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.info-callout p {
  margin-bottom: 0.75rem;
}

.info-callout p:last-child {
  margin-bottom: 0;
}

.info-callout ul {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.studio-header--page {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.studio-header--page h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.studio-header--page p {
  font-size: 1.1rem;
  color: #6b7280;
}

.studio-header--centered {
  text-align: center;
}

.studio-header--centered h1,
.studio-header--centered p {
  text-align: center;
}

@media (max-width: 960px) {
  .studio-card {
    padding: 2rem;
  }

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

  .studio-panel--preview {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .studio-shell {
    padding: 2rem 1rem;
  }

  .studio-card {
    padding: 1.75rem;
  }

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

  .primary-button {
    width: 100%;
  }

  .prompt-input {
    flex-direction: column;
  }

  .comparison-slider {
    right: 0.4rem;
  }

  .content-page {
    padding: 0;
    font-size: 0.95rem;
  }

  .content-page h2 {
    font-size: 1.35rem;
  }

  .content-page h3 {
    font-size: 1.15rem;
  }

  .studio-header--page h1 {
    font-size: 1.75rem;
  }

  .studio-header--page p {
    font-size: 1rem;
  }

  .info-callout {
    padding: 1rem 1.25rem;
  }
}

/* =============================================
   Landing page (.lp- namespace)
   ============================================= */

.lp-root {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a0a2e 50%, #0d1b3e 100%);
  color: #ffffff;
  overflow-x: hidden;
}

.lp-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: lp-float 8s ease-in-out infinite;
}

.lp-orb--violet {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.35) 0%, transparent 70%);
  top: -150px; left: -150px;
}

.lp-orb--cyan {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.25) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation-delay: -4s;
}

@keyframes lp-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

@keyframes lp-fadein {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lp-content { position: relative; z-index: 1; }

.lp-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 0;
}

.lp-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #a78bfa, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lp-hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  animation: lp-fadein 0.8s ease both;
}

.lp-badge {
  display: inline-block;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.4);
  color: #a78bfa;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}

.lp-headline {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin: 0 0 1.5rem;
}

.lp-headline-accent {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lp-subheadline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.lp-store-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lp-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.lp-store-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124,58,237,0.3);
  color: #ffffff;
  text-decoration: none;
}

.lp-store-btn__icon { flex-shrink: 0; }
.lp-store-btn__label { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.lp-store-btn__sub { font-size: 0.75rem; font-weight: 400; opacity: 0.7; }

.lp-features {
  padding: 4rem 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
  animation: lp-fadein 0.8s 0.2s ease both;
}

.lp-section-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #06b6d4;
  margin-bottom: 1rem;
}

.lp-section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 3rem;
}

.lp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.lp-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(124,58,237,0.2);
}

.lp-card__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.lp-card__icon--violet { background: rgba(124,58,237,0.2); }
.lp-card__icon--cyan   { background: rgba(6,182,212,0.2); }
.lp-card__icon--pink   { background: rgba(236,72,153,0.2); }

.lp-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.lp-card__desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin: 0;
}

.lp-cta {
  padding: 5rem 1.5rem;
  text-align: center;
  animation: lp-fadein 0.8s 0.4s ease both;
}

.lp-cta__inner {
  max-width: 620px;
  margin: 0 auto;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 32px;
  padding: 3.5rem 2rem;
  backdrop-filter: blur(20px);
}

.lp-cta__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.lp-cta__sub {
  color: rgba(255,255,255,0.55);
  font-size: 1.05rem;
  margin: 0 0 2.5rem;
}

.lp-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 480px) {
  .lp-store-row { flex-direction: column; align-items: center; }
  .lp-store-btn { width: 100%; max-width: 300px; justify-content: center; }
}
