:root {
  --bg: #fffaf6;
  --bg-2: #fff1e6;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --panel-strong: #fff7f1;
  --text: #17202d;
  --muted: #6f7785;
  --orange: #ff6a00;
  --orange-2: #ff8b38;
  --orange-soft: rgba(255, 106, 0, 0.12);
  --orange-soft-2: rgba(255, 106, 0, 0.18);
  --border: rgba(255, 170, 115, 0.35);
  --shadow: 0 24px 80px rgba(255, 105, 0, 0.12);
  --shadow-soft: 0 10px 30px rgba(20, 25, 35, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-body: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-display: "Bahnschrift", "Aptos Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 175, 120, 0.28), transparent 32%),
    radial-gradient(circle at right center, rgba(255, 220, 196, 0.66), transparent 28%),
    linear-gradient(180deg, #fffdfb 0%, #fff7f1 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(4px);
}

body::before {
  top: -12vh;
  left: -8vw;
  width: 36vw;
  height: 36vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 143, 56, 0.28), rgba(255, 143, 56, 0.02) 65%, transparent 70%);
  animation: drift 18s ease-in-out infinite;
}

body::after {
  right: -10vw;
  bottom: -12vh;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.18), rgba(255, 106, 0, 0.03) 60%, transparent 72%);
  animation: drift 22s ease-in-out infinite reverse;
}

body.page-auth {
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

body.page-dashboard,
body.page-detail {
  padding: 28px 18px 40px;
}

body.page-dashboard::before,
body.page-detail::before,
body.page-dashboard::after,
body.page-detail::after {
  filter: blur(8px);
}

@keyframes drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, 16px, 0) scale(1.04);
  }
}

@keyframes shimmer {
  0% {
    background-position: -120% 0;
  }
  100% {
    background-position: 120% 0;
  }
}

@keyframes floatUp {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 106, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 106, 0, 0);
  }
}

@keyframes glowLine {
  0% {
    opacity: 0.35;
    transform: translateX(-18%);
  }
  50% {
    opacity: 0.85;
  }
  100% {
    opacity: 0.35;
    transform: translateX(18%);
  }
}

.ambient {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
  opacity: 0.55;
  animation: floatUp 9s ease-in-out infinite;
}

.ambient-one {
  width: 220px;
  height: 220px;
  left: 3%;
  top: 12%;
  background: radial-gradient(circle, rgba(255, 179, 112, 0.42), rgba(255, 179, 112, 0));
}

.ambient-two {
  width: 280px;
  height: 280px;
  right: 4%;
  top: 26%;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.16), rgba(255, 106, 0, 0));
  animation-delay: -2s;
}

.ambient-three {
  width: 260px;
  height: 260px;
  right: 18%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(255, 201, 155, 0.25), rgba(255, 201, 155, 0));
  animation-delay: -4s;
}

.auth-shell,
.app-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 24px;
  align-items: stretch;
}

.onboarding-shell {
  grid-template-columns: 1fr 0.9fr;
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel-glow {
  position: relative;
}

.panel-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, rgba(255, 106, 0, 0.24), transparent 35%, rgba(255, 195, 154, 0.32), transparent 68%, rgba(255, 106, 0, 0.2));
  opacity: 0.7;
  pointer-events: none;
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding: 1px;
  border-radius: inherit;
}

.auth-hero,
.auth-card,
.hero-copy,
.hero-stats,
.connection-panel,
.detail-preview,
.detail-metrics,
.studio-card {
  padding: 28px;
}

.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 640px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 243, 234, 0.9)),
    radial-gradient(circle at top right, rgba(255, 154, 78, 0.18), transparent 35%);
}

.auth-hero h1,
.hero-copy h2,
.panel-head h3,
.auth-card h2,
.topbar h1,
#detailTitle {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
}

.auth-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.98;
  max-width: 12ch;
  margin-top: 18px;
}

.auth-hero p {
  margin: 18px 0 0;
  font-size: 1rem;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.7;
}

.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(145deg, var(--orange), var(--orange-2));
  box-shadow: 0 18px 40px rgba(255, 106, 0, 0.32);
  animation: pulseGlow 3.4s ease-in-out infinite;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--orange);
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--orange), var(--orange-2));
  box-shadow: 0 0 0 8px rgba(255, 106, 0, 0.08);
}

.feature-strip,
.hero-pills,
.inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-strip {
  margin-top: 24px;
}

.feature-strip span,
.hero-pills span,
.status-chip,
.hint-chip,
.preview-badge,
.badge-tag,
.rule-pill,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.feature-strip span,
.hero-pills span,
.hint-chip,
.meta-chip {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 160, 95, 0.28);
  color: var(--text);
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-height: 640px;
  background: rgba(255, 255, 255, 0.88);
}

.auth-card-top,
.panel-head,
.topbar,
.brand-lockup,
.topbar-actions,
.panel-actions,
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #8a3f00;
  background: linear-gradient(145deg, rgba(255, 242, 231, 0.95), rgba(255, 226, 201, 0.9));
  border: 1px solid rgba(255, 174, 111, 0.44);
}

.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff7b1c;
  box-shadow: 0 0 0 6px rgba(255, 123, 28, 0.12);
}

.status-live {
  animation: pulseGlow 2.8s ease-in-out infinite;
}

.status-warm {
  color: #9b4a00;
}

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  border: 1.5px solid rgba(255, 176, 123, 0.38);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  outline: none;
  font-size: 0.98rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #8a93a1;
}

input:focus,
textarea:focus {
  border-color: rgba(255, 106, 0, 0.8);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12);
  transform: translateY(-1px);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

label {
  display: block;
  margin: 14px 0 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #2a3340;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field-hint,
.panel-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 164, 101, 0.7), transparent);
}

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-google,
.link-button {
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-primary,
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 0.98rem;
  font-weight: 800;
}

.btn-primary {
  color: white;
  background: linear-gradient(145deg, var(--orange), var(--orange-2));
  box-shadow: 0 18px 40px rgba(255, 106, 0, 0.26);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(255, 106, 0, 0.32);
}

.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  padding: 13px 16px;
  font-size: 0.95rem;
  font-weight: 800;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border: 1px solid rgba(255, 160, 95, 0.32);
}

.btn-secondary:hover,
.btn-ghost:hover,
.btn-google:hover,
.link-button:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 160, 95, 0.25);
}

.btn-google {
  width: 100%;
  color: #1c2530;
  background: linear-gradient(180deg, #ffffff, #fff6ef);
  border: 1px solid rgba(255, 160, 95, 0.3);
  box-shadow: 0 10px 30px rgba(16, 22, 35, 0.05);
}

.link-button {
  width: fit-content;
  padding: 0;
  background: transparent;
  color: var(--orange);
  font-size: 0.95rem;
  font-weight: 800;
}

.topbar {
  padding: 18px 24px;
}

.brand-lockup h1 {
  font-size: 1.3rem;
}

.topbar-actions {
  flex-wrap: wrap;
}

.status-chip {
  background: rgba(255, 245, 237, 0.96);
  color: #8d4300;
  border: 1px solid rgba(255, 160, 95, 0.32);
}

.hero-grid,
.detail-hero {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.hero-copy h2 {
  font-size: clamp(1.8rem, 3.6vw, 3.25rem);
  line-height: 1.04;
  margin-top: 16px;
  max-width: 14ch;
}

.hero-copy p {
  margin: 16px 0 0;
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.hero-stats {
  display: grid;
  align-content: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-tile,
.metric-card,
.note-card,
.loading-card,
.rule-item {
  position: relative;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 174, 116, 0.28);
  overflow: hidden;
}

.stat-tile {
  padding: 18px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-tile::after,
.metric-card::after,
.note-card::after,
.rule-item::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% -20%;
  height: 50%;
  background: radial-gradient(circle, rgba(255, 182, 123, 0.18), transparent 72%);
  opacity: 0.9;
  pointer-events: none;
}

.stat-tile span,
.metric-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.stat-tile strong,
.metric-card strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--text);
}

.connection-panel .panel-head,
.studio-card .panel-head,
.detail-preview .panel-head {
  margin-bottom: 10px;
}

.panel-head h3 {
  font-size: 1.45rem;
}

.panel-actions,
.composer-actions {
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.reels-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.loading-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.loading-card {
  min-height: 336px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.92) 20%, rgba(255, 248, 241, 0.95) 40%, rgba(255, 255, 255, 0.92) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.reel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 164, 101, 0.28);
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  box-shadow: 0 12px 30px rgba(23, 30, 42, 0.06);
}

.reel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.12), transparent 35%, transparent 65%, rgba(255, 154, 78, 0.16));
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.reel-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 106, 0, 0.42);
  box-shadow: 0 22px 50px rgba(255, 106, 0, 0.12);
}

.reel-card:hover::before {
  opacity: 1;
}

.reel-card.active {
  border-color: rgba(255, 106, 0, 0.8);
  box-shadow: 0 24px 56px rgba(255, 106, 0, 0.18);
}

.reel-thumb-box {
  position: relative;
  min-height: 250px;
  background:
    linear-gradient(160deg, rgba(255, 233, 220, 0.95), rgba(255, 246, 239, 0.95));
  overflow: hidden;
}

.reel-thumb-box::after {
  content: "";
  position: absolute;
  inset: auto -10% -20% -10%;
  height: 56%;
  background: radial-gradient(circle, rgba(255, 125, 27, 0.22), transparent 72%);
  pointer-events: none;
}

.reel-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 220ms ease;
}

.reel-card:hover .reel-thumb {
  transform: scale(1.06);
}

.reel-badge,
.reel-selected-pill {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.reel-badge {
  top: 12px;
  right: 12px;
  color: white;
  background: rgba(23, 32, 45, 0.75);
  backdrop-filter: blur(8px);
}

.reel-selected-pill {
  top: 12px;
  left: 12px;
  color: white;
  background: linear-gradient(145deg, var(--orange), var(--orange-2));
  display: none;
}

.reel-card.active .reel-selected-pill {
  display: inline-flex;
}

.reel-card-body,
.reel-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.reel-card-title,
.reel-caption {
  color: var(--text);
  font-weight: 800;
  line-height: 1.45;
}

.reel-card-title {
  font-size: 1rem;
}

.reel-caption {
  font-size: 0.92rem;
  color: #324152;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 4.1em;
}

.reel-trackers,
.reel-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reel-stat,
.reel-metric {
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 245, 237, 0.95), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(255, 174, 116, 0.25);
}

.reel-stat-label,
.reel-metric-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.reel-stat-val,
.reel-metric-value {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--text);
  font-weight: 800;
}

.reel-open-btn {
  margin-top: auto;
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-list.compact .rule-item {
  padding: 18px;
}

.rule-item {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.rule-title {
  font-size: 1rem;
  font-weight: 900;
}

.rule-subtitle,
.rule-text,
.keyword-preview .muted,
.notes-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.badge-tag {
  background: rgba(255, 240, 232, 0.95);
  color: #9f4b00;
  border: 1px solid rgba(255, 170, 115, 0.28);
}

.detail-hero {
  grid-template-columns: 1.1fr 0.9fr;
}

.detail-preview {
  display: grid;
  gap: 18px;
}

.preview-visual {
  position: relative;
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 238, 225, 0.96), rgba(255, 250, 246, 0.98));
  border: 1px solid rgba(255, 174, 116, 0.3);
}

.preview-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
}

.preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background: linear-gradient(180deg, rgba(23, 32, 45, 0.08), rgba(23, 32, 45, 0.45));
}

.preview-badge {
  width: fit-content;
  background: rgba(255, 255, 255, 0.92);
  color: #8f4300;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.preview-copy p {
  margin-top: 10px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
}

.inline-tags {
  margin-top: 14px;
}

.metric-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.metric-card {
  padding: 18px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 18px;
}

.panel-inset {
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 249, 244, 0.9), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(255, 170, 115, 0.24);
}

.preview-title {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--orange);
  margin-bottom: 10px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.note-card {
  padding: 18px;
  min-height: 160px;
}

.note-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 8px;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.loading-grid,
.notes-grid,
.metric-stack,
.stat-grid,
.hero-grid,
.detail-hero,
.studio-grid {
  animation: fadeUp 420ms ease-out;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .auth-shell,
  .hero-grid,
  .detail-hero,
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .auth-hero,
  .auth-card {
    min-height: auto;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.page-auth,
  body.page-dashboard,
  body.page-detail {
    padding: 16px 12px 24px;
  }

  .panel,
  .auth-hero,
  .auth-card,
  .hero-copy,
  .hero-stats,
  .connection-panel,
  .detail-preview,
  .detail-metrics,
  .studio-card {
    padding: 20px;
    border-radius: 22px;
  }

  .topbar,
  .topbar-actions,
  .auth-card-top,
  .panel-head,
  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-grid,
  .reel-trackers,
  .reel-metrics {
    grid-template-columns: 1fr;
  }

  .reels-grid-container,
  .loading-grid {
    grid-template-columns: 1fr;
  }

  .preview-visual {
    min-height: 280px;
  }
}

/* Public landing and legal surfaces */
.page-landing {
  background: #fffaf5;
}

.landing-nav,
.landing-main,
.landing-footer,
.legal-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
}

.landing-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.landing-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; font-size: .82rem; }
.landing-brand strong { display: block; font-family: var(--font-display); font-size: 1.16rem; line-height: 1; }
.landing-brand small { display: block; margin-top: 4px; color: var(--orange); font-size: .55rem; font-weight: 900; letter-spacing: .14em; }
.landing-links { display: flex; gap: 30px; }
.landing-links a, .footer-links a { color: var(--muted); text-decoration: none; font-size: .87rem; font-weight: 800; transition: color 160ms ease; }
.landing-links a:hover, .footer-links a:hover { color: var(--orange); }
.nav-cta { padding: 11px 15px; text-decoration: none; font-size: .83rem; }

.landing-hero { min-height: 670px; display: grid; grid-template-columns: .88fr 1.12fr; gap: 30px; align-items: center; padding: 42px 0 80px; }
.landing-copy h1 { max-width: 700px; margin: 18px 0 22px; font-family: var(--font-display); font-size: clamp(3.35rem, 6.5vw, 6.5rem); line-height: .9; letter-spacing: -.065em; }
.landing-copy h1 em, .section-intro h2 em, .access-copy h2 em { color: var(--orange); font-style: normal; }
.landing-copy > p { max-width: 520px; color: var(--muted); font-size: 1.06rem; line-height: 1.8; }
.landing-actions { display: flex; align-items: center; gap: 24px; margin-top: 30px; }
.landing-actions a { text-decoration: none; }
.landing-actions .btn-primary { padding: 16px 20px; }
.text-cta { color: var(--text); font-weight: 900; font-size: .9rem; }
.text-cta span { margin-left: 7px; color: var(--orange); font-size: 1.1rem; }
.trust-row { display: flex; align-items: center; gap: 9px; margin-top: 30px; color: #828996; font-size: .76rem; font-weight: 800; letter-spacing: .04em; }
.pulse-mini { width: 8px; height: 8px; border-radius: 50%; background: #ff6a00; box-shadow: 0 0 0 6px rgba(255,106,0,.12); animation: pulseGlow 2.3s infinite; }
.trust-divider { width: 1px; height: 16px; margin: 0 5px; background: #e6c7b1; }

.landing-visual { position: relative; min-height: 540px; display: grid; place-items: center; }
.dashboard-mockup { position: relative; z-index: 2; width: min(650px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(255,255,255,.82); box-shadow: 0 35px 90px rgba(110,55,20,.18), 0 0 0 10px rgba(255,255,255,.22); transform: rotate(2deg); animation: mockFloat 6s ease-in-out infinite; }
@keyframes mockFloat { 50% { transform: rotate(0deg) translateY(-10px); } }
.mock-top { display: flex; align-items: center; gap: 6px; padding: 13px 16px; border-bottom: 1px solid #f3e3d8; background: #fffaf7; }
.mock-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffc19a; }.mock-dot:first-child { background: #ff6a00; }
.mock-title { margin-left: 12px; color: #a07f6b; font-size: .61rem; font-weight: 900; letter-spacing: .11em; }.mock-live { margin-left: auto; color: var(--orange); font-size: .59rem; font-weight: 900; letter-spacing: .12em; }
.mock-body { display: flex; min-height: 390px; }.mock-sidebar { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 25px; padding: 20px 0; background: #242936; }.mock-logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: white; background: var(--orange); font-size: .58rem; font-weight: 900; }.mock-sidebar i { width: 15px; height: 15px; border: 2px solid #88909f; border-radius: 5px; opacity: .6; }.mock-sidebar i:nth-of-type(2) { border-radius: 50%; }.mock-sidebar-bottom { width: 15px; height: 15px; margin-top: auto; border-radius: 50%; background: #ff9a61; }
.mock-content { flex: 1; padding: 38px 42px; background: linear-gradient(145deg, #fff, #fff7f1); }.mock-label { color: var(--orange); font-size: .6rem; font-weight: 900; letter-spacing: .16em; }.mock-content h3 { max-width: 280px; margin: 10px 0 30px; color: #242936; font-family: var(--font-display); font-size: 2.1rem; line-height: .98; letter-spacing: -.05em; }.mock-stats { display: flex; gap: 46px; }.mock-stats strong, .mock-stats small { display: block; }.mock-stats strong { color: #242936; font-family: var(--font-display); font-size: 1.7rem; }.mock-stats small { margin-top: 4px; color: #8c919a; font-size: .65rem; font-weight: 800; }.mock-chart { position: relative; height: 110px; margin: 28px 0; border-bottom: 1px solid #eddacc; background: repeating-linear-gradient(0deg, transparent 0 35px, #f5e9e0 36px 37px); }.chart-bar { position: absolute; bottom: 0; width: 7%; border-radius: 5px 5px 0 0; background: linear-gradient(#ffad79, #ff6a00); animation: barPulse 2.5s ease-in-out infinite; }.bar-1 { left: 8%; height: 32%; }.bar-2 { left: 27%; height: 58%; animation-delay: -.3s; }.bar-3 { left: 46%; height: 42%; animation-delay: -.6s; }.bar-4 { left: 65%; height: 78%; animation-delay: -.9s; }.bar-5 { left: 84%; height: 66%; animation-delay: -1.2s; }@keyframes barPulse { 50% { opacity: .62; transform: scaleY(.88); } }
.chart-line { position: absolute; z-index: 1; left: 3%; right: 3%; top: 25%; height: 45%; border-top: 3px solid var(--orange); transform: skewY(-12deg) rotate(-2deg); filter: drop-shadow(0 5px 5px rgba(255,106,0,.2)); }
.mock-rule { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #f0d9c8; border-radius: 13px; background: rgba(255,255,255,.8); }.rule-avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: white; background: var(--orange); }.mock-rule b, .mock-rule small { display: block; }.mock-rule b { color: #36404e; font-size: .68rem; }.mock-rule small { margin-top: 3px; color: #999da5; font-size: .6rem; }.rule-check { margin-left: auto; color: var(--orange); font-weight: 900; }
.orbit { position: absolute; border: 1px solid rgba(255,106,0,.2); border-radius: 50%; animation: orbitSpin 16s linear infinite; }.orbit-a { width: 92%; height: 74%; transform: rotate(22deg); }.orbit-b { width: 76%; height: 96%; transform: rotate(-30deg); animation-duration: 22s; animation-direction: reverse; }@keyframes orbitSpin { to { transform: rotate(382deg); } }
.float-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 12px 15px; border: 1px solid rgba(255,255,255,.8); border-radius: 15px; background: rgba(255,255,255,.88); box-shadow: 0 15px 35px rgba(100,52,25,.14); animation: floatUp 4.5s ease-in-out infinite; }.float-card b, .float-card small { display: block; }.float-card b { color: #252b36; font-size: .85rem; }.float-card small { margin-top: 3px; color: #9a8d85; font-size: .63rem; }.float-card-one { top: 13%; right: -3%; }.float-card-two { bottom: 13%; left: -5%; animation-delay: -2s; }.float-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: white; background: #252b36; }.orange-icon { background: var(--orange); }

.marquee-band { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; color: white; background: var(--orange); transform: rotate(-1.2deg); }.marquee-band div { width: max-content; padding: 17px 0; font-size: .78rem; font-weight: 900; letter-spacing: .16em; animation: marquee 24s linear infinite; }.marquee-band span { margin: 0 28px; color: #ffd2b3; }@keyframes marquee { to { transform: translateX(-30%); } }
.section-block { padding: 120px 0 40px; }.section-intro { max-width: 670px; }.section-intro h2, .access-copy h2 { margin: 16px 0; font-family: var(--font-display); font-size: clamp(2.8rem, 5vw, 5rem); line-height: .94; letter-spacing: -.06em; }.section-intro p, .access-copy p { color: var(--muted); line-height: 1.8; }.steps-grid, .feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }.step-card, .feature-grid article { position: relative; min-height: 255px; padding: 26px; border: 1px solid rgba(255,170,115,.3); border-radius: 22px; background: rgba(255,255,255,.62); transition: transform 180ms ease, box-shadow 180ms ease; }.step-card:hover, .feature-grid article:hover { transform: translateY(-7px); box-shadow: 0 24px 55px rgba(255,106,0,.1); }.featured-step { color: white; background: #252b36; border-color: #252b36; }.step-number { position: absolute; top: 23px; right: 25px; color: var(--orange); font-size: .7rem; font-weight: 900; letter-spacing: .15em; }.step-icon, .feature-glyph { color: var(--orange); font-size: 2.3rem; }.step-card h3, .feature-grid h3 { margin: 34px 0 10px; font-family: var(--font-display); font-size: 1.28rem; }.step-card p, .feature-grid p { margin: 0; color: #9298a3; line-height: 1.7; font-size: .88rem; }.featured-step p { color: #bfc3cc; }.feature-section { padding-top: 90px; }.feature-grid { grid-template-columns: repeat(3, 1fr); }.feature-grid article { min-height: 215px; }.feature-grid article h3 { margin-top: 24px; }.feature-wide { grid-column: span 3; display: flex; align-items: center; gap: 22px; min-height: 130px !important; color: white; background: linear-gradient(115deg, #252b36, #3b3030); }.feature-wide h3 { margin: 0 0 7px !important; }.feature-wide p { color: #c6c6c8; }.feature-arrow { margin-left: auto; color: var(--orange); font-size: 1.8rem; }
.access-section { display: grid; grid-template-columns: 1fr .82fr; gap: 45px; align-items: center; margin: 120px 0; padding: 60px; border-radius: 30px; background: linear-gradient(120deg, #fff0e5, #fffaf6); }.access-proof { display: inline-flex; gap: 10px; margin-top: 20px; color: #8c6e5c; font-size: .78rem; font-weight: 900; }.access-proof span { color: var(--orange); }.access-section .auth-card { min-height: auto; padding: 28px; }
.landing-footer { display: flex; align-items: center; gap: 28px; padding: 28px 0 42px; border-top: 1px solid rgba(221,184,156,.35); }.landing-footer p { margin: 0; color: #9a8e86; font-size: .83rem; }.footer-links { display: flex; gap: 20px; margin-left: auto; }.copyright { color: #b0a59e; font-size: .72rem; }
.page-legal { padding: 0 0 35px; }.legal-shell { max-width: 880px; margin-top: 55px; padding: clamp(28px, 6vw, 70px); }.legal-shell h1 { margin: 17px 0 12px; font-family: var(--font-display); font-size: clamp(3rem, 7vw, 5.7rem); line-height: .9; letter-spacing: -.06em; }.legal-lead { max-width: 650px; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }.legal-meta { display: inline-block; margin: 16px 0 40px; padding: 8px 12px; border-radius: 999px; color: #9a4b10; background: #fff0e5; font-size: .72rem; font-weight: 900; }.legal-content { border-top: 1px solid #f0ded1; padding-top: 25px; }.legal-content h2 { margin: 28px 0 9px; font-family: var(--font-display); font-size: 1.28rem; }.legal-content p { margin: 0; color: var(--muted); line-height: 1.8; }.legal-footer { max-width: 880px; }

@media (max-width: 900px) { .landing-hero, .access-section { grid-template-columns: 1fr; }.landing-hero { padding-top: 30px; }.landing-copy h1 { max-width: 620px; }.landing-visual { min-height: 470px; }.steps-grid, .feature-grid { grid-template-columns: 1fr; }.feature-wide { grid-column: auto; }.access-section { padding: 34px; } }
@media (max-width: 620px) { .landing-nav, .landing-main, .landing-footer, .legal-shell { width: min(100% - 28px, 1240px); }.landing-links { display: none; }.nav-cta { padding: 10px 12px; font-size: .72rem; }.landing-hero { min-height: auto; padding: 48px 0 60px; }.landing-copy h1 { font-size: clamp(3.1rem, 16vw, 4.6rem); }.landing-actions { align-items: flex-start; flex-direction: column; gap: 18px; }.landing-visual { min-height: 340px; margin-top: 30px; }.dashboard-mockup { transform: rotate(0); }.mock-content { padding: 25px 18px; }.mock-sidebar { width: 45px; }.mock-content h3 { font-size: 1.55rem; }.float-card-one { right: -2%; }.float-card-two { left: -2%; }.float-card { transform: scale(.84); }.section-block { padding-top: 80px; }.section-intro h2, .access-copy h2 { font-size: 3.1rem; }.access-section { margin: 80px 0; padding: 25px 18px; }.landing-footer { align-items: flex-start; flex-direction: column; gap: 15px; }.footer-links { margin-left: 0; flex-wrap: wrap; }.legal-shell { margin-top: 25px; }.legal-footer { margin-top: 25px; } }

/* Responsive polish: softer contrast and wider desktop canvas */
:root {
  --orange: #e8792e;
  --orange-2: #f19a59;
  --orange-soft: rgba(232, 121, 46, 0.1);
  --orange-soft-2: rgba(232, 121, 46, 0.15);
  --border: rgba(215, 157, 116, 0.28);
  --shadow: 0 24px 80px rgba(154, 83, 39, 0.1);
}

body.page-dashboard,
body.page-detail { padding-inline: clamp(14px, 3vw, 42px); }
.app-shell { width: min(1440px, 100%); }
.panel { box-shadow: 0 18px 52px rgba(36, 43, 54, 0.055); }
.btn-primary { background: linear-gradient(145deg, #e8792e, #ee9557); box-shadow: 0 14px 32px rgba(205, 104, 42, 0.2); }
.btn-primary:hover { box-shadow: 0 18px 38px rgba(205, 104, 42, 0.25); }
.reel-card:hover { box-shadow: 0 18px 42px rgba(205, 104, 42, 0.1); }

@media (min-width: 1280px) {
  .hero-grid { grid-template-columns: 1.25fr .75fr; }
  .studio-grid { grid-template-columns: 1.15fr .85fr; }
  .reels-grid-container, .loading-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-shell { gap: 14px; }
  .topbar { padding: 16px 20px; }
  .hero-copy h2 { max-width: 19ch; }
  .landing-nav, .landing-main, .landing-footer { width: min(100% - 36px, 1240px); }
}

@media (max-width: 600px) {
  body.page-dashboard, body.page-detail { padding: 10px 10px 22px; }
  .app-shell { width: 100%; }
  .panel, .auth-hero, .auth-card, .hero-copy, .hero-stats, .connection-panel, .detail-preview, .detail-metrics, .studio-card { padding: 17px; border-radius: 18px; }
  .topbar { padding: 14px 16px; }
  .topbar-actions { width: 100%; flex-direction: row; align-items: center; }
  .topbar-actions .status-chip { min-width: 0; max-width: calc(100% - 90px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions .btn-ghost { margin-left: auto; }
  .brand-lockup { flex-direction: row; align-items: center; }
  .brand-lockup .brand-mark { width: 42px; height: 42px; }
  .brand-lockup h1 { font-size: 1.05rem; }
  .hero-copy h2 { font-size: 2rem; }
  .hero-copy p { font-size: .92rem; line-height: 1.65; }
  .panel-head { align-items: flex-start; }
  .panel-head h3 { font-size: 1.15rem; }
  .panel-actions, .composer-actions { flex-direction: column; align-items: stretch; }
  .panel-actions button, .composer-actions button { width: 100%; }
  .reel-thumb-box { min-height: 220px; }
  .detail-hero { gap: 12px; }
  .preview-visual { min-height: 250px; }
  .notes-grid { gap: 10px; }
  .note-card { min-height: auto; padding: 15px; }
  .landing-nav, .landing-main, .landing-footer, .legal-shell { width: calc(100% - 28px); }
  .landing-nav { padding: 17px 0; }
  .landing-brand .brand-mark { width: 38px; height: 38px; }
  .nav-cta { font-size: .68rem; }
  .landing-visual { overflow: visible; }
  .orbit { opacity: .5; }
  .mock-body { min-height: 300px; }
  .mock-content { padding: 20px 14px; }
  .mock-stats { gap: 22px; }
  .mock-stats strong { font-size: 1.35rem; }
  .mock-rule b { font-size: .6rem; }
  .float-card { padding: 9px 11px; }
  .float-card-one { top: 8%; right: -5%; }
  .float-card-two { bottom: 6%; left: -5%; }
}

@media (max-width: 390px) {
  .landing-brand small { display: none; }
  .nav-cta { padding-inline: 10px; }
  .landing-copy h1 { font-size: 3rem; }
  .landing-copy > p { font-size: .94rem; }
  .mock-sidebar { width: 34px; gap: 19px; }
  .mock-content h3 { font-size: 1.28rem; }
  .mock-chart { margin: 20px 0; }
}

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