/* Component rules extracted from docs/mockups.
   Where two mockups define the same selector, the selector is scoped
   and the declarations are unchanged. See docs/DECISIONS.md. */

@keyframes pulse {
  0%,
  100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes vaispin { to { transform: rotate(360deg); } }
@keyframes tbspin { to { transform: rotate(360deg); } }

.mark,
.brand .mark,
.bp-logo .mark,
.d-logo .mk {
  background: var(--grad-brand);
}

/* --- Buttons (mockup 01, 13) --- */
.cta-wrap { margin: 20px 16px 6px; }
.cta-primary {
  width: 100%;
  background: var(--grad-cta);
  color: #fff;
  border: none;
  border-radius: var(--radius-cta);
  padding: 15px;
  font-size: 14px;
  font-weight: 700;
}
.cta-primary[disabled] { opacity: 0.4; }
.cta-sub { text-align: center; font-size: 10.8px; color: var(--text-muted); margin-top: 10px; }
.cta-sub a { color: var(--accent); }

.btn {
  border: none;
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 12.8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn-outline {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-solid { flex: 1; background: var(--primary); color: #fff; }
.btn:disabled { opacity: 0.4; }
.upload-actions { display: flex; gap: 10px; margin: 0 16px; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-button);
  padding: 13px;
  font-size: 13.5px;
  font-weight: 700;
  width: 100%;
}
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 11.5px;
  text-align: center;
  margin-top: 12px;
  width: 100%;
}

/* --- Fields (mockup 01). Auth spacing lives under .form-panel. --- */
.field { margin: 0 16px 12px; }
.field label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 12px 13px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
}
.field input::placeholder { color: #5c5875; }
.field input:disabled { opacity: 0.4; }
.field.is-error input { border-color: var(--danger); }
.field .hint { font-size: 10.5px; color: var(--text-muted); margin-top: 6px; }
.err-text { color: var(--danger); font-size: 11px; margin-top: 6px; }
.form-panel .field { margin: 0 0 13px; }
.form-panel .field label { letter-spacing: 0.04em; }

.field-row2 { display: flex; gap: 10px; margin: 0 16px 12px; }
.field-row2 .field { margin: 0; flex: 1; }

.consent { margin: 6px 16px 0; font-size: 11.8px; color: var(--text-soft); }
.check-row { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 11px; }
.check-row input {
  margin-top: 2px;
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.check-row a { color: var(--accent); text-decoration: underline; }
.req { color: var(--danger); font-weight: 700; }

/* --- Pills and badges (mockup 01, 10, 13) --- */
.badge-live {
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.03em;
  display: inline-block;
}
.badge-count {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10.5px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  display: inline-block;
}
.hero { position: relative; }
.hero .badge-live { position: absolute; top: 12px; left: 12px; }
.hero .badge-count { position: absolute; top: 12px; right: 12px; }
.paid-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--warning);
  background: var(--warning-soft);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}
.badge-temp-inline {
  display: inline-block;
  background: var(--warning);
  color: #241a00;
  font-size: 9.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  margin: 0 16px;
}
.card h3 { font-size: 14px; margin: 0 0 7px; }
.desc { font-size: 12.5px; line-height: 1.5; color: var(--text-soft); }
.upload-actions.again { margin-top: 10px; }
.dev-pills { padding: 0 16px; gap: 8px; align-items: center; }

/* --- Hero, meta, callout (mockup 01) --- */
.hero {
  margin: 0 16px;
  border-radius: var(--radius-card-lg);
  aspect-ratio: 16 / 9;
  min-height: 180px;
  background: var(--grad-hero);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.hero-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #11111c; }
.hero.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 8, 24, .12), rgba(10, 8, 24, .76)); }
.hero > :not(.hero-banner) { position: relative; z-index: 1; }
.hero-info h2 { margin: 0 0 3px; font-size: 19px; }
.hero-info span { font-size: 12px; color: #d7d7e6; }
.event-meta { display: flex; gap: 8px; margin: 12px 16px; }
.meta-chip {
  flex: 1;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 10px;
  font-size: 10.5px;
  color: var(--text-muted);
}
.meta-chip b { display: block; color: var(--text); font-size: 12px; margin-top: 2px; }

.ai-callout {
  margin: 18px 16px;
  background: var(--grad-callout);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-card);
  padding: 15px;
}
.ai-callout h3 { margin: 0 0 6px; font-size: 14.5px; }
.ai-callout p { margin: 0; font-size: 12px; color: #cfcfe0; line-height: 1.5; }
.ai-callout .steps { display: flex; gap: 7px; margin-top: 12px; }
.ai-callout .step {
  flex: 1;
  background: var(--bg-elev-2);
  border-radius: 10px;
  padding: 7px;
  text-align: center;
  font-size: 9.8px;
  color: var(--text-muted);
}
.ai-callout .step.now { background: var(--primary-soft); color: #e2ddfa; }
.ai-callout .step .n {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
  font-weight: 700;
}

.confirm-banner {
  margin: 2px 16px 6px;
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #bdf5cf;
}
.confirm-banner .ck,
.photo1-chip .ck {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success);
  color: #08150c;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Two-photo progress, guides, chip (mockup 01) --- */
.photo-steps { margin: 2px 16px 10px; display: flex; align-items: center; gap: 8px; }
.photo-steps .seg { flex: 1; height: 5px; border-radius: 3px; background: var(--bg-elev-2); }
.photo-steps .seg.done { background: var(--success); }
.photo-steps .seg.now { background: var(--primary); }
.photo-steps-label {
  margin: 0 16px 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.oval-wrap { margin: 14px 16px 6px; display: flex; flex-direction: column; align-items: center; }
.oval {
  width: 190px;
  height: 240px;
  border-radius: 50% / 58%;
  border: 2.5px dashed #6a629a;
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 16px;
}
.oval svg,
.body-guide svg { opacity: 0.55; }
.oval .corner-hint,
.body-guide .corner-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #8a83a6;
  white-space: nowrap;
}
.body-guide .corner-hint { bottom: 12px; }
.body-guide {
  width: 215px;
  height: 262px;
  border-radius: 26px;
  border: 2.5px dashed #6a629a;
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 16px;
}
.photo1-chip {
  margin: 2px 16px 4px;
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.3px;
  color: #bdf5cf;
}
.photo1-chip .th {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2a2a4a, #1a1a2e);
  border: 1.5px solid var(--success);
  flex-shrink: 0;
}
.photo1-chip .ck { margin-left: auto; }

/* --- Waiting step list (mockup 12). Class step-list = .steps in that file. --- */
.step-list {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 16px 26px;
}
.step-row { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; position: relative; }
.step-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 30px;
  bottom: -9px;
  width: 1.5px;
  background: var(--border);
}
.step-dot {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  z-index: 1;
}
.step-dot.done { background: var(--success); color: #08150c; }
.step-dot.active {
  background: var(--bg-elev-2);
  border: 2px solid var(--accent);
  color: var(--accent);
}
.step-dot.pending {
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.step-txt b { display: block; font-size: 12.5px; margin-bottom: 1px; }
.step-txt span { font-size: 10.5px; color: var(--text-muted); }
.step-row.active .step-txt b { color: var(--accent); }
.step-row.pending .step-txt b { color: var(--text-muted); }

/* --- Home banner (mockup 10) --- */
.top-banner {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin: 6px 14px 2px;
  border-radius: var(--radius-cta);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5);
}
.top-banner.generating {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.16));
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.top-banner.ready {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.45);
}
.top-banner .tb-ic {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
}
.top-banner.generating .tb-ic { background: rgba(139, 92, 246, 0.22); color: var(--accent); }
.top-banner.generating .tb-ic .tb-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--primary);
  animation: tbspin 2.6s linear infinite;
}
.top-banner.ready .tb-ic { background: rgba(34, 197, 94, 0.22); color: var(--success); }
.top-banner .tb-txt { flex: 1; min-width: 0; }
.top-banner .tb-txt b { display: block; font-size: 11.8px; margin-bottom: 1px; }
.top-banner .tb-txt span { font-size: 10.2px; color: var(--text-muted); display: block; }
.top-banner .tb-cta {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 800;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  border: none;
  font-family: inherit;
  background: var(--success);
  color: #08150c;
}
.top-banner .tb-cta.sec {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border);
}
@media (max-width: 767px) {
  .top-banner .tb-cta.sec { display: none; }
}

/* --- Feed (mockup 10) --- */
.feed-card {
  margin: 0 18px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.feed-card-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.feed-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-brand);
  flex-shrink: 0;
}
.feed-who b { display: block; font-size: 12.5px; }
.feed-who span { font-size: 10.5px; color: var(--text-muted); }
.feed-media { height: 190px; background: var(--grad-media); position: relative; }
.feed-media.b { background: var(--grad-media-b); }
.feed-media .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
}
.feed-body { padding: 12px 14px 14px; }
.feed-body p { margin: 0 0 10px; font-size: 12.5px; color: #d3d3e6; line-height: 1.5; }
.feed-actions { display: flex; gap: 16px; font-size: 11.5px; color: var(--text-muted); }
.feed-actions span { display: flex; align-items: center; gap: 5px; }
@media (min-width: 768px) {
  .dev-sample.desktop .feed-media { height: 150px; }
}

/* Filter sits on a layer behind the overlay. A filter on the parent would
   also desaturate the lock and the button; the mockup asks for an unfiltered overlay. */
.feed-media.locked-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-media);
  filter: grayscale(1) brightness(0.45);
}
.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.lock-overlay .lock-ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.lock-overlay .lock-txt {
  font-size: 10.5px;
  font-weight: 700;
  color: #f2f2f7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn-unlock {
  background: var(--warning);
  color: #241a00;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
}

.credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--warning);
}

/* --- Video card (mockup 10) --- */
.vai-card {
  margin: 16px 18px 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-card-lg);
  overflow: hidden;
}
.vai-media {
  height: 230px;
  position: relative;
  background: linear-gradient(160deg, #1c1c3a, #0e0e1c);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vai-media.generating {
  background:
    radial-gradient(circle at 32% 28%, rgba(139, 92, 246, 0.55), transparent 60%),
    radial-gradient(circle at 72% 70%, rgba(34, 211, 238, 0.4), transparent 58%),
    linear-gradient(160deg, #1c1c3a, #0e0e1c);
}
.vai-spinner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.vai-spinner .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--primary);
  animation: vaispin 3s linear infinite;
}
.vai-media.ready { background: var(--grad-media); }
.vai-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.vai-ready-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--success);
  color: #08150c;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.vai-gen-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.vai-body { padding: 14px 16px 16px; }
.vai-body h4 { margin: 0 0 4px; font-size: 14px; }
.vai-body p { margin: 0 0 14px; font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.vai-actions { display: flex; gap: 10px; }
.vai-btn-primary {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-button);
  padding: 12px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
}
.vai-btn-primary:disabled { opacity: 0.5; }
.vai-btn-secondary {
  width: 44px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-button);
  font-size: 15px;
  font-family: inherit;
}

/* --- Navigation (mockup 10) --- */
.tabbar {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 10px 8px 14px;
}
.tab {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
}
.tab.active { color: var(--primary); }
.tab .ic {
  width: 22px;
  height: 22px;
  margin: 0 auto 3px;
  border-radius: 6px;
  background: currentColor;
  opacity: 0.85;
}

.d-side {
  width: 200px;
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-elev);
  min-height: 360px;
}
.d-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 14px;
  margin: 0 6px 16px;
}
.d-logo .mk { width: 19px; height: 19px; border-radius: 6px; display: inline-block; }
.d-nav {
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.d-nav i {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: currentColor;
  opacity: 0.8;
  display: inline-block;
}
.d-nav.on { background: rgba(139, 92, 246, 0.16); color: #d9ccff; font-weight: 700; }
.d-side .credits-pill { margin: auto 4px 0; justify-content: center; }

/* --- Brand panel (mockup 13) --- */
.brand-panel {
  padding: 34px 28px;
  background:
    radial-gradient(circle at 25% 15%, rgba(139, 92, 246, 0.5), transparent 55%),
    radial-gradient(circle at 80% 85%, rgba(34, 211, 238, 0.35), transparent 55%),
    linear-gradient(160deg, #1c1c3a, #0e0e1c);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  margin: 0 16px;
}
.bp-logo { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; }
.bp-logo .mark { width: 19px; height: 19px; border-radius: 6px; display: inline-block; }
.brand-panel h3 { font-size: 21px; line-height: 1.25; margin: 0 0 8px; }
.brand-panel p { margin: 0; font-size: 12px; color: #cfcfe0; line-height: 1.5; }

.brand { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: var(--text-muted); }
.brand .mark { width: 17px; height: 17px; border-radius: 5px; display: inline-block; }
