:root {
  --ink: #1e2d3b;
  --teal-deep: #2c4a52;
  --sage-tab: #466c71;
  --paper: #f6f5e8;
  --paper-tint: #e8ebd5;
  --white: #ffffff;
  --muted: #4b5c66;
  --gold: #f5d842;
  --cyan: #57d6dc;
  --lava: #c9461d;
  --shadow-comic: 5px 5px 0 #1e2d3b;
  --shadow-btn: 4px 4px 0 #1e2d3b;
  --font-display: 'Chakra Petch', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--paper-tint);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--lava); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
  color: var(--ink);
}
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0 0 16px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow-wrap { max-width: 820px; }

/* Header */
.site-header {
  background: var(--ink);
  border-bottom: 4px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.brand:hover { text-decoration: none; }
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--teal-deep);
  border: 2px solid var(--gold);
  transform: skewX(-6deg);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: var(--teal-deep);
  color: var(--paper);
  border: 2px solid var(--sage-tab);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  transform: skewX(-8deg);
}
.nav-tab:hover { background: var(--sage-tab); text-decoration: none; }
.nav-tab-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--ink);
}
.nav-tab-gold:hover { background: var(--cyan); color: var(--ink); }

/* Angular Comic Buttons (Valorborn DRAW / GO / ACCEPT style) */
.btn-comic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-btn);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transform: skewX(-6deg);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn-comic > span { transform: skewX(6deg); display: inline-block; }
.btn-comic:hover { text-decoration: none; transform: skewX(-6deg) translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn-comic:active { transform: skewX(-6deg) translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-comic-lg { min-height: 54px; padding: 0 34px; font-size: 18px; }
.btn-comic-sm { min-height: 36px; padding: 0 16px; font-size: 13px; }
.btn-comic-gold { background: var(--gold); color: var(--ink); }
.btn-comic-cyan { background: var(--cyan); color: var(--ink); }
.btn-comic-white { background: var(--white); color: var(--ink); }

/* Tags */
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: skewX(-6deg);
}
.tag-gold { background: var(--gold); color: var(--ink); }
.tag-cyan { background: var(--cyan); color: var(--ink); }
.tag-sage { background: var(--sage-tab); color: var(--paper); }

/* Comic Hero Section */
.comic-hero {
  background: var(--teal-deep);
  background-image: linear-gradient(135deg, rgba(30, 45, 59, .92), rgba(44, 74, 82, .82)), url('/_a/kabloom-arena-bg-opt.d910c11f2b.jpg');
  background-size: cover;
  background-position: center;
  color: var(--paper);
  padding: 32px 0 56px;
  border-bottom: 4px solid var(--ink);
}
.hero-banner { margin-bottom: 24px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.comic-hero h1 { color: var(--paper); text-shadow: 3px 3px 0 var(--ink); }
.hero-lead { color: var(--paper-tint); font-size: 17px; max-width: 68ch; margin: 0; }

/* Stage Frame */
.stage-frame {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 580px;
  background: var(--ink);
}
.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-scrim {
  position: absolute;
  inset: 0;
  background: rgba(30, 45, 59, .38);
}
.cover-dialog {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 34px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  text-align: center;
  max-width: 450px;
  margin: 0 16px;
}
.dialog-kicker {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sage-tab);
}
.cover-sub { font-size: 13px; color: var(--muted); margin: 0; }

.loader {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
}
.stage[data-gf-state="loading"] .loader { display: flex; }
.loader-ring {
  width: 48px;
  height: 48px;
  border: 4px solid var(--sage-tab);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Dock Bar */
.dock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  background: var(--paper);
  border-top: 3px solid var(--ink);
}
.dock-actions, .dock-links, .cta-actions, .form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.dock-text-link {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
}
.btn-dock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-dock:hover { background: var(--paper-tint); }
.btn-like[data-gf-liked] { background: var(--lava); color: var(--white); }
.dock-count {
  padding: 1px 7px;
  background: var(--ink);
  color: var(--gold);
  font-size: 12px;
}
.share-msg, .form-msg { font-size: 13px; font-weight: 700; color: var(--sage-tab); }
.ios-tip {
  margin: 0;
  padding: 10px 20px;
  background: var(--paper-tint);
  color: var(--ink);
  font-size: 13px;
  border-top: 2px solid var(--ink);
}

/* Comic Panels & Sections */
.deck { padding: 52px 0; }
.deck-sage {
  background: var(--paper);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.comic-panel {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-comic);
  padding: 24px;
}
.deck-sage .comic-panel { background: var(--paper-tint); }

.comic-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.comic-heading-center { justify-content: center; text-align: center; }
.comic-heading h2 { margin: 0; }
.diamond {
  width: 10px;
  height: 10px;
  background: var(--cyan);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* Scholar Character Split Panel (Screenshot #5 inspired) */
.scholar-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
}
.scholar-art {
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--paper-tint);
  overflow: hidden;
  transform: rotate(-1.2deg);
}
.scholar-art img { width: 100%; height: auto; }
.rung-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.rung-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--paper-tint);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}
.rung-chip b { color: var(--sage-tab); }
.rung-chip-hot { background: var(--gold); }
.rung-chip-hot b { color: var(--lava); }

/* Quest Steps */
.quest-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.quest-card h3 { margin: 10px 0 8px; font-size: 18px; }
.quest-card p { margin: 0; font-size: 14px; color: var(--muted); }
.quest-num {
  display: inline-block;
  padding: 2px 10px;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  transform: skewX(-6deg);
}

/* Versus Mode Split (Screenshot #6 inspired) */
.versus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.versus-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.versus-card h3 { font-size: 24px; margin: 4px 0 0; }
.versus-card p { color: var(--muted); margin: 0 0 8px; }
.versus-gold { border-top: 8px solid var(--gold); }
.versus-cyan { border-top: 8px solid var(--cyan); }

/* Tips & FAQ */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.tip-card p { margin: 0; color: var(--muted); font-size: 15px; }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { padding: 16px 20px; }
.faq-item summary {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.faq-item p { margin: 12px 0 0; color: var(--muted); }

/* Comments */
.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.comments-head .comic-heading { margin: 0; }
.comment-form { margin-bottom: 20px; }
.form-row { margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.field input, .field textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
}
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-list[data-gf-empty]::before {
  content: "Be the first player to drop a comment or share your streak!";
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.comment-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.comment-meta strong { color: var(--ink); }
.owner-pill {
  background: var(--lava);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
}
.comment-body { margin: 0 0 8px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--lava); font-size: 14px; font-weight: 700; cursor: pointer; }
.comment-replies { margin-top: 12px; padding-left: 16px; border-left: 3px solid var(--ink); display: flex; flex-direction: column; gap: 10px; }

/* Inner Pages */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 28px; }
.prose h3 { margin-top: 20px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb-light { color: var(--paper-tint); }
.breadcrumb-light a { color: var(--gold); }
.page-head { margin-bottom: 24px; }
.page-lead { font-size: 18px; color: var(--muted); margin: 0; }
.meta-line { font-size: 14px; color: var(--muted); margin: 0; }
.faq-block { margin-top: 40px; }
.cta-box { margin-top: 40px; }

/* Blog & Gameplay Guide Posts */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.blog-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.blog-thumb { display: block; border-bottom: 3px solid var(--ink); overflow: hidden; }
.blog-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.2s ease; }
.blog-thumb:hover img { transform: scale(1.03); }
.blog-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.blog-card-body h2 { font-size: 22px; margin: 4px 0 0; }
.blog-card-body h2 a { color: var(--ink); }
.blog-card-body p { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
.post-hero-fig { padding: 12px; margin: 0 0 28px; }
.post-hero-fig img { width: 100%; border: 2px solid var(--ink); }
.post-hero-fig figcaption { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 10px; text-align: center; }
.post-body img {
  width: 100%;
  margin: 22px 0;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 44px 0 28px;
  border-top: 4px solid var(--gold);
}
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-size: 20px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.footer-note { color: var(--paper-tint); font-size: 14px; max-width: 48ch; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; font-family: var(--font-display); font-size: 14px; font-weight: 700; text-transform: uppercase; }
.footer-links a { color: var(--paper); }
.footer-links a:hover { color: var(--gold); }
.footer-copy { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--teal-deep); font-size: 12px; color: var(--paper-tint); }
.footer-copy p { margin: 0; }

/* Self-Built Comic Expedition Game UI (/embed/kabloom) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
body.is-embed {
  background-color: var(--teal-deep);
  background-image: linear-gradient(180deg, rgba(30, 45, 59, .35), rgba(30, 45, 59, .55)), url('/_a/kabloom-arena-bg-opt.d910c11f2b.jpg');
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
body.is-embed main { width: 100%; max-width: 920px; }
.kb-arena { position: relative; }
.kb-fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

/* Dramatic Comic Cut-in Overlay (Screenshot #6 inspired) */
.kb-cutin {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 45, 59, .52);
  pointer-events: none;
  z-index: 50;
  animation: kb-cutin-fade 1.35s ease forwards;
}
.kb-cutin-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 36px 14px 18px;
  background: var(--gold);
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 10px 0 var(--ink);
  transform: skewX(-8deg);
  animation: kb-cutin-slide 0.35s cubic-bezier(.18,.89,.32,1.28) forwards;
}
.kb-cutin.is-cyan .kb-cutin-strip { background: var(--cyan); }
.kb-cutin.is-lava .kb-cutin-strip { background: var(--lava); color: var(--white); }
.kb-cutin-strip img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: skewX(8deg);
}
.kb-cutin-text { transform: skewX(8deg); }
.kb-cutin-sub {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.kb-cutin-title {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.05;
  text-shadow: 2px 2px 0 rgba(30, 45, 59, .28);
}
@keyframes kb-cutin-slide {
  0% { transform: skewX(-8deg) translateX(-140px) scale(0.9); opacity: 0; }
  100% { transform: skewX(-8deg) translateX(0) scale(1); opacity: 1; }
}
@keyframes kb-cutin-fade {
  0%, 75% { opacity: 1; }
  100% { opacity: 0; }
}

/* Main Layered Comic Window */
.kb-window {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 16px 18px 18px;
}
.kb-window::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 8px;
  background: var(--cyan);
  border-right: 3px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.kb-window.is-shake { animation: kb-shake 0.42s ease-in-out; }
.kb-window.is-shake-heavy { animation: kb-shake-heavy 0.55s ease-in-out; }
@keyframes kb-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px); }
  40% { transform: translate(6px, -2px); }
  60% { transform: translate(-4px, 1px); }
  80% { transform: translate(4px, 0); }
}
@keyframes kb-shake-heavy {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(-10px, 4px) rotate(-1deg); }
  30% { transform: translate(10px, -4px) rotate(1deg); }
  45% { transform: translate(-8px, -3px) rotate(-0.8deg); }
  65% { transform: translate(8px, 3px) rotate(0.8deg); }
  85% { transform: translate(-4px, 2px) rotate(0deg); }
}

/* Top Comic HUD */
.kb-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2.5px solid var(--ink);
}
.kb-tabs { display: inline-flex; gap: 6px; }
.kb-tab {
  min-height: 36px;
  padding: 0 16px;
  background: var(--white);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transform: skewX(-8deg);
}
.kb-tab > span { display: inline-block; transform: skewX(8deg); }
.kb-tab.is-active {
  background: var(--sage-tab);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

.kb-hud-mid { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kb-shields {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--paper-tint);
  border: 2px solid var(--ink);
}
.kb-shield { display: inline-flex; transition: transform 0.2s ease, opacity 0.2s ease; }
.kb-shield.is-broken { opacity: 0.25; transform: scale(0.82) rotate(-14deg); filter: grayscale(1); }
.kb-shield-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-deep);
  margin-left: 4px;
}
.kb-shield-label.is-danger { color: var(--lava); }

.kb-combo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--gold);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  transform: skewX(-6deg);
}
.kb-hud-right { display: flex; align-items: center; gap: 6px; }
.kb-badge {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  background: var(--paper-tint);
  border: 2px solid var(--ink);
  color: var(--ink);
}
.kb-sfx-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.kb-sfx-btn[aria-pressed="false"] { background: var(--white); color: var(--muted); }

/* Two-Column Character + Game Board (Screenshot #5 inspired) */
.kb-body {
  display: grid;
  grid-template-columns: 224px 1fr;
  gap: 16px;
  align-items: start;
}
.kb-actor-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kb-portrait-card {
  position: relative;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--paper-tint);
  overflow: hidden;
  transform: rotate(-1deg);
}
.kb-portrait-card.is-boss { border-color: var(--lava); box-shadow: 5px 5px 0 var(--lava); }
.kb-portrait-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.kb-ch-num {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  background: var(--cyan);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}
.kb-nameplate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
}
.kb-nameplate strong { font-size: 14px; color: var(--gold); letter-spacing: 0.05em; }
.kb-nameplate span { font-size: 12px; color: var(--paper-tint); }

/* Comic Speech Bubble */
.kb-speech {
  position: relative;
  padding: 10px 12px;
  background: var(--white);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.kb-speech::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 24px;
  width: 14px;
  height: 14px;
  background: var(--white);
  border-top: 2.5px solid var(--ink);
  border-left: 2.5px solid var(--ink);
  transform: rotate(45deg);
}
.kb-speech p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.is-pop { animation: kb-pop 0.28s cubic-bezier(.18,.89,.32,1.28); }
@keyframes kb-pop {
  0% { transform: scale(0.94); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Rarity-Bordered Relic Slots (Screenshot #5 inspired) */
.kb-relics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.kb-relic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  background: var(--paper-tint);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.kb-relic-cyan { border-top: 5px solid var(--cyan); }
.kb-relic-gold { border-top: 5px solid var(--gold); }
.kb-relic:hover:not(:disabled) { transform: translate(-1px, -2px); background: var(--white); }
.kb-relic:active:not(:disabled) { transform: translate(1px, 1px); }
.kb-relic:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.kb-relic-meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.1;
}
.kb-relic-meta small {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--sage-tab);
  font-weight: 700;
}

/* Right Stage Column */
.kb-stage-col { display: flex; flex-direction: column; gap: 12px; }
.kb-progress-box {
  padding: 10px 14px;
  background: var(--paper-tint);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.kb-prog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}
.kb-stage-name { color: var(--teal-deep); letter-spacing: 0.05em; }
.kb-step-label { color: var(--lava); }
.kb-rungs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kb-rung {
  height: 14px;
  background: var(--white);
  border: 2px solid var(--ink);
  transform: skewX(-14deg);
}
.kb-rung.is-now { background: var(--gold); }
.kb-rung.is-ok { background: var(--cyan); }
.kb-rung.is-crack { background: var(--gold); border-color: var(--lava); }
.kb-rung.is-boom { background: var(--lava); }

.kb-card {
  padding: 16px;
  background: var(--paper-tint);
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.kb-qmeta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.kb-cat {
  display: inline-block;
  padding: 3px 10px;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: skewX(-8deg);
}
.kb-question {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--ink);
}

/* Valorborn Beveled Comic Answer Tiles (Screenshot #3 & #4 inspired) */
.kb-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kb-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 14px;
  text-align: left;
  background: var(--white);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-top: 4px solid var(--paper-tint);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transform: skewX(-4deg);
  transition: transform 0.08s ease, background-color 0.12s ease, box-shadow 0.08s ease;
}
.kb-choice-txt { transform: skewX(4deg); display: inline-block; }
.kb-choice:hover:not(:disabled) {
  background: var(--cyan);
  border-top-color: var(--white);
  transform: skewX(-4deg) translate(-1px, -2px);
  box-shadow: 5px 6px 0 var(--ink);
}
.kb-choice:active:not(:disabled) {
  transform: skewX(-4deg) translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}
.kb-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transform: skewX(4deg);
}
.kb-choice.is-ok { background: var(--cyan); border-top-color: var(--white); color: var(--ink); }
.kb-choice.is-boom { background: var(--lava); border-top-color: var(--gold); color: var(--white); }
.kb-choice.is-boom .kb-keycap { background: var(--white); color: var(--lava); }
.kb-choice.is-slashed {
  opacity: 0.35;
  text-decoration: line-through;
  background: var(--paper);
  box-shadow: none;
  cursor: not-allowed;
}

.kb-feedback {
  padding: 14px 16px;
  background: var(--white);
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.kb-fb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.kb-fb-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0; }
.kb-rank-pill {
  padding: 2px 10px;
  background: var(--gold);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  transform: skewX(-6deg);
}
.kb-fb-note { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.kb-fb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.kb-copy-msg { font-size: 13px; font-weight: 700; color: var(--sage-tab); margin: 8px 0 0; }

@media (max-width: 860px) {
  .scholar-panel { grid-template-columns: 1fr; }
  .scholar-art { max-width: 280px; margin: 0 auto; }
  .quest-grid { grid-template-columns: repeat(2, 1fr); }
  .kb-body { grid-template-columns: 1fr; }
  .kb-actor-col { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; }
  .kb-relics { grid-column: 1 / -1; }
  .kb-speech::before { display: none; }
}
@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .wrap { padding: 0 16px; }
  .stage { min-height: 680px; aspect-ratio: auto; }
  .quest-grid, .versus-grid, .tips-grid, .kb-choices, .blog-grid { grid-template-columns: 1fr; }
  .btn-comic { width: 100%; }
  .kb-window { padding: 12px; }
  .kb-question { font-size: 18px; }
}
