:root {
  color-scheme: light;
  --paper: var(--consumer-paper, #f3f0e8);
  --paper-2: var(--consumer-paper-2, #e8e4da);
  --ink: var(--consumer-ink, #11120f);
  --muted: var(--consumer-muted, #696960);
  --line: var(--consumer-line, rgba(17, 18, 15, .16));
  --acid: #c8ff32;
  --acid-strong: #a9ef00;
  --white: var(--consumer-card, #fffef9);
  --danger: var(--consumer-danger, #c53a26);
  --radius: var(--consumer-radius, 22px);
  --shadow: var(--consumer-shadow, 0 22px 70px rgba(17, 18, 15, .16));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.presentation-scroll-lock,
html.presentation-scroll-lock body { overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0;
  min-width: 300px;
  background:
    radial-gradient(circle at 88% 4%, rgba(200, 255, 50, .24), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.mobile-only { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  padding: 12px clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
}
.brand small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.environment-badge {
  padding: 4px 7px;
  border: 1px solid #8b6400;
  border-radius: 999px;
  background: #fff1a8;
  color: #5e4300;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}
.brand-mark { display: inline-flex; align-items: end; gap: 2px; width: 23px; height: 19px; }
.brand-mark i { display: block; width: 6px; border-radius: 6px; background: var(--ink); transform: rotate(-8deg); }
.brand-mark i:nth-child(1) { height: 11px; }
.brand-mark i:nth-child(2) { height: 18px; background: var(--acid-strong); }
.brand-mark i:nth-child(3) { height: 14px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.credits-pill, .account-button, .icon-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 254, 249, .72);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}
.credits-pill { padding: 0 14px; font-size: 12px; }
.credits-pill span { font-size: 15px; font-weight: 800; }
.account-button { padding: 0 17px; }
.icon-button { width: 40px; display: grid; place-items: center; padding: 0; }
.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.install-button { background: var(--ink); color: white; }
.refresh-button { background: var(--ink); color: white; }
.refresh-button[data-refreshing="true"] svg { animation: animateit-refresh-spin .75s linear infinite; }
.notification-button { position: relative; }
.help-button svg { stroke-width: 1.9; }
.notification-button[data-state="enabled"]::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--acid-strong);
}
@keyframes animateit-refresh-spin { to { transform: rotate(360deg); } }

.public-gallery-return {
  position: sticky;
  top: 74px;
  z-index: 19;
  width: fit-content;
  min-height: 42px;
  margin: 10px auto 0;
  padding: 0 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--acid);
  box-shadow: 0 10px 28px rgba(17, 18, 15, .18);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.public-gallery-return span { font-size: 18px; line-height: 1; }
.public-gallery-return:disabled { cursor: wait; opacity: .7; }

main { width: min(1500px, 100%); margin: 0 auto; }
.first-view {
  min-height: calc(100svh - 67px);
  padding: clamp(26px, 4.6vw, 70px) clamp(18px, 4vw, 58px) clamp(30px, 4vw, 60px);
  display: grid;
  grid-template-columns: minmax(330px, .83fr) minmax(520px, 1.35fr);
  gap: clamp(24px, 4vw, 62px);
  align-items: start;
}
.create-panel { min-width: 0; }
.create-copy { max-width: 620px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.create-copy h1 {
  margin: 0;
  font-size: clamp(54px, 6.6vw, 102px);
  line-height: .88;
  letter-spacing: -.075em;
  font-weight: 800;
}
.create-copy > p:last-child {
  margin: 20px 0 26px;
  max-width: 570px;
  color: var(--muted);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
}

.import-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 254, 249, .65);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}
.import-card.is-dragging { border-color: var(--ink); box-shadow: 0 0 0 5px var(--acid); }
.selected-media {
  position: relative;
  min-height: 164px;
  max-height: 270px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(200, 255, 50, .34), transparent 55%),
    var(--paper-2);
}
.primary-image-picker {
  width: 100%;
  min-height: inherit;
  max-height: inherit;
  padding: 0;
  border: 0;
  border-radius: inherit;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: inherit;
  background: transparent;
  cursor: pointer;
  pointer-events: none;
}
.primary-image-picker:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }
.primary-file-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.primary-file-input:focus-visible + .primary-image-picker { outline: 3px solid var(--ink); outline-offset: -6px; }
.selected-media img { width: 100%; height: 100%; min-height: 164px; max-height: 270px; object-fit: contain; background: #d8d4ca; }
.selected-media.is-dragging { overflow: visible; outline: 3px dashed var(--ink); outline-offset: -9px; background: var(--acid); }
.selected-media.is-dragging::after {
  content: "Drop image to use";
  position: absolute;
  z-index: 3;
  inset: 12px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(200, 255, 50, .92);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  pointer-events: none;
}
.empty-selection { display: grid; place-items: center; gap: 2px; color: var(--muted); }
.empty-selection .spark { color: var(--ink); font-size: 34px; line-height: 1; }
.empty-selection strong { color: var(--ink); font-size: 17px; }
.empty-selection span:last-child { font-size: 12px; }
.clear-selection {
  position: absolute;
  z-index: 4;
  top: 9px;
  right: 9px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(17, 18, 15, .78);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.continuation-context {
  min-height: 68px;
  margin-bottom: 10px;
  padding: 7px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(17,18,15,.18);
  border-radius: 16px;
  background: linear-gradient(110deg, rgba(200,255,50,.35), rgba(255,255,255,.78));
}
.continuation-context[hidden] { display: none; }
.continuation-parent { width: 52px; height: 52px; padding: 0; overflow: hidden; border: 0; border-radius: 11px; background: #222; cursor: pointer; }
.continuation-parent img { width: 100%; height: 100%; display: block; object-fit: cover; }
.continuation-context span { min-width: 0; display: grid; gap: 2px; }
.continuation-context small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.continuation-context strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.continuation-context em { color: var(--muted); font-size: 9px; font-style: normal; }
.continuation-context.is-preparing em { display: flex; align-items: center; gap: 5px; color: #4d591f; font-weight: 750; }
.continuation-context.is-preparing em::before {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  box-sizing: border-box;
  content: "";
  border: 2px solid rgba(17,18,15,.22);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.continuation-exit { width: 34px; height: 34px; padding: 0; border: 1px solid rgba(17,18,15,.18); border-radius: 50%; background: white; color: var(--ink); cursor: pointer; font-size: 23px; line-height: 1; }
.continuation-exit:hover { background: var(--ink); color: white; }
.source-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 9px;
}
.source-button {
  min-width: 0;
  min-height: 58px;
  padding: 7px 3px 6px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}
.source-button:hover { border-color: var(--line); background: var(--white); color: var(--ink); }
.source-button[aria-pressed="true"] { border-color: var(--ink); background: var(--acid); color: var(--ink); box-shadow: 0 0 0 2px rgba(200, 255, 50, .26); }
.source-button svg { width: 23px; height: 23px; fill: currentColor; }
.mobile-source { display: none; }
.recent-block { margin: 9px 0 2px; padding-top: 9px; border-top: 1px solid var(--line); }
.recent-label { display: block; margin: 0 0 7px 3px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.recent-rail-frame { position: relative; min-width: 0; }
.recent-rail { display: flex; gap: 8px; overflow-x: auto; padding: 0 2px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.recent-rail::-webkit-scrollbar { display: none; }
.rail-arrow { display: none; place-items: center; padding: 0; border: 1px solid rgba(17,18,15,.14); border-radius: 999px; background: var(--ink); color: white; box-shadow: 0 8px 25px rgba(17,18,15,.24); cursor: pointer; font-family: inherit; font-size: 27px; font-weight: 700; line-height: 1; transition: opacity .15s ease, transform .15s ease; }
.rail-arrow[hidden] { display: none !important; }
.rail-arrow:hover:not(:disabled) { transform: scale(1.05); }
.rail-arrow:focus-visible { outline: 3px solid var(--acid); outline-offset: 2px; }
.rail-arrow:disabled { opacity: .24; cursor: default; }
.recent-rail-frame .rail-arrow { position: absolute; z-index: 6; top: 0; width: 28px; height: 52px; }
.recent-rail-frame .rail-arrow-previous { left: 0; }
.recent-rail-frame .rail-arrow-next { right: 0; }
.recent-rail-frame.has-scroll-controls .recent-rail { padding-inline: 35px; scroll-padding-inline: 35px; }
.recent-thumb {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--paper-2);
  cursor: pointer;
  scroll-snap-align: start;
}
.recent-thumb[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--acid); }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-thumb.is-continuation-frame::after { content: "+7"; position: absolute; right: 2px; bottom: 2px; padding: 1px 3px; border-radius: 5px; background: var(--acid); color: var(--ink); font-size: 7px; font-weight: 900; }
.animate-button {
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 15px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: -.01em;
  transition: transform .18s ease, background .18s ease;
}
.animate-button:not(:disabled):hover { transform: translateY(-2px); background: #292b25; }
.animate-button:disabled { cursor: not-allowed; opacity: .36; }
.button-arrow { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--ink); font-size: 17px; }
.create-status { margin: 9px 4px 0; min-height: 18px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.create-status.is-error { color: var(--danger); }
.create-status.is-preparing { display: flex; align-items: center; gap: 7px; color: #586127; font-weight: 700; }
.create-status.is-preparing::before {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  box-sizing: border-box;
  content: "";
  border: 2px solid rgba(17,18,15,.2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

button.is-native-share-busy {
  position: relative;
  color: transparent !important;
  cursor: wait !important;
  opacity: .78;
}
button.is-native-share-busy::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--acid);
  transform: translate(-50%, -50%);
  animation: native-share-spin .72s linear infinite;
}
.share-action.is-native-share-busy::before { color: var(--ink); }
@keyframes native-share-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.gallery-panel { min-width: 0; }
.gallery-heading { margin-bottom: 13px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.gallery-heading h2, .how-it-works h2 { margin: 0; font-size: clamp(30px, 3.3vw, 52px); line-height: .95; letter-spacing: -.06em; }
.gallery-present-button {
  min-height: 39px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.gallery-present-button svg { width: 16px; fill: var(--acid); }
.gallery-filters { display: flex; gap: 4px; margin-bottom: 12px; }
.gallery-filters button {
  min-height: 35px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.gallery-filters button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: white; }
.gallery-filter-unseen {
  min-width: 31px;
  height: 21px;
  padding: 0 6px 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(17,18,15,.12), 0 4px 13px rgba(153,204,0,.28);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.gallery-filter-unseen[hidden] { display: none; }
.gallery-filter-unseen span { font-size: 11px; }
.gallery-filter-unseen b { font: inherit; }
.live-request-badge {
  min-width: 19px;
  height: 19px;
  margin-left: 5px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
}
.gallery-stage { position: relative; min-height: 460px; }
.gallery-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: min(76dvh, 820px);
  overflow-y: auto;
  padding: 1px 7px 12px 1px;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(17,18,15,.35) transparent;
}
.gallery-rail:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 18px; }
.gallery-rail::-webkit-scrollbar { width: 9px; }
.gallery-rail::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(17,18,15,.34); background-clip: padding-box; }
.result-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #1c1d19;
  aspect-ratio: 3 / 4;
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(17, 18, 15, .12);
}
.result-card.is-unseen { box-shadow: 0 0 0 2px var(--acid), 0 15px 40px rgba(113,152,0,.24); }
.result-card video, .result-card img { width: 100%; height: 100%; display: block; object-fit: cover; background: #292a25; transition: transform .45s ease; }
.result-card:hover video, .result-card:hover img { transform: scale(1.025); }
.result-card::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.82)); pointer-events: none; }
.card-play { position: absolute; z-index: 2; inset: 0; margin: auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--acid); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.26); }
.result-reaction-badge { position: absolute; z-index: 4; top: 10px; left: 10px; width: auto; min-width: 39px; height: 39px; padding: 0 9px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; background: rgba(255,255,255,.9); color: var(--ink); box-shadow: 0 7px 22px rgba(0,0,0,.24); font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: 18px; font-weight: 800; line-height: 1; pointer-events: none; }
.result-reaction-badge[hidden] { display: none; }
.result-unseen-badge {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  min-height: 31px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
  animation: unseen-attention 1.35s ease-in-out infinite;
}
@keyframes unseen-attention {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 0 0 0 rgba(200,255,50,.52); }
  50% { transform: scale(1.06); box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 0 0 7px rgba(200,255,50,0); }
}
.job-card { cursor: default; }
.job-card img { filter: saturate(.82) brightness(.7); }
.failed-job-card { cursor: default; border: 1px solid rgba(255,93,84,.58); }
.failed-job-card img { filter: grayscale(.35) saturate(.62) brightness(.48); }
.failed-job-card::after { inset: 20% 0 0; background: linear-gradient(transparent, rgba(40,8,7,.93)); }
.failed-job-badge { position: absolute; z-index: 4; top: 11px; left: 11px; padding: 6px 10px; border: 1px solid rgba(255,178,174,.75); border-radius: 999px; background: rgba(143,28,23,.9); color: white; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.failed-job-copy { z-index: 5; }
.failed-job-message { margin: 0; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: rgba(255,255,255,.82); font-size: 10px; line-height: 1.35; }
.card-controls .retry-failed-control { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.job-card .card-copy { z-index: 5; }
.job-card .card-meta { justify-content: flex-start; gap: 8px; }
.card-copy { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 11px; display: grid; gap: 6px; }
.card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; color: rgba(255,255,255,.76); font-size: 10px; }
.card-meta [data-content-metrics] { flex-basis: 100%; color: rgba(255,255,255,.62); }
.card-social-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.card-social-controls button {
  min-width: 0;
  height: 27px;
  padding: 0 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: white;
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-social-controls .card-rating-control { color: #ffe77a; }
.card-social-controls .card-reaction-control { font-family: inherit, "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.card-controls { display: grid; grid-template-columns: repeat(var(--card-control-count, 3), minmax(0, 1fr)); gap: 4px; align-items: stretch; }
.card-controls button {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  background: rgba(10,10,8,.54);
  color: white;
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-controls button:last-child { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.card-controls .flag-control { color: #ffb2ae; border-color: rgba(255,93,84,.55); }
.card-controls .delete-control { color: #ffb2ae; border-color: rgba(255,93,84,.55); }
.card-controls .public-toggle-control.is-active { color: var(--acid); border-color: var(--acid); background: rgba(200,255,50,.14); }
.failed-job-card .card-controls .delete-control { background: rgba(13,15,12,.82); color: #ffb2ae; border-color: rgba(255,93,84,.55); }
.card-controls button:disabled { opacity: .72; cursor: default; }
.gallery-loading { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-loading span { border-radius: 18px; background: linear-gradient(100deg, #e0dcd2 20%, #f9f7f1 38%, #e0dcd2 58%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }
.swipe-hint { display: block; margin: 8px 0 0; color: var(--muted); font-size: 9px; }
.empty-gallery {
  grid-column: 1 / -1;
  min-height: 230px;
  margin: 0;
  padding: 28px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 254, 249, .45);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.how-it-works {
  margin: 0 clamp(18px, 4vw, 58px) clamp(40px, 7vw, 100px);
  padding: clamp(25px, 4vw, 50px);
  display: grid;
  grid-template-columns: .65fr 1.2fr;
  gap: 30px 60px;
  border-radius: 28px;
  background: var(--ink);
  color: white;
}
.how-it-works .eyebrow { color: var(--acid); }
.how-it-works ol { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; list-style: none; }
.how-it-works li { min-height: 160px; padding: 18px; display: grid; align-content: end; gap: 4px; border-radius: 18px; background: #24261f; }
.how-it-works li > span { width: 35px; height: 35px; margin-bottom: auto; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--ink); font-weight: 800; }
.how-it-works li strong { font-size: 17px; }
.how-it-works li small, .allowance-copy { color: rgba(255,255,255,.6); line-height: 1.5; }
.allowance-copy { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12px; }
.allowance-copy strong { color: white; }
.help-contact {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: #24261f;
}
.help-contact div { display: grid; gap: 4px; }
.help-contact strong { font-size: 15px; }
.help-contact div span { color: rgba(255,255,255,.6); font-size: 11px; line-height: 1.5; }
.help-contact a {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

footer { padding: 24px clamp(18px, 4vw, 58px); display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer nav { display: flex; gap: 18px; }
footer a { color: inherit; }

.modal, .presentation, .gallery-presentation { border: 0; padding: 0; background: transparent; }
.modal { width: min(460px, calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 28px); overflow: visible; }
.modal::backdrop, .presentation::backdrop, .gallery-presentation::backdrop { background: rgba(17, 18, 15, .82); backdrop-filter: blur(8px); }
.modal-card {
  position: relative;
  width: 100%;
  padding: 30px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.modal-card h2 { margin: 0 0 9px; font-size: 34px; letter-spacing: -.055em; line-height: 1; }
.modal-card > p:not(.eyebrow):not(.modal-status) { margin: 0 0 20px; color: var(--muted); line-height: 1.5; font-size: 13px; }
.modal-card label { display: grid; gap: 7px; margin: 15px 0; font-size: 12px; font-weight: 800; }
.modal-card label small { color: var(--muted); font-weight: 500; }
.modal-card input[type="email"], .modal-card input[type="url"], .modal-card input[type="text"] {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-size: 16px;
}
.modal-close { position: absolute; top: 13px; right: 13px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper-2); cursor: pointer; font-size: 23px; }
.modal-primary { width: 100%; height: 52px; margin-top: 5px; border: 0; border-radius: 13px; background: var(--ink); color: white; cursor: pointer; font-weight: 800; }
.modal-primary:disabled { cursor: not-allowed; opacity: .52; }
.text-button { display: block; margin: 12px auto 0; border: 0; background: transparent; cursor: pointer; text-decoration: underline; font-size: 12px; }
.modal-status { min-height: 17px; margin: 10px 0 0; color: var(--danger); font-size: 11px; }
.modal-card > small { display: block; margin-top: 15px; color: var(--muted); line-height: 1.5; }
.shared-welcome-card { overflow: hidden; }
.shared-welcome-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: var(--accent);
}
.shared-welcome-note { display: grid; gap: 5px; margin: 16px 0; padding: 14px; border: 1px solid rgba(179, 226, 0, .55); border-radius: 14px; background: rgba(204, 255, 25, .13); }
.shared-welcome-note span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.account-menu-actions { display: grid; gap: 9px; }
.danger-outline, .danger-primary {
  min-height: 50px;
  width: 100%;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
.danger-outline { border: 1px solid rgba(196,48,42,.35); background: transparent; color: #a82b26; }
.danger-primary { border: 1px solid #c4302a; background: #c4302a; color: white; }
.danger-primary:disabled { opacity: .6; cursor: wait; }
.destructive-warning { display: grid; gap: 5px; margin: 16px 0; padding: 14px; border: 1px solid rgba(196,48,42,.24); border-radius: 14px; background: rgba(196,48,42,.07); color: #8f2722; }
.destructive-warning span { font-size: 12px; line-height: 1.45; }
.account-deletion-cancel { display: block; margin-top: 13px; text-align: center; }
.url-import-modal { width: min(640px, calc(100vw - 28px)); }
.url-import-card { max-height: calc(100dvh - 28px); overflow: auto; }
.url-import-card .modal-status { color: var(--muted); }
.url-results { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.url-results-heading { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.url-results-heading strong { font-size: 12px; }
.url-results-heading span { color: var(--muted); font-size: 10px; }
.url-image-grid { max-height: min(330px, 42dvh); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow: auto; overscroll-behavior: contain; }
.url-image-choice { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 13px; background: var(--paper-2); cursor: pointer; }
.url-image-choice:hover, .url-image-choice:focus-visible { border-color: var(--ink); outline: none; }
.url-image-choice img {
  width: 100%;
  height: 100%;
  display: block;
  padding: 4px;
  object-fit: contain;
  object-position: center;
  background: #e8e5df;
}
.url-image-choice span { position: absolute; inset: auto 6px 6px; padding: 5px 7px; border-radius: 999px; background: rgba(17,18,15,.86); color: white; font-size: 9px; font-weight: 800; opacity: 0; transform: translateY(3px); transition: opacity .16s, transform .16s; }
.url-image-choice:hover span, .url-image-choice:focus-visible span { opacity: 1; transform: none; }
.url-image-choice.is-unavailable { display: none; }
.install-preview {
  min-height: 82px;
  margin: 18px 0 10px;
  padding: 15px 17px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.install-preview .brand-mark { grid-row: 1 / 3; transform: scale(1.35); transform-origin: center; }
.install-preview strong { align-self: end; font-size: 16px; }
.install-preview small { color: var(--muted); font-size: 11px; }
.notification-benefits { margin: 16px 0 18px; padding: 0; display: grid; gap: 8px; list-style: none; }
.notification-benefits li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; font-weight: 700; }
.notification-benefits span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--ink); font-size: 12px; }
.credit-steps { margin: 18px 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.credit-steps li { display: grid; grid-template-columns: 35px 1fr; gap: 11px; align-items: start; }
.credit-steps li > span { min-width: 35px; height: 35px; padding: 0 5px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); font-size: 12px; font-weight: 850; }
.credit-steps p { margin: 0; display: grid; gap: 2px; }
.credit-steps strong { font-size: 13px; line-height: 1.35; }
.credit-steps small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.45; }

.presentation { inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; overflow: hidden; }
.presentation-shell { width: min(1080px, 100%); height: 100dvh; min-width: 0; min-height: 0; max-height: 100dvh; margin: auto; padding: 14px clamp(12px, 3vw, 34px) max(14px, env(safe-area-inset-bottom)); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; background: #0d0e0b; color: white; }
.presentation-shell > header { min-height: 48px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 10px; }
.presentation-shell > header div { min-width: 0; display: grid; text-align: center; }
.presentation-shell > header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presentation-shell > header small { color: rgba(255,255,255,.52); font-size: 10px; }
.presentation-back, .presentation-expand { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.08); color: white; cursor: pointer; font-size: 20px; }
.presentation-expand svg { width: 19px; fill: currentColor; }
.video-stage { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 19px; background: #080906; }
.video-stage video { width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; display: block; object-fit: contain; object-position: center; background: #080906; }
.video-error { position: absolute; padding: 20px; color: rgba(255,255,255,.66); }
.result-details { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 14px 20px; flex-wrap: wrap; }
.rating-block { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.65); font-size: 11px; }
.rating-block > span, .reaction-block > span { display: grid; gap: 2px; }
.rating-block b, .reaction-block b { color: rgba(255,255,255,.86); font-size: 11px; }
.rating-block small, .reaction-block small { color: rgba(255,255,255,.48); font-size: 9px; }
.stars { display: flex; gap: 1px; }
.stars button { padding: 3px; border: 0; background: transparent; color: rgba(255,255,255,.26); cursor: pointer; font-size: 22px; }
.stars button.is-active { color: var(--acid); }
.reaction-block { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.65); font-size: 11px; }
.reaction-picker { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.055); }
.reaction-picker button { position: relative; width: 31px; height: 31px; padding: 0; display: grid; place-items: center; border: 1px solid transparent; border-radius: 50%; background: transparent; filter: grayscale(.5); opacity: .68; cursor: pointer; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: 19px; line-height: 1; transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease, filter .15s ease; }
.reaction-picker button[data-count]:not([data-count=""])::after { content: attr(data-count); position: absolute; right: -2px; bottom: -3px; min-width: 14px; height: 14px; padding: 0 3px; display: grid; place-items: center; border-radius: 999px; background: var(--acid); color: var(--ink); font-family: Manrope, sans-serif; font-size: 8px; font-weight: 900; line-height: 1; }
.reaction-picker button:hover { opacity: 1; filter: none; transform: translateY(-1px); }
.reaction-picker button.is-active { border-color: var(--acid); background: rgba(200,255,50,.17); filter: none; opacity: 1; transform: scale(1.08); }
.presentation-reaction-badge { top: 14px; left: 14px; min-width: 48px; height: 48px; font-size: 21px; }
.public-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11px; }
.public-toggle input { position: absolute; opacity: 0; }
.public-toggle > span { position: relative; width: 36px; height: 21px; border-radius: 999px; background: rgba(255,255,255,.22); }
.public-toggle > span::after { content: ""; position: absolute; width: 15px; height: 15px; top: 3px; left: 3px; border-radius: 50%; background: white; transition: transform .18s; }
.public-toggle input:checked + span { background: var(--acid); }
.public-toggle input:checked + span::after { transform: translateX(15px); background: var(--ink); }
.public-review-status { margin: 0; padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.82); font-size: 11px; }
.presentation-actions { display: grid; grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); gap: 7px; }
.presentation-actions button { height: 52px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(255,255,255,.08); color: white; cursor: pointer; font-weight: 750; }
.presentation-actions [data-result-action="public"][aria-pressed="true"] { border-color: var(--acid); color: var(--acid); background: rgba(200,255,50,.12); }
.presentation-actions .share-action { border-color: var(--acid); background: var(--acid); color: var(--ink); }
.presentation-actions .flag-action { border-color: rgba(255,93,84,.8); color: #ffaaa5; }
.presentation-actions .delete-action { border-color: rgba(255,93,84,.8); color: #ffaaa5; }

.gallery-presentation {
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: white;
}
.gallery-presentation-shell {
  --gallery-tile-min: 210px;
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
  height: 100%;
  padding: max(14px, env(safe-area-inset-top)) clamp(14px, 2.8vw, 36px) max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  background:
    radial-gradient(circle at 82% 4%, rgba(200,255,50,.12), transparent 26%),
    #0c0d0a;
}
.gallery-presentation-shell > header {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(122px, max-content) minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}
.gallery-presentation-home {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.04em;
}
.gallery-presentation-home .brand-mark i:nth-child(1),
.gallery-presentation-home .brand-mark i:nth-child(3) { background: white; }
.gallery-presentation-home:hover { color: var(--acid); }
.gallery-presentation-close {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: white;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}
.gallery-presentation-close:hover { color: var(--acid); border-color: rgba(200,255,50,.5); }
.gallery-video-player > header button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: white;
  cursor: pointer;
  font-size: 24px;
}
.gallery-presentation-heading { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.gallery-presentation-heading small { color: var(--acid); font-size: 9px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.gallery-presentation-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(23px, 3vw, 38px); letter-spacing: -.045em; }
.gallery-presentation-heading span { color: rgba(255,255,255,.48); font-size: 11px; font-weight: 700; }
.gallery-presentation-tools { display: flex; align-items: center; gap: 12px; }
.gallery-size-control { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.55); font-size: 9px; font-weight: 750; }
.gallery-size-control input { width: clamp(90px, 12vw, 155px); accent-color: var(--acid); cursor: ew-resize; }
.gallery-mode-switch { padding: 3px; display: flex; gap: 3px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.05); }
.gallery-mode-switch button { width: 38px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.55); cursor: pointer; }
.gallery-mode-switch button[aria-pressed="true"] { background: var(--acid); color: var(--ink); }
.gallery-mode-switch svg { width: 17px; fill: currentColor; }
.gallery-presentation-viewport { position: relative; min-height: 0; overflow: hidden; }
.gallery-presentation-list { min-height: 0; height: 100%; }
.gallery-presentation-status {
  align-self: center;
  justify-self: center;
  margin: auto;
  max-width: 34rem;
  padding: 2rem;
  color: rgba(255, 255, 255, .76);
  text-align: center;
}
.gallery-presentation-shell[data-mode="grid"] .gallery-presentation-list {
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 2px 3px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--gallery-tile-min)), 1fr));
  grid-auto-rows: max-content;
  align-items: start;
  align-content: start;
  gap: clamp(10px, 1.4vw, 18px);
  scrollbar-color: rgba(255,255,255,.3) transparent;
}
.gallery-presentation-shell[data-mode="swipe"] .gallery-presentation-list {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px max(5vw, calc((100vw - min(78vw, 560px)) / 2)) 16px;
  display: flex;
  align-items: center;
  gap: clamp(13px, 3vw, 32px);
  scroll-padding-inline: max(5vw, calc((100vw - min(78vw, 560px)) / 2));
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  overscroll-behavior-block: none;
  touch-action: pan-x;
  scrollbar-width: none;
}
.gallery-presentation-shell[data-mode="swipe"] .gallery-presentation-list::-webkit-scrollbar { display: none; }
.gallery-rail-arrow { position: absolute; z-index: 8; top: 50%; width: 50px; height: 50px; border-color: rgba(255,255,255,.34); background: var(--acid); color: var(--ink); box-shadow: 0 12px 34px rgba(0,0,0,.38); transform: translateY(-50%); font-size: 34px; }
.gallery-rail-arrow:hover:not(:disabled) { transform: translateY(-50%) scale(1.05); }
.gallery-rail-arrow-previous { left: 12px; }
.gallery-rail-arrow-next { right: 12px; }
.gallery-poster {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: clamp(14px, 1.6vw, 22px);
  background: #22231f;
  color: white;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  box-shadow: 0 20px 54px rgba(0,0,0,.34);
  scroll-snap-align: center;
}
.gallery-poster.is-unseen { border-color: var(--acid); box-shadow: 0 0 0 2px rgba(200,255,50,.72), 0 20px 54px rgba(0,0,0,.34); }
.gallery-presentation-shell[data-mode="grid"] .gallery-poster {
  width: 100%;
  align-self: start;
  contain: paint;
}
.gallery-presentation-shell[data-mode="swipe"] .gallery-poster { flex: 0 0 min(78vw, 560px); height: min(73dvh, 760px); aspect-ratio: auto; }
.gallery-poster img, .gallery-poster video { width: 100%; height: 100%; display: block; object-fit: cover; background: #22231f; transition: transform .35s ease; }
.gallery-poster:hover img, .gallery-poster:hover video { transform: scale(1.025); }
.gallery-poster::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.88)); pointer-events: none; }
.gallery-poster-play { position: absolute; z-index: 2; inset: 0; width: 58px; height: 58px; margin: auto; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.34); font-size: 18px; }
.gallery-poster > .result-reaction-badge { min-width: 44px; height: 44px; font-size: 19px; }
.gallery-poster > .result-unseen-badge { top: 12px; right: 12px; }
.gallery-poster-copy { position: absolute; z-index: 3; left: 15px; right: 15px; bottom: 14px; display: grid; gap: 4px; text-align: left; }
.gallery-poster-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.gallery-poster-copy span { color: rgba(255,255,255,.65); font-size: 10px; }
.gallery-presentation-shell > footer { min-height: 20px; color: rgba(255,255,255,.42); font-size: 10px; text-align: center; }
.gallery-video-player { position: fixed; z-index: 100; isolation: isolate; inset: 0; width: 100%; height: 100dvh; min-width: 0; min-height: 0; max-width: 100%; max-height: 100dvh; padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 9px; background: #080906; }
.gallery-video-player[hidden] { display: none; }
.gallery-video-player > header { min-height: 48px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.gallery-video-heading { min-width: 0; display: grid; text-align: center; }
.gallery-video-player > header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-video-heading small { color: rgba(255,255,255,.52); font-size: 10px; }
.gallery-video-player > header svg { width: 19px; fill: currentColor; }
.gallery-video-stage { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: black; }
.gallery-video-player video { width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; display: block; object-fit: contain; object-position: center; background: black; }
.gallery-video-feedback { min-height: 44px; padding: 0 6px; }
.gallery-video-feedback[hidden] { display: none; }
.feedback-reaction-badge { position: static; z-index: auto; flex: 0 0 auto; min-width: 36px; height: 36px; padding: 0 8px; font-size: 17px; box-shadow: none; }
.gallery-video-actions { min-height: 48px; display: flex; justify-content: center; gap: 8px; }
.gallery-video-actions button { min-width: 94px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.09); color: white; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.gallery-video-actions button:hover { background: var(--acid); color: var(--ink); }
.gallery-video-actions .gallery-video-flag { border-color: rgba(255,105,92,.5); color: #ff8f85; }
.gallery-video-actions .gallery-video-delete { border-color: rgba(255,105,92,.5); color: #ff8f85; }
.gallery-video-actions .gallery-video-flag:hover { background: #d5372f; color: white; }
.gallery-video-actions .gallery-video-delete:hover { background: #d5372f; color: white; }
.gallery-video-actions button[hidden] { display: none; }

.public-share-option { grid-template-columns: auto 1fr !important; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); cursor: pointer; }
.public-share-option input { margin-top: 4px; accent-color: var(--ink); }
.public-share-option span { display: grid; gap: 2px; }
.public-share-option small { color: var(--muted); font-weight: 500; }
.public-gallery-share { margin-left: auto; }
.moderation-modal .modal-card { width: min(590px, calc(100vw - 28px)); }
.moderation-modal textarea { width: 100%; resize: vertical; }
.terms-check { grid-template-columns: auto 1fr !important; align-items: start; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; }
.terms-check input { margin-top: 3px; accent-color: var(--ink); }
.flag-reasons { margin: 0; padding: 0; display: grid; gap: 7px; border: 0; }
.flag-reasons legend { margin-bottom: 6px; font-weight: 800; }
.flag-reasons label { grid-template-columns: auto 1fr !important; align-items: start; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; }
.flag-reasons input { margin-top: 4px; accent-color: #d5372f; }
.flag-reasons span { display: grid; gap: 2px; }
.flag-reasons small { color: var(--muted); font-weight: 500; }
.flag-submit { background: #d5372f !important; color: white !important; }
.share-channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.share-channels button { min-height: 45px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; font-size: 12px; font-weight: 750; }
.share-channels button:first-child { grid-column: 1 / -1; background: var(--ink); color: white; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(430px, calc(100vw - 30px)); padding: 12px 17px; border-radius: 999px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 12px; font-weight: 700; text-align: center; }

@media (max-width: 1040px) {
  .first-view { grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.15fr); gap: 28px; }
  .gallery-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-loading { grid-template-columns: 1fr 1fr; }
}

/* Use the complete mobile composition for narrow screens and for short, touch-first
   phone landscape viewports. Safari can report a landscape CSS width above 760px,
   so width alone must not select the compressed two-column desktop layout. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-height: 520px) {
  .desktop-only { display: none !important; }
  .mobile-only, .mobile-source { display: inline-flex; }
  .topbar { min-height: 57px; padding: 8px 13px; }
  .brand { gap: 6px; font-size: 18px; }
  .brand small { display: none; }
  .brand-mark { width: 20px; height: 17px; }
  .credits-pill { padding: 0 10px; font-size: 10px; }
  .credits-pill span { font-size: 12px; }
  .icon-button { width: 37px; min-height: 37px; }
  .account-button { min-height: 37px; padding: 0 12px; font-size: 11px; }
  .top-actions { gap: 5px; }
  .account-button { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .public-gallery-return { margin-top: 8px; }
  .first-view { min-height: 0; padding: 18px 0 26px; display: block; }
  .create-panel { padding: 0 13px; }
  .create-copy { display: grid; grid-template-columns: 1fr; }
  .create-copy .eyebrow { display: none; }
  .create-copy h1 { font-size: clamp(45px, 14vw, 64px); }
  .create-copy > p:last-child { margin: 10px 0 14px; font-size: 13px; line-height: 1.42; }
  .import-card { padding: 8px; border-radius: 19px; }
  .selected-media { min-height: 112px; max-height: 170px; border-radius: 13px; }
  .selected-media img { min-height: 112px; max-height: 170px; }
  .empty-selection { gap: 0; }
  .empty-selection .spark { font-size: 25px; }
  .empty-selection strong { font-size: 14px; }
  .empty-selection span:last-child { font-size: 10px; }
  .source-actions { grid-template-columns: repeat(5, 1fr); gap: 2px; margin-top: 4px; }
  .source-button { min-height: 49px; padding: 4px 1px; border-radius: 11px; font-size: 8.5px; }
  .source-button svg { width: 20px; height: 20px; }
  .recent-block { margin-top: 4px; padding-top: 6px; }
  .recent-label { margin-bottom: 4px; font-size: 8px; }
  .recent-rail { gap: 6px; }
  .recent-thumb { flex-basis: 44px; width: 44px; height: 44px; border-radius: 9px; }
  .animate-button { min-height: 49px; margin-top: 6px; border-radius: 12px; font-size: 13px; }
  .button-arrow { width: 27px; height: 27px; }
  .create-status { margin-top: 6px; min-height: 14px; font-size: 9px; }
  .gallery-panel { margin-top: 24px; }
  .gallery-heading { padding: 0 13px; margin-bottom: 9px; align-items: center; }
  .gallery-heading h2 { font-size: 33px; }
  .gallery-heading .eyebrow { font-size: 8px; margin-bottom: 4px; }
  .gallery-present-button { min-height: 36px; padding: 0 11px; }
  .gallery-present-button span { display: none; }
  .gallery-filters { padding: 0 13px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
  .gallery-filters button { min-height: 32px; padding: 0 13px; font-size: 10px; }
  .gallery-stage { min-height: 365px; }
  .gallery-rail { display: flex; gap: 9px; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 0 13px 8px; scroll-padding-inline: 13px; scroll-snap-type: x mandatory; scrollbar-gutter: auto; scrollbar-width: none; overscroll-behavior-inline: contain; }
  .gallery-rail::-webkit-scrollbar { display: none; }
  .result-card { display: block; flex: 0 0 min(76vw, 300px); aspect-ratio: 4 / 5; scroll-snap-align: center; border-radius: 16px; }
  .result-card:first-child { scroll-snap-align: start; }
  .gallery-loading { left: 13px; right: 13px; grid-template-columns: 76vw; }
  .gallery-loading span:not(:first-child) { display: none; }
  .swipe-hint { margin: 4px 13px 0; }
  .how-it-works { margin: 0 13px 35px; padding: 22px 15px; display: block; border-radius: 20px; }
  .how-it-works h2 { font-size: 35px; }
  .how-it-works ol { margin-top: 20px; gap: 8px; }
  .how-it-works li { min-height: 135px; padding: 13px; }
  .how-it-works li > span { width: 29px; height: 29px; }
  .how-it-works li strong { font-size: 13px; }
  .how-it-works li small { font-size: 9px; }
  .allowance-copy { margin-top: 17px; padding-top: 14px; font-size: 9.5px; }
  .help-contact { margin-top: 13px; padding: 14px; align-items: stretch; flex-direction: column; }
  .help-contact a { align-self: flex-start; }
  footer { padding: 20px 13px; font-size: 10px; }
  footer nav { gap: 10px; }
  .modal-card { padding: 26px 19px 20px; border-radius: 21px; }
  .url-import-card h2 { max-width: calc(100% - 38px); font-size: 31px; }
  .url-image-grid { max-height: min(310px, 40dvh); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .url-image-choice { border-radius: 10px; }
  .url-image-choice span { opacity: 1; transform: none; }
  .presentation-shell { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); gap: 7px; }
  .presentation-shell > header { min-height: 44px; }
  .video-stage { border-radius: 13px; }
  .video-stage video { min-height: 0; max-height: 100%; }
  .result-details { min-height: 50px; gap: 12px; flex-wrap: wrap; }
  .rating-block > span { display: none; }
  .stars button { font-size: 20px; }
  .reaction-block { width: 100%; justify-content: center; }
  .reaction-block > span { display: none; }
  .reaction-block > .feedback-reaction-badge { display: grid; }
  .reaction-picker { max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
  .reaction-picker::-webkit-scrollbar { display: none; }
  .reaction-picker button { flex: 0 0 30px; }
  .public-toggle b { font-size: 9px; }
  .presentation-actions button { height: 48px; border-radius: 12px; font-size: 12px; }
  .gallery-presentation-shell { padding-inline: 8px; gap: 8px; }
  .gallery-presentation-shell > header { min-height: 50px; grid-template-columns: minmax(100px, max-content) minmax(0, 1fr) auto; gap: 8px; }
  .gallery-presentation-home { gap: 6px; font-size: 15px; }
  .gallery-presentation-home .brand-mark { width: 20px; height: 17px; }
  .gallery-presentation-heading { display: grid; gap: 0; }
  .gallery-presentation-heading small { font-size: 7px; }
  .gallery-presentation-heading strong { font-size: 20px; }
  .gallery-presentation-heading span { font-size: 8px; }
  .gallery-size-control { display: none !important; }
  .gallery-mode-switch button { width: 34px; height: 32px; }
  .gallery-presentation-shell[data-mode="grid"] .gallery-presentation-list { --gallery-tile-min: 125px !important; gap: 7px; }
  .gallery-presentation-shell[data-mode="swipe"] .gallery-presentation-list { padding-inline: 7vw; scroll-padding-inline: 7vw; gap: 10px; }
  .gallery-presentation-shell[data-mode="swipe"] .gallery-poster { flex-basis: 86vw; height: min(74dvh, 680px); }
  .gallery-poster-play { width: 52px; height: 52px; }
  .gallery-presentation-shell > footer { font-size: 9px; }
}

@media (min-width: 761px) and (pointer: fine) {
  .recent-rail-frame .rail-arrow:not([hidden]) { display: grid; }
  .gallery-presentation-shell[data-mode="swipe"] .gallery-rail-arrow:not([hidden]) { display: grid; }
}

@media (max-width: 380px) {
  .credits-pill { display: none !important; }
  .account-button { max-width: 64px; padding-inline: 9px; }
  .create-copy h1 { font-size: 45px; }
  .result-card { flex-basis: 79vw; }
  .how-it-works ol { grid-template-columns: 1fr; }
  .how-it-works li { min-height: 112px; }
}

@media (max-width: 520px) {
  .credits-pill { display: none !important; }
}

/* Keep installed and touch-first mobile navigation reachable while the page scrolls.
   Width alone misses wide iPhone landscape viewports, so coarse touch pointers are
   included without changing the desktop header behaviour. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  :root {
    --animateit-mobile-header-height: max(57px, calc(45px + max(8px, env(safe-area-inset-top))));
  }
  body { padding-top: var(--animateit-mobile-header-height); }
  .topbar {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    height: var(--animateit-mobile-header-height);
    min-height: var(--animateit-mobile-header-height);
    padding: max(8px, env(safe-area-inset-top)) 13px 8px;
    -webkit-backdrop-filter: blur(18px);
    transform: translateZ(0);
  }
  .public-gallery-return { top: calc(var(--animateit-mobile-header-height) + 8px); }
}

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

/* Public product explanation remains readable below the creation workspace. */
.discovery-info{max-width:1100px;margin:32px auto;padding:24px;line-height:1.65;overflow-wrap:anywhere}.discovery-info h2{font-size:clamp(22px,4vw,32px);line-height:1.2}.discovery-info details{border-top:1px solid #8884;padding:14px 0}.discovery-info summary{cursor:pointer;font-weight:700}.discovery-info a{color:inherit;text-decoration:underline}.discovery-info p{max-width:78ch}.discovery-info ol{padding-left:24px}

.create-copy h1{font-size:clamp(32px,4vw,52px);line-height:1.12}
