:root {
  --bg: #fff7fb;
  --card: #ffffff;
  --text: #3b1d3a;
  --muted: #6d4f6a;
  --primary: #b81b4d;
  --accent: #ffc542;
  --primary-hover: #96143d;
  --border: #f0d7e5;
  --tint-pink: #ffeaf3;
  --tint-gold: #fff6db;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .08);
  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 12px;
}

h1 { font-size: 48px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

p { margin: 0 0 16px; max-width: 70ch; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { left: 16px; top: 16px; z-index: 100; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand-link:hover { color: var(--primary); text-decoration: none; }
.brand-mark { display: inline-flex; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.nav-link:hover { background: var(--tint-pink); color: var(--primary); text-decoration: none; }
.nav-link.is-active { background: var(--tint-pink); color: var(--primary); }

.site-main { padding-top: 24px; padding-bottom: 64px; }
.section-band { margin-top: 48px; }

.deck-pill {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  background: var(--tint-gold);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--accent);
}

.hero-compact { margin-bottom: 24px; }
.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-copy { flex: 1 1 480px; }
.hero-lead { font-size: 18px; color: var(--muted); margin-bottom: 0; max-width: 70ch; }

.hero-meta-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.meta-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 14px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.meta-chip strong { color: var(--primary); font-family: var(--font-display); font-size: 18px; margin-right: 4px; }

.btn-primary, .btn-outline, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #ffffff; text-decoration: none; }

.btn-outline {
  background: var(--card);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--tint-pink); color: var(--primary-hover); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  min-height: 44px;
  padding: 8px 16px;
  font-size: 14px;
}
.btn-ghost:hover { background: var(--tint-pink); color: var(--text); text-decoration: none; }

.like-btn[data-gf-liked], .like-btn[aria-pressed="true"] {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.like-btn[data-gf-liked] .count-chip, .like-btn[aria-pressed="true"] .count-chip {
  background: rgba(255, 255, 255, .2);
  color: #ffffff;
}

.count-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--tint-pink);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}
.count-chip:empty { display: none; }

.engage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 16px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.engage-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-msg { font-size: 14px; color: var(--muted); font-weight: 600; }
.text-link { font-size: 16px; font-weight: 600; color: var(--primary); }


.section-head { margin-bottom: 24px; }
.dex-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.muted-note { color: var(--muted); font-size: 16px; margin-bottom: 0; }

.dex-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.dex-tab {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.dex-tab:hover { background: var(--tint-pink); border-color: var(--primary); }
.dex-tab.is-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.dex-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dex-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dex-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dex-code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--tint-pink);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}
.dex-jp { font-size: 14px; color: var(--muted); font-weight: 600; }
.dex-title { font-size: 22px; margin: 0; }
.dex-summary { font-size: 14px; color: var(--text); margin: 0; flex: 1; }
.dex-meta {
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.dex-tag { color: var(--primary); font-weight: 600; }

.method-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px;
  align-items: start;
}
.method-intro {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.axis-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.axis-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.axis-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--tint-gold);
  border: 1px solid var(--accent);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.axis-copy h3 { font-size: 18px; margin: 0 0 4px; }
.axis-copy p { font-size: 16px; color: var(--muted); margin: 0; }

.prose-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.prose-card h2 { margin-top: 32px; }
.prose-card h2:first-child { margin-top: 0; }
.prose-card h3 { margin-top: 24px; }
.prose-card ul, .prose-card ol { margin: 0 0 16px; padding-left: 24px; max-width: 70ch; }
.prose-card li { margin-bottom: 8px; }
.table-wrap { width: 100%; overflow-x: auto; margin: 24px 0; }
.prose-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
}
.prose-card th, .prose-card td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.prose-card th { background: var(--tint-pink); color: var(--text); font-weight: 600; }
.prose-card td:first-child { font-weight: 600; color: var(--text); }

.callout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.callout-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.callout-card h3 { font-size: 18px; margin: 0 0 8px; }
.callout-card p { font-size: 15px; margin: 0; color: var(--text); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
}
.related-card:hover { border-color: var(--primary); background: var(--tint-pink); text-decoration: none; }
.related-card h3 { font-size: 20px; margin: 0; color: var(--text); }
.related-card p { font-size: 15px; margin: 0; color: var(--muted); flex: 1; }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.faq-q {
  padding: 16px 24px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: "+"; color: var(--primary); font-size: 22px; flex-shrink: 0; }
.faq-item[open] .faq-q::after { content: "−"; }
.faq-a { padding: 0 24px 16px; color: var(--text); }
.faq-a p:last-child { margin-bottom: 0; }

.comments-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.comments-head { margin-bottom: 24px; }
.comment-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.form-row { margin-bottom: 16px; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.text-input, .text-area {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
.reply-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--tint-gold);
  border: 1px solid var(--accent);
  font-size: 14px;
}
.comment-form[data-gf-replying] .reply-banner { display: flex; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-msg { font-size: 14px; color: var(--muted); font-weight: 600; }

.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-list[data-gf-empty]::before {
  content: "No comments yet. Take the quiz above and post your Dere profile card combo first.";
  display: block;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: 16px;
}
.comment-list[data-gf-off]::before {
  content: "Comments are currently closed on this page.";
  display: block;
  padding: 16px;
  color: var(--muted);
}
.comment-card, .reply-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
}
.comment-card[data-gf-owner], .reply-card[data-gf-owner] {
  border-color: var(--primary);
  background: var(--tint-pink);
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 14px;
}
.comment-author { font-weight: 600; color: var(--text); }
.owner-tag {
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}
.reply-target { color: var(--primary); font-weight: 600; }
.comment-time { color: var(--muted); font-size: 12px; }
.comment-body { margin: 0 0 12px; font-size: 16px; }
.comment-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.page-hero { margin-bottom: 32px; }
.cta-card {
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-card p { margin-bottom: 0; color: var(--muted); }

.not-found-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  box-shadow: var(--shadow-md);
}
.not-found-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer-tagline { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-link { font-size: 14px; font-weight: 600; color: var(--text); }
.footer-copy { font-size: 12px; color: var(--muted); margin: 0; }

@media (max-width: 960px) {
  .dex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .container { padding: 0 16px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dex-grid { grid-template-columns: 1fr; }
  .callout-grid, .related-grid { grid-template-columns: 1fr; }
  .prose-card, .comments-section, .method-intro, .cta-card { padding: 24px 16px; }
  .engage-bar { padding: 16px; }
  .btn-primary { width: 100%; }
  .engage-actions { width: 100%; }
  .engage-actions .btn-outline { flex: 1 1 auto; }
}
