/* 共通：配色・フォント・基本要素 */

:root {
  --main: #A2E7EC;
  --paper: #F7FDFD;
  --line: #4DD1DB;
  --rose: #ECA7A2;
  --blush: #F9E3E1;
  --ink: #193e42;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper) center top/cover fixed;
  font: 16px/1.7 system-ui, sans-serif;
}

header a, h1, h2 {
  font-family: Georgia, 'Hiragino Mincho ProN', serif;
}

a {
  color: inherit;
}

header a, .card, nav a {
  text-decoration: none;
}

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 0;
  line-height: 1.2;
}

h2 {
  margin: 2rem 0 .8rem;
}

h3 {
  margin: .8rem 0;
}

.placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--main), var(--paper) 65%, var(--blush));
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid #38616b;
  outline-offset: 2px;
}

@font-face {
  font-family: Ellemin;
  src: url("./font/F66ElleminELpetit.ttf") format("truetype");
  font-display: swap;
}

:root {
  --type: Ellemin, "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --edge: #a1dbdd;
  --sea: #286e76;
  --round: 8px;
}

body, header a, h1, h2, h3, .tile {
  font-family: var(--type);
}

body {
  background-color: var(--paper);
  color: #264e52;
}

h1, h2, h3 {
  font-weight: normal;
  letter-spacing: .04em;
}

.social {
  margin: 1rem auto 2rem;
}

/* 共通：ページの横幅と表組み */

main {
  max-width: 1100px;
  margin: auto;
  padding: clamp(24px, 5vw, 70px) 5vw 60px;
}

/* トップページ以外は、メニューバーと本文の間隔を狭める */
body[data-page]:not([data-page="index"]) > main {
  padding-top: clamp(12px, 2.5vw, 35px);
}

.cols, .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 3vw, 36px);
}

.cols > * {
  min-width: 0;
}

dl {
  margin: .7rem 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  border-bottom: 1px solid var(--main);
  padding: .4rem 0;
}

dd {
  margin: 0;
  text-align: right;
}

figure {
  margin: 0;
  min-width: 0;
}

dialog {
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

dialog::backdrop {
  background: #183a4066;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td, th {
  padding: .55rem;
  text-align: left;
  border-bottom: 1px solid var(--main);
}

th {
  background: var(--main);
}

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

@media (max-width: 650px) {
  .stats {
    gap: .8rem;
  }
}

main {
  max-width: 1200px;
}

dialog {
  border-radius: 8px;
}

/* 共通：ナビゲーション・入力欄・検索フィルター */

button, select, nav a {
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: .35rem .8rem;
  border-radius: 5px;
}

button, select {
  cursor: pointer;
}

button:disabled {
  opacity: .4;
}

nav, .filters {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

button, select, nav a, .social a {
  border-radius: 6px;
}

.social, .filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .7rem;
}

select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right calc(.8rem + 5px) center, right .8rem center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.filters:has(input[type="search"]) {
  align-items: flex-end;
}

.filters:has(input[type="search"]) label {
  display: grid;
  gap: .2rem;
  font-size: .82rem;
}

.filters input[type="search"] {
  box-sizing: border-box;
  width: 13rem;
  max-width: 100%;
  min-height: 40px;
  padding: .35rem .7rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* 共通：カードやパネルの背景・枠・影 */

.mast, .panel, .gallery, [data-page="about"] .cols > section, .memo, .stats section, .viewer, [data-page="about"] table {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: var(--round);
}

.memo, .stats section, [data-page="about"] .cols > section {
  padding: clamp(16px, 2vw, 28px);
}

.mast, .panel, .gallery, .viewer, .memo, .stats section, .rail, [data-page="about"] .cols > section, [data-page="about"] table {
  box-shadow: 4px 4px 0 rgb(34 92 99 / 16%);
}

/* 共通：ヘッダーとスライドメニュー */

/* バーと波を含む画像をヘッダー全体に表示する。下側の余白は文字が波に重なるのを防ぐ。 */
header {
  --menu-image-y: -55px;

  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  --menu-tab-width: 170px;
  --menu-tab-overlap: 120px;
  --menu-text-offset: 0px;
  isolation: isolate;
}

header > .menu-bar-image {
  grid-area: 1 / 1 / 2 / -1;
  display: block;
  width: 100%;
  height: auto;
  margin-top: var(--menu-image-y);
  pointer-events: none;
}

header > a {
  grid-area: 1 / 1;
  position: relative;
  justify-self: start;
  margin-left: 5vw;
  top: -40px;
}

/* MENU文字の背景。画像の元の比率から高さを自動で決める */
header > .menu-label-image {
  position: absolute;
  top: calc(100% - var(--menu-tab-overlap));
  right: 5vw;
  display: block;
  width: var(--menu-tab-width);
  height: auto;
  pointer-events: none;
  z-index: 0;
}

/* 中間：メニューバー画像をMENU背景の手前に描く */
header > .menu-bar-image {
  position: relative;
  z-index: 1;
}

/* サイトタイトルをバーの手前に表示する */
header > a {
  z-index: 2;
}

/* 最前面：バーのすぐ下にMENU文字とクリック範囲を配置する */
header > #openMenu {
  position: absolute;
  top: calc(100% + var(--menu-text-offset));
  right: 5vw;
  z-index: 2;
  display: grid;
  place-items: start center;
  width: var(--menu-tab-width);
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1.4;
}

header a {
  font-size: 1.3rem;
  font-weight: bold;
}

#menu {
  margin: 0 0 0 auto;
  width: min(320px, 90vw);
  height: 100dvh;
  max-height: none;
}

#menu nav {
  flex-direction: column;
}

#menu small a {
  display: block;
}

header a {
  font-size: 1rem;
}

#openMenu {
  margin-left: auto;
}

#menu {
  border-radius: 8px 0 0 8px;
  background: var(--sea);
  color: white;
}

#menu nav a {
  background: transparent;
  border: 0;
  color: white;
  font-size: 1.65rem;
}

#menu small a {
  padding: .4rem .8rem;
}

#menu button {
  color: var(--ink);
}

#openMenu {
  border: 0;
  background: transparent;
  min-height: 44px;
}

[data-page="index"] #menu {
  border-radius: 8px 0 0 8px;
}

@media (prefers-reduced-motion:  no-preference) {
  header {
    animation: header-enter .55s ease-out .2s backwards;
  }
}

@media (prefers-reduced-motion:  no-preference) {
  #menu[open] {
    animation: drawer-enter .42s cubic-bezier(.2, .8, .2, 1);
  }
}

/* 共通：ページ遷移とヘッダーの登場アニメーション */

/* 入場時に画面を覆う幕を透明にする。 */
@keyframes page-reveal {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ページ移動時に幕で画面を覆う。 */
@keyframes page-cover {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion:  no-preference) {
  html::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #F7F7FD;
    pointer-events: none;
    opacity: 0;
    animation: page-reveal .5s ease-in-out both;
  }
}

@media (prefers-reduced-motion:  no-preference) {
  html.is-leaving::after {
    pointer-events: auto;
    animation: page-cover .5s ease-in-out both;
  }
}

/* 対象を徐々に透明にする。 */
@keyframes page-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* 対象を徐々に表示する。 */
@keyframes page-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* タイトルとメニューボタンをバーごと上から表示する。 */
@keyframes header-enter {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

/* 開いたメニューを画面右から表示する。 */
@keyframes drawer-enter {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

/* 共通：ページ先頭へ戻るボタンとPCの余白 */

#backToTop {
  position: fixed;
  --top-button-right: max(12px, env(safe-area-inset-right));
  right: var(--top-button-right);
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--main);
  color: var(--ink);
  box-shadow: 3px 3px 0 rgb(34 92 99 / 16%);
  font-size: 1.4rem;
  line-height: 1;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(calc(100% + var(--top-button-right) + 5px));
  transition: transform .3s ease-in, visibility 0s linear .3s;
}

#backToTop.is-visible {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: transform .35s ease-out, visibility 0s;
}

#backToTop:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 3px;
}

@media (min-width:  800px) {
  body[data-page] {
    --pc-top-button-right: clamp(24px, 4vw, 64px);
  }
}

@media (min-width:  800px) {
  #backToTop {
    --top-button-right: var(--pc-top-button-right);
  }
}

@media (min-width:  800px) {
  body[data-page] main {
    box-sizing: border-box;
    width: calc(100% - 2 * (var(--pc-top-button-right) + 56px));
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion:  reduce) {
  #backToTop, #backToTop.is-visible {
    transition: none;
  }
}

/* MAIN：タイトル・リンク・キャラクター検索結果 */

.grid, .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  gap: 1rem;
}

@media (max-width: 650px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mast {
  max-width: 620px;
  margin: auto;
  text-align: center;
  overflow: hidden;
  padding-top: 1.5rem;
}

.mast h1 {
  font-size: clamp(2rem, 6vw, 3.8rem);
}

.mast p {
  padding: 0 1rem;
}

.mast nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  gap: 0;
  background: #e6f7f7;
}

.mast nav a {
  border: 0;
  border-radius: 0;
  padding: .75rem .1rem;
  font-size: clamp(.8rem, 2.2vw, 1.1rem);
}

.mast nav a:hover, .social a:hover {
  background: var(--blush);
}

.social a {
  border: 1px solid var(--edge);
  padding: .25rem 1rem;
}

.collection, .gallery {
  padding: clamp(16px, 4vw, 48px);
}

.collection h2, [data-page="gallery"] h1, [data-page="about"] h1, [data-page="about"] main > h2 {
  text-align: center;
}

.collection h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2.4vw, 32px);
}

@media (max-width: 650px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-page="index"] {
  --round: 8px;
}

[data-page="index"] .collection {
  background-color: rgb(255 255 255 / 80%);
}

[data-page="index"] .filters label {
  display: grid;
  gap: .2rem;
  font-size: .82rem;
}

[data-page="index"] .filters select {
  font-size: 1rem;
  min-height: 40px;
}

[data-page="index"] :is(.filters select, .social a, .tile, #menu button) {
  border-radius: 6px;
}

/* 検索結果が空のときは全列を使って案内を中央に表示する。 */
#cards > .character-empty {
  grid-column: 1 / -1;
  text-align: center;
  margin: 0;
  padding-block: 2rem;
}

/* キャラクター共通：アイコン・ホバー・ロストの輪・準備中表示 */

.card {
  display: grid;
  align-content: start;
  gap: .2rem;
  min-width: 0;
}

.card small {
  font-size: .78rem;
}

.tile {
  display: grid;
  position: relative;
  aspect-ratio: 1;
  background: var(--tint);
  border: 2px solid var(--line);
  border-radius: 8px;
  place-items: center;
  font: clamp(2rem, 6vw, 4rem) var(--type);
}

.tile > span {
  grid-area: 1/1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile .hover {
  opacity: 0;
}

.card:is(:hover, :focus-visible) .tile {
  transform: scale(1.035);
  animation: tilt .3s ease;
  border-color: var(--rose);
}

.card:is(:hover, :focus-visible) .hover {
  opacity: 1;
}

.card:is(:hover, :focus-visible) .regular {
  opacity: 0;
}

/* アイコンを軽く左右に傾ける。 */
@keyframes tilt {
  35% {
    transform: scale(1.035) rotate(-3deg);
  }

  70% {
    transform: scale(1.035) rotate(2deg);
  }
}

.tile {
  overflow: visible;
}

/* ロストの輪を枠線込みのサイズに合わせ、少し右上へずらす。 */
.tile .halo {
  position: absolute;
  inset: -2px;
  width: auto;
  height: auto;
  transform: translate(3.5%, -3.5%);
  z-index: 1;
  pointer-events: none;
}

.tile .halo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .card:is(:hover, :focus-visible) .tile {
    animation: none;
    transform: none;
  }
}

.tile, .tile > span {
  border-radius: 6px;
}

.card {
  text-align: center;
}

.tile > span {
  border-radius: 4px;
}

.character-image-pending {
  width: 100%;
  text-align: center;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
}

.tile .character-image-pending, #faces .character-image-pending {
  aspect-ratio: 1;
}

.tile .character-image-pending, .face-thumbnails .character-image-pending {
  height: 100%;
  font-size: 0.75rem;
}

/* CHARACTERS：立ち絵・表情差分・プロフィール・技能値 */

.viewer, .rail {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.viewer figure {
  flex: 1;
  text-align: center;
}

.viewer img, .gallery img {
  width: 100%;
  display: block;
}

.viewer img {
  max-height: 60vh;
  object-fit: contain;
}

#portrait .placeholder {
  aspect-ratio: 3/4;
}

[data-page="characters"] .cols {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.viewer {
  position: relative;
  overflow: hidden;
  padding: .5rem;
  justify-content: center;
}

.viewer button {
  position: absolute;
  z-index: 1;
  background: #fffffff0;
  font-size: 1.5rem;
}

.viewer button:first-child {
  left: .45rem;
}

.viewer button:last-child {
  right: .45rem;
}

.viewer .placeholder {
  border-radius: 6px;
}

#faces {
  max-width: 250px;
  margin: auto;
}

.memo {
  min-height: 9em;
  white-space: pre-line;
}

@media (max-width: 650px) {
  [data-page="characters"] .cols {
    grid-template-columns: 1fr;
  }
}

.scenario-line {
  font-size: 1.5em;
  overflow-wrap: anywhere;
}

.viewer button, .rail button {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 1.8rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  flex-shrink: 0;
}

[data-page="characters"] main {
  max-width: none;
  padding-inline: 0;
}

[data-page="characters"] main > .cols {
  box-sizing: border-box;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 5vw;
}

[data-page="characters"] #switch + .stats {
  margin-top: 1rem;
}

/* キャラクター詳細のシステム名を10px下げる */
[data-page="characters"] #switch {
  padding-top: 20px;
}

body[data-page="characters"] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body[data-page="characters"] main {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  padding-inline: 0;
  padding-bottom: 0;
}

body[data-page="characters"] main > .cols {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 5vw;
  margin-bottom: 1.5rem;
}

/* CHARACTERS：下部のキャラクター選択バー */

.strip {
  display: flex;
  gap: .7rem;
  overflow-x: auto;
  flex: 1;
}

.strip .card {
  flex: 0 0 80px;
  font-size: .8rem;
}

.rail {
  background: var(--main);
  border-radius: 8px;
  padding: .8rem;
}

.strip .card[aria-current] {
  font-weight: bold;
}

.strip {
  position: relative;
  min-width: 0;
  padding: 9px;
  overflow-x: auto;
}

.strip .card[aria-current="page"] .tile {
  outline: 3px solid #ac6460;
  outline-offset: 2px;
}

[data-page="characters"] .rail {
  margin-top: 2rem;
  border-radius: 0;
}

/* キャラクター選択バーをページ末尾に全幅で配置する。 */
body[data-page="characters"] main > .rail {
  position: static;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: auto 0 0;
  border-radius: 0;
  padding-bottom: calc(.8rem + env(safe-area-inset-bottom, 0px));
}

body[data-page="characters"] .rail > .strip {
  min-width: 0;
  overflow-x: auto;
}

/* GALLERY：作品一覧と拡大ダイアログ */

.gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  align-items: start;
}

.gallery button {
  padding: 0;
  overflow: hidden;
}

#light {
  width: fit-content;
  max-width: 94vw;
}

#light figure {
  margin-top: .6rem;
}

#light img {
  display: block;
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
}

#light .placeholder {
  width: min(70vw, 550px);
  max-height: 70vh;
}

.gallery {
  display: block;
  columns: 3;
  column-gap: 1rem;
  margin: 1.5rem auto;
}

.gallery button {
  width: 100%;
  margin: 0 0 1rem;
  break-inside: avoid;
  border-radius: 6px;
}

@media (max-width: 650px) {
  .gallery {
    columns: 2;
  }
}

/* 元画像の比率を保ち、一覧の幅と高さ360pxを上限にする。 */
.gallery img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 360px;
  margin-inline: auto;
}

/* タイトルの左右を同じ幅にして画像の中心に揃える。 */
#light .light-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 0.5rem;
}

#light .light-header button {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

#light-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

#light figure img {
  margin-inline: auto;
}

/* PLAYER：プロフィール・通過／所持タブ・シナリオ表 */

[data-page="about"] main {
  max-width: 920px;
}

[data-page="about"] .cols {
  margin-top: 2rem;
}

[data-page="about"] dl div {
  display: block;
  padding: .7rem 0;
}

[data-page="about"] dd {
  text-align: left;
  margin: .35rem 0;
}

[data-page="about"] table {
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.scenario-switch {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: min(100%, 24rem);
  box-sizing: border-box;
  margin: 2rem auto 0;
  padding: 3px;
  border: 1px solid #4dd1db;
  border-radius: 6px;
  background: #f7fdfd;
}

/* 選択中のタブの下にスライドする背景を置く。 */
.scenario-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 4px;
  background: #a2e7ec;
  transform: translateX(0);
  transition: transform 380ms cubic-bezier(.34, 1.35, .55, 1);
}

.scenario-switch[data-kind="owned"]::before {
  transform: translateX(100%);
}

.scenario-switch button {
  min-width: 0;
  padding: .55rem .2rem;
  border: 0;
  background: transparent;
  color: #607c80;
  font: inherit;
  cursor: pointer;
  transition: color 180ms;
}

.scenario-switch button[aria-pressed="true"] {
  color: #194d53;
  font-weight: bold;
}

.scenario-switch button:focus-visible {
  outline: 2px solid #287780;
  outline-offset: -2px;
}

#scenario-list .scenario-divider th {
  padding: .2rem .75rem;
  background-color: #d5f3f5;
  border: 0;
  border-bottom: 1px solid #a2e7ec;
  color: #28575b;
  font-size: .85rem;
  font-weight: bold;
  line-height: 1.3;
  text-align: left;
}

@media (prefers-reduced-motion:  reduce) {
  .scenario-switch::before, .scenario-switch button {
    transition: none;
  }
}

[data-page="about"] .cols > section:first-child > h2 ~ h2 {
  border-top: 1px solid var(--main);
  margin-top: .7rem;
  padding-top: .7rem;
}

[data-page="about"] .cols > section:last-child dl > div:last-child {
  border-bottom: none;
}

[data-page="about"] .scenario-note {
  max-width: 42rem;
  margin: 0 auto;
  font-size: .85em;
  line-height: 1.6;
  color: #506d71;
  text-align: left;
  padding-left: 1em;
  text-indent: -1em;
}

.scenario-table-scroll {
  padding-bottom: 4px;
}

/* 所持一覧の幅を番号・タイトル・システムの文字数から決める。 */
#scenario-list {
  --cell-padding: min(.75rem, 1vw);
  table-layout: fixed;
  box-sizing: border-box;
  width: 100%;
  margin-inline: auto;
  max-width: calc(4ch + 32ic + 6 * var(--cell-padding));
}

/* 通過一覧ではHO列の幅も確保する。 */
#scenario-list:has(thead th:nth-child(4)) {
  max-width: calc(4ch + 42ic + 8 * var(--cell-padding));
}

#scenario-list thead th, #scenario-list tbody td {
  box-sizing: border-box;
  padding-inline: var(--cell-padding);
  white-space: normal;
  overflow-wrap: anywhere;
}

#scenario-list thead th:first-child {
  width: calc(4ch + 2 * var(--cell-padding));
}

#scenario-list tbody td.scenario-number {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#scenario-list thead th:nth-child(2), #scenario-list tbody td:nth-child(2) {
  text-align: left;
}

#scenario-list thead th:nth-child(3) {
  width: 29%;
}

#scenario-list:has(thead th:nth-child(4)) thead th:nth-child(3) {
  width: 24%;
}

#scenario-list thead th:nth-child(4) {
  width: 23%;
}

/* 404：案内画像とメッセージ */

.error-page {
  text-align: center;
}

.error-page img {
  display: block;
  width: min(320px, 75%);
  height: auto;
  margin: 1rem auto;
}



