:root {
  --bg-deep: #091326;
  --bg-surface: #0f1b33;
  --bg-panel: rgba(11, 20, 39, 0.92);
  --text-main: #f5f7fb;
  --text-muted: #b3c1d9;
  --gold: #eab954;
  --gold-hover: #f7ca68;
  --border-subtle: rgba(255, 255, 255, 0.14);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

.page-pad {
  padding: 2.5rem 0 4rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.85rem 4vw;
  background: rgba(9, 19, 38, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.main-nav a {
  white-space: nowrap;
  transition: color 0.18s ease;
}

.main-nav a:hover {
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-gold {
  background: var(--gold);
  color: #161209;
}

.btn-gold:hover {
  background: var(--gold-hover);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-ghost-dark {
  background: transparent;
  color: var(--gold);
  border-color: rgba(234, 185, 84, 0.45);
}

.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* 3D Stage */
.stage-section {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  min-height: 540px;
  overflow: hidden;
  background: var(--bg-deep);
}

.scene-mount {
  position: absolute;
  inset: 0;
}

.card-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.4rem 4vw 2.5rem;
  background: linear-gradient(to bottom, rgba(9, 19, 38, 0.86), rgba(9, 19, 38, 0.35), transparent);
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

.card-audience {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.card-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.card-sender {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #dce6f7;
}

.unwrap-cta-wrap {
  position: absolute;
  bottom: 7.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
}

.greeting-panel {
  position: absolute;
  top: 1.4rem;
  left: 1.5rem;
  width: min(420px, 90vw);
  padding: 1.35rem 1.5rem;
  background: var(--bg-panel);
  border: 1px solid rgba(234, 185, 84, 0.35);
  border-radius: 0.85rem;
  z-index: 15;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.greeting-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
}

.greeting-title {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.15;
}

.greeting-body {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #e2e8f5;
}

.greeting-sig {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold);
}

.greeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.social-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Bottom Collapsible Controls Dock */
.controls-dock-wrap {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 94vw;
}

.dock-toggle {
  padding: 0.3rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  cursor: pointer;
}

.controls-dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
}

.dock-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dock-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 0.45rem;
  cursor: pointer;
  white-space: nowrap;
}

.dock-btn.is-active {
  background: rgba(234, 185, 84, 0.18);
  border-color: rgba(234, 185, 84, 0.5);
  color: var(--gold);
}

.is-hidden {
  display: none !important;
}

/* Editorial & AdSense Band */
.content-band {
  background: #0b162b;
  padding: 2.5rem 0 3.5rem;
  border-top: 1px solid var(--border-subtle);
}

.ad-slot {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.ad-slot-placeholder {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 92px;
  justify-content: center;
}

.ad-label {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
}

.ad-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.editorial-card,
.tip-card,
.prose-page {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1.5rem;
}

.editorial-card h2,
.prose-page h1 {
  font-family: var(--font-display);
  margin-top: 0;
}

/* Creator Page */
.creator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.creator-form,
.remix-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-subtle);
  background: #081020;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
}

.success-box {
  background: rgba(234, 185, 84, 0.12);
  border: 1px solid rgba(234, 185, 84, 0.45);
  padding: 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.copy-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.copy-row input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border-subtle);
  background: #081020;
  color: var(--text-main);
}

/* Modal */
.remix-dialog {
  width: min(520px, 94vw);
  padding: 1.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(234, 185, 84, 0.4);
  background: #0f1b33;
  color: var(--text-main);
}

.remix-dialog::backdrop {
  background: rgba(3, 7, 18, 0.75);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
}

.dialog-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.remix-result {
  padding: 0.9rem;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 0.5rem;
  font-size: 0.88rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  background: #070e1d;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner {
  width: min(1140px, 92vw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a:hover {
  color: var(--gold);
}

@media (max-width: 820px) {
  .main-nav {
    display: none;
  }
  .creator-layout,
  .field-row {
    grid-template-columns: 1fr;
  }
  .greeting-panel {
    left: 50%;
    transform: translateX(-50%);
    top: 1rem;
  }
}
