* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #170d22;
  color: #fff;
  font-family: "Yu Gothic", "Meiryo", sans-serif;

  width: 100%;
  overflow-x: hidden;

}

/* ページ全体 */
.config-page {
  min-height: 100vh;
  padding: 20px;

  background-image:
    linear-gradient(rgba(20,10,30,0.45), rgba(20,10,30,0.55)),
    url("../img/bg/cg-bg.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* タイトル */
.config-title {
  margin: 0 0 32px;
  font-size: 42px;
  text-shadow: 0 0 14px #f5b6e4, 0 0 8px #000;
}

/* ラジオボタン本体は隠す */
.config-page input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* 環境設定ウィンドウ */
.config-window {
  display: flex;
  width: min(980px, 100%);
  height: calc(100svh - 60px);
  min-height: 0px;
  margin: 0 auto;
  border: 2px solid #d99bd0;
  border-radius: 18px;
  background: rgba(20, 10, 30, 0.65);
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 28px rgba(255, 160, 220, 0.25),
    inset 0 0 20px rgba(255, 210, 240, 0.06);
  overflow: hidden;
}

/* 左メニュー */
.config-menu {
  width: 260px;
  padding: 24px 18px;
  border-right: 2px solid rgba(217, 155, 208, 0.65);
  background: rgba(30, 15, 45, 0.58);
}

.config-menu label {
  display: block;
  margin-bottom: 12px;
  padding: 20px 18px;
  border: 1px solid rgba(255, 190, 230, 0.55);
  border-radius: 16px;
  background: rgba(255, 210, 240, 0.08);
  color: #fff;
  font-weight: bold;
  font-size: 22px;
  cursor: pointer;
  text-shadow: 0 0 6px #000;
}

.config-menu label:hover {
  background: rgba(255, 170, 220, 0.28);
}


/* ここに入れる */
.config-home-link {
  display: block;
  margin-top: 22px;
  padding: 14px 16px;

  border: 2px solid #ffb8e8;
  border-radius: 999px;
  background: linear-gradient(#ff85c8, #d84b9b);
  color: #fff;

  text-align: center;
  text-decoration: none;
  font-weight: bold;
  text-shadow: 0 0 6px #000;
  box-shadow: 0 0 16px rgba(255, 120, 200, 0.4);
}

.config-home-link:hover {
  background: linear-gradient(#ff9bd5, #e65aaa);
}




/* 選択中のタブ */
#tab-screen:checked ~ .config-window label[for="tab-screen"],
#tab-sound:checked ~ .config-window label[for="tab-sound"],
#tab-link:checked ~ .config-window label[for="tab-link"],
#tab-save:checked ~ .config-window label[for="tab-save"],
#tab-extra:checked ~ .config-window label[for="tab-extra"] {
  background: linear-gradient(#ff9bd5, #d84b9b);
  border-color: #ffd6f2;
  box-shadow: 0 0 14px rgba(255, 140, 210, 0.45);
}

/* 右側の内容 */
.config-content {
  flex: 1;
  height: 100%;
  min-height: 0;
  padding: 32px 48px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

/* パネルは基本非表示 */
.config-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

/* 選択されたパネルだけ表示 */
#tab-screen:checked ~ .config-window .panel-screen,
#tab-sound:checked ~ .config-window .panel-sound,
#tab-link:checked ~ .config-window .panel-link,
#tab-save:checked ~ .config-window .panel-save,
#tab-extra:checked ~ .config-window .panel-extra {
  display: block;
}

.config-panel h2 {
  margin: 0 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 190, 230, 0.55);
  color: #ffc5ec;
  font-size: 30px;
  text-shadow: 0 0 10px #000;
}

.config-panel p {
  margin: 14px 0;
  font-size: 18px;
  line-height: 1.8;
}

/* ちょっとADVの設定画面っぽい飾り */
.config-panel::after {
  content: "SYSTEM CONFIG";
  position: absolute;
  right: 28px;
  bottom: 22px;
  color: rgba(255, 210, 240, 0.18);
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 0.08em;
}

/* 戻るボタン */
.back-area {
  display: none;
  margin-top: 34px;
  text-align: center;
}

.back-area a {
  display: inline-block;
  padding: 13px 42px;
  border: 2px solid #ffb8e8;
  border-radius: 999px;
  background: linear-gradient(#ff85c8, #d84b9b);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 0 18px rgba(255, 120, 200, 0.45);
}

.back-area a:hover {
  background: linear-gradient(#ff9bd5, #e65aaa);
}

/* ふわっと表示 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* スマホ縦 */
@media (max-width: 768px) and (orientation: portrait) {
  .config-page {
    min-height: 100vh;
    padding: 18px;
    border: 8px solid #241033;
  }


.config-home-link {
  display: none;
}

.back-area {
  display: block;
  margin-top: 34px;
  text-align: center;
}

  .config-title {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(200, 121, 184, 0.85);
    text-align: center;
    font-size: 24px;
  }

  .config-window {
    display: block;
    height: auto;
    min-height: 0;
    border-radius: 16px;
  }

  .config-menu {
    width: 100%;
    padding: 14px;
    border-right: none;
    border-bottom: 2px solid rgba(217, 155, 208, 0.65);

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .config-menu label {
    margin: 0;
    padding: 12px 10px;
    text-align: center;
    font-size: 13px;
  }

.config-content {
  height: auto;
  overflow: visible;
  padding: 22px 20px 56px;
}

  .config-panel h2 {
    margin-bottom: 18px;
    font-size: 22px;
  }

  .config-panel p {
    font-size: 15px;
    line-height: 1.7;
  }

  .config-panel::after {
    right: 18px;
    bottom: 16px;
    font-size: 15px;
  }

  .back-area a {
    width: 100%;
    text-align: center;
  }

.back-area a + a {
  margin-top: 12px;
}

}

/* スマホ横 */
@media (max-width: 950px) and (orientation: landscape) {
  .config-page {
    height: 100svh;
    min-height: 0;
    padding: 14px;
    border: 8px solid #241033;
    overflow: hidden;
  }

  .config-title {
    margin-bottom: 10px;
    font-size: 26px;
    line-height: 1.1;
  }

  .config-window {
    height: calc(100svh - 40px);
    min-height: 0;
  }

  .config-menu {
    width: 190px;
    padding: 12px;
    overflow-y: auto;
  }

  .config-menu label {
    margin-bottom: 8px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .config-home-link {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .config-content {
    padding: 22px 28px;
  }

  .config-panel h2 {
    margin-bottom: 14px;
    font-size: 22px;
  }

  .config-panel p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.6;
  }

  .config-panel::after {
    font-size: 16px;
  }
}


/* ここから下に追加する */
.link-entry {
  margin-bottom: 28px;
}

.link-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: bold;
}

.link-status {
  color: #d8a8c8;
  font-size: 14px;
  opacity: 0.8;
}

.link-comment {
  margin: 0;
  padding-left: 16px;
  color: #f3d7e7;
  line-height: 1.7;
  opacity: 0.92;
}

.link-url,
.link-archive {
  padding-left: 16px;
}

.link-url,
.link-archive a {
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* 見出し下の余白を自然に戻す */
.config-panel h2 {
  margin-bottom: 24px;
  padding-bottom: 14px;
}

/* リンク集の最初の項目を少しだけ離す */
.panel-screen .link-entry:first-of-type {
  margin-top: 0;
}

/* SYSTEM CONFIG の背景文字を消す */
.config-panel::after {
  display: none;
}


.link-title {
  margin-top: 0;
}


.link-archive a {
  display: inline-block;
}



.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.gallery-item {
  display: block;
  text-decoration: none;
  color: #fff;
}

.gallery-item img {
  width: 100%;
  border-radius: 12px;
  border: 2px solid rgba(255, 190, 230, 0.5);
  transition: 0.2s;
}

.gallery-item img:hover {
  transform: scale(1.03);
  border-color: #ffd6f2;
}

.gallery-item span {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
}


.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}


.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;

  background: rgba(5, 0, 10, 0.82);
  backdrop-filter: blur(6px);

  align-items: center;
  justify-content: center;
}

.image-modal.show {
  display: flex;
}

.image-modal img {
  max-width: 90vw;
  max-height: 86vh;
  border: 2px solid #ffb8e8;
  border-radius: 14px;
  box-shadow: 0 0 28px rgba(255, 160, 220, 0.45);
}

.modal-close {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 1000;

  color: #fff;
  font-size: 42px;
  cursor: pointer;
  text-shadow: 0 0 10px #f5b6e4, 0 0 8px #000;
}

.omake-home-link {
  margin-top: 12px;
  background: linear-gradient(#c98cff, #8f5ad8);
}

.omake-home-link:hover {
  background: linear-gradient(#d9a6ff, #a46be8);
}

.back-area .omake-back-button {
  background: linear-gradient(#c98cff, #8f5ad8);
  border-color: #e5c4ff;
}

.back-area .omake-back-button:hover {
  background: linear-gradient(#d9a6ff, #a46be8);
}




.gallery-year {
  margin: 38px 0 18px;

  padding-left: 12px;
  border-left: 4px solid rgba(255, 180, 230, 0.75);

  color: #ffd3ef;
  font-size: 24px;
  text-shadow: 0 0 8px rgba(0,0,0,0.7);
}
