/* ═══════════════════════════════════════════════════
   CARDED — Design System
   Palette: Navy · Jade · Gold · Ink · Paper
═══════════════════════════════════════════════════ */

:root {
  --navy:    #0D1B2A;
  --navy-mid: #162437;
  --navy-light: #1E3252;
  --jade:    #00C896;
  --jade-dark: #00A07A;
  --jade-glow: rgba(0,200,150,0.15);
  --gold:    #E8B84B;
  --gold-light: #F2CC78;
  --ink:     #1A1A2E;
  --paper:   #F7F5F0;
  --paper-dark: #EDE9E2;
  --white:   #FFFFFF;
  --red:     #E03055;
  --muted:   #8A96A8;
  --border:  rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.15);
  --radius:  12px;
  --radius-lg: 20px;
  --card-radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--paper);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
input, textarea, select { font-family: inherit; }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }
h5 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 0.75rem;
}

/* ─── LAYOUT ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-sub { color: var(--muted); max-width: 560px; margin: 0.75rem auto 0; font-size: 1.05rem; }

/* ─── PAGE SYSTEM ─── */
.page { display: none; }
.page.active { display: block; }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(13,27,42,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex; align-items: center; gap: 2rem;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-family: 'Playfair Display', serif; font-weight: 900; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 0.25rem; margin-left: 1rem; flex: 1; }
.nav-links a { padding: 0.4rem 0.75rem; border-radius: 6px; font-size: 0.9rem; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--paper); background: rgba(255,255,255,0.06); }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--paper); font-size: 1.4rem; cursor: pointer; }
.mobile-menu { display: none; flex-direction: column; padding: 1rem 2rem; gap: 0.5rem; border-top: 1px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 0.6rem 0; color: var(--muted); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--jade); color: var(--navy); border-color: var(--jade); }
.btn-primary:hover { background: var(--jade-dark); border-color: var(--jade-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,200,150,0.3); }
.btn-outline { background: transparent; color: var(--paper); border-color: var(--border-light); }
.btn-outline:hover { border-color: var(--paper); background: rgba(255,255,255,0.06); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--paper); background: rgba(255,255,255,0.06); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-full { width: 100%; }
.btn.small { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 3rem;
  position: relative;
}
.hero-bg {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(0,200,150,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(232,184,75,0.04) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}
.hero-content { flex: 1; max-width: 560px; position: relative; z-index: 1; }
.hero-headline { margin: 0.5rem 0 1.25rem; }
.hero-headline em { color: var(--jade); font-style: italic; }
.hero-sub { font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.7; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-proof { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: 0.85rem; color: var(--muted); }
.hero-proof strong { color: var(--paper); }
.proof-sep { color: var(--border-light); }
.hero-visual { flex: 1; display: flex; justify-content: center; align-items: center; min-height: 420px; position: relative; z-index: 1; }

/* ─── CARD FAN ─── */
.card-fan { position: relative; width: 320px; height: 420px; }
.fan-card {
  position: absolute;
  width: 180px; height: 252px;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-lg);
  transform-origin: center bottom;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  left: 50%; top: 50%;
  margin-left: -90px; margin-top: -126px;
}
.fan-card:hover { z-index: 10 !important; }
.fc-1 { transform: rotate(-20deg) translate(-80px, 20px); z-index: 1; }
.fc-2 { transform: rotate(-10deg) translate(-40px, 5px); z-index: 2; }
.fc-3 { transform: rotate(0deg) translate(0px, 0px); z-index: 3; }
.fc-4 { transform: rotate(10deg) translate(40px, 5px); z-index: 2; }
.fc-5 { transform: rotate(20deg) translate(80px, 20px); z-index: 1; }
.fan-card:hover { transform: rotate(0deg) translate(0, -30px) scale(1.05) !important; }

.fan-card-inner { width: 100%; height: 100%; border-radius: var(--card-radius); overflow: hidden; position: relative; }
.fc-playing { background: #fff; border: 1px solid #e0e0e0; }
.fc-flash { background: linear-gradient(135deg, #1a3a6e, #0d2a5a); display: flex; align-items: center; justify-content: center; }
.fc-custom { background: linear-gradient(135deg, #2a1a4e, #1a0d3a); display: flex; align-items: center; justify-content: center; }
.fc-tarot { background: linear-gradient(135deg, #1a2a1a, #0d3a2a); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fc-red .card-pip, .fc-red .card-corner { color: #d32f2f !important; }
.card-corner { position: absolute; font-size: 11px; font-weight: 700; color: #222; line-height: 1.1; }
.card-corner.tl { top: 8px; left: 10px; }
.card-corner.br { bottom: 8px; right: 10px; transform: rotate(180deg); }
.card-pip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3.5rem; color: #222; }
.card-pip.red { color: #d32f2f; }
.flash-q { color: var(--paper); font-size: 0.7rem; text-align: center; padding: 1rem; font-weight: 500; line-height: 1.5; }
.custom-card-art { text-align: center; color: var(--paper); }
.custom-glyph { font-size: 2.5rem; }
.custom-label { font-size: 0.7rem; font-weight: 700; margin-top: 0.25rem; color: var(--gold); }
.custom-stats { font-size: 0.6rem; color: var(--muted); margin-top: 0.25rem; font-family: 'JetBrains Mono', monospace; }
.tarot-art { font-size: 3rem; }
.tarot-name { font-size: 0.65rem; font-weight: 700; color: var(--gold); margin-top: 0.5rem; letter-spacing: 0.08em; }

/* ─── HOW IT WORKS ─── */
.how-it-works { background: rgba(255,255,255,0.02); }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.step { text-align: center; padding: 2rem 1rem; }
.step-num { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--jade); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.step-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; }

/* ─── CARD TYPES ─── */
.types-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.type-card {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}
.type-card:hover { border-color: var(--jade); transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,200,150,0.1); }
.type-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.type-card h3 { margin-bottom: 0.5rem; }
.type-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin-bottom: 1rem; }
.type-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { background: rgba(0,200,150,0.1); color: var(--jade); font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 20px; font-weight: 500; }

/* ─── PRINT SPECS ─── */
.specs-section { background: var(--navy-mid); }
.specs-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.specs-text h2 { margin-bottom: 1rem; }
.specs-text p { color: var(--muted); margin-bottom: 2rem; line-height: 1.7; }
.finish-options { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }
.finish-opt { display: flex; align-items: flex-start; gap: 1rem; }
.finish-swatch { width: 44px; height: 60px; border-radius: 6px; flex-shrink: 0; margin-top: 2px; }
.finish-swatch.gloss { background: linear-gradient(135deg, #fff 0%, #d0e8ff 50%, #fff 100%); border: 1px solid #ccc; }
.finish-swatch.matte { background: #e8e4de; border: 1px solid #ccc; }
.finish-opt strong { display: block; margin-bottom: 0.25rem; }
.finish-opt p { color: var(--muted); font-size: 0.88rem; margin: 0; }

.specs-card-visual { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.spec-card-demo { position: relative; width: 160px; height: 224px; }
.spec-card {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 10px;
  transition: opacity 0.3s;
  opacity: 0;
}
.spec-card.active { opacity: 1; }
.glossy-card { background: linear-gradient(135deg, #f0f8ff, #e8f4ff); border: 1px solid #c0d8f0; box-shadow: 2px 2px 0 rgba(200,220,255,0.8), -2px -2px 0 rgba(255,255,255,0.6); }
.matte-card { background: #ede9e2; border: 1px solid #d0ccc5; }
.spec-card-face { width: 100%; height: 100%; border-radius: 10px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.spec-label { font-family: 'Playfair Display', serif; font-size: 0.85rem; color: var(--navy); font-weight: 700; letter-spacing: 0.08em; }
.spec-shine { position: absolute; top: -20px; left: -20px; width: 80px; height: 200px; background: linear-gradient(45deg, transparent, rgba(255,255,255,0.5), transparent); transform: rotate(30deg); animation: shine 3s infinite; }
@keyframes shine { 0%,70%,100% { left: -20px; } 40% { left: 140px; } }
.spec-toggle { display: flex; gap: 0; border: 1px solid var(--border-light); border-radius: 8px; overflow: hidden; }
.spec-btn { padding: 0.5rem 1.25rem; background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 0.85rem; font-family: inherit; transition: all 0.2s; }
.spec-btn.active { background: var(--jade); color: var(--navy); font-weight: 600; }
.spec-dims { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* ─── PRICING TEASER ─── */
.pricing-teaser { text-align: center; }
.price-compare { display: flex; align-items: center; justify-content: center; gap: 3rem; margin: 3rem 0; }
.price-col { text-align: center; }
.price-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.5rem; }
.price-amount { font-family: 'JetBrains Mono', monospace; font-size: 2.5rem; font-weight: 600; color: var(--jade); }
.price-amount.alt { color: var(--muted); text-decoration: line-through; font-size: 1.8rem; }
.price-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.price-vs { font-size: 1.25rem; color: var(--muted); font-weight: 600; }

/* ─── MARKETPLACE TEASER ─── */
.marketplace-teaser { text-align: center; }
.market-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin: 3rem 0; }
.market-card { background: var(--navy-light); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all 0.2s; }
.market-card:hover { transform: translateY(-4px); border-color: var(--jade); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.market-card-art { height: 140px; display: flex; align-items: center; justify-content: center; }
.market-card-info { padding: 1rem; }
.market-card-info h4 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.market-meta { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.5rem; }
.stars { color: var(--gold); }
.market-price { font-family: 'JetBrains Mono', monospace; font-size: 1rem; font-weight: 600; color: var(--jade); }

/* ─── CTA BANNER ─── */
.cta-banner {
  background: linear-gradient(135deg, var(--jade-dark) 0%, #007a5e 100%);
  padding: 5rem 2rem; text-align: center;
}
.cta-banner h2 { color: var(--navy); font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cta-banner p { color: rgba(13,27,42,0.7); margin: 1rem 0 2rem; font-size: 1.05rem; }
.cta-banner .btn-primary { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.cta-banner .btn-primary:hover { background: var(--ink); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }

/* ─── FOOTER ─── */
.footer { background: var(--ink); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--muted); font-size: 0.88rem; margin-top: 1rem; line-height: 1.6; }
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a { color: var(--muted); font-size: 0.88rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--paper); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.8rem; }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: var(--muted); transition: color 0.2s; }
.footer-legal a:hover { color: var(--paper); }

/* ─── STUDIO ─── */
#page-create { padding-top: 68px; min-height: 100vh; }
.studio-layout { display: flex; height: calc(100vh - 68px); overflow: hidden; }

/* Sidebar */
.studio-sidebar {
  width: 360px; flex-shrink: 0;
  background: var(--navy-mid);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.studio-sidebar-header { padding: 1.5rem; border-bottom: 1px solid var(--border); }
.studio-sidebar-header h2 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.studio-sidebar-header p { font-size: 0.85rem; color: var(--muted); }
.studio-section { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.studio-step-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.studio-step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--jade); color: var(--navy); font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.studio-step-header h3 { font-size: 0.95rem; }

/* Deck type options */
.deck-type-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.deck-type-opt { position: relative; }
.deck-type-opt input { position: absolute; opacity: 0; }
.deck-type-label {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.15s;
}
.deck-type-opt input:checked + .deck-type-label { border-color: var(--jade); background: var(--jade-glow); color: var(--jade); }
.dti { font-size: 1.1rem; }

/* Finish radio */
.finish-radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.finish-radio { position: relative; }
.finish-radio input { position: absolute; opacity: 0; }
.finish-radio-label {
  display: flex; flex-direction: column;
  padding: 0.75rem; border-radius: 8px;
  border: 1px solid var(--border); cursor: pointer; transition: all 0.15s;
}
.finish-radio input:checked + .finish-radio-label { border-color: var(--jade); background: var(--jade-glow); }
.finish-radio-label strong { font-size: 0.88rem; }
.finish-radio-label span { font-size: 0.75rem; color: var(--muted); }

/* Studio note */
.studio-note { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.75rem;
}
.upload-zone:hover { border-color: var(--jade); background: var(--jade-glow); }
.upload-zone.small { padding: 0.75rem; }
.upload-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.upload-label { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.25rem; }
.upload-hint { font-size: 0.72rem; color: var(--muted); }
.template-link { font-size: 0.8rem; color: var(--jade); display: inline-block; margin-top: 0.5rem; }
.template-link.small { font-size: 0.75rem; }
.box-preview { position: relative; margin-bottom: 0.75rem; }
.box-preview img { width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.clear-btn { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.7); border: none; color: #fff; font-size: 0.75rem; padding: 0.3rem 0.6rem; border-radius: 4px; cursor: pointer; }
.hidden { display: none; }

/* Deck info form */
.deck-info-form { display: flex; flex-direction: column; gap: 0.75rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.form-group input, .form-group textarea, .form-group select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  color: var(--paper); font-size: 0.88rem;
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-group select { cursor: pointer; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--jade); }

/* Studio actions */
.studio-actions { margin-top: auto; padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.75rem; }
.price-estimate { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); }
.price-est-val { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--jade); }

/* Studio main */
.studio-main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.studio-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.toolbar-left { display: flex; align-items: center; gap: 1rem; }
.deck-name-display { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; }
.deck-count-display { font-size: 0.78rem; color: var(--jade); background: var(--jade-glow); padding: 0.2rem 0.6rem; border-radius: 20px; font-family: 'JetBrains Mono', monospace; }
.toolbar-right { display: flex; gap: 0.5rem; }
.toolbar-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 0.4rem 0.85rem; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-family: inherit; transition: all 0.15s; }
.toolbar-btn.active, .toolbar-btn:hover { border-color: var(--jade); color: var(--jade); background: var(--jade-glow); }

/* Preview area */
.preview-area { flex: 1; overflow-y: auto; }
.preview-mode { display: none; }
.preview-mode.active { display: block; }

/* Preview fan */
.preview-fan-wrap { display: flex; justify-content: center; padding: 3rem 2rem 1rem; }
.preview-fan { position: relative; width: 280px; height: 380px; }
.pf-card {
  position: absolute; width: 120px; height: 168px;
  border-radius: var(--card-radius);
  background: #fff;
  border: 1px solid #ddd;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transform-origin: center bottom;
  left: 50%; top: 50%; margin-left: -60px; margin-top: -84px;
  transition: all 0.3s;
}
.pf-card-back { background: var(--navy-light); border: none; font-size: 1.5rem; color: var(--muted); }

/* Playing card config */
.playing-config { padding: 1rem 2rem 2rem; }
.playing-config h3 { margin-bottom: 0.5rem; font-size: 0.95rem; }
.suits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
.suit-upload-card {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.suit-upload-card:hover { border-color: var(--jade); }
.suit-symbol { font-size: 2rem; }
.suit-symbol.black { color: var(--paper); }
.suit-symbol.red { color: var(--red); }
.suit-name { font-size: 0.75rem; font-weight: 600; margin: 0.25rem 0; }
.suit-status { font-size: 0.65rem; color: var(--muted); }
.back-design-row, .joker-row { margin-bottom: 1.25rem; }
.back-design-row h3, .joker-row h3 { font-size: 0.88rem; margin-bottom: 0.5rem; }
.toggle-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; cursor: pointer; }

/* Custom deck builder */
.custom-deck-builder, .flash-builder, .tarot-builder { padding: 1.5rem 2rem; }
.custom-builder-header, .flash-builder-header, .tarot-builder-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.custom-builder-header h3, .flash-builder-header h3, .tarot-builder-header h3 { font-size: 1rem; }
.custom-cards-list, .flash-cards-list, .tarot-cards-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.custom-totals, .flash-totals, .tarot-add-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.82rem; color: var(--muted); }
.tarot-add-row { justify-content: space-between; }
.tarot-count { font-size: 0.82rem; color: var(--muted); }

/* Card type row */
.card-type-row {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.ctr-upload { width: 44px; height: 44px; border-radius: 6px; background: var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; font-size: 1.2rem; overflow: hidden; }
.ctr-upload img { width: 100%; height: 100%; object-fit: cover; }
.ctr-name { flex: 1; background: transparent; border: none; border-bottom: 1px solid var(--border-light); padding: 0.3rem 0; color: var(--paper); font-size: 0.85rem; font-family: inherit; }
.ctr-name:focus { outline: none; border-color: var(--jade); }
.ctr-qty { display: flex; align-items: center; gap: 0.3rem; }
.ctr-qty-btn { background: var(--border); border: none; color: var(--paper); width: 24px; height: 24px; border-radius: 4px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.ctr-qty-val { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; width: 24px; text-align: center; }
.ctr-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0.2rem; }
.ctr-del:hover { color: var(--red); }

/* Flash card row */
.flash-row {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}
.flash-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.flash-row-num { font-size: 0.72rem; color: var(--jade); font-family: 'JetBrains Mono', monospace; }
.flash-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.flash-input {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.4rem 0.6rem; color: var(--paper); font-size: 0.8rem; font-family: inherit; resize: none;
}
.flash-input:focus { outline: none; border-color: var(--jade); }

/* Tarot card row */
.tarot-row {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.tarot-num { font-size: 0.7rem; color: var(--jade); font-family: 'JetBrains Mono', monospace; width: 24px; }
.tarot-upload { width: 36px; height: 50px; border-radius: 4px; background: var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.9rem; flex-shrink: 0; overflow: hidden; }
.tarot-upload img { width: 100%; height: 100%; object-fit: cover; }
.tarot-name-input { flex: 1; background: transparent; border: none; border-bottom: 1px solid var(--border-light); color: var(--paper); font-size: 0.85rem; padding: 0.2rem 0; font-family: inherit; }
.tarot-name-input:focus { outline: none; border-color: var(--jade); }
.tarot-desc { flex: 1.5; background: transparent; border: none; border-bottom: 1px solid var(--border-light); color: var(--muted); font-size: 0.75rem; padding: 0.2rem 0; font-family: inherit; resize: none; }
.tarot-desc:focus { outline: none; border-color: var(--jade); }
.tarot-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.9rem; }
.tarot-del:hover { color: var(--red); }

/* Tarot presets */
.tarot-presets { display: flex; gap: 0.5rem; }

/* Flash import row */
.flash-import-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }

/* ─── MARKETPLACE ─── */
#page-marketplace { padding-top: 68px; }
.marketplace-hero {
  background: linear-gradient(180deg, rgba(0,200,150,0.08) 0%, transparent 100%);
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.marketplace-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 0.75rem; }
.marketplace-hero p { color: var(--muted); margin-bottom: 2rem; }
.market-search { max-width: 560px; margin: 0 auto; display: flex; gap: 0; }
.market-search input {
  flex: 1; background: var(--navy-light); border: 1px solid var(--border-light);
  border-radius: 10px 0 0 10px; padding: 0.85rem 1.25rem; color: var(--paper);
  font-size: 0.95rem; font-family: inherit;
}
.market-search input:focus { outline: none; border-color: var(--jade); }
.search-btn { background: var(--jade); border: none; padding: 0 1.25rem; border-radius: 0 10px 10px 0; cursor: pointer; font-size: 1.1rem; }

.marketplace-body { padding: 2rem 0; }
.marketplace-filters { display: flex; align-items: center; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 0.5rem; }
.filter-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.filter-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 0.35rem 0.85rem; border-radius: 20px; cursor: pointer; font-size: 0.8rem; font-family: inherit; transition: all 0.15s; }
.filter-btn.active, .filter-btn:hover { border-color: var(--jade); color: var(--jade); background: var(--jade-glow); }
#sort-select { background: var(--navy-light); border: 1px solid var(--border); color: var(--paper); padding: 0.35rem 0.75rem; border-radius: 6px; font-size: 0.82rem; font-family: inherit; cursor: pointer; }

.marketplace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.mp-card {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.mp-card:hover { transform: translateY(-4px); border-color: var(--jade); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.mp-card-art { height: 160px; display: flex; align-items: center; justify-content: center; position: relative; }
.mp-badge { position: absolute; top: 8px; left: 8px; background: var(--jade); color: var(--navy); font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 20px; }
.mp-card-body { padding: 0.85rem; }
.mp-card-body h4 { font-size: 0.88rem; margin-bottom: 0.25rem; }
.mp-creator { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.5rem; }
.mp-stars { font-size: 0.72rem; color: var(--gold); }
.mp-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.mp-price { font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; font-weight: 600; color: var(--jade); }
.mp-buy { background: var(--jade); border: none; color: var(--navy); font-size: 0.72rem; font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 6px; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.mp-buy:hover { background: var(--jade-dark); }

/* ─── PRICING PAGE ─── */
#page-pricing { padding-top: 68px; }
.pricing-page { padding: 5rem 0; }
.pricing-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 3rem 0; }
.pricing-table { background: var(--navy-light); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.pricing-table h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.pricing-table-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.5rem; }

.price-table { width: 100%; border-collapse: collapse; }
.price-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
.price-table td { padding: 0.65rem 0.75rem; font-size: 0.88rem; border-bottom: 1px solid var(--border); }
.price-table td:last-child, .price-table td:nth-last-child(2) { font-family: 'JetBrains Mono', monospace; color: var(--jade); }
.price-table tr.highlight-row { background: var(--jade-glow); }
.table-note { font-size: 0.75rem; color: var(--muted); margin-top: 0.75rem; }

/* Royalty breakdown */
.royalty-example h3 { font-size: 1rem; margin-bottom: 1rem; }
.royalty-bar-wrap { margin-bottom: 1.25rem; }
.royalty-bar { display: flex; height: 44px; border-radius: 8px; overflow: hidden; }
.rb-seg { display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; text-align: center; line-height: 1.2; }
.rb-seg.creator { background: var(--jade); color: var(--navy); }
.rb-seg.print { background: var(--gold); color: var(--navy); }
.rb-seg.platform { background: var(--navy-light); color: var(--paper); border: 1px solid var(--border-light); }
.rb-seg.shipping { background: rgba(255,255,255,0.08); color: var(--muted); }
.royalty-amounts { display: flex; flex-direction: column; gap: 0.5rem; }
.ra-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.ra-label { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.ra-label.creator { color: var(--jade); }
.ra-label.print { color: var(--gold); }
.ra-amount { font-family: 'JetBrains Mono', monospace; font-weight: 600; }

.pricing-faq { margin: 4rem 0; }
.pricing-faq h2 { margin-bottom: 2rem; }
.faq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.faq-item { background: var(--navy-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.faq-item h4 { margin-bottom: 0.5rem; font-size: 0.95rem; }
.faq-item p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

.pricing-cta { text-align: center; padding: 4rem 2rem; background: var(--navy-mid); border-radius: var(--radius-lg); }
.pricing-cta h2 { margin-bottom: 0.75rem; }
.pricing-cta p { color: var(--muted); margin-bottom: 2rem; }

/* ─── MODALS ─── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--navy-mid); border: 1px solid var(--border-light); border-radius: var(--radius-lg); max-width: 480px; width: 100%; padding: 2rem; position: relative; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.modal-close:hover { color: var(--paper); }
.modal h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.modal p { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.5rem; }
.modal-form { display: flex; flex-direction: column; gap: 0.75rem; }
.modal-input {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 0.75rem 1rem; color: var(--paper); font-size: 0.9rem; font-family: inherit;
}
.modal-input:focus { outline: none; border-color: var(--jade); }
.modal-divider { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: 0.8rem; }
.modal-divider::before, .modal-divider::after { content:''; flex:1; height:1px; background: var(--border); }
.modal-footer { margin-top: 1rem; text-align: center; font-size: 0.82rem; color: var(--muted); }
.modal-footer a { color: var(--jade); }
.modal-success { text-align: center; padding: 1rem 0; }
.modal-success .success-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal-success h2 { margin-bottom: 0.5rem; }
.modal-success p { margin-bottom: 1.5rem; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .types-grid, .steps-grid, .market-preview { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pricing-tables { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .hero { flex-direction: column; padding: 7rem 2rem 4rem; min-height: auto; text-align: center; }
  .hero-ctas { justify-content: center; }
  .hero-proof { justify-content: center; }
  .hero-visual { min-height: 300px; }
  .specs-layout { grid-template-columns: 1fr; }
  .price-compare { flex-direction: column; gap: 1.5rem; }
  .studio-layout { flex-direction: column; height: auto; }
  .studio-sidebar { width: 100%; max-height: 50vh; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .mobile-menu-btn { display: flex; }
}
@media (max-width: 600px) {
  .types-grid, .steps-grid, .market-preview, .pricing-tables { grid-template-columns: 1fr; }
  .suits-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .marketplace-filters { flex-direction: column; align-items: flex-start; }
}
