:root {
  --ink: #0d0d13;
  --paper: #f7efd8;
  --paper-deep: #e8d9b7;
  --red: #ff4138;
  --red-dark: #d5212b;
  --yellow: #ffd42a;
  --cyan: #20d9e7;
  --purple: #9a62ff;
  --white: #fffdf3;
  --muted: #6d6659;
  --border: 3px solid var(--ink);
  --hard-shadow: 6px 6px 0 var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Nunito", sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: multiply;
  background-image:
    repeating-radial-gradient(circle at 0 0, transparent 0 3px, rgba(13, 13, 19, 0.22) 4px, transparent 5px),
    repeating-linear-gradient(91deg, transparent 0 7px, rgba(13, 13, 19, 0.05) 8px, transparent 10px);
  background-size: 10px 10px, 18px 18px;
}

/* Masthead */
.site-header {
  position: relative;
  z-index: 50;
  min-height: 92px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 12px clamp(20px, 4vw, 70px);
  border-bottom: 4px solid var(--ink);
  background: var(--paper);
}

.logo-lockup {
  display: inline-flex;
  width: fit-content;
  flex-direction: column;
  transform: rotate(-2deg);
}

.logo-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.21em;
}

.logo-word {
  font: 400 clamp(32px, 4vw, 50px)/0.8 "Bangers", sans-serif;
  letter-spacing: 0.045em;
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--paper), 4px 4px 0 var(--red);
}

.logo-word span {
  color: var(--red);
  text-shadow: 2px 2px 0 var(--paper), 4px 4px 0 var(--ink);
}

.main-nav {
  display: flex;
  gap: 6px;
}

.nav-tab {
  position: relative;
  padding: 13px 17px 10px;
  background: transparent;
  color: var(--ink);
  font: 400 20px/1 "Bangers", sans-serif;
  letter-spacing: 0.06em;
}

.nav-tab::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 4px;
  background: transparent;
  transform: rotate(-2deg);
}

.nav-tab:hover::after,
.nav-tab.is-active::after {
  background: var(--red);
}

.nav-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  margin-left: 3px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font: 900 10px "Nunito", sans-serif;
  vertical-align: top;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pollinations-badge {
  min-height: 43px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  padding: 6px 11px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-1deg);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.pollinations-badge:hover {
  transform: translate(2px, 2px) rotate(-1deg);
  box-shadow: 2px 2px 0 var(--ink);
}

.pollinations-badge>span {
  grid-row: 1 / 3;
  color: var(--red);
  font-size: 22px;
}

.pollinations-badge small {
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
}

.pollinations-badge b {
  font: 400 14px/0.9 "Bangers", sans-serif;
  letter-spacing: 0.05em;
}

.ink-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 22px;
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font: 400 21px/1 "Bangers", sans-serif;
  letter-spacing: 0.07em;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.ink-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.ink-button:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--ink);
}

.ink-button--small {
  min-height: 43px;
  padding: 8px 16px;
  font-size: 16px;
}

.ink-button--yellow {
  background: var(--yellow);
}

.ink-button--dark {
  background: var(--ink);
  color: var(--white);
  box-shadow: 5px 5px 0 var(--red);
}

/* Comic cover hero */
.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 92px));
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 5px solid var(--ink);
  background: #041019;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -3;
}

.hero-ink {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(2, 9, 15, 0.99) 0%, rgba(2, 9, 15, 0.92) 30%, rgba(2, 9, 15, 0.2) 62%, rgba(2, 9, 15, 0.02) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  background-image: radial-gradient(circle, var(--cyan) 1.4px, transparent 1.8px);
  background-size: 9px 9px;
  mask-image: linear-gradient(110deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 35%, rgba(0, 0, 0, 0) 65%);
  -webkit-mask-image: linear-gradient(110deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 35%, rgba(0, 0, 0, 0) 65%);
}

.hero::after {
  content: "";
  position: absolute;
  left: -4%;
  bottom: -110px;
  width: 58%;
  height: 180px;
  background: var(--red);
  border-top: 5px solid var(--ink);
  transform: rotate(4deg);
  z-index: -1;
}

.hero-copy {
  width: min(760px, 52%);
  padding: 70px clamp(22px, 6vw, 104px) 110px;
  color: var(--white);
}

.burst-label {
  display: inline-block;
  padding: 8px 13px 6px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font: 400 17px/1 "Bangers", sans-serif;
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}

.burst-label--yellow {
  background: var(--yellow);
  color: var(--ink);
}

.issue-line {
  margin: 26px 0 10px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.hero h1 {
  margin: 0;
  font: 400 clamp(70px, 9vw, 138px)/0.76 "Bangers", sans-serif;
  letter-spacing: 0.015em;
  color: var(--white);
  text-shadow: 5px 5px 0 #000;
  transform: skewY(-1deg);
}

.hero h1 em {
  color: var(--yellow);
  font-style: normal;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 5px 5px 0 var(--red), 8px 8px 0 var(--ink);
}

.hero-lede {
  max-width: 590px;
  margin: 30px 0;
  color: #d8e8e7;
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 700;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.hero-actions .ink-button {
  font-size: 25px;
  padding-inline: 28px;
}

.hand-note {
  color: var(--yellow);
  font: 400 16px/1.2 "Permanent Marker", cursive;
  transform: rotate(-6deg);
}

.hero-sfx {
  position: absolute;
  top: 9%;
  right: 2%;
  color: var(--yellow);
  font: 400 clamp(52px, 8vw, 110px)/1 "Bangers", sans-serif;
  letter-spacing: 0.04em;
  transform: rotate(9deg);
  -webkit-text-stroke: 3px var(--ink);
  text-shadow: 7px 7px 0 var(--red), 10px 10px 0 var(--ink);
}

.hero-stamp {
  position: absolute;
  right: 5%;
  bottom: 6%;
  width: 108px;
  height: 108px;
  display: grid;
  align-content: center;
  text-align: center;
  border: 4px double var(--paper);
  border-radius: 50%;
  color: var(--paper);
  transform: rotate(-12deg);
}

.hero-stamp strong {
  font: 400 31px/0.8 "Bangers", sans-serif;
}

.hero-stamp span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.ticker {
  width: 100%;
  margin-left: 0;
  display: flex;
  justify-content: space-around;
  gap: 28px;
  padding: 13px 26px 10px;
  border-block: 3px solid var(--ink);
  background: var(--yellow);
  font: 400 clamp(16px, 2vw, 24px)/1 "Bangers", sans-serif;
  letter-spacing: 0.07em;
  white-space: nowrap;
  transform: none;
  overflow: hidden;
}

/* Studio */
.studio-shell {
  padding: 95px clamp(16px, 4.5vw, 80px) 120px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(13, 13, 19, 0.16) 1px, transparent 1px);
  background-size: 10px 10px;
}

.section-heading {
  max-width: 1500px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin: 0 auto 42px;
}

.chapter-chip {
  display: inline-block;
  padding: 7px 11px 5px;
  border: 2px solid var(--ink);
  background: var(--red);
  color: var(--white);
  font: 400 15px/1 "Bangers", sans-serif;
  letter-spacing: 0.1em;
  transform: rotate(-2deg);
}

.section-heading h2 {
  margin: 12px 0 0;
  font: 400 clamp(56px, 7vw, 96px)/0.8 "Bangers", sans-serif;
  letter-spacing: 0.03em;
  text-shadow: 4px 4px 0 var(--red);
}

.section-heading p {
  max-width: 360px;
  margin: 0;
  font: 400 18px/1.25 "Permanent Marker", cursive;
  transform: rotate(-2deg);
}

.studio-grid {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(600px, 1.28fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.creator-controls {
  min-width: 0;
}

.creator-controls form {
  display: grid;
  gap: 20px;
}

.control-block {
  position: relative;
  padding: 22px;
  border: var(--border);
  background: var(--white);
  box-shadow: var(--hard-shadow);
}

.control-block:nth-child(even) {
  transform: rotate(0.35deg);
}

.control-block--red {
  border-top: 10px solid var(--red);
}

.control-block--cyan {
  border-top: 10px solid var(--cyan);
}

.control-block--yellow {
  border-top: 10px solid var(--yellow);
}

.control-block--purple {
  border-top: 10px solid var(--purple);
}

.control-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.step-number {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font: 400 22px "Bangers", sans-serif;
}

.control-heading h3 {
  margin: 0;
  font: 400 27px/1 "Bangers", sans-serif;
  letter-spacing: 0.06em;
}

.control-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

textarea,
input[type="text"] {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 0;
  outline: none;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 3px 3px 0 rgba(13, 13, 19, 0.12);
  font-weight: 700;
}

textarea {
  min-height: 155px;
  resize: vertical;
  padding: 14px;
  line-height: 1.55;
}

input[type="text"] {
  height: 52px;
  padding: 0 14px;
}

textarea:focus,
input[type="text"]:focus {
  background: #fff;
  box-shadow: inset 0 0 0 3px var(--yellow);
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  margin-top: 12px;
}

.mini-actions button {
  padding: 4px 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.mini-actions button:hover {
  border-color: var(--red);
}

.mini-actions .smart-story-button {
  padding: 7px 9px 5px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
}

.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.style-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: 31px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  padding: 9px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: 3px 3px 0 transparent;
}

.style-card i {
  grid-row: 1 / 3;
  align-self: center;
  font-style: normal;
  font-size: 22px;
}

.style-card span {
  font: 400 15px/1 "Bangers", sans-serif;
  letter-spacing: 0.05em;
}

.style-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.style-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.style-card.is-selected {
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px) rotate(-1deg);
}

.layout-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.layout-choice {
  min-height: 94px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.layout-choice b {
  font: 400 14px "Bangers", sans-serif;
  letter-spacing: 0.06em;
}

.layout-choice.is-selected {
  background: var(--purple);
  color: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.layout-icon {
  width: 41px;
  height: 35px;
  display: grid;
  gap: 2px;
  padding: 2px;
  border: 2px solid currentColor;
}

.layout-icon i {
  background: currentColor;
}

.icon-grid4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.icon-grid6 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
}

.icon-strip3 {
  grid-template-rows: repeat(3, 1fr);
}

.generate-button {
  min-height: 88px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 13px 23px;
  border: 4px solid var(--ink);
  background: var(--red);
  color: var(--white);
  box-shadow: 8px 8px 0 var(--ink);
  text-align: left;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.generate-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.generate-button:active {
  transform: translate(8px, 8px);
  box-shadow: none;
}

.generate-button:disabled {
  filter: grayscale(0.6);
  opacity: 0.75;
  cursor: wait;
}

.generate-zap {
  font-size: 34px;
  color: var(--yellow);
}

.generate-button span:nth-child(2) {
  font: 400 31px/0.9 "Bangers", sans-serif;
  letter-spacing: 0.07em;
}

.generate-button small {
  display: block;
  margin-bottom: 5px;
  font: 900 9px "Nunito", sans-serif;
  letter-spacing: 0.16em;
}

.generate-button b {
  font-size: 30px;
}

.status-line {
  margin: 0;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.status-line.is-error {
  color: var(--red-dark);
}

/* Comic desk and page */
.comic-desk {
  position: sticky;
  top: 18px;
  min-width: 0;
}

.desk-note {
  width: fit-content;
  margin: 0 0 8px auto;
  font: 400 13px "Permanent Marker", cursive;
  transform: rotate(2deg);
}

.page-toolbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: var(--border);
  border-bottom: 0;
  background: var(--ink);
  color: var(--white);
}

.active-panel-label {
  color: var(--yellow);
  font: 400 13px "Bangers", sans-serif;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.toolbar-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-actions>button,
.sfx-wrap>button {
  height: 34px;
  padding: 0 9px;
  border: 2px solid var(--white);
  background: transparent;
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
}

.toolbar-actions button:hover {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
}

.toolbar-actions .danger-tool:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.sfx-wrap {
  position: relative;
}

.sfx-menu {
  position: absolute;
  top: 40px;
  right: 0;
  z-index: 80;
  width: 250px;
  grid-template-columns: 1fr 1fr;
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--ink);
}

.sfx-menu button {
  padding: 8px;
  background: var(--white);
  color: var(--ink);
  font: 400 18px "Bangers", sans-serif;
  text-align: left;
}

.sfx-menu button:hover {
  background: var(--red);
  color: #fff;
}

.comic-page {
  position: relative;
  padding: clamp(13px, 2vw, 24px);
  border: 5px solid var(--ink);
  background: #fff8e7;
  box-shadow: 13px 13px 0 var(--ink), 17px 17px 0 var(--red);
  background-image: radial-gradient(rgba(13, 13, 19, 0.12) 1px, transparent 1px);
  background-size: 7px 7px;
}

.comic-page::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(13, 13, 19, 0.23);
  pointer-events: none;
}

.comic-page-header {
  position: relative;
  min-height: 108px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 13px;
  padding: 12px 16px;
  border: 4px solid var(--ink);
  overflow: hidden;
  background: var(--yellow);
}

.comic-page-header::after {
  content: "";
  position: absolute;
  right: 10%;
  top: -100px;
  width: 250px;
  height: 280px;
  background: var(--red);
  transform: rotate(32deg);
  opacity: 0.86;
  z-index: 0;
}

.cover-seal,
.comic-title-wrap,
.price-box {
  position: relative;
  z-index: 1;
}

.cover-seal {
  width: 63px;
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  background: var(--white);
  line-height: 1;
}

.cover-seal span {
  padding: 4px;
  background: var(--ink);
  color: #fff;
  font: 400 11px "Bangers", sans-serif;
  letter-spacing: 0.06em;
}

.cover-seal b {
  font: 400 32px/0.8 "Bangers", sans-serif;
}

.cover-seal small {
  font-size: 7px;
  font-weight: 900;
}

.comic-title-wrap p {
  margin: 0 0 4px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.23em;
}

.comic-title-wrap h2 {
  margin: 0;
  outline: 0;
  font: 400 clamp(28px, 4vw, 57px)/0.78 "Bangers", sans-serif;
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 var(--white);
}

.comic-title-wrap h3 {
  margin: 6px 0 0;
  outline: 0;
  font-size: clamp(7px, 1vw, 11px);
  font-weight: 900;
  letter-spacing: 0.16em;
}

.comic-title-wrap [contenteditable="true"]:focus {
  background: rgba(255, 255, 255, 0.55);
}

.price-box {
  min-width: 69px;
  padding: 8px;
  border: 3px solid var(--ink);
  background: var(--white);
  font: 900 8px/1.1 "Nunito", sans-serif;
  text-align: center;
}

.price-box b {
  font: 400 20px "Bangers", sans-serif;
}

.price-box small {
  display: block;
  margin-top: 4px;
  font-size: 5px;
}

.comic-panels {
  display: grid;
  gap: 11px;
  min-height: 540px;
}

.comic-panels.layout-grid4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(2, minmax(255px, 1fr));
}

.comic-panels.layout-grid6 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, minmax(185px, 1fr));
}

.comic-panels.layout-strip3 {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, minmax(205px, 1fr));
}

.comic-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 4px solid var(--ink);
  background: #d8caa9;
  isolation: isolate;
  cursor: pointer;
}

.comic-panel:nth-child(3n + 2) {
  transform: rotate(0.25deg);
}

.comic-panel.is-active {
  box-shadow: inset 0 0 0 5px var(--yellow);
}

.comic-panel.is-active::after {
  content: "EDITING";
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 20;
  padding: 3px 6px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  font: 400 10px "Bangers", sans-serif;
  letter-spacing: 0.08em;
}

.panel-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.panel-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.2);
}

.panel-empty,
.panel-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 25px;
  color: var(--ink);
  text-align: center;
}

.panel-empty {
  background-image: radial-gradient(rgba(13, 13, 19, 0.23) 1.2px, transparent 1.3px);
  background-size: 8px 8px;
}

.panel-empty b {
  font: 400 72px/0.8 "Bangers", sans-serif;
  opacity: 0.35;
}

.panel-empty p {
  max-width: 180px;
  margin: 0;
  font: 400 13px/1.2 "Permanent Marker", cursive;
}

.panel-loading {
  color: #fff;
  background: var(--ink);
}

.panel-loading i {
  width: 54px;
  height: 54px;
  border: 7px dotted var(--yellow);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.panel-loading b {
  font: 400 23px "Bangers", sans-serif;
  letter-spacing: 0.08em;
}

.panel-loading small {
  color: #beb6a4;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.panel-controls {
  position: absolute;
  left: 7px;
  bottom: 7px;
  z-index: 24;
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(5px);
  transition: 120ms ease;
}

.comic-panel:hover .panel-controls,
.comic-panel:focus-within .panel-controls {
  opacity: 1;
  transform: none;
}

.panel-controls button {
  height: 29px;
  padding: 0 8px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 9px;
  font-weight: 900;
}

.panel-controls button:hover {
  background: var(--yellow);
}

.panel-number {
  position: absolute;
  right: 8px;
  bottom: 7px;
  z-index: 4;
  color: rgba(255, 255, 255, 0.65);
  font: 400 24px "Bangers", sans-serif;
  -webkit-text-stroke: 1px var(--ink);
}

.panel-prompt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  min-height: 44px;
  padding: 10px 70px 8px 12px;
  border: 0;
  border-top: 2px solid var(--ink);
  background: rgba(255, 253, 243, 0.92);
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(100%);
  transition: 140ms ease;
}

.comic-panel.is-active .panel-prompt:focus {
  opacity: 1;
  transform: none;
}

.overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.comic-overlay {
  position: absolute;
  z-index: 10;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  cursor: grab;
  transition: box-shadow 0.15s ease;
}

.comic-overlay:hover {
  box-shadow: 0 0 0 2px var(--cyan), 4px 4px 0 rgba(13, 13, 19, 0.75);
}

.comic-overlay:active {
  cursor: grabbing;
  z-index: 20;
}

.comic-overlay .editable-copy {
  outline: none;
  cursor: text;
}

.speech-overlay,
.thought-overlay {
  max-width: 46%;
  min-width: 60px;
  padding: 8px 11px;
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(13, 13, 19, 0.65);
  font-size: clamp(8px, 1vw, 12px);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.speech-overlay {
  border-radius: 50%;
}

.speech-overlay::after {
  content: "";
  position: absolute;
  left: 45%;
  bottom: -10px;
  width: 17px;
  height: 17px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--white);
  transform: rotate(45deg);
}

.speech-overlay[data-tail="up"]::after {
  top: -10px;
  bottom: auto;
  left: 45%;
  transform: rotate(225deg);
}

.speech-overlay[data-tail="left"]::after {
  top: 42%;
  bottom: auto;
  left: -10px;
  transform: rotate(135deg);
}

.speech-overlay[data-tail="right"]::after {
  top: 42%;
  right: -10px;
  bottom: auto;
  left: auto;
  transform: rotate(-45deg);
}

.thought-overlay {
  border-radius: 45%;
  border-style: solid;
}

.thought-overlay::before,
.thought-overlay::after {
  content: "";
  position: absolute;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
}

.thought-overlay::before {
  width: 11px;
  height: 11px;
  left: 18%;
  bottom: -13px;
}

.thought-overlay::after {
  width: 6px;
  height: 6px;
  left: 12%;
  bottom: -22px;
}

.caption-overlay {
  max-width: 72%;
  padding: 7px 10px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: clamp(8px, 0.9vw, 11px);
  font-weight: 900;
  line-height: 1.2;
  transform: rotate(-1deg);
}

.sfx-overlay {
  color: var(--yellow);
  font: 400 clamp(29px, 4vw, 60px)/0.8 "Bangers", sans-serif;
  letter-spacing: 0.04em;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--red), 7px 7px 0 var(--ink);
  transform: rotate(-8deg);
}

.comic-page-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 11px 6px;
  border: 3px solid var(--ink);
  background: var(--red);
  color: #fff;
  font: 400 12px "Bangers", sans-serif;
  letter-spacing: 0.08em;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 13px;
  margin-top: 28px;
}

.book-page-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
}

.book-page-nav button,
.book-page-nav b {
  min-height: 45px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font: 400 15px "Bangers", sans-serif;
  box-shadow: 4px 4px 0 var(--ink);
}

.export-note {
  margin: 17px 4px 0;
  color: var(--muted);
  font: 400 12px "Permanent Marker", cursive;
  text-align: right;
}

/* Romance showcase */
.romance-spread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
  align-items: stretch;
  border-top: 5px solid var(--ink);
  background: #b8a1d5;
  overflow: hidden;
}

.romance-art-panel {
  position: relative;
  min-height: 650px;
  border-right: 5px solid var(--ink);
  overflow: hidden;
}

.romance-art-panel img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.romance-art-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(13, 13, 19, 0.22) 1px, transparent 1.3px);
  background-size: 8px 8px;
  opacity: 0.35;
}

.romance-caption {
  position: absolute;
  left: 25px;
  bottom: 24px;
  z-index: 2;
  max-width: 370px;
  padding: 13px 17px 10px;
  border: 4px solid var(--ink);
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--ink);
  font: 400 21px/1.05 "Bangers", sans-serif;
  letter-spacing: 0.05em;
  transform: rotate(-1deg);
}

.romance-heart {
  position: absolute;
  top: 24px;
  right: 25px;
  z-index: 2;
  color: var(--red);
  font-size: 95px;
  line-height: 1;
  -webkit-text-stroke: 4px var(--ink);
  text-shadow: 7px 7px 0 var(--paper);
  transform: rotate(9deg);
}

.romance-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(55px, 7vw, 110px) clamp(28px, 5vw, 80px);
  background-color: #f2d5dc;
  background-image: radial-gradient(rgba(13, 13, 19, 0.16) 1.2px, transparent 1.3px);
  background-size: 10px 10px;
}

.romance-copy::before {
  content: "♥";
  position: absolute;
  right: -10px;
  bottom: -75px;
  color: rgba(255, 65, 56, 0.12);
  font-size: 330px;
  line-height: 1;
  transform: rotate(-12deg);
}

.romance-copy>* {
  position: relative;
  z-index: 1;
}

.romance-copy h2 {
  margin: 23px 0 20px;
  font: 400 clamp(58px, 6.3vw, 94px)/0.8 "Bangers", sans-serif;
  letter-spacing: 0.025em;
}

.romance-copy h2 em {
  color: var(--red);
  font-style: normal;
  text-shadow: 4px 4px 0 var(--paper), 7px 7px 0 var(--ink);
}

.romance-copy p {
  max-width: 570px;
  margin: 0 0 25px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

.romance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.romance-tags span {
  padding: 7px 10px 5px;
  border: 2px solid var(--ink);
  background: var(--white);
  font: 400 14px "Bangers", sans-serif;
  letter-spacing: 0.06em;
  box-shadow: 3px 3px 0 var(--ink);
}

/* Feature spread */
.feature-spread {
  position: relative;
  padding: 115px clamp(20px, 5vw, 90px) 130px;
  border-top: 5px solid var(--ink);
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.feature-spread::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(var(--paper) 1.2px, transparent 1.3px);
  background-size: 9px 9px;
}

.feature-title,
.feature-cards {
  position: relative;
  z-index: 1;
  max-width: 1350px;
  margin-inline: auto;
}

.feature-title span {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.25em;
}

.feature-title h2 {
  margin: 12px 0 50px;
  font: 400 clamp(53px, 7vw, 94px)/0.82 "Bangers", sans-serif;
  letter-spacing: 0.03em;
}

.feature-title h2 em {
  color: var(--yellow);
  font-style: normal;
  text-shadow: 5px 5px 0 var(--red);
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 38px);
}

.feature-card {
  position: relative;
  min-height: 260px;
  padding: 80px 28px 28px;
  border: 4px solid var(--white);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--white);
}

.feature-card:nth-child(2) {
  transform: rotate(1deg);
}

.feature-card b {
  position: absolute;
  top: -15px;
  left: 20px;
  font: 400 100px/1 "Bangers", sans-serif;
  color: rgba(13, 13, 19, 0.18);
}

.feature-card h3 {
  position: relative;
  margin: 0 0 10px;
  font: 400 31px "Bangers", sans-serif;
  letter-spacing: 0.05em;
}

.feature-card p {
  position: relative;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.feature-card--yellow {
  background: var(--yellow);
}

.feature-card--cyan {
  background: var(--cyan);
}

.feature-card--red {
  background: var(--red);
}

/* Library */
.library-view {
  min-height: calc(100vh - 92px);
  padding: 90px clamp(20px, 6vw, 100px) 130px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(13, 13, 19, 0.17) 1px, transparent 1px);
  background-size: 9px 9px;
}

.library-hero {
  max-width: 1300px;
  margin: 0 auto 55px;
}

.library-hero h1 {
  margin: 15px 0 4px;
  font: 400 clamp(72px, 11vw, 150px)/0.75 "Bangers", sans-serif;
  text-shadow: 6px 6px 0 var(--red);
}

.library-hero p {
  max-width: 550px;
  margin: 25px 0;
  font-weight: 800;
}

.library-grid {
  max-width: 1300px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 34px;
}

.library-empty {
  grid-column: 1 / -1;
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 40px;
  border: 4px dashed var(--ink);
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.library-empty b {
  font: 400 55px "Bangers", sans-serif;
}

.library-empty p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.issue-card {
  padding: 10px 10px 16px;
  border: 4px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-0.7deg);
}

.issue-card:nth-child(even) {
  transform: rotate(1deg);
}

.issue-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 3px solid var(--ink);
  background: var(--paper-deep);
}

.issue-card h2 {
  margin: 13px 4px 0;
  font: 400 24px "Bangers", sans-serif;
}

.issue-card p {
  margin: 3px 4px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.issue-card-actions {
  display: flex;
  gap: 7px;
}

.issue-card-actions a,
.issue-card-actions button {
  flex: 1;
  padding: 8px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

.issue-card-actions button {
  background: var(--white);
}

.issue-card-actions button:hover {
  background: var(--red);
  color: #fff;
}

/* Lightbox, toast, footer */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 13, 19, 0.9);
}

.lightbox-card {
  position: relative;
  width: min(1100px, 100%);
  max-height: 90vh;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  border: 5px solid var(--ink);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--red);
  overflow: auto;
}

.lightbox-card img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: contain;
  background: #08080d;
}

.lightbox-copy {
  padding: clamp(24px, 4vw, 52px);
}

.lightbox-copy>span {
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.lightbox-copy h2 {
  margin: 10px 0 20px;
  font: 400 48px/0.9 "Bangers", sans-serif;
}

.lightbox-copy p {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink);
  background: var(--red);
  color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  max-width: 360px;
  padding: 14px 18px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.toast.is-error {
  background: var(--red);
  color: #fff;
}

.story-loader {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 13, 19, 0.9);
}

.story-loader-card {
  width: min(520px, 100%);
  padding: 45px 30px 38px;
  border: 5px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 12px 12px 0 var(--red);
  text-align: center;
  background-image: radial-gradient(rgba(13, 13, 19, 0.16) 1px, transparent 1.2px);
  background-size: 9px 9px;
}

.story-loader-burst {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border: 5px solid var(--ink);
  border-radius: 50%;
  background: var(--red);
  color: var(--yellow);
  font-size: 43px;
  animation: story-spin 1.1s linear infinite;
}

.story-loader-card h2 {
  margin: 0;
  font: 400 clamp(37px, 7vw, 58px)/0.9 "Bangers", sans-serif;
  letter-spacing: .04em;
}

.story-loader-card p {
  margin: 18px 0;
  font-weight: 900;
}

.story-loader-card small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .18em;
}

.story-loader-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 20px 0;
}

.story-loader-dots i {
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  animation: story-pulse .9s ease-in-out infinite alternate;
}

.story-loader-dots i:nth-child(2),
.story-loader-dots i:nth-child(5) {
  animation-delay: .15s
}

.story-loader-dots i:nth-child(3),
.story-loader-dots i:nth-child(6) {
  animation-delay: .3s
}

@keyframes story-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes story-pulse {
  to {
    transform: translateY(-10px);
    background: var(--cyan);
  }
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 35px clamp(20px, 5vw, 80px);
  border-top: 5px solid var(--ink);
  background: var(--red);
  color: var(--white);
}

.footer-logo {
  font: 400 42px "Bangers", sans-serif;
  letter-spacing: 0.05em;
  text-shadow: 3px 3px 0 var(--ink);
}

.footer-logo span {
  color: var(--yellow);
}

.footer-tagline {
  margin: 0;
  font: 400 14px "Permanent Marker", cursive;
  color: var(--paper);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.footer-nav-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 15px;
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font: 400 16px/1 "Bangers", sans-serif;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.footer-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.footer-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.footer-btn--yellow {
  background: var(--yellow);
}

.footer-btn--dark {
  background: var(--ink);
  color: var(--yellow);
  box-shadow: 3px 3px 0 var(--yellow);
}

.footer-btn--dark:hover {
  background: var(--white);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.footer-copy {
  font: 400 12px "Bangers", sans-serif;
  letter-spacing: 0.08em;
  color: var(--paper);
  opacity: 0.95;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: center;
    border-top: 2px solid var(--ink);
    padding-top: 5px;
  }

  .header-actions {
    justify-self: end;
  }

  .hero {
    min-height: 700px;
  }

  .hero-copy {
    width: 67%;
    padding-left: 45px;
  }

  .hero h1 {
    font-size: clamp(70px, 11vw, 116px);
  }

  .studio-grid {
    grid-template-columns: 1fr;
  }

  .creator-controls {
    max-width: 900px;
    margin: auto;
  }

  .comic-desk {
    position: static;
    max-width: 920px;
    margin: 30px auto 0;
  }

  .romance-spread {
    grid-template-columns: 1fr;
  }

  .romance-art-panel {
    min-height: 570px;
    border-right: 0;
    border-bottom: 5px solid var(--ink);
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 78px;
    padding: 10px 14px;
    gap: 10px;
  }

  .logo-kicker {
    font-size: 6px;
  }

  .logo-word {
    font-size: 35px;
  }

  .header-cta {
    display: none;
  }

  .pollinations-badge {
    min-height: 38px;
    padding: 5px 8px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .pollinations-badge>span {
    font-size: 17px;
  }

  .pollinations-badge small {
    font-size: 5px;
  }

  .pollinations-badge b {
    font-size: 11px;
  }

  #open-key-modal-btn {
    min-height: 38px;
    padding: 4px 10px;
    font-size: 13px;
    letter-spacing: 0.05em;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .main-nav {
    grid-column: 1 / -1;
  }

  .nav-tab {
    padding: 9px 11px;
    font-size: 16px;
  }

  .hero {
    min-height: 690px;
    align-items: end;
  }

  .hero-art {
    object-position: 68% center;
  }

  .hero-ink {
    background: linear-gradient(0deg, rgba(2, 9, 15, 0.99) 0%, rgba(2, 9, 15, 0.88) 55%, rgba(2, 9, 15, 0.08) 100%);
  }

  .hero::before {
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0) 100%);
  }

  .hero-copy {
    width: 100%;
    padding: 265px 19px 64px;
  }

  .burst-label {
    font-size: 12px;
  }

  .issue-line {
    margin-top: 18px;
    font-size: 8px;
  }

  .hero h1 {
    font-size: clamp(62px, 20vw, 92px);
  }

  .hero-lede {
    margin: 22px 0;
    font-size: 13px;
    line-height: 1.5;
  }

  .hero-actions {
    gap: 15px;
  }

  .hero-actions .ink-button {
    min-height: 48px;
    padding-inline: 16px;
    font-size: 19px;
  }

  .hand-note {
    font-size: 11px;
  }

  .hero-sfx {
    top: 5%;
    right: 4%;
    font-size: 52px;
  }

  .hero-stamp {
    display: none;
  }

  .ticker {
    justify-content: flex-start;
    font-size: 16px;
  }

  .ticker div:nth-child(n+4) {
    display: none;
  }

  .studio-shell {
    padding: 70px 12px 90px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    margin-bottom: 28px;
  }

  .section-heading h2 {
    font-size: 59px;
  }

  .section-heading p {
    font-size: 14px;
  }

  .studio-grid {
    display: block;
  }

  .control-block {
    padding: 17px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .control-heading h3 {
    font-size: 24px;
  }

  .control-heading p {
    font-size: 9px;
  }

  .style-card span {
    font-size: 13px;
  }

  .layout-choice {
    min-height: 84px;
  }

  .generate-button {
    min-height: 78px;
    padding: 10px 16px;
  }

  .generate-button span:nth-child(2) {
    font-size: 26px;
  }

  .comic-desk {
    margin-top: 55px;
  }

  .desk-note {
    margin-right: 5px;
  }

  .page-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .toolbar-actions>button,
  .sfx-wrap>button {
    padding-inline: 7px;
  }

  .toolbar-actions span {
    display: none;
  }

  .comic-page {
    padding: 9px;
    box-shadow: 7px 7px 0 var(--ink), 10px 10px 0 var(--red);
  }

  .comic-page-header {
    grid-template-columns: auto 1fr;
    min-height: 90px;
    padding: 8px;
    gap: 8px;
  }

  .cover-seal {
    width: 48px;
    min-height: 66px;
  }

  .price-box {
    display: none;
  }

  .comic-title-wrap h2 {
    font-size: 28px;
  }

  .comic-title-wrap h3 {
    font-size: 6px;
  }

  .comic-panels {
    gap: 7px;
    min-height: 480px;
  }

  .comic-panels.layout-grid4 {
    grid-template-rows: repeat(2, minmax(220px, 1fr));
  }

  .comic-panels.layout-grid6 {
    grid-template-rows: repeat(3, minmax(150px, 1fr));
  }

  .comic-panels.layout-strip3 {
    grid-template-rows: repeat(3, minmax(165px, 1fr));
  }

  .comic-panel {
    border-width: 3px;
  }

  .panel-empty b {
    font-size: 48px;
  }

  .panel-empty p {
    font-size: 9px;
  }

  .panel-controls {
    opacity: 1;
    transform: none;
  }

  .panel-controls button {
    height: 24px;
    padding-inline: 6px;
    font-size: 7px;
  }

  .comic-page-footer {
    font-size: 8px;
  }

  .page-actions {
    flex-direction: column-reverse;
  }

  .page-actions .ink-button {
    width: 100%;
  }

  .feature-spread {
    padding: 80px 18px 95px;
  }

  .romance-art-panel {
    min-height: 410px;
  }

  .romance-art-panel img {
    object-position: 38% center;
  }

  .romance-caption {
    left: 14px;
    right: 14px;
    bottom: 14px;
    font-size: 16px;
  }

  .romance-heart {
    top: 13px;
    right: 13px;
    font-size: 60px;
  }

  .romance-copy {
    padding: 65px 20px 75px;
  }

  .romance-copy h2 {
    font-size: 57px;
  }

  .romance-copy p {
    font-size: 13px;
  }

  .feature-title h2 {
    font-size: 55px;
  }

  .feature-cards {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 210px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer>div:last-child {
    align-items: center;
  }

  .lightbox-card {
    grid-template-columns: 1fr;
  }

  .lightbox-card img {
    min-height: 290px;
    max-height: 52vh;
  }

  .lightbox-copy {
    padding: 24px;
  }

  .lightbox-copy h2 {
    font-size: 37px;
  }
}

@media (max-width: 430px) {
  .style-grid {
    grid-template-columns: 1fr;
  }

  .layout-choice b {
    font-size: 11px;
  }

  .comic-panels.layout-grid4,
  .comic-panels.layout-grid6 {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .comic-panels.layout-grid4 .comic-panel {
    min-height: 250px;
  }

  .comic-panels.layout-grid6 .comic-panel {
    min-height: 210px;
  }

  .comic-panels.layout-strip3 .comic-panel {
    min-height: 185px;
  }

  .toolbar-actions>button,
  .sfx-wrap>button {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Completion Banner */
.completion-banner {
  margin: 32px 0 24px;
  padding: 28px 24px;
  border: 4px solid var(--ink);
  background: var(--paper);
  background-image: radial-gradient(var(--ink) 1px, transparent 1.2px);
  background-size: 10px 10px;
  box-shadow: 8px 8px 0 var(--ink);
  text-align: center;
}

.completion-content h2 {
  font: 400 clamp(32px, 5vw, 54px)/0.95 "Bangers", sans-serif;
  letter-spacing: 0.03em;
  margin: 12px 0 8px;
  color: var(--ink);
}

.completion-content p {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
}

.completion-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Page Navigation Add Button */
.nav-add-page {
  background: var(--yellow) !important;
  color: var(--ink) !important;
  font-weight: 900 !important;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.nav-add-page:hover {
  transform: scale(1.04);
}

/* Multi-Page Reader Modal */
.reader-card {
  position: relative;
  width: min(92vw, 980px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 5px solid var(--ink);
  background: var(--paper);
  box-shadow: 12px 12px 0 var(--ink);
  overflow: hidden;
}

.reader-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border: 3px solid var(--ink);
  background: var(--red);
  color: var(--white);
  font: 400 24px/1 "Bangers", sans-serif;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.reader-close:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 4px solid var(--ink);
  background: var(--yellow);
}

.reader-header h2 {
  font: 400 clamp(24px, 3.5vw, 42px)/0.9 "Bangers", sans-serif;
  letter-spacing: 0.03em;
  margin: 4px 0 0;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reader-controls button {
  padding: 8px 14px;
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font: 400 14px "Bangers", sans-serif;
  letter-spacing: 0.06em;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.reader-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.reader-controls b {
  font: 400 16px "Bangers", sans-serif;
  letter-spacing: 0.08em;
  padding: 0 8px;
}

.reader-body {
  flex: 1;
  overflow: auto;
  padding: 24px;
  display: grid;
  place-items: center;
  background: var(--ink);
}

.reader-body canvas {
  max-width: 100%;
  height: auto;
  max-height: 65vh;
  border: 4px solid var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.reader-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 4px solid var(--ink);
  background: var(--white);
}

/* Rate Limit Modal */
.rate-limit-card {
  position: relative;
  width: min(90vw, 520px);
  padding: 32px 28px;
  border: 5px solid var(--ink);
  background: var(--paper);
  background-image: radial-gradient(var(--ink) 1px, transparent 1.2px);
  background-size: 10px 10px;
  box-shadow: 10px 10px 0 var(--ink);
  text-align: center;
}
.rate-limit-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 3px solid var(--ink);
  background: var(--red);
  color: var(--white);
  font: 400 22px/1 "Bangers", sans-serif;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.rate-limit-close:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.rate-limit-body h2 {
  font: 400 clamp(28px, 4.5vw, 42px)/0.95 "Bangers", sans-serif;
  color: var(--ink);
  margin: 14px 0 10px;
}
.rate-limit-body p {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 20px;
}
.rate-limit-timer {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 24px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 24px;
}
.rate-limit-timer small {
  font: 900 10px "Nunito", sans-serif;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.rate-limit-timer b {
  font: 400 36px/1 "Bangers", sans-serif;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.device-storage-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 20px;
  padding: 8px 16px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font: 700 13px/1.4 "Nunito", sans-serif;
}
.device-storage-warning span {
  font: 400 15px "Bangers", sans-serif;
  letter-spacing: 0.05em;
}

/* Model Selector UI */
.model-selector-wrap {
  margin-top: 18px;
  padding: 16px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}
.model-lock-banner {
  padding: 10px 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  margin-bottom: 14px;
  font-size: 12px;
}
.model-lock-banner span {
  display: block;
  font: 400 15px "Bangers", sans-serif;
  letter-spacing: 0.05em;
  color: var(--ink);
}
.model-lock-banner small {
  display: block;
  font-weight: 700;
  color: #555;
  margin-top: 2px;
}
.model-selectors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.model-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.model-field label {
  font: 400 13px "Bangers", sans-serif;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.model-field select, .model-field input {
  padding: 8px 10px;
  border: 2px solid var(--ink);
  background: var(--white);
  font: 700 12px "Nunito", sans-serif;
  color: var(--ink);
}
.model-field select:disabled, .model-field input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: #eaeaea;
}

/* Pollen Key Modal */
.pollen-key-card {
  position: relative;
  width: min(92vw, 540px);
  padding: 32px 28px;
  border: 5px solid var(--ink);
  background: var(--paper);
  background-image: radial-gradient(var(--ink) 1px, transparent 1.2px);
  background-size: 10px 10px;
  box-shadow: 10px 10px 0 var(--ink);
}
.pollen-key-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 3px solid var(--ink);
  background: var(--red);
  color: var(--white);
  font: 400 22px/1 "Bangers", sans-serif;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.pollen-key-body h2 {
  font: 400 clamp(28px, 4.5vw, 40px)/0.95 "Bangers", sans-serif;
  color: var(--ink);
  margin: 12px 0 8px;
}
.pollen-key-body p {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 18px;
}
.pollen-key-input-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pollen-key-input-wrap input {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  background: var(--white);
  font: 700 14px "Nunito", sans-serif;
}
.pollen-key-status {
  font: 400 14px "Bangers", sans-serif;
  letter-spacing: 0.05em;
  color: var(--ink);
  padding: 6px 12px;
  background: var(--white);
  border: 2px solid var(--ink);
  margin-bottom: 14px;
}
.pollen-key-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.pollen-key-links a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
}
.pollen-key-links button {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--ink);
  padding: 4px 10px;
  font: 400 12px "Bangers", sans-serif;
  cursor: pointer;
}