:root {
  --cream: #FFF8F0;
  --ink: #1A1A2E;
  --ink-soft: #4A4A6A;
  --pink: #FF6B9D;
  --pink-soft: #FFD1DF;
  --mint: #4ECDC4;
  --mint-soft: #C9F4F0;
  --yellow: #FFE66D;
  --yellow-soft: #FFF6C2;
  --lav: #C7A8FF;
  --lav-soft: #EADCFF;
  --sky: #95DAFF;
  --peach: #FFB088;
  --white: #FFFFFF;
  --border: 3px solid var(--ink);
  --border-thick: 4px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { min-height: 100svh; }

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px dashed var(--ink); outline-offset: 4px; }

/* === Background blobs === */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .55;
  animation: float 16s ease-in-out infinite;
}
.orb-pink   { background: var(--pink);   width: 320px; height: 320px; top: -80px; left: -60px; }
.orb-mint   { background: var(--mint);   width: 280px; height: 280px; top: 35%;   right: -80px; animation-delay: -3s; }
.orb-yellow { background: var(--yellow); width: 360px; height: 360px; bottom: -120px; left: 20%; animation-delay: -7s; }
.orb-lav    { background: var(--lav);    width: 240px; height: 240px; top: 18%;   left: 45%; animation-delay: -10s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -20px); }
  50% { transform: translate(-20px, 30px); }
  75% { transform: translate(20px, 20px); }
}

/* === App shell === */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.loading {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 14px;
  padding: 40px;
}
.loading-emoji {
  font-size: 64px;
  animation: bounce 1.2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}

/* === Header === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 248, 240, .85);
  backdrop-filter: blur(12px);
  border-bottom: var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  border: var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font-family: "Yusei Magic", sans-serif;
  font-size: 22px;
  transform: rotate(-6deg);
}
.brand-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--pink-soft);
  border: 2px solid var(--ink);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
}
.topnav { display: flex; gap: 8px; align-items: center; }
.topnav button {
  font-size: 13px;
  font-weight: 800;
  padding: 8px 14px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.topnav button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.topnav button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.topnav .home-btn { background: var(--mint); }

/* === Page === */
.page {
  flex: 1;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

/* === Hero / Home === */
.hero {
  text-align: center;
  padding: 36px 16px 24px;
}
.hero-tag {
  display: inline-block;
  background: var(--lav);
  border: var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transform: rotate(-2deg);
  margin-bottom: 20px;
}
.hero h1 {
  font-family: "Yusei Magic", "M PLUS Rounded 1c", sans-serif;
  font-size: clamp(36px, 8vw, 56px);
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.hero h1 .accent { color: var(--pink); display: inline-block; }
.hero h1 .wiggle { display: inline-block; animation: wiggle 2.5s ease-in-out infinite; }
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(5deg); }
}
.hero .lead {
  max-width: 460px;
  margin: 0 auto 28px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.hero-illust-wrap {
  margin: 8px auto 24px;
  max-width: 420px;
  filter: drop-shadow(6px 6px 0 var(--ink));
  animation: hero-bob 4.5s ease-in-out infinite;
}
.hero-illust {
  width: 100%;
  height: auto;
  display: block;
}
@keyframes hero-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 460px;
  margin: 0 auto 32px;
}
.stat-chip {
  background: var(--white);
  border: var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 12px 8px;
  text-align: center;
}
.stat-chip strong { display: block; font-size: 22px; }
.stat-chip span { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.stat-chip.is-pink { background: var(--pink-soft); }
.stat-chip.is-mint { background: var(--mint-soft); }
.stat-chip.is-yellow { background: var(--yellow-soft); }

/* === Mode select === */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}
@media (max-width: 480px) {
  .mode-grid { grid-template-columns: 1fr; }
}
.mode-card {
  background: var(--white);
  border: var(--border-thick);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px 18px;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
}
.mode-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.mode-card:active { transform: translate(3px, 3px); box-shadow: var(--shadow-sm); }
.mode-card.is-newgrad { background: var(--mint-soft); }
.mode-card.is-career  { background: var(--yellow-soft); }
.mode-card .emoji {
  font-size: 44px;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(2px 2px 0 var(--ink));
}
.mode-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}
.mode-card span {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  font-weight: 600;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pink);
  color: var(--white);
  border: var(--border-thick);
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
  text-shadow: 1px 1px 0 var(--ink);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translate(3px, 3px); box-shadow: var(--shadow-sm); }
.btn.btn-mint { background: var(--mint); }
.btn.btn-yellow { background: var(--yellow); color: var(--ink); text-shadow: none; }
.btn.btn-lav { background: var(--lav); }
.btn.btn-ghost { background: var(--white); color: var(--ink); text-shadow: none; }
.btn.btn-sm { padding: 10px 20px; font-size: 14px; box-shadow: var(--shadow-sm); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; box-shadow: var(--shadow); }

/* === Sections === */
.section-head {
  text-align: center;
  margin-bottom: 24px;
}
.section-head h2 {
  font-family: "Yusei Magic", sans-serif;
  font-size: clamp(26px, 5vw, 36px);
  margin: 8px 0 6px;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}

.flow-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 560px;
  margin: 40px auto 0;
}
@media (max-width: 560px) {
  .flow-cards { grid-template-columns: 1fr; }
}
.flow-card {
  background: var(--white);
  border: var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 16px 14px;
  text-align: center;
}
.flow-card:nth-child(1) { background: var(--pink-soft); transform: rotate(-1.5deg); }
.flow-card:nth-child(2) { background: var(--mint-soft); transform: rotate(1deg); }
.flow-card:nth-child(3) { background: var(--lav-soft); transform: rotate(-1deg); }
.flow-card .num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: "Yusei Magic", sans-serif;
  margin-bottom: 8px;
}
.flow-card h4 { margin: 6px 0; font-size: 15px; }
.flow-card p { margin: 0; font-size: 12px; color: var(--ink-soft); font-weight: 600; line-height: 1.6; }

/* === Quiz Stage === */
.quiz-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 12px 8px;
}
.progress-wrap {
  width: 100%;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress-track {
  flex: 1;
  height: 14px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--ink);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--mint));
  background-size: 300% 100%;
  border-right: 2px solid var(--ink);
  transition: width .35s cubic-bezier(.5, 1.5, .5, 1);
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
  to { background-position: 300% 0; }
}
.progress-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  white-space: nowrap;
}

.swipe-deck {
  position: relative;
  width: min(100%, 380px);
  height: 460px;
  user-select: none;
}
.swipe-card {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  cursor: grab;
  transition: transform .35s cubic-bezier(.5, 1.5, .5, 1), opacity .25s ease;
  will-change: transform;
}
.swipe-card.is-dragging { transition: none; cursor: grabbing; }
.swipe-card.is-back { transform: scale(.94) translateY(14px); opacity: .6; pointer-events: none; }
.swipe-card.is-back-2 { transform: scale(.88) translateY(28px); opacity: .25; pointer-events: none; }
.swipe-card.swipe-left { transform: translateX(-130%) rotate(-18deg); opacity: 0; }
.swipe-card.swipe-right { transform: translateX(130%) rotate(18deg); opacity: 0; }

.swipe-card .q-num {
  font-family: "Yusei Magic", sans-serif;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.swipe-card .q-title {
  font-size: 24px;
  font-family: "Yusei Magic", sans-serif;
  margin: 0 0 18px;
  line-height: 1.3;
}
.swipe-card .q-options {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  gap: 10px;
}
.swipe-card .q-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--border);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
}
.swipe-card .q-opt .e { font-size: 38px; filter: drop-shadow(1px 1px 0 var(--ink)); }
.swipe-card .q-opt.left  { background: var(--pink-soft); }
.swipe-card .q-opt.right { background: var(--mint-soft); }
.swipe-card .q-vs {
  font-family: "Yusei Magic", sans-serif;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

.swipe-card.tilt-left .q-opt.left   { background: var(--pink); color: var(--white); transform: scale(1.04); transition: .15s; }
.swipe-card.tilt-right .q-opt.right { background: var(--mint); color: var(--white); transform: scale(1.04); transition: .15s; }

.likert-row {
  width: min(100%, 380px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.likert-btn {
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 8px 4px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 800;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
  cursor: pointer;
}
.likert-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.likert-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.likert-num { font-size: 18px; line-height: 1; }
.likert-label { font-size: 9px; color: var(--ink-soft); font-weight: 700; }
.likert-btn.is-1 { background: var(--pink-soft); }
.likert-btn.is-2 { background: var(--peach); background: #FFE4D9; }
.likert-btn.is-3 { background: var(--yellow-soft); }
.likert-btn.is-4 { background: #DFF6F2; }
.likert-btn.is-5 { background: var(--mint-soft); }

.swipe-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 6px;
}
.swipe-pill {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.swipe-pill:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.swipe-pill:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.swipe-pill.is-undo { background: var(--yellow-soft); }

.swipe-hint {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* === Vibe selection === */
.vibe-section { padding: 20px 4px; }
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}
.chip {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.chip.is-active {
  background: var(--pink);
  color: var(--white);
  text-shadow: 1px 1px 0 var(--ink);
}
.chip.is-active.tone-mint { background: var(--mint); }
.chip.is-active.tone-yellow { background: var(--yellow); color: var(--ink); text-shadow: none; }
.chip.is-active.tone-lav { background: var(--lav); }

.vibe-block {
  background: var(--white);
  border: var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.vibe-block h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.vibe-block .hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 14px;
  font-weight: 600;
}

/* === Result === */
.result-wrap { padding: 12px 0; }
.result-hero {
  text-align: center;
  margin-bottom: 28px;
}
.result-hero .badge {
  display: inline-block;
  background: var(--yellow);
  border: var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  transform: rotate(-2deg);
}
.result-hero h2 {
  font-family: "Yusei Magic", sans-serif;
  font-size: clamp(28px, 6vw, 38px);
  margin: 0;
}
.result-hero p {
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 8px;
  font-size: 14px;
}

.result-cards {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}
.result-card {
  background: var(--white);
  border: var(--border-thick);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
}
.result-card.is-1 { background: linear-gradient(135deg, var(--yellow-soft), var(--peach)); transform: rotate(-.6deg); }
.result-card.is-2 { background: linear-gradient(135deg, var(--mint-soft), var(--sky)); transform: rotate(.4deg); }
.result-card.is-3 { background: linear-gradient(135deg, var(--lav-soft), var(--pink-soft)); transform: rotate(-.3deg); }

.result-card .rank {
  position: absolute;
  top: -16px;
  left: -10px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  display: grid;
  place-items: center;
  font-family: "Yusei Magic", sans-serif;
  font-size: 14px;
  border: 3px solid var(--cream);
  box-shadow: var(--shadow-sm);
  transform: rotate(-8deg);
}
.result-card .rank strong { font-size: 22px; line-height: 1; display: block; }

.result-card h3 {
  font-family: "Yusei Magic", sans-serif;
  font-size: 22px;
  margin: 0 0 6px;
  padding-left: 60px;
  min-height: 50px;
}
.result-card .cat {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 12px;
}
.result-card .desc {
  font-size: 14px;
  line-height: 1.7;
  font-weight: 600;
  margin: 0 0 14px;
}
.result-card .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.result-card .meta-pill {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}
.result-card .score-bar {
  height: 12px;
  background: rgba(255,255,255,.6);
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.result-card .score-fill {
  height: 100%;
  background: var(--pink);
  border-right: 2px solid var(--ink);
}
.result-card.is-2 .score-fill { background: var(--mint); }
.result-card.is-3 .score-fill { background: var(--lav); }
.result-card .score-text {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
}

.result-card .reasons {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px dashed var(--ink);
  border-radius: 14px;
}
.result-card .reasons-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
}
.result-card .reasons ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.result-card .reasons li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.result-card .reason-tag {
  background: var(--ink);
  color: var(--cream);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.result-card .reason-detail {
  color: var(--ink);
  flex: 1;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.honne-block {
  background: var(--white);
  border: var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.honne-block h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.honne-block h3 .heart { color: var(--pink); }
.honne-block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 600;
}

/* === Job list === */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.job-tile {
  background: var(--white);
  border: var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  text-align: left;
  transition: transform .14s ease, box-shadow .14s ease;
}
.job-tile:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.job-tile .e { font-size: 34px; filter: drop-shadow(2px 2px 0 var(--ink)); }
.job-tile h3 { font-size: 15px; margin: 8px 0 4px; }
.job-tile .cat { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.job-tile.color-1 { background: var(--pink-soft); }
.job-tile.color-2 { background: var(--mint-soft); }
.job-tile.color-3 { background: var(--yellow-soft); }
.job-tile.color-4 { background: var(--lav-soft); }
.job-tile.color-5 { background: var(--white); }

.cat-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  justify-content: center;
}

/* === Job detail === */
.job-detail {
  background: var(--white);
  border: var(--border-thick);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}
.job-detail .hero-emoji {
  font-size: 56px;
  filter: drop-shadow(3px 3px 0 var(--ink));
  margin-bottom: 8px;
}
.job-detail h1 {
  font-family: "Yusei Magic", sans-serif;
  font-size: 28px;
  margin: 0 0 4px;
}
.job-detail .subline {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 16px;
}
.job-detail .desc-block {
  font-size: 15px;
  line-height: 1.8;
  font-weight: 600;
  margin-bottom: 18px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.detail-mini {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
}
.detail-mini h4 {
  margin: 0 0 6px;
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.detail-mini ul, .detail-mini ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

/* === Taxonomy trail === */
.taxonomy-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.trail-step {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
}
.trail-step.is-current {
  background: var(--yellow);
  color: var(--ink);
}
.trail-arrow {
  opacity: .5;
}

/* === Accordion === */
.accordion {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 18px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 3px 3px 0 var(--ink);
  transition: box-shadow .15s ease, transform .15s ease;
}
.accordion:hover {
  box-shadow: 4px 4px 0 var(--ink);
}
.accordion.is-open {
  background: var(--white);
}
.accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: transparent;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.accordion-emoji {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(1px 1px 0 var(--ink));
}
.accordion-title { flex: 1; }
.accordion-count {
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 800;
}
.accordion-arrow {
  font-size: 14px;
  transition: transform .25s ease;
}
.accordion.is-open .accordion-arrow {
  transform: rotate(-180deg);
}
.accordion-content {
  display: none;
  padding: 4px 16px 16px;
  border-top: 1px dashed rgba(26, 26, 46, .25);
  margin-top: 4px;
}
.accordion.is-open .accordion-content {
  display: block;
  animation: accordion-in .25s ease;
}
@keyframes accordion-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rich-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.rich-list li {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 10px 14px;
  display: grid;
  gap: 4px;
  box-shadow: 2px 2px 0 var(--ink);
}
.rich-list li strong {
  font-size: 14px;
  font-weight: 800;
}
.rich-list li span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.5;
}

.simple-list {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 600;
}
.simple-list li {
  margin-bottom: 4px;
}

.dual-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dual-col h5 {
  margin: 0 0 6px;
  font-size: 13px;
}
@media (max-width: 600px) {
  .dual-col { grid-template-columns: 1fr; }
}

/* === Empty state === */
.empty {
  text-align: center;
  padding: 40px 20px;
  font-weight: 600;
  color: var(--ink-soft);
}
.empty .e { font-size: 60px; }

/* === Toast === */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  z-index: 100;
  animation: toast-in .3s ease;
}
@keyframes toast-in {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* === Confetti / Sparkle === */
.sparkle-wrap {
  position: relative;
}
.sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 24px;
  animation: sparkle 1.4s ease-out forwards;
}
@keyframes sparkle {
  0% { opacity: 0; transform: scale(.4) rotate(0); }
  30% { opacity: 1; transform: scale(1.4) rotate(40deg); }
  100% { opacity: 0; transform: scale(.6) rotate(180deg) translateY(-40px); }
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 30px 16px 24px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.footer a { text-decoration: underline; text-underline-offset: 3px; }
.footer .dot { opacity: .5; }

/* === Tablet+ tweaks === */
@media (min-width: 720px) {
  .hero { padding: 56px 16px 32px; }
}
