
:root {
  color-scheme: light;
  --theme-primary: #151217;
  --theme-secondary: #d4a72c;
  --theme-accent: #fff3c4;
  --theme-paper: #fffaf0;
  --theme-panel: #ffffff;
  --theme-text: #1f1a12;
  --theme-muted: #756b5e;
  --ink: var(--theme-text);
  --muted: var(--theme-muted);
  --line: #eadfca;
  --paper: var(--theme-paper);
  --panel: var(--theme-panel);
  --accent: var(--theme-secondary);
  --accent-dark: var(--theme-primary);
  --mint: #0f766e;
  --gold: var(--theme-secondary);
  --warm: #c2410c;
  --black: var(--theme-primary);
  --shadow: 0 18px 44px rgba(21, 18, 23, 0.13);
  --font-sans:
    "Zen Kaku Gothic New",
    "BIZ UDPGothic",
    "Yu Gothic UI",
    "Yu Gothic",
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Noto Sans JP",
    "Noto Sans CJK JP",
    "Meiryo",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  --font-display:
    "Shippori Mincho B1",
    "Zen Kaku Gothic New",
    "Yu Mincho",
    "Hiragino Mincho ProN",
    "Noto Serif JP",
    "Yu Gothic",
    serif;
  font-family:
    var(--font-sans);
  font-feature-settings: "palt" 1;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--theme-secondary) 13%, transparent) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 18, 23, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, var(--theme-paper) 0%, #fffdf8 48%, var(--theme-accent) 100%);
  background-size: 28px 28px, 28px 28px, auto;
}

a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero,
.character-hero {
  padding: 56px 0 40px;
}

.character-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--theme-secondary) 24%, transparent), transparent 34%),
    linear-gradient(135deg, var(--theme-accent) 0%, #ffffff 64%, color-mix(in srgb, var(--theme-secondary) 18%, #ffffff) 100%);
  border-bottom: 1px solid #dcc58d;
}

.character-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--theme-primary) 0 28px, var(--theme-secondary) 28px 56px);
}

.character-hero .shell {
  position: relative;
  border-left: 8px solid var(--theme-primary);
  border-radius: 8px;
  padding: 22px 24px 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(21, 18, 23, 0.12);
}

.brand-banner-shell {
  position: relative;
  width: min(1800px, calc(100% - 48px));
  margin: 0 auto 22px;
}

.brand-banner {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center;
  border: 1px solid color-mix(in srgb, var(--theme-secondary) 62%, #000000);
  border-radius: 8px;
  background: var(--theme-primary);
  box-shadow: 0 18px 46px rgba(21, 18, 23, 0.24);
}

.eyebrow,
.status {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 6vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
  color: var(--theme-primary);
  text-shadow: 0 3px 0 color-mix(in srgb, var(--theme-secondary) 28%, transparent);
}

.hero h1 {
  max-width: 1040px;
  font-size: clamp(2.6rem, 5.1vw, 4rem);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: keep-all;
  line-break: strict;
  text-wrap: balance;
}

.guideline-hero h1 {
  max-width: 1120px;
  font-size: clamp(2.15rem, 4.7vw, 4.2rem);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: balance;
}

h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.section-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.section-title small {
  color: var(--theme-muted);
  font-family: var(--font-sans);
  font-size: 0.8em;
  font-weight: 800;
}

.section-title small::before {
  content: "/ ";
  color: var(--theme-secondary);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.lead,
.catchphrase {
  max-width: 780px;
  color: var(--theme-muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.catchphrase {
  color: var(--theme-primary);
  font-weight: 800;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-facts span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid #e8d29b;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(138, 100, 18, 0.12);
  color: var(--ink);
  font-size: 0.92rem;
  white-space: nowrap;
}

.hero-facts strong {
  color: var(--accent-dark);
  font-size: 0.78rem;
}

.page-menu {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--theme-paper) 88%, #ffffff);
  backdrop-filter: blur(12px);
}

.page-menu-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.page-menu-label {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--theme-primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.page-menu-scroll {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-menu-scroll::-webkit-scrollbar {
  display: none;
}

.page-menu a {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8d29b;
  border-radius: 999px;
  padding: 7px 12px;
  background: #ffffff;
  color: var(--theme-primary);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(21, 18, 23, 0.06);
}

.page-menu a:hover,
.page-menu a:focus-visible,
.page-menu a.is-active,
.page-menu a[aria-current="true"] {
  border-color: var(--theme-secondary);
  background: var(--theme-primary);
  color: #ffffff;
}

.page-menu a.is-active,
.page-menu a[aria-current="true"] {
  box-shadow: 0 10px 20px rgba(21, 18, 23, 0.18);
}

.section {
  padding: 24px 0 56px;
}

.character-grid,
.content-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.character-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.character-card {
  overflow: hidden;
}

.character-card-media {
  display: block;
  margin: -22px -22px 18px;
  color: inherit;
  text-decoration: none;
}

.character-card-media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center;
  background: var(--theme-primary);
  border-bottom: 1px solid var(--line);
}

.character-card-media:hover img,
.character-card-media:focus-visible img {
  filter: saturate(1.08) brightness(1.02);
}

.panel {
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary));
}

.character-card p,
.panel p {
  color: var(--muted);
  line-height: 1.7;
}

.wide {
  grid-column: 1 / -1;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8d29b;
  border-radius: 999px;
  padding: 7px 13px;
  background: #fff7df;
  text-decoration: none;
  white-space: nowrap;
}

.official-video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.official-video-frame {
  justify-self: center;
  overflow: hidden;
  width: min(100%, 420px);
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000000;
  box-shadow: 0 18px 42px rgba(21, 18, 23, 0.12);
}

.official-video-frame[data-video-orientation="landscape"] {
  width: min(100%, 680px);
  aspect-ratio: 16 / 9;
}

.music-video-frame,
.music-video-frame[data-video-orientation="landscape"],
.music-video-frame[data-video-orientation="portrait"] {
  width: min(100%, 680px);
  aspect-ratio: var(--video-aspect-ratio, 16 / 9);
}

.official-video-frame video,
.official-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.official-video-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-paper) 68%, #ffffff);
}

.official-video-title {
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-weight: 800;
}

.music-track-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.music-track-card img {
  display: block;
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--theme-paper);
}

.music-track-card p {
  margin: 0;
}

.music-track-card .official-video-title {
  margin-bottom: 4px;
}

.official-video-toggle {
  display: inline-flex;
  width: fit-content;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff7df;
}

.official-video-toggle button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: transparent;
  color: var(--theme-muted);
  font: 900 0.86rem/1.2 "Zen Kaku Gothic New", sans-serif;
  cursor: pointer;
}

.official-video-toggle button[aria-pressed="true"] {
  background: var(--theme-primary);
  color: #ffffff;
}

.official-video-toggle span {
  min-width: 1.6em;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.22);
}

.official-video-actions {
  margin-top: 0;
}

.official-video-actions button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid #e8d29b;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--theme-primary);
  color: #ffffff;
  font: 900 0.9rem/1.2 "Zen Kaku Gothic New", sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(21, 18, 23, 0.08);
}

.official-video-actions button:hover,
.official-video-actions button:focus-visible {
  background: var(--theme-secondary);
  color: #ffffff;
}

.source-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 22px 0 8px;
  border: 1px solid color-mix(in srgb, var(--theme-secondary) 34%, var(--line));
  border-radius: 8px;
  padding: 18px;
  background: color-mix(in srgb, var(--theme-accent) 34%, #ffffff);
  box-shadow: 0 14px 30px rgba(21, 18, 23, 0.08);
}

.source-callout.panel {
  margin: 0;
}

.source-callout .eyebrow,
.source-callout h2,
.source-callout p {
  margin: 0;
}

.source-callout h2 {
  margin-top: 4px;
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.source-callout p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.source-links a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--theme-primary);
  border-radius: 999px;
  padding: 7px 13px 7px 9px;
  background: var(--theme-primary);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
}

.source-links .link-icon {
  grid-row: auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
}

.source-links .link-icon svg {
  width: 16px;
  height: 16px;
}

.source-links a:hover,
.source-links a:focus-visible {
  border-color: var(--theme-secondary);
  background: var(--theme-secondary);
  color: var(--theme-primary);
}

.official-links {
  background:
    linear-gradient(135deg, var(--theme-primary) 0%, color-mix(in srgb, var(--theme-primary) 76%, var(--theme-secondary)) 58%, color-mix(in srgb, var(--theme-primary) 48%, var(--theme-secondary)) 100%);
  color: #ffffff;
  border-color: #2a1824;
}

.official-links h2 {
  margin-bottom: 16px;
}

.official-links h3 {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.88);
}

.official-links .eyebrow {
  color: #fbbf24;
}

.link-group + .link-group {
  margin-top: 22px;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  justify-content: center;
  gap: 12px;
}

.link-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 4px;
  min-height: 76px;
  align-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
}

.link-icon {
  display: inline-grid;
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.link-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-icon img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.link-icon-image {
  background: transparent;
}

.link-icon-youtube {
  background: #dc2626;
}

.link-icon-instagram {
  background: #c13584;
}

.link-icon-tiktok {
  background: #111827;
}

.link-icon-discord {
  background: #5865f2;
}

.link-icon-googleDrive {
  background: #1a73e8;
}

.link-icon-github {
  background: #24292f;
}

.link-icon-json {
  background: #7c3aed;
}

.link-icon-x {
  background: #000000;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: #f6d36b;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.link-card span {
  font-size: 1.05rem;
  font-weight: 800;
}

.link-card small {
  color: rgba(255, 255, 255, 0.72);
  overflow-wrap: anywhere;
}

.link-card em {
  grid-column: 2;
  color: #f8dda0;
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 800;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  gap: 16px;
}

.visual-base {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.visual-base .visual-link {
  width: min(100%, 920px);
  margin: 0 auto;
}

.visual-base .visual-link img {
  height: auto;
}

.visual-archive {
  border: 1px solid color-mix(in srgb, var(--theme-secondary) 32%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-accent) 38%, #ffffff);
  overflow: hidden;
}

.visual-archive-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--theme-primary);
  font-weight: 900;
}

.visual-archive-header small {
  color: var(--theme-muted);
  font-weight: 800;
}

.visual-archive .visual-grid {
  padding: 16px;
  border-top: 1px solid color-mix(in srgb, var(--theme-secondary) 28%, var(--line));
  background: #ffffff;
}

.visual-more {
  display: flex;
  width: 100%;
  min-height: 48px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--theme-secondary) 28%, var(--line));
  background: var(--theme-primary);
  color: #ffffff;
  font: inherit;
  font-weight: 900;
}

.visual-more:hover,
.visual-more:focus-visible {
  background: color-mix(in srgb, var(--theme-primary) 84%, var(--theme-secondary));
}

.visual-more span {
  color: #f8dda0;
  font-size: 0.86rem;
}

.visual-card {
  display: grid;
  gap: 10px;
  margin: 0;
}

.visual-link {
  position: relative;
  display: block;
  width: 100%;
  color: #ffffff;
  text-decoration: none;
}

.visual-link img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 25, 35, 0.1);
}

.visual-link span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(21, 18, 23, 0.72);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.visual-link:hover img,
.visual-link:focus-visible img {
  border-color: #f9a8d4;
  box-shadow: 0 18px 38px rgba(138, 100, 18, 0.18);
}

.visual-card figcaption {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.visual-card strong {
  color: var(--ink);
}

.image-modal {
  width: min(96vw, 1180px);
  max-width: 1180px;
  max-height: 94vh;
  border: 1px solid color-mix(in srgb, var(--theme-secondary) 45%, #ffffff);
  border-radius: 8px;
  padding: 0;
  background: #0b0a0d;
  color: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.image-modal::backdrop {
  background: rgba(8, 7, 10, 0.78);
  backdrop-filter: blur(5px);
}

.image-modal-frame {
  display: grid;
  max-height: 94vh;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.image-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(21, 18, 23, 0.96);
}

.image-modal-toolbar strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-modal-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.image-modal-actions [data-modal-count] {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.image-modal-actions a,
.image-modal-actions button {
  display: inline-flex;
  min-height: 34px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.image-modal-actions a:hover,
.image-modal-actions a:focus-visible,
.image-modal-actions button:hover,
.image-modal-actions button:focus-visible {
  border-color: var(--theme-secondary);
  background: var(--theme-secondary);
  color: var(--theme-primary);
}

.image-modal-stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  background: #111014;
}

.image-modal img {
  display: block;
  width: 100%;
  max-height: calc(94vh - 132px);
  object-fit: contain;
  background: #111014;
}

.image-modal-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  width: 44px;
  height: 64px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 7, 10, 0.62);
  color: #ffffff;
  font: inherit;
  font-size: 2.6rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.image-modal-prev {
  left: 14px;
}

.image-modal-next {
  right: 14px;
}

.image-modal-nav:hover,
.image-modal-nav:focus-visible {
  border-color: var(--theme-secondary);
  background: var(--theme-secondary);
  color: var(--theme-primary);
}

.image-modal [data-modal-caption] {
  margin: 0;
  padding: 10px 14px 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.6;
}

.guideline-layout {
  max-width: 980px;
}

.guideline-card p,
.guideline-notice p,
.guideline-section p {
  color: var(--muted);
  line-height: 1.75;
}

.guideline-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.75;
}

.guideline-list li::marker {
  color: var(--theme-secondary);
}

.guideline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.print-button {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--theme-secondary) 54%, var(--line));
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--theme-secondary);
  color: var(--theme-primary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.print-button:hover,
.print-button:focus-visible {
  filter: brightness(1.04);
}

.rights-panel {
  display: grid;
  gap: 14px;
}

.rights-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.rights-list div {
  display: grid;
  grid-template-columns: minmax(112px, 0.28fr) 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.revision-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.75;
}

.revision-list li::marker {
  color: var(--theme-secondary);
}

.revision-list time {
  display: inline-block;
  min-width: 104px;
  color: var(--accent-dark);
  font-weight: 800;
}

.section-note {
  max-width: 760px;
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.75;
}

.back-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid #e8d29b;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.72);
  margin-bottom: 28px;
  text-decoration: none;
}

.content-layout {
  padding: 32px 0 64px;
  scroll-margin-top: 78px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.detail-main,
.detail-stack {
  display: grid;
  align-content: start;
  gap: 18px;
}

.detail-stack {
  grid-template-columns: minmax(0, 1fr);
}

.detail-settings {
  grid-column: 1 / -1;
}

.panel {
  scroll-margin-top: 76px;
}

.profile-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: minmax(132px, 0.4fr) 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--accent-dark);
  font-weight: 700;
  overflow-wrap: normal;
  word-break: keep-all;
}

dd {
  margin: 0;
  font-weight: 800;
}

.profile-color-token {
  display: inline-flex;
  align-items: center;
  gap: 0.38em;
  margin-right: 0.22em;
  white-space: nowrap;
}

.color-swatch {
  display: inline-block;
  width: 1.12em;
  height: 1.12em;
  border: 1px solid rgba(31, 26, 18, 0.22);
  border-radius: 4px;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  vertical-align: -0.16em;
}

.stack {
  display: grid;
  gap: 16px;
}

.timeline {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-group {
  display: grid;
  gap: 14px;
}

.timeline-group + .timeline-group {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed color-mix(in srgb, var(--theme-secondary) 44%, var(--line));
}

.timeline-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.timeline-group-heading h3 {
  margin: 0;
}

.timeline-group-heading p,
.timeline-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.timeline-group-heading span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--theme-secondary) 46%, var(--line));
  border-radius: 999px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--theme-accent) 46%, #ffffff);
  color: var(--theme-primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.timeline li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

time {
  color: var(--mint);
  font-weight: 800;
}

.date-range {
  display: inline-grid;
  gap: 2px;
  justify-items: start;
  line-height: 1.16;
}

.date-range-separator {
  color: var(--theme-secondary);
  font-size: 0.82rem;
}

.hidden-entrances {
  grid-column: 1 / -1;
  min-height: 1.2rem;
  padding: 2px 0;
  font-size: 0.88rem;
  line-height: 1.4;
  user-select: text;
}

.hidden-entrance {
  color: transparent;
  text-decoration: none;
  text-shadow: none;
  user-select: text;
}

.hidden-entrance::selection {
  color: var(--theme-text);
  background: color-mix(in srgb, var(--theme-accent) 75%, #ffffff);
}

.hidden-entrance:focus-visible {
  color: var(--theme-text);
  outline: 2px solid var(--theme-primary);
  outline-offset: 3px;
}

.retro-homepage {
  min-height: 100vh;
  padding: 18px 10px;
  color: #000080;
  background:
    repeating-linear-gradient(45deg, #fff7c2 0 8px, #fffbdf 8px 16px),
    #fff8c8;
  font-family: "MS PGothic", "Osaka", "Hiragino Kaku Gothic ProN", sans-serif;
}

.retro-homepage a {
  color: #0000ee;
  text-decoration: underline;
}

.retro-homepage a:visited {
  color: #551a8b;
}

.retro-shell {
  width: min(760px, calc(100% - 12px));
  margin: 0 auto;
  padding: 8px;
  border: 4px ridge #ff66cc;
  background: #ffffff;
  box-shadow: 8px 8px 0 #99ccff;
}

.retro-marquee {
  overflow: hidden;
  border: 2px inset #cccccc;
  background: #000000;
  color: #00ff00;
  font: 700 0.92rem/1.8 "MS PGothic", monospace;
  white-space: nowrap;
}

.retro-marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: retro-marquee 18s linear infinite;
}

@keyframes retro-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.retro-header {
  margin: 10px 0;
  padding: 12px 8px;
  border: 3px double #000080;
  background:
    linear-gradient(90deg, rgba(255, 153, 204, 0.34), rgba(153, 204, 255, 0.34)),
    #ffffff;
  text-align: center;
}

.retro-subtitle {
  margin: 0 0 6px;
  color: #cc0000;
  font-size: 0.82rem;
  font-weight: 700;
}

.retro-header h1 {
  max-width: none;
  margin: 0 0 10px;
  color: #ff1493;
  font-family: "MS Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 8vw, 3.7rem);
  line-height: 1.1;
  text-shadow: 2px 2px 0 #ffff00, 4px 4px 0 #00ccff;
  word-break: keep-all;
}

.retro-header h1 span {
  display: block;
}

.retro-counter {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
  color: #000000;
  font-size: 0.95rem;
}

.retro-counter-digits {
  display: inline-block;
  padding: 3px 7px;
  border: 3px inset #c0c0c0;
  background: #000000;
  color: #ffcc00;
  font: 700 1.1rem/1 "Courier New", monospace;
  letter-spacing: 0.12em;
}

.retro-kiriban {
  margin: 6px 0 0;
  color: #cc0000;
  font-size: 0.9rem;
  font-weight: 700;
}

.retro-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 10px 0;
  padding: 8px;
  border-top: 2px dashed #ff66cc;
  border-bottom: 2px dashed #66ccff;
  background: #ffffee;
  font-size: 0.92rem;
}

.retro-nav a::before {
  content: "[ ";
  color: #ff1493;
}

.retro-nav a::after {
  content: " ]";
  color: #ff1493;
}

.retro-box {
  margin: 12px 0;
  padding: 10px;
  border: 2px dotted #000080;
  background: #ffffff;
}

.retro-box h2 {
  margin: 0 0 8px;
  color: #ffffff;
  background: #000080;
  font-family: "MS PGothic", sans-serif;
  font-size: 1rem;
  line-height: 1.4;
}

.retro-box p {
  margin: 8px 0;
  color: #222222;
  font-size: 0.96rem;
  line-height: 1.7;
}

.retro-video-frame {
  width: min(100%, 360px);
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 4px ridge #99ccff;
  background: #000000;
}

.retro-video-frame[data-video-orientation="landscape"] {
  width: min(100%, 560px);
  aspect-ratio: 16 / 9;
}

.retro-video-frame video,
.retro-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.retro-video-title {
  word-break: break-word;
}

.retro-video-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.retro-video-toggle button {
  padding: 4px 10px;
  border: 3px outset #c0c0c0;
  border-radius: 0;
  background: #ccffcc;
  color: #000080;
  font: 700 0.92rem/1.3 "MS PGothic", sans-serif;
  cursor: pointer;
}

.retro-video-toggle button[aria-pressed="true"] {
  border-style: inset;
  background: #ffff99;
  color: #cc0000;
}

.retro-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.retro-video-actions button {
  padding: 4px 10px;
  border: 3px outset #c0c0c0;
  border-radius: 0;
  background: #ffffcc;
  color: #000080;
  font: 700 0.92rem/1.3 "MS PGothic", sans-serif;
  cursor: pointer;
}

.retro-video-actions button:active {
  border-style: inset;
}

.retro-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #999999;
  color: #666666;
  font-size: 0.82rem;
  text-align: center;
}

@media (min-width: 1440px) {
  .shell {
    width: min(1440px, calc(100% - 80px));
  }

  .character-hero .shell {
    width: min(1320px, calc(100% - 96px));
  }

  .content-layout:not(.guideline-layout) {
    width: min(1560px, calc(100% - 96px));
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    align-items: start;
    gap: 22px;
  }

  .content-layout:not(.guideline-layout) .wide {
    grid-column: auto;
  }

  .content-layout:not(.guideline-layout) > .source-callout {
    grid-column: 1 / -1;
  }

  .content-layout:not(.guideline-layout) #links,
  .content-layout:not(.guideline-layout) #videos,
  .content-layout:not(.guideline-layout) #settings,
  .content-layout:not(.guideline-layout) #timeline,
  .content-layout:not(.guideline-layout) #rights {
    grid-column: 1 / -1;
  }

  .content-layout:not(.guideline-layout) #visual {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .content-layout:not(.guideline-layout) #fanworks {
    grid-column: 1 / span 6;
  }

  .content-layout:not(.guideline-layout) #prompts {
    grid-column: 7 / -1;
  }

  .content-layout:not(.guideline-layout) #prompts.prompts-solo {
    grid-column: 1 / -1;
  }

  .content-layout:not(.guideline-layout) .detail-layout {
    grid-column: 1 / -1;
    grid-template-columns: minmax(640px, 0.62fr) minmax(420px, 0.38fr);
    gap: 22px;
  }

  .content-layout:not(.guideline-layout) .detail-stack {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .content-layout:not(.guideline-layout) .detail-settings {
    grid-column: 1 / -1;
  }
}

@media print {
  :root {
    color: #111;
    background: #fff;
  }

  body {
    background: #fff;
    color: #111;
  }

  .back-link,
  .brand-banner-shell,
  .guideline-actions,
  .page-menu,
  .source-callout {
    display: none !important;
  }

  .character-hero {
    border: 0;
    padding: 0 0 18px;
    background: #fff;
  }

  .shell,
  .guideline-layout {
    width: 100%;
    max-width: none;
  }

  .content-layout,
  .guideline-layout {
    display: block;
    padding: 0;
  }

  .panel {
    break-inside: avoid;
    box-shadow: none;
    border-color: #d8d8d8;
    margin: 0 0 14px;
  }

  .panel::before {
    background: #d8d8d8;
  }

  .hero-facts span,
  .links a {
    background: #fff;
  }
}

@media (max-width: 980px) {
  .profile-list div,
  .timeline li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(calc(100% - 20px), 520px);
  }

  .hero,
  .character-hero {
    padding: 28px 0 22px;
  }

  .character-hero .shell {
    border-left-width: 5px;
    padding: 16px 14px 18px;
  }

  .brand-banner-shell {
    width: min(calc(100% - 18px), 1120px);
    margin-bottom: 12px;
  }

  .brand-banner {
    aspect-ratio: 3 / 1;
    border-radius: 6px;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 3.6rem);
    line-height: 1.06;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
    word-break: normal;
    line-break: auto;
    text-wrap: pretty;
  }

  .guideline-hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
    line-height: 1.14;
  }

  h2 {
    margin-bottom: 14px;
    font-size: 1.26rem;
  }

  h3 {
    font-size: 1rem;
  }

  .lead,
  .catchphrase {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .hero-facts {
    gap: 8px;
    margin-top: 18px;
  }

  .hero-facts span {
    width: 100%;
    justify-content: space-between;
    border-radius: 8px;
    white-space: normal;
  }

  .page-menu {
    top: 0;
  }

  .page-menu-inner {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    gap: 8px;
  }

  .page-menu-label {
    min-height: 38px;
    padding: 8px 12px;
  }

  .page-menu-scroll {
    flex: 1 1 auto;
  }

  .page-menu a {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 0.88rem;
  }

  .back-link {
    margin-bottom: 18px;
  }

  .character-grid,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .content-layout {
    gap: 12px;
    padding: 14px 0 44px;
  }

  .character-card,
  .panel {
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.09);
  }

  .character-card-media {
    margin: -16px -16px 14px;
  }

  .official-links {
    margin-left: -4px;
    margin-right: -4px;
    padding: 18px 14px;
  }

  .official-links h2 {
    margin-bottom: 12px;
  }

  .official-video-layout {
    grid-template-columns: 1fr;
  }

  .official-video-meta {
    padding: 14px;
  }

  .official-video-actions button {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .link-group + .link-group {
    margin-top: 16px;
  }

  .links a {
    width: 100%;
    min-height: 42px;
  }

  .source-callout {
    grid-template-columns: 1fr;
    margin-top: 16px;
    padding: 16px;
  }

  .source-links {
    justify-content: stretch;
  }

  .source-links a {
    width: 100%;
  }

  .link-list {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .link-card {
    min-height: 64px;
    padding: 12px;
  }

  .link-icon {
    width: 34px;
    height: 34px;
  }

  .link-icon svg {
    width: 21px;
    height: 21px;
  }

  .visual-references {
    padding-left: 0;
    padding-right: 0;
  }

  .visual-references .eyebrow,
  .visual-references h2,
  .visual-card figcaption {
    padding-left: 16px;
    padding-right: 16px;
  }

  .visual-card {
    gap: 10px;
  }

  .visual-base {
    margin-bottom: 12px;
  }

  .visual-base .visual-card figcaption {
    padding-left: 16px;
    padding-right: 16px;
  }

  .visual-archive {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .visual-archive-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .visual-archive .visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }

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

  .visual-link {
    width: 100%;
  }

  .visual-link img {
    height: min(68vh, 380px);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    object-fit: contain;
  }

  .visual-link span {
    right: 10px;
    bottom: 10px;
  }

  .visual-archive .visual-link img {
    height: clamp(140px, 34vw, 190px);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .visual-archive .visual-card figcaption {
    padding-left: 0;
    padding-right: 0;
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .image-modal {
    width: 96vw;
    max-height: 92vh;
  }

  .image-modal-frame {
    max-height: 92vh;
  }

  .image-modal-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .image-modal-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .image-modal-actions [data-modal-count] {
    width: 100%;
    text-align: center;
  }

  .image-modal-actions a,
  .image-modal-actions button {
    flex: 1 1 0;
    min-width: 0;
    padding-right: 10px;
    padding-left: 10px;
  }

  .image-modal img {
    max-height: calc(92vh - 174px);
  }

  .image-modal-nav {
    width: 38px;
    height: 54px;
    font-size: 2.1rem;
  }

  .image-modal-prev {
    left: 8px;
  }

  .image-modal-next {
    right: 8px;
  }

  .timeline {
    gap: 12px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .date-range {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
  }
}
