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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #1a1a2e;
  font-family: 'Comic Neue', cursive, sans-serif;
}

.comic-page {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: #111;
}

/* ---------- panel base ---------- */

.panel {
  background: #f5f0e1;
  border: 3px solid #111;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.panel-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2%;
}

/* ---------- split panels ---------- */

.split-panel {
  flex-direction: row;
}

.split-left,
.split-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4vh;
  padding: 1%;
  position: relative;
}

.split-divider {
  width: 2px;
  align-self: stretch;
  background: #333;
  flex-shrink: 0;
}

.viii-side {
  background: linear-gradient(175deg, #fff5e6 0%, #ffe0b2 100%);
}

.iiix-side {
  background: linear-gradient(175deg, #e6f0ff 0%, #b2d4ff 100%);
}

/* ---------- title panel ---------- */

.panel-title .panel-inner {
  background: linear-gradient(135deg, #2c1810 0%, #1a1040 100%);
  gap: 1vh;
}

.title-kings {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3vw;
}

.king-col {
  display: flex;
  justify-content: center;
}

.vs-badge {
  font-family: 'Bangers', cursive;
  font-size: clamp(1.2rem, 3vw, 3rem);
  color: #ff4444;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
  background: #ffd700;
  border-radius: 50%;
  width: clamp(2rem, 4vw, 4rem);
  height: clamp(2rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #111;
  flex-shrink: 0;
}

.title-text {
  display: flex;
  align-items: baseline;
  gap: 0.8vw;
  flex-wrap: wrap;
  justify-content: center;
}

.title-name {
  font-family: 'Bangers', cursive;
  font-size: clamp(1rem, 2.5vw, 2.5rem);
  letter-spacing: 0.08em;
}

.viii-name {
  color: #ffd700;
  text-shadow: 2px 2px 0 #8b4513;
}

.iiix-name {
  color: #7ec8ff;
  text-shadow: 2px 2px 0 #1a3a5c;
}

.title-vs {
  font-family: 'Comic Neue', cursive;
  font-size: clamp(0.7rem, 1.4vw, 1.4rem);
  color: #aaa;
  font-style: italic;
}

/* ---------- CSS kings ---------- */

.king {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.king .head {
  width: clamp(1.4rem, 3vw, 3rem);
  height: clamp(1.4rem, 3vw, 3rem);
  border-radius: 50%;
  background: #fdd9a0;
  border: 2px solid #333;
  position: relative;
  z-index: 2;
}

.king .beard {
  width: clamp(1rem, 2.2vw, 2.2rem);
  height: clamp(0.6rem, 1.2vw, 1.2rem);
  background: #8b4513;
  border-radius: 0 0 50% 50%;
  margin-top: -0.4vh;
  z-index: 1;
}

.king .body {
  width: clamp(2rem, 4vw, 4rem);
  height: clamp(1.6rem, 3vw, 3rem);
  border-radius: 4px 4px 0 0;
  margin-top: -0.2vh;
}

.viii-king .body {
  background: linear-gradient(180deg, #8b0000 0%, #600 100%);
  border: 2px solid #333;
}

.iiix-king .body {
  background: linear-gradient(180deg, #1a5276 0%, #0e2f44 100%);
  border: 2px solid #333;
}

.crown {
  width: clamp(1.6rem, 3.2vw, 3.2rem);
  height: clamp(0.8rem, 1.6vw, 1.6rem);
  position: relative;
  z-index: 3;
  margin-bottom: -0.2vh;
}

.crown-viii {
  background:
    conic-gradient(from 210deg at 20% 100%, transparent 30deg, #ffd700 30deg 60deg, transparent 60deg),
    conic-gradient(from 210deg at 50% 100%, transparent 30deg, #ffd700 30deg 60deg, transparent 60deg),
    conic-gradient(from 210deg at 80% 100%, transparent 30deg, #ffd700 30deg 60deg, transparent 60deg);
  background-color: #ffd700;
  background-size: 100% 100%;
  clip-path: polygon(0% 100%, 10% 30%, 25% 70%, 40% 0%, 50% 50%, 60% 0%, 75% 70%, 90% 30%, 100% 100%);
}

.crown-iiix {
  background: #7ec8ff;
  clip-path: polygon(0% 100%, 10% 30%, 25% 70%, 40% 0%, 50% 50%, 60% 0%, 75% 70%, 90% 30%, 100% 100%);
}

.iiix-king .phone {
  width: clamp(0.6rem, 1.2vw, 1.2rem);
  height: clamp(0.9rem, 1.8vw, 1.8rem);
  background: #333;
  border-radius: 2px;
  border: 1px solid #666;
  position: absolute;
  right: -0.6vw;
  bottom: 0.6vh;
}

.iiix-king .phone::after {
  content: '';
  display: block;
  width: 60%;
  height: 70%;
  margin: 15% auto;
  background: #4af;
  border-radius: 1px;
}

/* ---------- speech bubbles ---------- */

.speech-bubble {
  background: #fff;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 0.4vh 0.6vw;
  font-size: clamp(0.5rem, 1.1vw, 1rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  position: relative;
  max-width: 95%;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid #333;
}

.viii-bubble {
  color: #8b0000;
}

.iiix-bubble {
  color: #1a5276;
}

.shout {
  font-size: clamp(0.55rem, 1.2vw, 1.1rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.confused {
  font-style: italic;
  font-size: clamp(0.45rem, 0.95vw, 0.9rem);
}

/* ---------- panel label ---------- */

.panel-label {
  font-family: 'Bangers', cursive;
  font-size: clamp(0.5rem, 1vw, 1rem);
  letter-spacing: 0.1em;
  color: #555;
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ---------- captions ---------- */

.caption {
  font-size: clamp(0.45rem, 1vw, 0.95rem);
  text-align: center;
  color: #333;
  line-height: 1.25;
}

.caption strong {
  color: #111;
}

.caption em {
  font-size: 0.85em;
  color: #666;
}

/* ---------- scenes ---------- */

.scene {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  min-height: 0;
}

/* --- panel 2: wives / wifi --- */

.wife-row {
  display: flex;
  gap: 0.3vw;
  flex-wrap: wrap;
  justify-content: center;
}

.wife {
  width: clamp(0.8rem, 1.6vw, 1.6rem);
  height: clamp(1.2rem, 2.4vw, 2.4rem);
  background: linear-gradient(180deg, #fdd9a0 35%, #9b59b6 35%);
  border-radius: 50% 50% 20% 20%;
  border: 1px solid #333;
  position: relative;
}

.wife::before {
  content: '';
  position: absolute;
  top: -15%;
  left: 15%;
  width: 70%;
  height: 30%;
  background: #654321;
  border-radius: 50% 50% 0 0;
}

.wifi-row {
  display: flex;
  gap: 0.3vw;
  flex-wrap: wrap;
  justify-content: center;
}

.wifi-icon {
  font-size: clamp(0.8rem, 1.6vw, 1.6rem);
}

/* --- panel 3: church --- */

.church {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.church-roof {
  width: 0;
  height: 0;
  border-left: clamp(1.5rem, 3vw, 3rem) solid transparent;
  border-right: clamp(1.5rem, 3vw, 3rem) solid transparent;
  border-bottom: clamp(1rem, 2vw, 2rem) solid #8b4513;
}

.church-body {
  width: clamp(2rem, 4vw, 4rem);
  height: clamp(1.2rem, 2.4vw, 2.4rem);
  background: #d4a76a;
  border: 2px solid #333;
}

.church-cross {
  font-size: clamp(0.8rem, 1.6vw, 1.6rem);
  margin-top: -3.5vh;
  color: #ffd700;
  text-shadow: 1px 1px 0 #333;
}

.stream-phone {
  width: clamp(2rem, 4vw, 4rem);
  height: clamp(3rem, 5.5vw, 5.5rem);
  background: #222;
  border-radius: 4px;
  border: 2px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stream-screen {
  width: 80%;
  height: 80%;
  background: #111;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3vh;
}

.stream-logo {
  font-size: clamp(0.7rem, 1.4vw, 1.4rem);
  color: #ff6b6b;
}

.stream-sub {
  font-size: clamp(0.3rem, 0.6vw, 0.6rem);
  color: #4f4;
  text-align: center;
  font-weight: 700;
}

/* --- panel 4: feast --- */

.turkey-leg {
  font-size: clamp(1.5rem, 4vw, 4rem);
}

.protein-bar {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.4rem, 0.9vw, 0.9rem);
  padding: 0.6vh 0.8vw;
  border-radius: 3px;
  border: 2px solid #1b5e20;
  text-align: center;
  line-height: 1.3;
}

/* --- panel 5: breaking away --- */

.rome-text {
  font-family: 'Bangers', cursive;
  font-size: clamp(1rem, 2.5vw, 2.5rem);
  color: #8b0000;
  text-shadow: 1px 1px 0 #333;
  position: relative;
}

.break-crack {
  font-size: clamp(1rem, 2.5vw, 2.5rem);
  position: absolute;
}

.cracked-phone {
  font-size: clamp(1.5rem, 3.5vw, 3.5rem);
  position: relative;
}

.crack-lines {
  position: absolute;
  top: 20%;
  left: 30%;
  width: 50%;
  height: 60%;
  border-top: 2px solid #ff4444;
  border-left: 1px solid #ff4444;
  transform: rotate(25deg);
  pointer-events: none;
}

/* --- panel 6: execution --- */

.axe-icon {
  font-size: clamp(1.5rem, 4vw, 4rem);
}

.contact-card {
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 6px;
  padding: 0.5vh 0.5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3vh;
}

.contact-name {
  font-weight: 700;
  font-size: clamp(0.45rem, 1vw, 1rem);
  color: #333;
}

.contact-delete {
  font-size: clamp(0.35rem, 0.8vw, 0.8rem);
  color: #e74c3c;
  font-weight: 700;
}

/* --- panel 7: legacy --- */

.palace {
  font-size: clamp(2rem, 5vw, 5rem);
}

.follower-count {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  padding: 0.8vh 1vw;
  border-radius: 8px;
  text-align: center;
}

.follower-num {
  font-family: 'Bangers', cursive;
  font-size: clamp(1rem, 2.2vw, 2.2rem);
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.follower-label {
  font-size: clamp(0.35rem, 0.7vw, 0.7rem);
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- panel 8: portrait --- */

.portrait-frame {
  border: 4px solid #8b6914;
  background: #2c1810;
  padding: 0.4vh;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.5);
}

.portrait-img {
  width: clamp(2.5rem, 5vw, 5rem);
  height: clamp(2.5rem, 5vw, 5rem);
  background: #3a2a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-king {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.p-crown {
  font-size: clamp(0.7rem, 1.4vw, 1.4rem);
}

.p-face {
  font-size: clamp(1rem, 2vw, 2rem);
}

.selfie-king {
  font-size: clamp(2rem, 4.5vw, 4.5rem);
}

.duck-lips {
  font-size: clamp(0.35rem, 0.75vw, 0.75rem);
  color: #e91e63;
  font-weight: 700;
  font-style: italic;
}

/* --- panel 9: finale --- */

.panel-finale {
  border: 3px solid #ffd700;
}

.finale-scene {
  flex-direction: column;
}

.finale-king {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.viii-finale .head {
  width: clamp(1.2rem, 2.6vw, 2.6rem);
  height: clamp(1.2rem, 2.6vw, 2.6rem);
  border-radius: 50%;
  background: #fdd9a0;
  border: 2px solid #333;
}

.viii-finale .beard {
  width: clamp(0.8rem, 1.8vw, 1.8rem);
  height: clamp(0.5rem, 1vw, 1rem);
  background: #8b4513;
  border-radius: 0 0 50% 50%;
  margin-top: -0.3vh;
}

.viii-finale .body {
  width: clamp(1.6rem, 3.4vw, 3.4rem);
  height: clamp(1.2rem, 2.4vw, 2.4rem);
  background: linear-gradient(180deg, #8b0000 0%, #600 100%);
  border: 2px solid #333;
  border-radius: 4px 4px 0 0;
  margin-top: -0.2vh;
}

.viii-finale .crown {
  width: clamp(1.4rem, 2.8vw, 2.8rem);
  height: clamp(0.7rem, 1.4vw, 1.4rem);
}

.iiix-finale .head {
  width: clamp(1.2rem, 2.6vw, 2.6rem);
  height: clamp(1.2rem, 2.6vw, 2.6rem);
  border-radius: 50%;
  background: #fdd9a0;
  border: 2px solid #333;
}

.iiix-finale .body {
  width: clamp(1.6rem, 3.4vw, 3.4rem);
  height: clamp(1.2rem, 2.4vw, 2.4rem);
  background: linear-gradient(180deg, #1a5276 0%, #0e2f44 100%);
  border: 2px solid #333;
  border-radius: 4px 4px 0 0;
  margin-top: -0.2vh;
}

.iiix-finale .crown {
  width: clamp(1.4rem, 2.8vw, 2.8rem);
  height: clamp(0.7rem, 1.4vw, 1.4rem);
}

.iiix-finale .sweat {
  position: absolute;
  right: -0.8vw;
  top: 20%;
  font-size: clamp(0.6rem, 1.2vw, 1.2rem);
  animation: sweatDrip 1.5s ease-in-out infinite;
}

@keyframes sweatDrip {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(0.4vh); opacity: 0.5; }
}

/* ---------- action lines for dramatic panels ---------- */

.axe-scene::before,
.break-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    rgba(0,0,0,0.03) 0deg 10deg,
    transparent 10deg 20deg
  );
  pointer-events: none;
}

/* ---------- halftone dots on viii side ---------- */

.viii-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(139,0,0,0.04) 1px, transparent 1px);
  background-size: 6px 6px;
  pointer-events: none;
}

.iiix-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26,82,118,0.04) 1px, transparent 1px);
  background-size: 6px 6px;
  pointer-events: none;
}
