/* =========================================================
   Spaceman.co.jp
   Manga Comedy Site CSS
   Theme: Space station comedy, manga panels, black/white/red
   ========================================================= */

:root {
  --bg: #050507;
  --bg-soft: #0d0d12;
  --bg-panel: #14141b;
  --paper: #f7f2e8;
  --paper-soft: #fffaf0;
  --ink: #111111;
  --text: #f4f0e8;
  --muted: #b9b4aa;
  --muted-dark: #5d584f;
  --red: #e63232;
  --red-dark: #a51616;
  --yellow: #ffd447;
  --blue: #84c7ff;
  --line: rgba(255, 255, 255, 0.16);
  --line-dark: rgba(0, 0, 0, 0.18);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --radius-sm: 14px;
  --max: 1180px;
  --font-jp: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --font-sans: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Courier New", monospace;
}

/* =========================================================
   Base
   ========================================================= */

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(132, 199, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(230, 50, 50, 0.15), transparent 30rem),
    linear-gradient(180deg, #020204 0%, #08080d 42%, #111016 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.8;
  letter-spacing: 0.03em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.65) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.35) 1px, transparent 1.5px);
  background-size: 90px 90px, 140px 140px;
  background-position: 0 0, 42px 38px;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.22) 0,
      rgba(255, 255, 255, 0.22) 1px,
      transparent 1px,
      transparent 5px
    );
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-color: rgba(230, 50, 50, 0.7);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--yellow);
}

p {
  margin: 0 0 1.2rem;
}

strong {
  color: var(--paper-soft);
  font-weight: 800;
}

main {
  display: block;
}

::selection {
  background: var(--red);
  color: #fff;
}

/* =========================================================
   Layout Helpers
   ========================================================= */

.wrap,
.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: clamp(54px, 8vw, 108px) 0;
  position: relative;
}

.section-tight {
  padding: clamp(36px, 6vw, 72px) 0;
}

.section-paper {
  background:
    linear-gradient(180deg, rgba(247, 242, 232, 0.98), rgba(255, 250, 240, 0.96)),
    url("/images/spaceman-paper-texture.jpg");
  color: var(--ink);
}

.section-dark {
  background:
    radial-gradient(circle at 20% 15%, rgba(230, 50, 50, 0.14), transparent 30rem),
    linear-gradient(180deg, rgba(9, 9, 14, 0.98), rgba(2, 2, 4, 0.98));
  color: var(--text);
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-jp);
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 34px;
  height: 3px;
  background: var(--red);
  border-radius: 999px;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.95;
  color: var(--muted);
}

.section-paper .lead,
.section-paper .section-kicker {
  color: var(--muted-dark);
}

.section-paper .section-kicker::before {
  background: var(--red);
}

/* =========================================================
   Header / Navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 7, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1260px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.logo,
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--paper-soft);
  text-decoration: none;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper-soft);
  border-radius: 50%;
  color: var(--red);
  box-shadow: 0 0 0 4px rgba(230, 50, 50, 0.14);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text small {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  margin-top: 0.18rem;
}

.nav,
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.nav a,
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 0.82rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.nav a:hover,
.site-nav a:hover,
.nav a.active,
.site-nav a.active {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--yellow);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  min-height: calc(100vh - 76px);
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero.with-image {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.22) 100%),
    var(--hero-image, none) center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(0deg, var(--bg) 0%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1260px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 140px) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-copy {
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-badge::before {
  content: "●";
  color: var(--red);
  text-shadow: 0 0 16px rgba(230, 50, 50, 0.9);
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.6rem, 12vw, 11rem);
  line-height: 0.88;
  font-weight: 1000;
  letter-spacing: -0.08em;
  text-transform: uppercase;
  color: var(--paper-soft);
  text-shadow:
    0 4px 0 rgba(230, 50, 50, 0.78),
    0 18px 50px rgba(0, 0, 0, 0.8);
}

.hero .jp-title {
  margin: 1rem 0 0;
  font-family: var(--font-jp);
  font-size: clamp(1.6rem, 3.4vw, 3.2rem);
  line-height: 1.22;
  color: var(--paper-soft);
}

.hero .tagline {
  max-width: 720px;
  margin: 1.5rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.9;
  color: rgba(255, 250, 240, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero-card {
  position: relative;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(20, 20, 27, 0.92), rgba(8, 8, 12, 0.92));
  box-shadow: var(--shadow);
}

.hero-card::before {
  content: "第1話";
  position: absolute;
  top: -15px;
  left: 24px;
  padding: 0.22rem 0.8rem;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-card h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-jp);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.25;
}

.hero-card p {
  color: var(--muted);
}

/* =========================================================
   Buttons
   ========================================================= */

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.72rem 1.15rem;
  border: 2px solid var(--paper-soft);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink);
  text-decoration: none;
  font-weight: 950;
  letter-spacing: 0.06em;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.btn:hover {
  transform: translateY(-2px);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
}

.button-red,
.btn-red {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.button-red:hover,
.btn-red:hover {
  background: var(--red-dark);
  color: #fff;
}

.button-ghost,
.btn-ghost {
  background: rgba(0, 0, 0, 0.25);
  color: var(--paper-soft);
  border-color: rgba(255, 255, 255, 0.32);
}

.button-ghost:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--yellow);
}

/* =========================================================
   Manga Panel System
   ========================================================= */

.manga-grid,
.panel-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 1.4rem);
}

.panel,
.manga-panel {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border: 4px solid var(--paper-soft);
  border-radius: 6px;
  background: var(--paper-soft);
  color: var(--ink);
  box-shadow: 10px 12px 0 rgba(230, 50, 50, 0.9);
}

.panel.dark,
.manga-panel.dark {
  background: var(--bg-panel);
  color: var(--text);
}

.panel.span-4 { grid-column: span 4; }
.panel.span-5 { grid-column: span 5; }
.panel.span-6 { grid-column: span 6; }
.panel.span-7 { grid-column: span 7; }
.panel.span-8 { grid-column: span 8; }
.panel.span-12 { grid-column: span 12; }

.panel img,
.manga-panel img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.panel-content {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.panel-label {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.25rem 0.65rem;
  background: var(--ink);
  color: var(--paper-soft);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.panel.dark .panel-label {
  background: var(--red);
  color: #fff;
}

.panel h2,
.panel h3,
.manga-panel h2,
.manga-panel h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-jp);
  line-height: 1.22;
}

.panel h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.panel h3 {
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
}

.panel p {
  color: inherit;
}

.panel .small {
  font-size: 0.9rem;
  color: rgba(17, 17, 17, 0.72);
}

.panel.dark .small {
  color: var(--muted);
}

/* Comic speech bubbles */

.bubble,
.speech-bubble {
  position: relative;
  display: inline-block;
  max-width: 680px;
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: var(--paper-soft);
  color: var(--ink);
  font-weight: 850;
  line-height: 1.65;
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.18);
}

.bubble::after,
.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 32px;
  width: 26px;
  height: 26px;
  background: var(--paper-soft);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(45deg);
}

.bubble.red {
  background: var(--red);
  color: #fff;
  border-color: #fff;
}

.bubble.red::after {
  background: var(--red);
  border-color: #fff;
}

.bubble.small {
  font-size: 0.9rem;
  max-width: 420px;
}

/* Manga impact text */

.impact {
  font-family: var(--font-jp);
  font-size: clamp(2.4rem, 8vw, 7rem);
  line-height: 0.95;
  font-weight: 1000;
  letter-spacing: -0.05em;
  color: var(--paper-soft);
  text-shadow:
    4px 4px 0 var(--red),
    8px 8px 0 rgba(0, 0, 0, 0.7);
  transform: rotate(-2deg);
}

.impact.dark {
  color: var(--ink);
  text-shadow:
    4px 4px 0 var(--yellow),
    8px 8px 0 rgba(230, 50, 50, 0.72);
}

/* =========================================================
   Story / Character Cards
   ========================================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}

.card,
.character-card,
.episode-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.card:hover,
.character-card:hover,
.episode-card:hover {
  border-color: rgba(255, 212, 71, 0.55);
}

.card-image,
.character-image,
.episode-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.card-image img,
.character-image img,
.episode-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.card:hover img,
.character-card:hover img,
.episode-card:hover img {
  transform: scale(1.04);
}

.card-body,
.character-body,
.episode-body {
  padding: clamp(1.1rem, 2vw, 1.55rem);
}

.card h3,
.character-card h3,
.episode-card h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-jp);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.25;
}

.card p,
.character-card p,
.episode-card p {
  color: var(--muted);
}

.card-meta,
.episode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.section-paper .card,
.section-paper .character-card,
.section-paper .episode-card {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--ink);
}

.section-paper .card p,
.section-paper .character-card p,
.section-paper .episode-card p {
  color: var(--muted-dark);
}

.section-paper .pill,
.section-paper .tag {
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--red-dark);
}

/* =========================================================
   Comedy Feature Blocks
   ========================================================= */

.comedy-strip {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1.3rem, 4vw, 3rem);
  align-items: center;
}

.comedy-strip.reverse {
  grid-template-columns: 1.05fr 0.95fr;
}

.comedy-copy {
  position: relative;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 3px solid var(--paper-soft);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.46);
  box-shadow: var(--shadow);
}

.comedy-copy::before {
  content: "COMEDY";
  position: absolute;
  top: -16px;
  left: 24px;
  padding: 0.2rem 0.72rem;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 950;
  font-size: 0.75rem;
}

.comedy-copy h2,
.comedy-copy h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-jp);
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.18;
}

.comedy-copy p {
  color: rgba(255, 250, 240, 0.88);
}

.comedy-image {
  overflow: hidden;
  border: 4px solid var(--paper-soft);
  border-radius: 9px;
  background: #000;
  box-shadow: 12px 14px 0 var(--red);
}

.comedy-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* =========================================================
   Episode Pages / Article
   ========================================================= */

.article-hero {
  padding: clamp(70px, 10vw, 130px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}

.article-header {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
}

.article-header h1 {
  margin: 0;
  font-family: var(--font-jp);
  font-size: clamp(2.3rem, 6vw, 5.8rem);
  line-height: 1.06;
  color: var(--paper-soft);
}

.article-header .subtitle {
  margin: 1rem auto 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.article-image {
  width: min(1100px, calc(100% - 40px));
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  overflow: hidden;
  border: 4px solid var(--paper-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.article-image img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.article-body {
  width: min(850px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(46px, 8vw, 90px) 0;
  font-family: var(--font-jp);
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  line-height: 2.15;
}

.article-body h2 {
  margin: 2.8rem 0 1rem;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.28;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 6px solid var(--red);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper-soft);
  font-size: 1.16em;
}

.article-body .note {
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.065);
}

/* =========================================================
   Gallery
   ========================================================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.1rem);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--paper-soft);
  border-radius: 8px;
  background: #000;
  box-shadow: 7px 8px 0 rgba(230, 50, 50, 0.8);
  cursor: pointer;
}

.gallery-item a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 400ms ease, opacity 400ms ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
  opacity: 0.82;
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 0.8rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 850;
}

/* Lightbox-friendly classes */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 30px;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox.active {
  display: grid;
}

.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 82vh;
  border: 4px solid var(--paper-soft);
  border-radius: 10px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  z-index: 1001;
  border: 2px solid var(--paper-soft);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: var(--paper-soft);
  font-weight: 950;
  cursor: pointer;
}

.lightbox-close {
  top: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translateY(-50%);
}

.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }

/* =========================================================
   Tables / Lists
   ========================================================= */

.feature-list {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
}

.feature-list li::before {
  content: "★";
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--yellow);
}

.section-paper .feature-list li {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.7);
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
}

.simple-table th,
.simple-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.simple-table th {
  color: var(--yellow);
  font-weight: 950;
}

/* =========================================================
   Forms
   ========================================================= */

.form-card {
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

label {
  display: block;
  margin: 0 0 0.38rem;
  color: var(--paper-soft);
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--paper-soft);
  font: inherit;
}

textarea {
  min-height: 170px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(255, 212, 71, 0.34);
  border-color: var(--yellow);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  background: #030304;
  color: var(--muted);
}

.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
}

.footer-brand {
  color: var(--paper-soft);
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--yellow);
}

/* =========================================================
   Utility Classes
   ========================================================= */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }

.red-text { color: var(--red); }
.yellow-text { color: var(--yellow); }
.muted { color: var(--muted); }

.border-top {
  border-top: 1px solid var(--line);
}

.border-bottom {
  border-bottom: 1px solid var(--line);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1000px) {
  .header-inner {
    min-height: auto;
    padding: 0.8rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav,
  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .comedy-strip,
  .comedy-strip.reverse {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel.span-4,
  .panel.span-5,
  .panel.span-6,
  .panel.span-7,
  .panel.span-8 {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .wrap,
  .container,
  .narrow,
  .hero-inner,
  .article-header,
  .article-body,
  .article-image,
  .footer-inner {
    width: min(100% - 28px, var(--max));
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .nav a,
  .site-nav a {
    min-height: 36px;
    padding: 0.42rem 0.68rem;
    font-size: 0.82rem;
  }

  .hero h1 {
    letter-spacing: -0.06em;
  }

  .hero.with-image {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.82)),
      var(--hero-image, none) center / cover no-repeat;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button,
  .btn {
    width: 100%;
  }

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

  .manga-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .panel.span-4,
  .panel.span-5,
  .panel.span-6,
  .panel.span-7,
  .panel.span-8,
  .panel.span-12 {
    grid-column: 1;
  }

  .panel,
  .manga-panel {
    min-height: auto;
    box-shadow: 6px 7px 0 rgba(230, 50, 50, 0.9);
  }

  .panel img,
  .manga-panel img {
    min-height: 240px;
  }

  .comedy-image {
    box-shadow: 7px 8px 0 var(--red);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
  }

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* =====================================================
   GLOBAL READABLE QUOTE / MANGA SPEECH CARD FIX
   Use for important Japanese quote lines over image-heavy sections
   ===================================================== */

.quote,
blockquote,
.manga-quote,
.story-quote,
.episode-quote,
.feature-quote {
  position: relative;
  display: inline-block;
  max-width: min(760px, 100%);
  margin: 1.35rem 0;
  padding: 1rem 1.25rem;
  color: #111;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,248,238,0.96));
  border: 3px solid #111;
  border-left: 10px solid #d51f1f;
  border-radius: 18px;
  box-shadow:
    0 18px 45px rgba(0,0,0,0.35),
    0 0 0 4px rgba(255,255,255,0.55);
  font-weight: 900;
  line-height: 1.8;
  letter-spacing: 0.02em;
  text-shadow: none !important;
  z-index: 5;
}

.quote p,
blockquote p,
.manga-quote p,
.story-quote p,
.episode-quote p,
.feature-quote p {
  margin: 0;
  color: #111 !important;
}

.quote::before,
blockquote::before,
.manga-quote::before,
.story-quote::before,
.episode-quote::before,
.feature-quote::before {
  content: "“";
  position: absolute;
  top: -0.55rem;
  left: 0.65rem;
  color: #d51f1f;
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 900;
}

.quote::after,
blockquote::after,
.manga-quote::after,
.story-quote::after,
.episode-quote::after,
.feature-quote::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 42px;
  width: 28px;
  height: 28px;
  background: inherit;
  border-right: 3px solid #111;
  border-bottom: 3px solid #111;
  transform: rotate(45deg);
}

/* =====================================================
   EPISODE LIST READABILITY SURGERY
   Keeps episode titles readable without mouse-over.
   ===================================================== */

.episode-list-polish,
.feature-list.episode-list-polish {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: grid;
  gap: 1rem;
}

.episode-list-polish li {
  position: relative;
  padding: 1.05rem 1.1rem 1.05rem 1.25rem;
  border: 2px solid rgba(17,17,17,0.82);
  border-left: 10px solid #d71920;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,248,238,0.96));
  box-shadow:
    0 14px 34px rgba(0,0,0,0.20),
    0 0 0 4px rgba(255,255,255,0.60);
  color: #111 !important;
}

.episode-list-polish li::before {
  display: none !important;
}

.episode-list-polish strong,
.episode-list-polish a,
.episode-list-polish li a {
  color: #111 !important;
  text-decoration: none !important;
  font-weight: 950;
  text-shadow: none !important;
}

.episode-list-polish a:hover,
.episode-list-polish li:hover a {
  color: #d71920 !important;
  text-decoration: underline !important;
  text-underline-offset: 0.2em;
}

.episode-list-polish li br + text,
.episode-list-polish li {
  line-height: 1.8;
}

.episode-list-polish li {
  font-weight: 700;
}

.episode-list-polish strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: 0.02em;
}

/* =====================================================
   DR. CHATGPT QUOTE CARD READABILITY OVERRIDE
   Put this AFTER episode-list-polish rules.
   Fixes:
   「これは金融システムではありません」
   「地球では言えなかったけど、宇宙なら言えると思ったの」
   ===================================================== */

.manga-quote,
.story-quote,
.home-quote,
.panel .manga-quote,
.panel .story-quote,
.panel .home-quote,
.panel.dark .manga-quote,
.panel.dark .story-quote,
.panel.dark .home-quote,
.section-dark .manga-quote,
.section-dark .story-quote,
.section-dark .home-quote,
.section-paper .manga-quote,
.section-paper .story-quote,
.section-paper .home-quote {
  position: relative !important;
  display: inline-block !important;
  max-width: min(760px, 100%) !important;
  margin: 1.35rem 0 !important;
  padding: 1rem 1.25rem 1.05rem !important;

  color: #101010 !important;
  background:
    radial-gradient(circle at top left, #ffffff 0%, #fff8ee 100%) !important;

  border: 3px solid #101010 !important;
  border-left: 12px solid #d71920 !important;
  border-radius: 18px !important;

  box-shadow:
    0 22px 55px rgba(0,0,0,0.42),
    0 0 0 5px rgba(255,255,255,0.72) !important;

  font-weight: 950 !important;
  line-height: 1.75 !important;
  letter-spacing: 0.02em !important;
  text-shadow: none !important;
  text-decoration: none !important;
  z-index: 20 !important;
  isolation: isolate !important;
}

.manga-quote *,
.story-quote *,
.home-quote *,
.panel .manga-quote *,
.panel .story-quote *,
.panel .home-quote *,
.panel.dark .manga-quote *,
.panel.dark .story-quote *,
.panel.dark .home-quote * {
  color: #101010 !important;
  text-shadow: none !important;
  text-decoration: none !important;
}

.manga-quote::before,
.story-quote::before,
.home-quote::before {
  content: "“" !important;
  position: absolute !important;
  top: -0.72rem !important;
  left: 0.75rem !important;
  color: #d71920 !important;
  font-size: 2.8rem !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  text-shadow: none !important;
}

.manga-quote::after,
.story-quote::after,
.home-quote::after {
  content: "" !important;
  position: absolute !important;
  bottom: -18px !important;
  left: 42px !important;
  width: 28px !important;
  height: 28px !important;
  background: #fff8ee !important;
  border-right: 3px solid #101010 !important;
  border-bottom: 3px solid #101010 !important;
  transform: rotate(45deg) !important;
  z-index: -1 !important;
}

/* Keep quote cards from inheriting bad link/list/panel hover behavior */
.manga-quote:hover,
.story-quote:hover,
.home-quote:hover,
.panel:hover .manga-quote,
.panel:hover .story-quote,
.panel:hover .home-quote {
  color: #101010 !important;
  background:
    radial-gradient(circle at top left, #ffffff 0%, #fff8ee 100%) !important;
  text-shadow: none !important;
}

/* =====================================================
   DR. CHATGPT SITEWIDE SPEECH / QUOTE READABILITY FIX
   Put this at the VERY BOTTOM of site.css.
   Fixes unreadable quote bubbles across all pages.
   ===================================================== */

/* Main quote/bubble classes used throughout Spaceman.co.jp */
.bubble,
.speech-bubble,
.manga-quote,
.story-quote,
.home-quote,
blockquote,
.panel .bubble,
.panel .speech-bubble,
.panel .manga-quote,
.panel .story-quote,
.panel .home-quote,
.panel blockquote,
.panel.dark .bubble,
.panel.dark .speech-bubble,
.panel.dark .manga-quote,
.panel.dark .story-quote,
.panel.dark .home-quote,
.panel.dark blockquote,
.section-dark .bubble,
.section-dark .speech-bubble,
.section-dark .manga-quote,
.section-dark .story-quote,
.section-dark .home-quote,
.section-dark blockquote,
.section-paper .bubble,
.section-paper .speech-bubble,
.section-paper .manga-quote,
.section-paper .story-quote,
.section-paper .home-quote,
.section-paper blockquote,
.article-body blockquote,
.comedy-copy .bubble,
.comedy-copy .speech-bubble,
.comedy-copy .manga-quote,
.comedy-copy .story-quote,
.comedy-copy .home-quote {
  position: relative !important;
  display: inline-block !important;
  max-width: min(780px, 100%) !important;
  margin: 1.15rem 0 !important;
  padding: 1rem 1.2rem 1.05rem !important;

  color: #101010 !important;
  background:
    radial-gradient(circle at top left, #ffffff 0%, #fff8ee 100%) !important;

  border: 3px solid #101010 !important;
  border-left: 12px solid #d71920 !important;
  border-radius: 18px !important;

  box-shadow:
    0 22px 55px rgba(0,0,0,0.42),
    0 0 0 5px rgba(255,255,255,0.72) !important;

  font-family: inherit !important;
  font-weight: 950 !important;
  line-height: 1.75 !important;
  letter-spacing: 0.02em !important;
  text-shadow: none !important;
  text-decoration: none !important;
  z-index: 30 !important;
  isolation: isolate !important;
}

/* Force all children inside bubbles/quotes to stay dark and readable */
.bubble *,
.speech-bubble *,
.manga-quote *,
.story-quote *,
.home-quote *,
blockquote *,
.article-body blockquote *,
.panel .bubble *,
.panel .speech-bubble *,
.panel .manga-quote *,
.panel .story-quote *,
.panel .home-quote *,
.panel blockquote *,
.panel.dark .bubble *,
.panel.dark .speech-bubble *,
.panel.dark .manga-quote *,
.panel.dark .story-quote *,
.panel.dark .home-quote *,
.panel.dark blockquote * {
  color: #101010 !important;
  text-shadow: none !important;
  text-decoration: none !important;
}

/* Keep normal paragraph text inside quote cards readable */
.bubble p,
.speech-bubble p,
.manga-quote p,
.story-quote p,
.home-quote p,
blockquote p {
  margin: 0 !important;
  color: #101010 !important;
}

/* Red quote mark for story/quote blocks */
.manga-quote::before,
.story-quote::before,
.home-quote::before,
blockquote::before {
  content: "“" !important;
  position: absolute !important;
  top: -0.72rem !important;
  left: 0.75rem !important;
  color: #d71920 !important;
  font-size: 2.8rem !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  text-shadow: none !important;
}

/* Speech-tail for all bubble styles */
.bubble::after,
.speech-bubble::after,
.manga-quote::after,
.story-quote::after,
.home-quote::after,
blockquote::after {
  content: "" !important;
  position: absolute !important;
  bottom: -18px !important;
  left: 42px !important;
  width: 28px !important;
  height: 28px !important;
  background: #fff8ee !important;
  border-right: 3px solid #101010 !important;
  border-bottom: 3px solid #101010 !important;
  transform: rotate(45deg) !important;
  z-index: -1 !important;
}

/* Red bubble variant must still be readable, not red-on-dark */
.bubble.red,
.speech-bubble.red,
.manga-quote.red,
.story-quote.red,
.home-quote.red,
.panel .bubble.red,
.panel.dark .bubble.red,
.section-dark .bubble.red {
  color: #101010 !important;
  background:
    radial-gradient(circle at top left, #ffffff 0%, #fff8ee 100%) !important;
  border-color: #101010 !important;
  border-left-color: #d71920 !important;
  text-shadow: none !important;
}

/* Prevent hover states from turning quote text light/invisible */
.bubble:hover,
.speech-bubble:hover,
.manga-quote:hover,
.story-quote:hover,
.home-quote:hover,
blockquote:hover,
.panel:hover .bubble,
.panel:hover .speech-bubble,
.panel:hover .manga-quote,
.panel:hover .story-quote,
.panel:hover .home-quote,
.panel:hover blockquote,
.card:hover .bubble,
.card:hover .speech-bubble,
.card:hover .manga-quote,
.card:hover .story-quote,
.card:hover .home-quote,
.card:hover blockquote {
  color: #101010 !important;
  background:
    radial-gradient(circle at top left, #ffffff 0%, #fff8ee 100%) !important;
  text-shadow: none !important;
}

/* Links inside bubbles should not inherit white/yellow hover behavior */
.bubble a,
.speech-bubble a,
.manga-quote a,
.story-quote a,
.home-quote a,
blockquote a {
  color: #101010 !important;
  font-weight: 950 !important;
  text-decoration: underline !important;
  text-underline-offset: 0.18em !important;
}

.bubble a:hover,
.speech-bubble a:hover,
.manga-quote a:hover,
.story-quote a:hover,
.home-quote a:hover,
blockquote a:hover {
  color: #d71920 !important;
}

/* Mobile: keep quote cards compact but readable */
@media (max-width: 720px) {
  .bubble,
  .speech-bubble,
  .manga-quote,
  .story-quote,
  .home-quote,
  blockquote {
    display: block !important;
    width: 100% !important;
    padding: 0.95rem 1rem 1rem !important;
    font-size: 0.98rem !important;
    line-height: 1.7 !important;
  }
}
