/* =========================================================
   ListingAI - studio look
   Ink + signal blue. The hero is a lit stage; every scene paints its own colour.
   ========================================================= */
@property --tone { syntax: "<color>"; inherits: true; initial-value: #3157ff; }

:root {
  --ink: #10142b;
  --ink-2: #1b2150;
  --paper: #f6f7fc;
  --mist: #eceffa;
  --signal: #3157ff;
  --signal-d: #2340d6;
  --cyan: #19c6d9;
  --sun: #ffc247;
  --text: #10142b;
  --muted: #5d6486;
  --line: #dfe3f3;
  --danger: #d6334a;
  --card: #fff;
  --radius: 16px;
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Onest", "Segoe UI", system-ui, sans-serif;
  --side: 136px;
  --tone: #3157ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { font-family: var(--body); background: var(--paper); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
[hidden] { display: none !important; }

.main { margin-right: var(--side); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.small-text { color: var(--muted); font-size: 13px; margin: 6px 0; }

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 14px 28px; font-size: 16px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: transform 0.2s, background 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 10px 24px rgba(49, 87, 255, 0.35); }
.btn-primary:hover { background: var(--signal-d); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(49, 87, 255, 0.45); }
.btn-primary:disabled { opacity: 0.65; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; opacity: 0.9; }
.btn-ghost:hover { transform: translateY(-2px); opacity: 1; }
.btn-full { width: 100%; }
.btn-small { padding: 7px 16px; font-size: 14px; background: var(--mist); color: var(--signal); }
.btn-small:hover { background: #dfe5ff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25); }

/* ===== header ===== */
.scroll-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--signal), var(--cyan), var(--sun)); }
.header {
  --fg: var(--text); --fg-soft: var(--muted); --bd: var(--line);
  position: fixed; top: 0; left: 0; right: var(--side); z-index: 30; height: 68px;
  background: rgba(246, 247, 252, 0.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  transition: background 0.3s, border-color 0.3s;
}
.header.on-dark { --fg: #fff; --fg-soft: rgba(255, 255, 255, 0.7); --bd: rgba(255, 255, 255, 0.28); background: transparent; backdrop-filter: none; border-bottom-color: transparent; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: none; }
.logo { font-family: var(--display); font-weight: 600; font-size: 17px; text-decoration: none; color: var(--fg); letter-spacing: -0.02em; }
.logo span { color: var(--cyan); }
.header-right { display: flex; align-items: center; gap: 14px; }
.credits-badge { padding: 6px 14px; border-radius: 999px; background: var(--signal); color: #fff; font-size: 14px; font-weight: 600; }
.account-box { display: flex; align-items: center; gap: 10px; }
.user-email { font-size: 14px; color: var(--fg-soft); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header .btn-small { background: transparent; border: 1px solid var(--bd); color: var(--fg); }
.lang-switch { display: flex; border: 1px solid var(--bd); border-radius: 999px; overflow: hidden; }
.lang-btn { border: 0; background: transparent; padding: 6px 13px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--fg-soft); }
.lang-btn.active { background: var(--signal); color: #fff; }

/* ===== side menu ===== */
.sidebar {
  position: fixed; top: 16px; bottom: 16px; right: 16px; width: 104px; z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 22px 10px;
  background: linear-gradient(180deg, #151b3f 0%, #0b0f26 100%);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 26px; box-shadow: 0 20px 50px rgba(11, 15, 38, 0.3);
}
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { width: 54px; height: 54px; filter: drop-shadow(0 6px 16px rgba(49, 87, 255, 0.5)); }
.brand-name { font-family: var(--display); font-size: 8px; font-weight: 600; letter-spacing: 0.28em; padding-left: 0.28em; color: #9fb4ff; }
.nav { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 6px; }
.nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 10px 4px;
  border: 1px solid transparent; border-radius: 18px; background: transparent; color: #8f9cc6; cursor: pointer; font-size: 12px; font-weight: 600; transition: 0.2s;
}
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.nav-icon svg { width: 22px; height: 22px; }
.nav-item.active { color: #fff; border-color: rgba(120, 150, 255, 0.4); background: linear-gradient(135deg, rgba(49, 87, 255, 0.32), rgba(49, 87, 255, 0.08)); }
.nav-item.active::before { content: ""; position: absolute; right: -11px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--signal), var(--cyan)); }

/* ===== intro: camera iris opens once per visit ===== */
.intro { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.intro-iris { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 200vmax var(--ink); animation: iris 1.15s 0.55s cubic-bezier(0.7, 0, 0.2, 1) forwards; }
.intro-mark { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; animation: markOut 0.5s 0.55s ease-in forwards; }
@keyframes iris { to { width: 260vmax; height: 260vmax; } }
@keyframes markOut { to { opacity: 0; transform: scale(0.6); } }

/* ===== hero: the lit stage ===== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; color: #fff; padding: 110px 0 70px;
  background: radial-gradient(70% 70% at 78% 52%, color-mix(in srgb, var(--tone) 42%, transparent), transparent 70%), var(--ink);
  transition: --tone 0.9s;
}
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 56px; align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 3.5vw, 54px); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 22px; }
.hero-text { font-size: 18px; color: rgba(255, 255, 255, 0.78); max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-actions .btn-ghost { color: #fff; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 34px; list-style: none; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--cyan)); }

.stage-col { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.stage-wrap { position: relative; width: 100%; perspective: 1100px; }
.stage {
  position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 30px; overflow: hidden; isolation: isolate;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: rotateY(calc(var(--ry, 0) * 1deg)) rotateX(calc(var(--rx, 0) * 1deg)); transition: transform 0.25s ease-out;
}
.stage-scenes, .scene { position: absolute; inset: 0; }
.scene { background-size: cover; }
.stage-light { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.32), transparent 70%); mix-blend-mode: soft-light; }
.stage-tag { position: absolute; z-index: 4; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 999px; background: rgba(16, 20, 43, 0.72); backdrop-filter: blur(8px); color: #fff; font-size: 13px; font-weight: 600; }
.stage-tag i { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }

.swatches { display: flex; gap: 12px; }
.sw { position: relative; width: 38px; height: 38px; padding: 0; border: 2px solid rgba(255, 255, 255, 0.55); border-radius: 50%; cursor: pointer; background-size: cover; transition: transform 0.2s, border-color 0.2s; }
.sw:hover { transform: scale(1.12); }
.sw.active { border-color: #fff; transform: scale(1.15); }
.sw.active::after { content: ""; position: absolute; left: 50%; bottom: -10px; height: 3px; width: 0; border-radius: 3px; background: #fff; transform: translateX(-50%); animation: tick var(--tick, 3.8s) linear forwards; }
.swatches.paused .sw.active::after { animation: none; width: 22px; }

@keyframes tick { to { width: 22px; } }
.hero h1, .hero-text, .hero-actions, .hero-points { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 1.1s; }
.hero-text { animation-delay: 1.25s; } .hero-actions { animation-delay: 1.4s; } .hero-points { animation-delay: 1.55s; }
.stage { animation: rise 0.9s 1.0s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.stage { --noop: 0; }
body.no-intro .hero h1, body.no-intro .hero-text, body.no-intro .hero-actions, body.no-intro .hero-points, body.no-intro .stage { animation-delay: 0.05s; }
/* ===== sections ===== */
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* scene wall */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.chip:hover { border-color: var(--signal); color: var(--signal); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.scene-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; }
.scene-card {
  position: relative; aspect-ratio: 4 / 5; border: 0; border-radius: 22px; overflow: hidden; cursor: pointer; text-align: left; background-size: cover; isolation: isolate;
  box-shadow: 0 1px 2px rgba(16, 20, 43, 0.08); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}
.scene-card:hover { transform: translateY(-8px) rotate(-0.6deg); box-shadow: 0 26px 50px rgba(16, 20, 43, 0.22); }
.scene-card .sc-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.sc-name { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; padding: 7px 12px; border-radius: 12px; background: rgba(16, 20, 43, 0.74); backdrop-filter: blur(6px); color: #fff; font-size: 13px; font-weight: 600; }
.scene-wall.swap .scene-card { animation: cardIn 0.5s both; }
@keyframes cardIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

/* how it works: a real sequence */
.how { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 33px; border-top: 2px dashed var(--line); }
.step { position: relative; }
.step-num { position: relative; width: 66px; height: 66px; margin-bottom: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-size: 22px; font-weight: 600; box-shadow: 0 0 0 8px #fff; }
.step:nth-child(2) .step-num { background: var(--signal); } .step:nth-child(3) .step-num { background: var(--cyan); color: var(--ink); }
.step h3 { font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: -0.02em; margin-bottom: 8px; }
.step p { color: var(--muted); max-width: 320px; }

/* features: ruled list, no boxes */
.features { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 64px; }
.feature { display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.feature .ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--tint) 14%, #fff); color: var(--tint); }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: -0.02em; margin-bottom: 6px; }
.feature p { color: var(--muted); }

/* gallery (shown only when examples exist) */
.gallery { padding: 20px 0 80px; }
.gallery h2 { font-family: var(--display); font-weight: 600; font-size: 28px; margin-bottom: 22px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.example { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.example-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.example-pair div { position: relative; }
.example-pair img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.example-pair span { position: absolute; left: 8px; bottom: 8px; padding: 2px 10px; border-radius: 10px; background: rgba(16, 20, 43, 0.75); color: #fff; font-size: 12px; font-weight: 600; }
.example figcaption { margin-top: 10px; font-weight: 600; }

/* FAQ */
.faq { max-width: 780px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; background: transparent; border: 0; cursor: pointer; text-align: left; font-size: 17px; font-weight: 600; }
.faq-q::after { content: "+"; font-size: 26px; line-height: 1; color: var(--signal); transition: transform 0.3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.faq-a > div { overflow: hidden; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a p { color: var(--muted); padding-bottom: 22px; max-width: 640px; }

/* final call + footer */
.cta { padding: 0 0 96px; }
.cta-box { position: relative; overflow: hidden; border-radius: 34px; padding: 72px 40px; color: #fff; text-align: center; background: radial-gradient(60% 120% at 85% 0%, rgba(49, 87, 255, 0.7), transparent 60%), radial-gradient(50% 100% at 10% 100%, rgba(25, 198, 217, 0.4), transparent 60%), var(--ink); }
.cta-box h2 { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 3vw, 42px); line-height: 1.15; letter-spacing: -0.03em; max-width: 720px; margin: 0 auto 30px; }
.footer { padding: 36px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-logo { font-family: var(--display); font-weight: 600; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.footer-logo span { color: var(--signal); }

/* scroll reveal (used on a few blocks only) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease var(--d, 0ms), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   STUDIO: the creating page
   ========================================================= */
.studio { display: none; padding: 92px 28px 56px; min-height: 100vh; background: radial-gradient(60% 40% at 90% 0%, rgba(49, 87, 255, 0.12), transparent 70%), var(--paper); }
body.in-studio .studio { display: block; animation: studioIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
body.in-studio .landing { display: none; }
@keyframes studioIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.studio-head { max-width: 1240px; margin: 0 auto 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.studio-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.6vw, 36px); letter-spacing: -0.03em; line-height: 1.15; }
.studio-head p { color: var(--muted); margin-top: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: 0.2s; }
.back-link:hover { border-color: var(--signal); color: var(--signal); }
.studio-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(340px, 450px) minmax(0, 1fr); gap: 26px; align-items: start; }
.panel, .canvas { background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 1px 2px rgba(16, 20, 43, 0.04), 0 24px 60px rgba(16, 20, 43, 0.07); }
.panel { position: sticky; top: 84px; padding: 26px; max-height: calc(100vh - 104px); overflow-y: auto; }
.canvas { padding: 26px; min-height: 620px; }
.panel h2 { font-size: 15px; font-weight: 600; margin: 24px 0 12px; }
.panel h2:first-of-type { margin-top: 0; }
.canvas h2 { font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: -0.02em; margin-bottom: 14px; }
.gate { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px 18px; margin-bottom: 22px; border-radius: 18px; background: var(--ink); color: #fff; }
.gate p { font-size: 14px; color: rgba(255, 255, 255, 0.82); }

.input { width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 14px; font: inherit; font-size: 16px; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.input:focus { outline: 0; border-color: var(--signal); box-shadow: 0 0 0 4px rgba(49, 87, 255, 0.14); }
.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; border: 2px dashed #c3caea; border-radius: 18px; padding: 22px; cursor: pointer; color: var(--muted); text-align: center; background: var(--paper); transition: 0.2s; }
.upload:hover { border-color: var(--signal); background: #f0f3ff; color: var(--signal); }
.upload img { max-height: 150px; border-radius: 12px; box-shadow: 0 10px 24px rgba(16, 20, 43, 0.18); }
.generate-row { position: sticky; bottom: -26px; margin: 22px -26px -26px; padding: 16px 26px 26px; background: linear-gradient(180deg, transparent, #fff 28%); }
.hint { margin-top: 10px; color: var(--danger); font-size: 14px; min-height: 20px; }

/* scene picker */
.bg-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.bg-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 0 14px; transition: border-color 0.2s, box-shadow 0.2s; }
.bg-search:focus-within { border-color: var(--signal); box-shadow: 0 0 0 4px rgba(49, 87, 255, 0.12); }
.bg-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.bg-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; padding: 9px 0; text-align: left; }
.bg-shuffle { flex: none; white-space: nowrap; }
.bg-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.bg-tabs.dim .bg-tab { opacity: 0.55; }
.bg-tab { flex: none; scroll-snap-align: start; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.bg-dot { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--tab, var(--signal)); color: #fff; }
.bg-tab.active .bg-dot { background: #fff; color: var(--tab, var(--signal)); }
.bg-empty { grid-column: 1 / -1; padding: 18px 4px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.result-actions .btn-ghost { color: var(--ink); }
.bg-tab { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.bg-tab:hover { border-color: var(--tab, var(--signal)); }
.bg-tab.active { background: var(--tab, var(--signal)); border-color: var(--tab, var(--signal)); color: #fff; }
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bg-grid.enter .bg-tile { animation: cardIn 0.4s both; }
.bg-tile { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: center; }
.bg-thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background-size: cover; border: 2.5px solid transparent; box-shadow: 0 1px 3px rgba(16, 20, 43, 0.18); transition: transform 0.25s, border-color 0.2s, box-shadow 0.2s; }
.bg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-tile:hover .bg-thumb { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(16, 20, 43, 0.2); }
.bg-tile.selected .bg-thumb { border-color: var(--signal); box-shadow: 0 0 0 4px rgba(49, 87, 255, 0.2); }
.bg-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--signal); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; opacity: 0; transform: scale(0.4); transition: 0.2s; }
.bg-tile.selected .bg-check { opacity: 1; transform: none; }
.bg-name { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; line-height: 1.25; }
.bg-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.bg-chip { border: 0; background: var(--ink); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.bg-chip b { opacity: 0.6; margin-left: 4px; }

/* live preview (shown before generating) */
.lp-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.lp-grid.n1 { grid-template-columns: minmax(0, 340px); justify-content: center; }
.lp-grid.n2 { grid-template-columns: repeat(2, 1fr); }
.lp-tile { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background-size: cover; box-shadow: 0 18px 40px rgba(16, 20, 43, 0.18); animation: cardIn 0.45s both; transition: transform 0.35s; }
.lp-tile:hover { transform: translateY(-6px) rotate(-0.5deg); }
.lp-tile .lp-photo { position: absolute; left: 50%; bottom: 30%; width: 52%; max-height: 52%; object-fit: contain; transform: translateX(-50%) rotate(-2deg); background: #fff; padding: 5px; border-radius: 8px; box-shadow: 0 14px 26px rgba(0, 0, 0, 0.3); }
.lp-tile figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 6px 12px; border-radius: 12px; background: rgba(16, 20, 43, 0.74); color: #fff; font-size: 12px; font-weight: 600; }
.lp-note { margin-top: 16px; text-align: center; }

/* result */
.empty { padding: 6px 0 0; }
.loading { padding: 10px 0; }
.dev-text { font-weight: 600; color: var(--signal); margin-bottom: 14px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.shimmer { border-radius: 12px; background: linear-gradient(90deg, #eceffa 25%, #f8f9fe 50%, #eceffa 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.shimmer.line { height: 16px; margin-bottom: 12px; } .shimmer.short { width: 60%; }
.loading-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.shimmer.box { aspect-ratio: 1; border-radius: 20px; }
.text-block { background: var(--paper); border-radius: 18px; padding: 18px; margin-bottom: 22px; }
.text-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.text-head h3, #resultContent > h3 { font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: -0.02em; }
#resultText h4 { margin: 10px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
#resultText p, #resultText ul { color: #2a3052; }
#resultText ul { padding-left: 20px; }
.result-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 12px; }
.result-img { aspect-ratio: 1; border-radius: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 10px 26px rgba(16, 20, 43, 0.14); animation: cardIn 0.5s both; }
.result-img img { max-width: 80%; max-height: 80%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25)); }
.result-img.generated { position: relative; }
.dl-btn { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 10px 16px; min-height: 44px; font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: rgba(11, 15, 38, 0.82); backdrop-filter: blur(6px); cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.3); }
.dl-btn:hover { background: var(--signal); }
.result-img.generated img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: cover; filter: none; transition: transform 0.4s; }
.result-img.generated:hover img { transform: scale(1.05); }
.result-img .no-photo { color: rgba(0, 0, 0, 0.45); font-size: 14px; text-align: center; padding: 10px; }

/* =========================================================
   WINDOWS (credits when free tries end, profile)
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(11, 15, 38, 0.66); backdrop-filter: blur(4px); }
.modal-box { position: relative; width: 100%; max-width: 700px; padding: 38px 32px 32px; border-radius: 28px; background: #fff; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.modal:not([hidden]) .modal-box { animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(0.96); } to { opacity: 1; transform: none; } }
.modal-box h2 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; margin-bottom: 8px; }
.modal-text { color: var(--muted); margin-bottom: 26px; }
.modal-close { position: absolute; top: 12px; right: 16px; border: 0; background: transparent; font-size: 30px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--text); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.plan { position: relative; display: block; cursor: pointer; background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 24px 14px; transition: 0.2s; }
.plan h3 { font-family: var(--display); font-weight: 500; font-size: 15px; }
.plan .price { font-family: var(--display); font-weight: 600; font-size: 32px; margin: 10px 0; letter-spacing: -0.03em; }
.plan p { color: var(--muted); font-size: 14px; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan:hover { border-color: #9db0ff; transform: translateY(-3px); }
.plan:has(input:checked) { border: 2px solid var(--signal); background: #f0f3ff; box-shadow: 0 0 0 5px rgba(49, 87, 255, 0.13); padding: 23.5px 13.5px; }
.plan:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 3px; }
.plan:has(input:checked)::after { content: "\2713"; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--signal); color: #fff; font-size: 13px; font-weight: 700; }

.profile-box { text-align: left; max-height: 90vh; overflow-y: auto; max-width: 560px; }
.profile-email { color: var(--muted); margin-bottom: 18px; }
.profile-section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.profile-section h3 { margin-bottom: 8px; }
.invite-row { display: flex; gap: 8px; margin-top: 8px; }
.invite-row .input { font-size: 14px; padding: 9px 12px; }
.history-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.history-item { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.history-item:hover, .history-item:focus-visible { border-color: var(--signal); box-shadow: 0 6px 18px rgba(49, 87, 255, 0.14); outline: none; }
.history-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.history-info strong { overflow-wrap: anywhere; line-height: 1.3; }
.history-info small { color: var(--muted); }
.history-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.history-photo { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #f1f5f9; }
.history-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.history-photo:hover img { transform: scale(1.04); }
.history-open { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--signal); }

/* ===== tablet / phone ===== */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .stage-col { max-width: 440px; margin: 0 auto; width: 100%; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-grid > * { min-width: 0; }
  .panel { position: static; max-height: none; }
  .generate-row { position: static; margin: 22px 0 0; padding: 0; background: none; }
}
@media (max-width: 800px) {
  :root { --side: 0px; }
  .main { padding-bottom: 76px; }
  .container { padding: 0 20px; }
  .header { right: 0; height: 60px; }
  .user-email { display: none; }
  .sidebar { top: auto; bottom: 8px; left: 12px; right: 12px; width: auto; height: 54px; flex-direction: row; justify-content: space-around; align-items: center; padding: 4px 6px; gap: 0; border-radius: 18px; }
  .brand { display: none; }
  .nav { flex-direction: row; justify-content: space-around; margin: 0; gap: 2px; }
  .nav-item { gap: 1px; padding: 3px 6px; font-size: 9px; border-radius: 12px; }
  .nav-icon { width: 26px; height: 26px; border-radius: 9px; background: none; border-color: transparent; }
  .nav-icon svg { width: 18px; height: 18px; }
  .header, .header.on-dark { background: rgba(11, 15, 38, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.08); }
  .header:not(.on-dark) { background: rgba(246, 247, 252, 0.94); border-bottom-color: var(--line); }
  .nav-item.active::before { display: none; }
  .hero { padding-top: 96px; }
  .section { padding: 64px 0; }
  .steps { grid-template-columns: 1fr; gap: 30px; } .steps::before { display: none; }
  .features { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .modal-box { padding: 32px 18px 22px; }
  .studio { padding: 80px 16px 40px; }
  .panel, .canvas { padding: 18px; border-radius: 22px; }
  .lp-grid, .lp-grid.n2 { grid-template-columns: repeat(2, 1fr); }
  .cta-box { padding: 52px 22px; }
  .header-right { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .intro { display: none; }
}

body.no-intro .intro { display: none; }

@media (max-width: 800px) {
  .credits-badge { white-space: nowrap; font-size: 13px; padding: 5px 10px; }
  .account-box .btn-small { padding: 5px 10px; font-size: 13px; }
  .logo { font-size: 15px; }
  .lang-btn { padding: 5px 9px; }
  .header .container { padding: 0 12px; }
}

/* ===== text options + text versions ===== */
.opt-block { display: flex; flex-direction: column; gap: 8px; }
.opt-label { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.opt-row { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.opt:hover { border-color: var(--signal); }
.opt.active { background: var(--signal); border-color: var(--signal); color: #fff; }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235d6486' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center; padding-right: 40px; cursor: pointer; }
.vtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.vtab { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.vtab:hover { border-color: var(--signal); }
.vtab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.hashtags span { display: inline-block; margin: 0 4px 4px 0; padding: 2px 10px; border-radius: 999px; background: #e6ebff; color: var(--signal-d); font-size: 13px; font-weight: 600; }

/* the studio panel is long now: let the page scroll, no inner scrollbar or sticky button */
.panel { position: static; max-height: none; overflow: visible; }
.generate-row { position: static; margin: 24px 0 0; padding: 0; background: none; }
.canvas { position: sticky; top: 84px; align-self: start; }
@media (max-width: 1080px) { .canvas { position: static; } }

.panel .opt-label:first-of-type { margin-top: 0; }
.panel > .input, .panel .opt-label + .input { margin-bottom: 2px; }
.panel .upload { margin-top: 14px; }

.opt-label { font-size: 14px; margin-top: 14px; margin-bottom: 8px; }
.opt-row { gap: 8px; }
.opt { padding: 9px 16px; font-size: 14px; line-height: 1.2; }

/* ===== sign-in button in the header ===== */
.signin-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 9px; padding: 9px 20px 9px 14px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; background: linear-gradient(120deg, var(--signal), #7a5cff 55%, var(--cyan)); background-size: 200% 100%; box-shadow: 0 8px 22px rgba(49, 87, 255, 0.4); animation: siFlow 6s ease-in-out infinite, siPulse 3.2s ease-out 2.6s infinite; transition: transform 0.2s, box-shadow 0.2s; }
.signin-btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent); transform: skewX(-20deg); animation: siShine 4.5s ease-in-out 3s infinite; }
.signin-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 28px rgba(49, 87, 255, 0.55); }
.signin-btn:active { transform: scale(0.97); }
.signin-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.si-ico { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,0.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='9' r='3.5'/%3E%3Cpath d='M5 20c1-4 4-5.500 7-5.500s6 1.500 7 5.500'/%3E%3C/svg%3E") center/16px no-repeat; }
@keyframes siFlow { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
@keyframes siShine { 0%, 55% { left: -60%; } 80%, 100% { left: 130%; } }
@keyframes siPulse { 0% { box-shadow: 0 8px 22px rgba(49,87,255,0.4), 0 0 0 0 rgba(90,120,255,0.55); } 70%, 100% { box-shadow: 0 8px 22px rgba(49,87,255,0.4), 0 0 0 16px rgba(90,120,255,0); } }

/* ===== sign-in window ===== */
.auth-box { max-width: 420px; overflow: hidden; padding: 44px 30px 28px; isolation: isolate; }
.auth-box > *:not(.auth-orb):not(.modal-close):not(.auth-done) { position: relative; z-index: 1; }
.auth-box .modal-close { z-index: 2; }
.auth-orb { position: absolute; z-index: 0; border-radius: 50%; filter: blur(34px); opacity: 0.55; pointer-events: none; }
.auth-orb.o1 { width: 190px; height: 190px; top: -70px; left: -50px; background: #7aa0ff; animation: orb 9s ease-in-out infinite; }
.auth-orb.o2 { width: 170px; height: 170px; top: 30px; right: -70px; background: #7ae9ff; animation: orb 11s ease-in-out -3s infinite; }
.auth-orb.o3 { width: 150px; height: 150px; bottom: -60px; left: 30%; background: #ffd27a; opacity: 0.4; animation: orb 13s ease-in-out -6s infinite; }
@keyframes orb { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(26px, 20px) scale(1.18); } }
.auth-logo { width: 62px; height: 62px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 20px; font-family: var(--display); font-weight: 700; font-size: 30px; color: #fff; background: linear-gradient(135deg, var(--signal), var(--cyan)); box-shadow: 0 14px 30px rgba(49, 87, 255, 0.4); }
.auth-logo span { font-size: 16px; margin: -14px 0 0 2px; }
.modal.auth:not([hidden]) .auth-logo { animation: logoIn 0.7s cubic-bezier(0.2, 1.3, 0.3, 1) 0.1s both; }
@keyframes logoIn { from { opacity: 0; transform: scale(0.3) rotate(-25deg); } to { opacity: 1; transform: none; } }
.auth-box h2 { font-size: 24px; }
.auth-box .modal-text { margin-bottom: 22px; font-size: 15px; }
.auth-buttons { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.modal.auth:not([hidden]) .auth-buttons > * { animation: slideUp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.modal.auth:not([hidden]) .auth-buttons > :nth-child(1) { animation-delay: 0.22s; }
.modal.auth:not([hidden]) .auth-buttons > :nth-child(2) { animation-delay: 0.32s; }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.auth-slot { min-height: 44px; display: flex; justify-content: center; width: 100%; transition: transform 0.2s; }
.auth-slot:hover { transform: translateY(-2px); }
.auth-msg { min-height: 20px; margin-top: 14px; font-size: 13px; color: #c0392b; }
.auth-note { margin-top: 4px; font-size: 12px; color: var(--muted); }
.auth-done { position: absolute !important; inset: 0; z-index: 3 !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #fff; color: var(--signal); opacity: 0; pointer-events: none; transform: scale(1.06); transition: opacity 0.3s, transform 0.3s; }
.auth-done b { font-family: var(--display); font-size: 22px; color: var(--ink); }
.auth.ok .auth-done { opacity: 1; transform: none; }
.auth-done circle { stroke-dasharray: 151; stroke-dashoffset: 151; }
.auth-done path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.auth.ok .auth-done circle { animation: draw 0.5s ease-out 0.1s forwards; }
.auth.ok .auth-done path { animation: draw 0.4s ease-out 0.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.modal.auth.closing { animation: fadeOut 0.25s forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.modal.auth.closing .modal-box { animation: popOut 0.25s forwards; }
@keyframes popOut { to { opacity: 0; transform: translateY(16px) scale(0.97); } }
.modal.auth:not([hidden]):not(.closing) { animation: fadeIn 0.25s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* the studio page asks for sign-in with a small shake when someone tries to skip it */
.auth.shake .auth-box { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .signin-btn, .signin-btn::after, .auth-orb { animation: none !important; } }

.google-fallback { width: 100%; max-width: 300px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: box-shadow 0.2s, border-color 0.2s; }
.google-fallback:hover { border-color: #c5cbe6; box-shadow: 0 10px 24px rgba(16, 20, 43, 0.12); }

.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 12px; color: var(--muted); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-email { width: 100%; max-width: 300px; margin: 0 auto; }
.auth-step { display: flex; flex-direction: column; gap: 10px; }
.auth-step:not([hidden]) { animation: stepIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.auth-box .input { text-align: center; background: rgba(255, 255, 255, 0.85); }
.code-input { font-family: var(--display); font-size: 26px; letter-spacing: 0.4em; text-indent: 0.4em; padding: 10px 12px; }
.auth-sent { font-size: 13px; color: var(--muted); }
.auth-sent b { color: var(--ink); word-break: break-all; }
.auth-link { border: 0; background: none; font: inherit; font-size: 13px; color: var(--signal); cursor: pointer; padding: 4px; }
.auth-link:hover { text-decoration: underline; }
.auth-email .btn:disabled { opacity: 0.6; cursor: wait; }
.auth-msg.good { color: #1e8e5a; }

.custom-scene { resize: vertical; min-height: 64px; text-align: left; font-size: 15px; line-height: 1.4; margin-top: 4px; }
.panel .custom-scene { text-align: left; }
.custom-note { margin: 6px 2px 0; color: var(--muted); }
.bg-chip.custom { border-style: dashed; }
.lp-tile.custom { background: linear-gradient(135deg, #e9edff, #ffe9d6); }
label[for="customScene"] { display: block; margin-top: 16px; }

/* compact form */
.lang-row { display: flex; align-items: center; gap: 12px; }
.lang-row .opt-label { margin: 0; white-space: nowrap; }
.lang-row .input { flex: 1; padding: 9px 14px; font-size: 15px; }
.more { margin-top: 12px; }
.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--signal); padding: 4px 0; user-select: none; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: "+"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--mist); font-size: 15px; line-height: 1; transition: transform 0.25s; }
.more[open] > summary::before { content: "\2212"; transform: rotate(180deg); }
.more[open] > .input, .more[open] > .custom-note { animation: stepIn 0.3s both; }
.more > .input { margin-top: 8px; }
.panel h2 { margin-top: 22px; }
.panel h2:first-of-type { margin-top: 0; }
.panel .upload { margin-top: 10px; padding: 14px 16px; }
.panel .opt-row { margin-top: 6px; }
label[for="customScene"] { margin-top: 0; }

/* "+" tile: the seller's own background photo */
.bg-tile.add .bg-thumb { display: grid; place-items: center; background: #f4f6ff; border: 2px dashed #b9c4ff; }
.bg-tile.add .plus { font-size: 34px; line-height: 1; color: var(--signal); font-weight: 500; }
.bg-tile.add:hover .bg-thumb { border-color: var(--signal); background: #eaeeff; }
.bg-tile.own .bg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* legal links */
.footer-right { text-align: right; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; margin-bottom: 6px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--signal); text-decoration: underline; }
.legal-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.legal-note a { color: var(--signal); }
@media (max-width: 620px) { .footer-right { text-align: left; } .footer-links { justify-content: flex-start; } }

/* ===== full-screen photo viewer ===== */
body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 500; background: rgba(6, 8, 20, 0.96); display: flex; flex-direction: column; }
.viewer-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 64px 12px 110px; }
.viewer-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; }
.viewer-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.viewer-count { position: absolute; top: 24px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.75); font-weight: 600; font-size: 14px; pointer-events: none; }
.viewer-save { position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--signal); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 28px rgba(49, 87, 255, 0.45); }

.free-note { margin: -4px 0 12px; padding: 10px 14px; border-radius: 14px; background: #eef2ff; color: var(--signal-d); font-size: 14px; font-weight: 600; line-height: 1.4; }
.paywall-photos { margin-top: -6px; font-weight: 600; }