:root {
  --bg: #0a0c12;
  --surface: #141824;
  --surface2: #1c2232;
  --accent: #e94560;
  --accent2: #7c6cf0;
  --accent3: #22d3a8;
  --text: #eef1f7;
  --dim: #9aa3b5;
  --border: #2a3144;
  --radius: 16px;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.site-beta-banner {
  background: linear-gradient(90deg, #3d2e14, #5c4520);
  color: #f5e6c8;
  border-bottom: 1px solid #8b6914;
  padding: 10px 16px;
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: center;
}
.site-beta-banner strong { color: #ffd966; }
.site-beta-banner a { color: #ffe8a8; text-decoration: underline; }
.site-beta-banner a:hover { color: #fff; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(233, 69, 96, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(124, 108, 240, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(34, 211, 168, 0.08), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 12, 18, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav.is-open {
  background: rgba(10, 12, 18, 0.97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.site-nav .wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #f4f0e8;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.brand span {
  font-family: Literata, Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--surface); border-color: rgba(124, 108, 240, 0.45); }
.nav-toggle-icon {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, top 0.2s, opacity 0.2s;
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }
.site-nav.is-open .nav-toggle-icon { background: transparent; }
.site-nav.is-open .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.site-nav.is-open .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.nav-links a {
  color: var(--dim);
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); text-decoration: none; }

#nav-login-btn[hidden],
#nav-signout-btn[hidden],
#nav-account-link[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .site-nav {
    height: auto;
    align-items: stretch;
  }
  .site-nav .wrap {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .site-nav.is-open .wrap {
    padding-bottom: 12px;
  }
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .brand span {
    font-size: 1rem;
    max-width: calc(100vw - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 6px;
    padding: 12px 0 8px;
    margin: 0;
    border-top: 1px solid var(--border);
    order: 10;
  }
  .site-nav.is-open .nav-links {
    display: flex;
  }
  .nav-links a,
  .nav-links .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 0.95rem;
  }
  .nav-links a:not(.btn) {
    border-radius: 10px;
    text-align: center;
  }
  body.nav-menu-open {
    overflow: hidden;
  }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 8px 28px rgba(233, 69, 96, 0.35);
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--border);
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── Hero ── */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 {
  font-family: Literata, Georgia, serif;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.28;
  padding-bottom: 0.12em;
  overflow: visible;
  background: linear-gradient(135deg, #fff 30%, #c4b8ff 70%, #ff8fa3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero .tagline {
  color: var(--dim);
  font-size: 1.08rem;
  line-height: 1.55;
  margin-top: 16px;
  max-width: 42rem;
  margin-inline: auto;
}
.hero-cta {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.btn-lg { padding: 14px 32px; font-size: 1.02rem; }
.hero-secondary-link {
  color: var(--dim);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s;
}
.hero-secondary-link:hover { color: var(--text); text-decoration: underline; }
.hero-demo {
  margin: 40px auto 0;
  max-width: 960px;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}
.hero-demo img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-badges {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.badge {
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--dim);
}
.badge.accent { border-color: rgba(124, 108, 240, 0.5); color: #c4b8ff; }

/* ── Social proof ── */
.social-proof { padding: 20px 0 12px; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.proof-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  font-size: 0.9rem;
}
.proof-card p { color: var(--text); margin-bottom: 12px; }
.proof-card footer { color: var(--dim); font-size: 0.82rem; }

/* ── Sections ── */
section { padding: 52px 0; }
section h2 {
  font-family: Literata, serif;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin-bottom: 8px;
}
.section-lead {
  color: var(--dim);
  margin-bottom: 28px;
  max-width: 560px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { font-size: 1rem; margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 0.92rem; }
.section-cta { margin-top: 24px; text-align: center; }

.feature-rows { display: flex; flex-direction: column; gap: 36px; margin-top: 28px; }
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.feature-row-reverse .feature-copy { order: 2; }
.feature-row-reverse .feature-shot { order: 1; }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.feature-copy h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-copy p { color: var(--dim); font-size: 0.92rem; }
.feature-shot {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.feature-shot img { display: block; width: 100%; height: auto; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.step-num {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}
.step-card h3 { font-size: 1rem; margin-bottom: 6px; }
.step-card p { color: var(--dim); font-size: 0.88rem; }
.steps-note { margin-top: 20px; color: var(--dim); font-size: 0.9rem; text-align: center; }

.account-notice .notice-card {
  background: rgba(124, 108, 240, 0.08);
  border: 1px solid rgba(124, 108, 240, 0.28);
  border-radius: var(--radius);
  padding: 22px 24px;
  color: var(--dim);
  font-size: 0.92rem;
  line-height: 1.65;
}
.account-notice .notice-card p + p { margin-top: 12px; }
.account-notice strong { color: var(--text); }

@media (max-width: 800px) {
  .feature-row, .feature-row-reverse { grid-template-columns: 1fr; }
  .feature-row-reverse .feature-copy,
  .feature-row-reverse .feature-shot { order: unset; }
  .steps-grid { grid-template-columns: 1fr; }
}

/* ── Theme previews (CSS app mockups) ── */
.theme-showcase-hint {
  color: var(--dim);
  font-size: 0.88rem;
  margin-bottom: 16px;
  text-align: center;
}
.theme-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 720px) {
  .theme-showcase { grid-template-columns: 1fr; }
}
.theme-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.theme-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  border-color: rgba(124, 108, 240, 0.45);
}
.theme-shot {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: #080a10;
  cursor: zoom-in;
  position: relative;
  font: inherit;
  text-align: left;
}
.theme-shot img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  object-position: center top;
  display: block;
  vertical-align: top;
}
.theme-enlarge-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.85);
  color: #c4b8ff;
  border: 1px solid rgba(124, 108, 240, 0.4);
  pointer-events: none;
}
.theme-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.theme-lightbox[hidden] { display: none; }
.theme-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  border: none;
  cursor: pointer;
}
.theme-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.theme-lightbox-inner img {
  max-width: 100%;
  max-height: calc(92vh - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.theme-lightbox-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.theme-lightbox-caption {
  color: var(--dim);
  font-size: 0.9rem;
  text-align: center;
}
.theme-card-info {
  padding: 16px 18px 18px;
}
.theme-card-info h3 { font-size: 0.95rem; margin-bottom: 4px; }
.theme-card-info p { color: var(--dim); font-size: 0.82rem; }
.theme-card-info .price {
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent3);
}

.app-mockup {
  aspect-ratio: 16 / 10;
  display: grid;
  grid-template-rows: 22px 1fr;
  font-size: 6px;
  border-bottom: 1px solid var(--border);
}
.mock-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mock-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.mock-brand { margin-left: 4px; font-weight: 600; opacity: 0.85; }
.mock-body {
  display: grid;
  grid-template-columns: 28% 1fr 26%;
  min-height: 0;
}
.mock-sidebar {
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mock-line {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.12);
}
.mock-line.active { opacity: 1; }
.mock-line.short { width: 70%; }
.mock-editor {
  margin: 5px;
  border-radius: 3px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mock-prose { height: 3px; border-radius: 1px; opacity: 0.55; }
.mock-prose:nth-child(odd) { width: 92%; }
.mock-prose:nth-child(even) { width: 78%; }
.mock-ai {
  margin: 5px 5px 5px 0;
  border-radius: 3px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mock-ai-label { font-weight: 600; font-size: 5px; opacity: 0.7; margin-bottom: 2px; }
.mock-bubble { height: 8px; border-radius: 2px; background: rgba(255,255,255,0.1); }

/* ── Store page ── */
.store-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .store-layout { grid-template-columns: 1fr; }
}

.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}
.store-search {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.store-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
}
.filter-chip.active {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #fff;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.store-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.store-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--surface2);
}
.store-item h4 { font-size: 0.92rem; }
.store-item .meta { font-size: 0.78rem; color: var(--dim); text-transform: capitalize; }
.store-item .price { font-weight: 600; color: var(--accent3); font-size: 0.9rem; }
.store-item-actions { margin-top: auto; display: flex; gap: 6px; }

.cart-panel {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.cart-panel h3 { font-size: 1rem; margin-bottom: 14px; }
.cart-empty { color: var(--dim); font-size: 0.88rem; }
.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.gift-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.gift-block label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 10px;
}
.gift-fields { display: none; flex-direction: column; gap: 8px; }
.gift-fields.open { display: flex; }
.gift-fields input, .gift-fields textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}
.gift-fields textarea { min-height: 60px; resize: vertical; }

.store-notice {
  background: rgba(124, 108, 240, 0.12);
  border: 1px solid rgba(124, 108, 240, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #c4b8ff;
}

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}
.modal-card-wide { width: min(480px, 100%); }
.btn-google {
  width: 100%;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  margin-bottom: 4px;
}
.btn-google:hover { background: #f8f9fa; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--dim);
  font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
}
.auth-tab.active {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--accent2);
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--dim);
  margin-bottom: 10px;
  cursor: pointer;
}
.checkbox-row input { margin-top: 3px; flex-shrink: 0; }

.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.modal-card h2 {
  font-family: Literata, serif;
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.modal-card .sub { color: var(--dim); font-size: 0.88rem; margin-bottom: 20px; }
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  color: var(--dim);
  margin-bottom: 5px;
}
.form-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
}
.form-error { color: var(--accent); font-size: 0.85rem; margin-top: 10px; min-height: 1.2em; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 48px 0 32px;
  color: var(--dim);
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #f4f0e8;
}
.footer-brand span { font-family: Literata, serif; font-weight: 600; color: var(--text); }
.footer-tag { font-size: 0.82rem; max-width: 220px; }
.footer-links h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 10px;
}
.footer-links a {
  display: block;
  color: var(--dim);
  text-decoration: none;
  padding: 4px 0;
  font-size: 0.88rem;
}
.footer-links a:hover { color: var(--accent2); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
}
footer a { color: var(--accent2); }
.version { margin-top: 16px; font-size: 0.78rem; color: var(--dim); }

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Legal / docs pages ── */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.page-content h1 {
  font-family: Literata, serif;
  font-size: 2rem;
  margin-bottom: 8px;
}
.page-content .lead { color: var(--dim); margin-bottom: 32px; }
.page-content h2 {
  font-size: 1.15rem;
  margin: 28px 0 10px;
}
.page-content p, .page-content li {
  color: var(--dim);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 12px;
}
.page-content ul { padding-left: 20px; }

/* ── Account portal ── */
.portal-page { padding: 32px 0 64px; }
#account-root.signed-out .portal-main-panel { display: none; }
#account-root.signed-in .portal-gate { display: none; }
#account-root.signed-in .portal-main-panel { display: block; }
.portal-header { margin-bottom: 28px; }
.portal-header h1 { font-family: Literata, serif; font-size: 2rem; }
.portal-gate { text-align: center; padding: 48px 0; }
.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.portal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.portal-panel-wide { grid-column: 1 / -1; }
.portal-panel h2 { font-size: 1.05rem; margin-bottom: 12px; }
.portal-sub { font-size: 0.88rem; color: var(--dim); margin: 16px 0 8px; }
.portal-body { font-size: 0.9rem; color: var(--dim); }
.portal-body .meta { font-size: 0.82rem; color: var(--dim); }
.portal-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.portal-row:last-child { border-bottom: none; }
.portal-device-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.portal-device-history { margin-top: 12px; font-size: 0.85rem; color: var(--dim); }
.store-owned-pill { font-size: 0.78rem; font-weight: 600; color: #3d9a6a; }
.store-item-owned { opacity: 0.92; }
.portal-ticket-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
}
.portal-ticket-row:hover { border-color: var(--accent); }
.portal-ticket-row-title { display: block; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.portal-ticket-detail { margin-top: 16px; max-width: 640px; }
.portal-ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.portal-ticket-msg {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.portal-ticket-msg-user { background: rgba(255,255,255,0.04); }
.portal-ticket-msg-staff { background: rgba(124, 156, 255, 0.12); border-color: rgba(124, 156, 255, 0.35); }
.portal-ticket-msg-meta { font-size: 0.78rem; color: var(--dim); margin: 0 0 6px; }
.portal-ticket-msg-body { margin: 0; white-space: pre-wrap; font-size: 0.9rem; color: var(--text); }
.portal-ticket-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.portal-ticket-img {
  max-width: 160px;
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
}
.portal-ticket-file-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.portal-ticket-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}
.portal-ticket-file-rm {
  border: none;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
}
.portal-ticket-file-rm:hover { color: var(--text); }
.portal-ticket-back { margin-bottom: 8px; }
.portal-form { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.portal-input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}
.portal-input textarea { resize: vertical; }
.empty { color: var(--dim); font-size: 0.88rem; }
.form-msg { font-size: 0.85rem; color: var(--accent3); min-height: 1.2em; margin-top: 8px; }
.portal-status {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(124, 108, 240, 0.12);
  border: 1px solid rgba(124, 108, 240, 0.35);
  color: #c4b8ff;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.portal-status-error {
  background: rgba(233, 69, 96, 0.12);
  border-color: rgba(233, 69, 96, 0.4);
  color: #ffb4c0;
}
.support-ai-placeholder {
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  font-size: 0.9rem;
  color: var(--dim);
  margin-bottom: 16px;
}
@media (max-width: 800px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-panel-wide { grid-column: auto; }
}
