/* ===== ベース設定 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: "Courier New", "MS Gothic", monospace;
  line-height: 1.6;
  word-break: break-word;
  -webkit-text-size-adjust: 100%;
  background-color: #000;
  color: #fff;
}

body {
  padding: 1rem;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== ヘッダー / フッター（背景色はつけない） ===== */
header, footer {
  text-align: center;
  padding: 1rem 0;
  color: #fff;
}

/* ===== メインコンテンツ ===== */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

/* ===== 見出し ===== */
h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* ===== テキスト ===== */
p {
  font-size: 1rem;
  text-indent: 1em;
  margin-bottom: 1rem;
}

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

dl {
  margin-bottom: 1rem;
}

dt {
  font-weight: bold;
  margin-top: 0.5rem;
}

dd {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}
/* ===== リンク ===== */
a {
  color: #4eaaff;               /* 青色文字 */
  text-decoration: underline;   /* 下線あり */
}
a:hover {
  color: #82cfff;
}

/* ===== 画像 / メディア ===== */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== 表（document.html用など）===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  color: #fff;
}
th, td {
  border: 1px solid #444;
  padding: 0.5rem;
  text-align: left;
}
th {
  background-color: #111;
}

/* ===== レスポンシブ対応（モバイル向け） ===== */
@media screen and (max-width: 600px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  p, li, td, th {
    font-size: 0.95rem;
  }

  body {
    padding: 0.5rem;
  }

  main {
    padding: 0.5rem;
  }
}


/* ===== ===== */
table.profile-table {
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

header h1 a {
  color: inherit;             /* 親要素の色を引き継ぐ（＝白） */
  text-decoration: none;     /* 下線を消す（必要に応じて） */
}

details.char-details1 summary {
  /* font-size: 1.25rem;     h3 相当 */
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;             /* テキストと矢印の間隔 */
}

details.char-details1 summary::after {
  content: "▶";
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

details.char-details1[open] summary::after {
  content: "▼";
}

details.char-details2 summary {
  font-size: 1.25rem;     /* h3 相当 */
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;             /* テキストと矢印の間隔 */
}

details.char-details2 summary::after {
  content: "▷";
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

details.char-details2[open] summary::after {
  content: "▽";
}

/* enemy-profile.h2, enemy-profile.h3 {
  border-bottom: 1px solid #fff;
  padding-bottom: 0.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

enemy-profile.dl {
  margin-left: 1rem;
}

enemy-profile.dt {
  font-weight: bold;
  margin-top: 1rem;
}

enemy-profile.dd {
  margin-left: 1rem;
  white-space: pre-wrap;
} */

/*きゃた紹介欄*/
.wide-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.char-side-image {
  width: 240px;
  height: auto;
  object-fit: cover;
  border: 2px solid white;
  border-radius: 8px;
  flex-shrink: 0;
}

.char-text {
  flex: 1;
  min-width: 200px;
}

.tags {
  margin-bottom: 0.5em;
}
.tag {
  display: inline-block;
  background: #fff;
  color: #000;
  border: 1px solid #aaa;
  padding: 2px 6px;
  font-size: 0.85em;
  border-radius: 4px;
  margin-right: 0.3em;
}

/* スマホなど画面幅600px以下で縦並びに切り替え */
@media screen and (max-width: 600px) {
  .wide-layout {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .char-side-image {
    width: 100%;
    max-width: 300px;
  }

  .char-text {
    width: 100%;
  }
}


    /* 必要なCSSをページ内にも記述 */
    .enemy-intro {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 1.5rem;
      margin-bottom: 2rem;
    }

    .intro-image img {
      width: 200px;
      height: auto;
      border: 2px solid white;
      border-radius: 8px;
    }

    .intro-text {
      flex: 1;
      min-width: 250px;
    }

    .tags {
      margin-top: 0.5em;
      margin-bottom: 1em;
    }

    .tag {
      display: inline-block;
      background: #fff;
      color: #000;
      border: 1px solid #aaa;
      padding: 2px 6px;
      font-size: 0.85em;
      border-radius: 4px;
      margin-right: 0.3em;
    }

    .enemy-profile .section {
      margin-bottom: 1.5rem;
    }

    .enemy-profile h4 {
      border-bottom: 1px solid #ccc;
      padding-bottom: 0.3rem;
      margin-bottom: 0.5rem;
      font-size: 1.1rem;
    }

    @media (max-width: 600px) {
      .enemy-intro {
        flex-direction: column;
        align-items: center;
        text-align: left;
      }

      .intro-image img {
        width: 80%;
        max-width: 300px;
      }
    }



  /*敵の攻撃ページ*/
  .attack-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1.5rem auto;
    padding-bottom: 1rem;
  }

  .character-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  }

  .episode-result {
  border: 1px solid #ccc;       /* 薄いグレーの枠線 */
  padding: 0.5rem 0.5rem;         /* 内側余白 */
  margin-top: 2rem;             /* 上側マージンで前の要素と離す */

}

.episode-result .character-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.character-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border: 1px solid #aaa;
}

.indent {
  display: inline-block;
  width: 1em; /* または 2em で全角字下げ */
}


main .episode-text p {
  text-indent: 0;
}



/*ゲージ系*/
.status-label {
  font-weight: bold;
  font-family: monospace;
  margin-top: 1em;
  margin-bottom: 0.25em;
}

/* ステータスバー全体 */
.status-bar {
  width: 200px;
  height: 16px;
  background-color: black; /* 最大値を表す黒背景 */
  border: 2px solid #666;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

/* 減少部分の赤 */
.hp-loss, .spirit-loss {
  position: absolute;
  top: 0;
  height: 100%;
  background-color: #d00; /* 赤 */
  z-index: 2;
  /* 右端基準ではなく左から残量幅の後ろに配置 */
}

/* 残量部分 */
.hp-fill, .spirit-fill {
  position: absolute;
  top: 0;
  height: 100%;
  z-index: 3;
  border-radius: 3px 0 0 3px;
}

/* HPは緑 */
.hp-fill {
  background-color: #0f0;
  left: 0;
}

/* 青: 回復分 */
.hp-heal {
  position: absolute;
  top: 0;
  height: 100%;
  background-color: #00f;     /* はっきり見える青 */
  opacity: 0.6;
  z-index: 2;               /* 他より前面に */
  left: 0;
  border-radius: 3px 0 0 3px;
}

/* 精神力は黄色 */
.spirit-fill {
  background-color: #ff0;
  left: 0;
}
.status-effects {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.status-icon {
  width: 24px;
  height: 24px;
  background-color: #333;
  border: 1px solid #999;
  box-shadow: inset 0 0 3px #000;
  position: relative;
}


/* 状態別の色やマークを変える */
.status-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.effect-badge {
  font-family: monospace;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: #222;
  color: #fff;
  border: 1px solid #555;
  box-shadow: inset 0 0 2px #000;
}

/* 色分け */
.effect-badge.red {
  background-color: #400;
  color: #f88;
  border-color: #a00;
}

.effect-badge.blue {
  background-color: #003366;
  color: #aaddff;
  border-color: #227;
}

.effect-badge.yellow {
  background-color: #664400;
  color: #ffe08a;
  border-color: #aa7700;
}

.term-critical {
  color: #ff8a8a;
  font-weight: 700;
}


/* コメント欄全体 */
#comment-section {
  margin-top: 2rem;
  font-family: "Courier New", "MS Gothic", monospace;
  color: #fff;
}

/* コメントフォーム */
#comment-form {
  background-color: #111;
  padding: 1rem;
  border: 1px solid #444;
  border-radius: 8px;
  max-width: 600px;
}

#comment-form input[type="text"],
#comment-form textarea {
  width: 100%;
  background-color: #000;
  color: #fff;
  border: 1px solid #555;
  border-radius: 6px;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  resize: vertical;
}

#comment-form input[type="text"]:focus,
#comment-form textarea:focus {
  outline: none;
  border-color: #4eaaff;
  background-color: #111;
}

#comment-form button {
  color: #000;
  border: none;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.3s ease;
}

#comment-form button:hover {
  background-color: #82cfff;
}

/* コメント表示 */
#comments-display ul {
  list-style-type: none;
  margin-top: 1rem;
  padding-left: 0;
  max-width: 600px;
}

#comments-display li {
  background-color: #111;
  border: 1px solid #444;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

#comments-display li strong {
  color: #4eaaff;
  font-weight: bold;
}

#comments-display li small {
  color: #888;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/* モバイル対応 */
@media screen and (max-width: 600px) {
  #comment-form, #comments-display ul {
    max-width: 100%;
  }
}

.novel-prologue {
  background-color: #111;
  border-left: 4px solid #4eaaff;
  padding: 1rem;
  margin-bottom: 2rem;
}

.novel-prologue h3 {
  margin-bottom: 0.5rem;
  color: #82cfff;
}

/* ===== Mire Works general site design system ===== */
:root {
  --font-body: "Inter", "Segoe UI", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-interface: "Inter", "Segoe UI", sans-serif;
  --font-heading-serif: "Yu Mincho", "Hiragino Mincho ProN", serif;
  --line-body: 1.7;
  --line-heading: 1.12;
  --line-hero-title: 0.98;
  --line-work-title: 1.1;
  --line-work-lead: 1.45;
  --line-reading: 1.9;
  --color-bg: #f5f7f7;
  --color-surface: #ffffff;
  --color-text: #232a30;
  --color-text-muted: #6d777e;
  --color-accent: #5f91ad;
  --color-accent-strong: #426f89;
  --color-border: #ccd5d9;
  --color-border-strong: #aebac0;
  --color-focus: #426f89;
  --color-header-bg: rgba(255, 255, 255, 0.88);
  --color-hover-bg: rgba(255, 255, 255, 0.42);
  --color-table-heading-bg: rgba(229, 239, 243, 0.48);
  --color-game-embed-bg: #202830;
  --max-site-width: 1180px;
  --max-content-width: var(--max-site-width);
  --max-blog-list-width: 1040px;
  --max-reading-width: 780px;
  --max-page-width: 860px;
  --max-game-width: 1280px;
  --max-game-embed-width: 1280px;
  --max-text-width: 760px;
  --max-work-title-width: 900px;
  --max-age-check-width: 640px;
  --max-home-content-width: 720px;
  --max-home-lead-width: 520px;
  --max-home-section-width: 1080px;
  --max-home-about-width: 1040px;
  --max-home-about-text-width: 360px;
  --gutter-page: clamp(40px, 8vw, 128px);
  --gutter-page-compact: 32px;
  --space: clamp(1rem, 2vw, 2rem);
  --radius-small: 4px;
  --border-default: 1px solid var(--color-border);
  --border-strong: 1px solid var(--color-border-strong);
  --motion-standard: 160ms ease;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  font-size: 16px;
  font-family: var(--font-body);
  line-height: var(--line-body);
  color: var(--color-text);
  background: var(--color-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent-strong);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--color-accent-strong);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

p,
li,
dd {
  color: var(--color-text-muted);
  font-size: 1rem;
}

p {
  margin: 0 0 1rem;
  text-indent: 0;
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: var(--line-heading);
  letter-spacing: 0;
  color: var(--color-text);
}

h1 {
  font-size: 3.2rem;
  font-weight: 720;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.45rem;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--color-text);
  border: var(--border-default);
  background: transparent;
}

th,
td {
  border: var(--border-default);
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--color-text);
  background: var(--color-table-heading-bg);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: var(--border-default);
  background: var(--color-header-bg);
  backdrop-filter: blur(12px);
  color: var(--color-text);
  padding: 0;
  text-align: left;
}

.site-header__inner {
  width: min(100% - var(--gutter-page), var(--max-content-width));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  color: var(--color-text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--color-text);
}

.site-brand__icon {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: cover;
  flex: 0 0 auto;
  border: var(--border-default);
  border-radius: var(--radius-small);
}

.site-brand__text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.25rem;
  font-weight: 720;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.6rem, 2vw, 1.45rem);
  flex-wrap: wrap;
}

.site-nav a,
.site-footer__nav a {
  color: var(--color-text);
  font-family: var(--font-interface);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.site-nav a:hover,
.site-footer__nav a:hover {
  color: var(--color-accent-strong);
}

.site-main {
  width: min(100% - var(--gutter-page), var(--max-content-width));
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.site-main:not(.home-page):not(.blog-page):not(.site-main--game) {
  width: min(100% - var(--gutter-page), var(--max-page-width));
  max-width: var(--max-page-width);
}

.site-main--game {
  width: min(100% - var(--gutter-page), var(--max-game-width));
  max-width: var(--max-game-width);
}

.section-label {
  margin: 0 0 0.6rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
}

.page-hero {
  display: grid;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.6rem, 4vw, 3rem);
  border-bottom: var(--border-default);
}

.page-hero p:not(.section-label) {
  max-width: var(--max-text-width);
  margin-bottom: 0;
}

.section-block {
  margin-top: clamp(2.8rem, 7vw, 5.5rem);
}

#works {
  scroll-margin-top: 6rem;
}

.section-heading {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
}

.home-featured .section-heading h2,
.home-blog .section-heading h2,
.home-about .section-heading h2 {
  font-family: var(--font-heading-serif);
  font-weight: 600;
  letter-spacing: 0;
}

.home-featured .section-heading {
  max-width: var(--max-home-section-width);
  margin-bottom: 1rem;
}

.content-panel {
  position: relative;
  border-top: var(--border-default);
  border-bottom: var(--border-default);
  border-radius: 0;
  padding: clamp(1.35rem, 3vw, 2.25rem) 0;
  background: transparent;
}

.content-panel--stack {
  display: grid;
  gap: 0.35rem;
}

.content-panel > :last-child,
.content-panel--stack > :last-child {
  margin-bottom: 0;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 120px;
  padding: 0.74rem 1.05rem;
  border: var(--border-strong);
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--motion-standard), color var(--motion-standard), background var(--motion-standard), transform var(--motion-standard);
}

.button:hover,
button.button:hover {
  border-color: var(--color-accent);
  background: var(--color-hover-bg);
  color: var(--color-accent-strong);
  transform: translateY(-1px);
}

.button--secondary,
button.button--secondary {
  border-color: var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.page-back {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.page-return {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.page-return a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.page-return a:hover {
  color: var(--color-accent-strong);
}

.home-page {
  padding-top: 0;
}

.home-hero {
  display: block;
  padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(1.8rem, 4vw, 2.6rem);
  border-bottom: 0;
}

.home-hero__content {
  max-width: var(--max-home-content-width);
}

.home-hero h1 {
  max-width: 10ch;
  font-size: 6.45rem;
  font-weight: 720;
  line-height: var(--line-hero-title);
  letter-spacing: 0;
}

.home-hero__lead {
  max-width: var(--max-home-lead-width);
  margin: clamp(1rem, 3vw, 1.6rem) 0 0;
  color: var(--color-text);
  font-size: 1.18rem;
  line-height: 1.86;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: clamp(1.1rem, 3vw, 1.8rem);
}

.home-featured {
  width: 100%;
  max-width: var(--max-home-section-width);
  margin-top: clamp(2rem, 5.25vw, 3rem);
}

.home-about {
  margin-top: clamp(3.2rem, 7vw, 5rem);
}

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.link-arrow {
  color: var(--color-accent-strong);
  transition: transform var(--motion-standard);
}

.text-action:hover .link-arrow,
.featured-work__link:hover .link-arrow {
  transform: translateX(4px);
}

.featured-work {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3.25rem);
  align-items: end;
  padding: clamp(1.35rem, 4vw, 2.5rem) 0 clamp(1.6rem, 4vw, 2.8rem);
  border-top: var(--border-default);
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
}

.featured-work__media {
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.featured-work__media img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.featured-work__type {
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.featured-work h3 {
  max-width: var(--max-work-title-width);
  overflow-wrap: anywhere;
  font-size: 2.9rem;
  line-height: var(--line-work-title);
  font-weight: 720;
}

.featured-work__lead {
  max-width: var(--max-text-width);
  margin: clamp(0.75rem, 2vw, 1.15rem) 0 0;
  color: var(--color-text);
  font-size: 1.32rem;
  line-height: var(--line-work-lead);
}

.featured-work__link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  margin-top: clamp(1.2rem, 3vw, 2rem);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.featured-work__link:hover {
  background: transparent;
  color: var(--color-accent-strong);
}

.home-about__body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: clamp(1.2rem, 4vw, 3.5rem);
  align-items: start;
  padding-bottom: clamp(0.8rem, 2vw, 1.5rem);
}

.home-about {
  width: 100%;
  max-width: var(--max-home-about-width);
}

.home-about__body p {
  max-width: var(--max-home-about-text-width);
  margin: 0;
}

.home-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: var(--border-default);
  border-bottom: var(--border-default);
}

.home-link {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  column-gap: 1rem;
  row-gap: 0.2rem;
  align-items: baseline;
  min-height: 0;
  padding: 1.05rem 0;
  border: 0;
  border-bottom: var(--border-default);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
  position: relative;
}

.home-link:last-child {
  border-bottom: 0;
}

.home-link__arrow {
  grid-column: 3;
  grid-row: 1 / span 2;
  position: static;
  align-self: center;
  color: var(--color-accent);
  transition: transform var(--motion-standard);
}

.home-link:hover {
  color: var(--color-accent-strong);
}

.home-link:hover .home-link__arrow {
  transform: translateX(3px);
}

.home-link__number {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.home-link__title {
  grid-column: 2;
  font-size: 1.08rem;
  font-weight: 700;
}

.home-link small {
  grid-column: 2;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  padding-right: 0;
}

.blog-page {
  width: min(100% - var(--gutter-page), var(--max-blog-list-width));
  max-width: var(--max-blog-list-width);
}

.blog-header p {
  max-width: var(--max-text-width);
}

.blog-tags-section {
  margin-top: clamp(1rem, 3vw, 1.8rem);
}

.blog-list-section {
  margin-top: clamp(1.6rem, 4vw, 2.8rem);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.18rem 0.55rem;
  border: var(--border-default);
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
}

.blog-tags-section .blog-tags {
  gap: 0.35rem 0.75rem;
  padding-bottom: 1rem;
  border-bottom: var(--border-default);
}

.blog-tags-section .blog-tag {
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.24em;
}

.blog-tag:hover,
.blog-tag.is-current {
  border-color: var(--color-accent);
  background: var(--color-hover-bg);
  color: var(--color-accent-strong);
}

.blog-tags-section .blog-tag:hover,
.blog-tags-section .blog-tag.is-current {
  border-color: transparent;
  background: transparent;
  color: var(--color-accent-strong);
}

.blog-tags-section .blog-tag.is-current {
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.blog-tag__count {
  color: var(--color-text-muted);
  font-size: 0.84em;
}

.blog-list,
.home-blog-list {
  border-top: var(--border-default);
  border-bottom: var(--border-default);
}

.blog-list-item {
  display: grid;
  gap: 0.55rem;
  padding: clamp(1.1rem, 3vw, 1.8rem) 0;
  border-bottom: var(--border-default);
}

.blog-list-item:last-child {
  border-bottom: 0;
}

.blog-list-item h3 {
  max-width: var(--max-work-title-width);
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.24;
}

.blog-list-item h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.blog-list-item h3 a:hover {
  color: var(--color-accent-strong);
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.blog-summary {
  max-width: var(--max-text-width);
  margin: 0 0 0.25rem;
  overflow-wrap: anywhere;
  color: var(--color-text-muted);
}

.blog-read-link {
  width: fit-content;
  margin-top: 0;
}

.blog-empty {
  margin: 0;
  padding: 1.2rem 0;
  border-top: var(--border-default);
  border-bottom: var(--border-default);
}

.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: var(--border-default);
}

.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  min-height: 40px;
  padding: 0.35rem 0.7rem;
  border: var(--border-default);
  border-radius: var(--radius-small);
  color: var(--color-text);
  text-decoration: none;
}

.blog-pagination a:hover,
.blog-pagination [aria-current="page"] {
  border-color: var(--color-accent);
  background: var(--color-hover-bg);
  color: var(--color-accent-strong);
}

.blog-post {
  max-width: var(--max-reading-width);
  margin-inline: auto;
}

.blog-post__header {
  gap: 0.85rem;
  text-align: left;
}

.blog-post__header h1 {
  overflow-wrap: anywhere;
}

.blog-post__header p {
  max-width: var(--max-reading-width);
}

.blog-post__header .blog-tags {
  margin-top: 0.2rem;
}

.blog-content {
  padding-top: clamp(1.4rem, 4vw, 2.4rem);
  overflow-wrap: anywhere;
}

.blog-page > .page-return,
.blog-page > .page-back {
  max-width: var(--max-reading-width);
  margin-inline: auto;
}

.blog-content > * + * {
  margin-top: 1rem;
}

.blog-content h1,
.blog-content h2,
.blog-content h3 {
  font-family: var(--font-heading-serif);
  font-weight: 600;
}

.blog-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.35rem);
}

.blog-content h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.blog-content h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
}

.blog-content p,
.blog-content li {
  line-height: var(--line-reading);
}

.blog-content ul,
.blog-content ol {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.4rem;
}

.blog-content blockquote {
  margin: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--color-border-strong);
}

.blog-content blockquote p {
  color: var(--color-text);
}

.blog-content hr {
  border: 0;
  border-top: var(--border-default);
}

.blog-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border: var(--border-default);
  border-radius: 0;
  background: var(--color-surface);
  line-height: 1.65;
}

.blog-content code {
  padding: 0.08rem 0.28rem;
  border: var(--border-default);
  border-radius: var(--radius-small);
  background: var(--color-hover-bg);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.92em;
}

.blog-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  white-space: pre;
}

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

.blog-content a {
  overflow-wrap: anywhere;
}

.home-blog {
  width: 100%;
  max-width: var(--max-home-section-width);
}

.home-blog__more {
  margin-top: 1.2rem;
}

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

.profile-list > div {
  display: grid;
  grid-template-columns: minmax(9rem, 0.32fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: var(--border-default);
}

.profile-list > div:first-child {
  padding-top: 0;
}

.profile-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-list dt {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--color-text);
}

.iframe-shell {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: var(--border-default);
  border-radius: 0;
  background: var(--color-surface);
}

.iframe-shell iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

.iframe-shell--form iframe {
  min-height: min(76vh, 760px);
}

.game-embed-section {
  display: flex;
  justify-content: center;
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
}

.game-embed {
  width: min(100%, var(--max-game-embed-width));
  margin-inline: auto;
  border: var(--border-default);
  border-radius: 0;
  background: var(--color-game-embed-bg);
  overflow: hidden;
}

.game-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.game-mobile-notice {
  display: none;
  max-width: var(--max-reading-width);
  margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
}

.game-mobile-notice h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.game-mobile-notice p {
  margin-bottom: 0.85rem;
}

.hitori-jinji-page .page-return,
.hitori-jinji-page .page-hero {
  width: 100%;
  max-width: var(--max-reading-width);
  margin-inline: auto;
}

.hitori-jinji-page .page-hero h1 {
  word-break: keep-all;
  overflow-wrap: normal;
}

.game-description {
  max-width: var(--max-reading-width);
  margin-inline: auto;
  line-height: var(--line-reading);
}

.game-description h2 {
  margin-bottom: 1rem;
}

.game-description p {
  line-height: var(--line-reading);
}

.game-description p + p {
  margin-top: 1rem;
}

.age-check-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--space);
}

.age-check-main {
  width: min(100%, var(--max-age-check-width));
}

.age-check-wrapper {
  display: grid;
  gap: 1rem;
  border: var(--border-default);
  border-radius: 0;
  padding: clamp(1.4rem, 5vw, 2.5rem);
  background: var(--color-surface);
  text-align: left;
}

.age-check-wrapper h1 {
  font-size: 2.6rem;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.site-footer {
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  border-top: var(--border-default);
  color: var(--color-text-muted);
  background: transparent;
  text-align: left;
}

.site-footer__inner {
  width: min(100% - var(--gutter-page), var(--max-content-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__meta {
  display: grid;
  gap: 0.2rem;
}

.site-footer__label {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-footer small {
  color: var(--color-text-muted);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
}

@media (max-width: 820px) {
  h1 {
    font-size: 2.7rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .site-header__inner {
    min-height: 86px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 0.85rem 0;
    gap: 0.8rem;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .home-hero {
    padding-top: clamp(2rem, 7vw, 3rem);
  }

  .home-hero h1 {
    font-size: 5.8rem;
  }

  .home-hero__lead {
    font-size: 1.2rem;
  }

  .home-hero__actions {
    justify-content: flex-start;
  }

  .home-about__body {
    grid-template-columns: 1fr;
  }

  .featured-work {
    grid-template-columns: 1fr;
  }

  .featured-work h3 {
    font-size: 2.45rem;
  }

  .featured-work__lead {
    font-size: 1.25rem;
  }

  .featured-work__link {
    justify-self: start;
  }

  .home-link {
    border-right: 0;
    border-bottom: var(--border-default);
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__nav {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .game-mobile-notice {
    display: block;
  }

  .hitori-jinji-page .game-embed-section {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .hitori-jinji-page .page-hero h1 {
    font-size: clamp(2.45rem, 5vw, 2.7rem);
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .site-main,
  .site-main--game,
  .site-header__inner,
  .site-footer__inner {
    width: min(100% - var(--gutter-page-compact), var(--max-content-width));
  }

  .site-brand__icon {
    width: 36px;
    height: 36px;
  }

  .site-brand__text {
    font-size: 1.14rem;
  }

  .site-nav {
    gap: 0.7rem;
  }

  .site-nav a,
  .site-footer__nav a {
    font-size: 0.95rem;
  }

  .home-hero h1 {
    font-size: 3.25rem;
  }

  .home-hero__lead {
    font-size: 1.08rem;
  }

  .button-group {
    flex-direction: column;
  }

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

  .content-panel,
  .age-check-wrapper {
    padding: 1rem;
  }

  .featured-work {
    padding: 1.2rem 0;
  }

  .featured-work h3 {
    font-size: 2rem;
  }

  .featured-work__lead {
    font-size: 1.12rem;
  }

  .age-check-wrapper h1 {
    font-size: 2.1rem;
  }

  .profile-list > div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
