/* ------------------------------
   基本設定
------------------------------ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;

  background: #f7f6f1;

  color: #171717;

  font-family:
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "YuGothic",
    sans-serif;

  line-height: 1.8;
}

button,
a {
  font: inherit;
}


/* ------------------------------
   ヘッダー
------------------------------ */

.hero {
  position: relative;

  width: 100%;

  min-height: 460px;

  background-image: url("header.png");
  background-position: center;
  background-size: cover;
}

.hero::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.70) 0%,
      rgba(0, 0, 0, 0.22) 52%,
      rgba(0, 0, 0, 0.08) 100%
    );
}

.hero-overlay {
  position: relative;

  z-index: 1;

  max-width: 1440px;

  min-height: 460px;

  margin: 0 auto;

  padding: 38px 70px 60px;

  display: flex;

  flex-direction: column;

  justify-content: space-between;

  color: white;
}

.hero-top {
  display: flex;

  justify-content: space-between;

  align-items: center;
}

.brand-name {
  margin: 0;

  font-size: 16px;

  font-weight: 700;

  letter-spacing: 0.08em;
}

.guide-link {
  color: white;

  text-decoration: none;

  border-bottom: 1px solid white;

  padding-bottom: 3px;
}

.hero-title p {
  margin: 0 0 8px;

  font-size: 13px;

  letter-spacing: 0.2em;
}

.hero-title h1 {
  margin: 0;

  font-size: clamp(42px, 5vw, 76px);

  line-height: 1.15;

  letter-spacing: 0.04em;
}


/* ------------------------------
   メイン共通
------------------------------ */

main {
  max-width: 1440px;

  margin: 0 auto;

  padding: 0 70px 120px;
}

.section-label {
  margin: 0 0 12px;

  font-size: 12px;

  font-weight: 700;

  letter-spacing: 0.18em;
}

h2 {
  margin: 0;

  font-size: 32px;

  line-height: 1.4;
}


/* ------------------------------
   苦手要素設定
------------------------------ */

.settings-section {
  min-height: 180px;

  display: flex;

  justify-content: space-between;

  align-items: center;

  border-bottom: 1px solid #c9c7bf;
}

.settings-status {
  margin: 14px 0 0;

  font-size: 15px;
}


/* ------------------------------
   ボタン
------------------------------ */

.primary-button,
.secondary-button {
  border: 0;

  cursor: pointer;

  transition:
    background 0.2s,
    color 0.2s;
}

.primary-button {
  min-width: 170px;

  padding: 14px 24px;

  background: #171717;

  color: white;
}

.primary-button:hover {
  background: #3c3c3c;
}

.secondary-button {
  padding: 12px 22px;

  background: #c71585;
  color: #ffffff;

  border: 1px solid #c71585;

  font-weight: 700;

  text-decoration: none;
  display: inline-block;
}

.secondary-button:hover {
  background: #171717;

  color: white;
}


/* ------------------------------
   シナリオ一覧
------------------------------ */

.scenario-section {
  padding-top: 80px;
}

.section-heading {
  margin-bottom: 38px;
}

.scenario-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 34px;
}


/* ------------------------------
   シナリオカード
------------------------------ */

.scenario-card {
  background: white;

  border-top: 1px solid #171717;
}

.scenario-thumbnail {
  aspect-ratio: 1 / 1;

  background: #deddd7;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 12px;

  letter-spacing: 0.16em;

  color: #77746d;

  overflow: hidden;
}

/* ------------------------------
   管理画面ログイン
------------------------------ */

html.auth-checking body {
  visibility: hidden;
}

.admin-entry-link {
  color: #ffffff;

  font-size: 12px;
  text-decoration: none;

  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

.admin-entry-link:hover {
  opacity: 0.55;
}

.admin-login-page {
  width: min(560px, calc(100% - 40px));

  margin: 0 auto;

  padding-top: 80px;
  padding-bottom: 110px;
}

.admin-login-panel {
  padding: 42px;

  border: 1px solid #b9b7b0;

  background: #ffffff;
}

.admin-login-panel h2 {
  margin: 6px 0 12px;

  font-size: 30px;
}

.admin-login-description {
  margin: 0 0 32px;

  color: #67655f;

  line-height: 1.8;
}

.admin-login-field {
  margin-bottom: 24px;
}

.admin-login-field label {
  display: block;

  margin-bottom: 8px;

  font-size: 13px;
  font-weight: 700;
}

.admin-login-field input {
  width: 100%;

  padding: 12px 14px;

  border: 1px solid #aaa79e;

  background: #ffffff;

  font: inherit;
}

.admin-login-message {
  min-height: 1.7em;

  margin-top: 18px;

  color: #a32929;
}

@media (max-width: 700px) {
  .hero-top {
    flex-wrap: wrap;
  }

  .admin-login-panel {
    padding: 28px 22px;
  }
}


/* ------------------------------
   内見前のご案内
------------------------------ */

.guide-page {
  width: min(980px, calc(100% - 12vw));

  margin: 0 auto;

  padding-top: 80px;
  padding-bottom: 110px;
}

.guide-page h2 {
  margin: 7px 0 24px;

  font-size: 34px;
  line-height: 1.45;
}

.guide-introduction {
  max-width: 780px;
}

.guide-introduction > p:not(.section-label) {
  margin: 12px 0;

  font-size: 16px;
  line-height: 2;
}

.guide-flow-section,
.guide-notice-section,
.guide-final-section {
  margin-top: 90px;

  padding-top: 55px;

  border-top: 1px solid #b9b7b0;
}

.guide-flow-list {
  margin: 40px 0 0;
  padding: 0;

  list-style: none;

  border-top: 1px solid #deddd7;
}

.guide-flow-list li {
  padding: 28px 0;

  display: grid;

  grid-template-columns: 70px minmax(0, 1fr);

  gap: 22px;

  border-bottom: 1px solid #deddd7;
}

.guide-step-number {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.guide-flow-list h3 {
  margin: 0 0 9px;

  font-size: 20px;
}

.guide-flow-list p {
  margin: 0;

  color: #5b5a55;

  line-height: 1.8;
}

.guide-notice-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1px;

  background: #b9b7b0;

  border: 1px solid #b9b7b0;
}

.guide-notice-grid article {
  padding: 30px;

  background: #ffffff;
}

.guide-notice-grid h3 {
  margin: 0 0 12px;

  font-size: 18px;
}

.guide-notice-grid p {
  margin: 0;

  color: #5b5a55;

  font-size: 14px;
  line-height: 1.9;
}

.guide-final-section {
  text-align: center;
}

.guide-final-section h2 {
  margin-bottom: 32px;
}

.guide-final-actions {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 16px;
}

@media (max-width: 700px) {
  .guide-page {
    width: calc(100% - 40px);

    padding-top: 55px;
  }

  .guide-page h2 {
    font-size: 27px;
  }

  .guide-flow-section,
  .guide-notice-section,
  .guide-final-section {
    margin-top: 65px;
  }

  .guide-flow-list li {
    grid-template-columns: 45px minmax(0, 1fr);

    gap: 14px;
  }

  .guide-notice-grid {
    grid-template-columns: 1fr;
  }
}

.scenario-thumbnail img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

.scenario-content {
  padding: 26px 4px 4px;
}

.scenario-title-row {
  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  gap: 20px;
}

.scenario-title-row h3 {
  margin: 0;

  font-size: 25px;

  line-height: 1.4;
}

.rating {
  flex-shrink: 0;

  padding: 3px 8px;

  border: 1px solid #171717;

  font-size: 11px;

  font-weight: 700;
}

.world {
  margin: 12px 0 28px;

  font-size: 13px;

  color: #5b5a55;
}


/* ------------------------------
   時間・ロスト率
------------------------------ */

.scenario-data {
  margin: 0;

  border-top: 1px solid #deddd7;
}

.scenario-data > div {
  display: flex;

  justify-content: space-between;

  gap: 15px;

  padding: 13px 0;

  border-bottom: 1px solid #deddd7;
}

.scenario-data dt {
  font-size: 13px;

  color: #67655f;
}

.scenario-data dd {
  margin: 0;

  font-weight: 700;
}

.help {
  width: 17px;

  height: 17px;

  margin-left: 4px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  border: 1px solid #77746d;

  border-radius: 50%;

  font-size: 10px;

  cursor: help;
}


/* ------------------------------
   ジャンル
------------------------------ */

.genre-list {
  min-height: 72px;

  padding: 22px 0;

  display: flex;

  flex-wrap: wrap;

  align-content: flex-start;

  gap: 7px;
}

.genre-list span {
  padding: 4px 9px;

  border: 1px solid #aaa79e;

  font-size: 11px;
}


/* ------------------------------
   カード下部
------------------------------ */

.card-actions {
  padding-top: 8px;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 14px;
}

.sample-link {
  color: #171717;

  font-size: 13px;

  text-decoration: none;

  border-bottom: 1px solid #171717;
}

.sample-link:hover {
  opacity: 0.55;
}


/* ------------------------------
   スマートフォン
------------------------------ */

@media (max-width: 700px) {

  .hero {
    min-height: 360px;
  }

  .hero-overlay {
    min-height: 360px;

    padding: 24px 22px 36px;
  }

  .hero-title h1 {
    font-size: 40px;
  }

  main {
    padding:
      0 22px 80px;
  }

  .settings-section {
    min-height: 190px;

    align-items: flex-start;

    flex-direction: column;

    justify-content: center;

    gap: 24px;
  }

  h2 {
    font-size: 26px;
  }

  .scenario-grid {
    grid-template-columns: 1fr;

    gap: 60px;
  }

}

/* ------------------------------
   アクセントカラー調整
------------------------------ */

/* 「設定を変更する」 */
.secondary-button {
  background: #c71585;
  color: #ffffff;
  border-color: #c71585;
  font-weight: 700;
}

.secondary-button:hover {
  background: #a91270;
  color: #ffffff;
  border-color: #a91270;
}


/* レーティング共通 */
.rating {
  font-weight: 700;
}

/* R18・R18G */
.rating-r18 {
  background: #c71585;
  color: #ffffff;
  border-color: #c71585;
}

/* R15 */
.rating-r15 {
  background: #ff69b4;
  color: #ffffff;
  border-color: #ff69b4;
}

/* ------------------------------
   ? ツールチップ
------------------------------ */

.help {
  position: relative;
}

.tooltip {
  position: absolute;

  left: 50%;
  bottom: calc(100% + 12px);

  transform: translateX(-50%);

  width: 260px;

  padding: 14px 16px;

  background: #171717;
  color: #ffffff;

  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;

  text-align: left;

  border-radius: 4px;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  z-index: 100;
}

.tooltip-wide {
  width: 430px;
}

.help:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.tooltip::after {
  content: "";

  position: absolute;

  top: 100%;
  left: 50%;

  transform: translateX(-50%);

  border: 7px solid transparent;
  border-top-color: #171717;
}

/* ------------------------------
   下層ページ共通
------------------------------ */

.sub-header {
  background: #171717;
  color: #ffffff;
}

.sub-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 34px 70px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub-header h1 {
  margin: 5px 0 0;
  font-size: 32px;
}

.back-link {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid #ffffff;
}


/* ------------------------------
   苦手要素設定ページ
------------------------------ */

.settings-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 70px 120px;
}

.settings-intro {
  padding-bottom: 45px;
  border-bottom: 1px solid #c9c7bf;
}

.settings-intro p {
  margin-top: 16px;
}

.settings-count {
  font-weight: 700;
}


/* カテゴリ */

.category-list {
  margin-top: 50px;
}

.category-item {
  border-top: 1px solid #b9b7b0;
}

.category-item:last-child {
  border-bottom: 1px solid #b9b7b0;
}

.category-item summary {
  padding: 20px 4px;

  cursor: pointer;

  display: flex;
  justify-content: space-between;

  font-size: 17px;
  font-weight: 700;

  list-style: none;
}

.category-item summary::-webkit-details-marker {
  display: none;
}

.category-count {
  min-width: 26px;
  height: 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #aaa79e;
  border-radius: 50%;

  font-size: 11px;
}

.category-content {
  padding: 0 4px 24px;
}


/* 個別タグ */

.preference-item {
  border-top: 1px solid #deddd7;
}

.preference-toggle {
  width: 100%;
  padding: 16px 0;

  border: 0;
  background: transparent;

  display: flex;
  justify-content: space-between;

  cursor: pointer;

  text-align: left;
}

.preference-toggle:hover {
  opacity: 0.6;
}

.preference-status {
  color: #77746d;
  font-size: 12px;
}

.preference-panel {
  padding: 4px 0 28px;
}

.preference-group + .preference-group {
  margin-top: 24px;
}

.preference-label {
  margin: 0 0 10px;

  font-weight: 700;
}

.preference-group label {
  display: block;

  margin: 8px 0;

  cursor: pointer;
}


/* 下部操作 */

.settings-actions {
  margin-top: 55px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.no-preferences-button {
  margin-left: auto;
}

.reset-button {
  border: 0;
  background: transparent;

  padding: 10px 0;

  color: #77746d;

  cursor: pointer;

  border-bottom: 1px solid #77746d;
}

.reset-button:hover {
  color: #171717;
}


/* スマートフォン */

@media (max-width: 700px) {

  .sub-header-inner {
    padding: 24px 22px;
  }

  .sub-header h1 {
    font-size: 25px;
  }

  .settings-page {
    padding: 50px 22px 80px;
  }

  .settings-actions {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 30px;
  }

  .no-preferences-button {
    margin-left: 0;
  }

}

/* ------------------------------
   苦手要素の設定欄 開閉
------------------------------ */

.preference-panel {
  display: none;
}

.preference-panel.is-open {
  display: block;
}

/* ------------------------------
   苦手要素設定 状態表示
------------------------------ */

.preference-range-group {
  display: none;
}

.preference-range-group.is-active {
  display: block;
}

.preference-status.is-caution {
  color: #c71585;
  font-weight: 700;
}

.preference-status.is-ng {
  color: #c71585;
  font-weight: 700;
}

.save-message {
  min-height: 1.8em;
  margin-top: 18px;

  color: #c71585;
  font-weight: 700;
}

.input-error {
  margin: 12px 0 0;

  color: #c71585;
  font-size: 13px;
  font-weight: 700;
}

/* ------------------------------
   シナリオ詳細
------------------------------ */

.scenario-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 70px 120px;
}

.scenario-page > h2 {
  margin-bottom: 45px;
  font-size: 42px;
}

.scenario-detail-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 70px;
}

.scenario-info-panel,
.scenario-check-panel {
  border-top: 1px solid #171717;
  padding-top: 25px;
}

.scenario-info-panel h3,
.scenario-check-panel h3,
.scenario-note-section h3 {
  margin: 0 0 25px;

  font-size: 20px;
}

.scenario-detail-data {
  margin: 0;
}

.scenario-detail-data > div {
  display: grid;

  grid-template-columns:
    130px 1fr;

  gap: 20px;

  padding: 15px 0;

  border-bottom: 1px solid #deddd7;
}

.scenario-detail-data dt {
  color: #67655f;
  font-size: 13px;
}

.scenario-detail-data dd {
  margin: 0;

  font-weight: 700;
}

.scenario-note-section {
  margin-top: 70px;

  border-top: 1px solid #171717;

  padding-top: 25px;
}


/* スマートフォン */

@media (max-width: 700px) {

  .scenario-page {
    padding: 50px 22px 80px;
  }

  .scenario-detail-layout {
    grid-template-columns: 1fr;

    gap: 55px;
  }

  .scenario-page > h2 {
    font-size: 32px;
  }

}

/* ------------------------------
   苦手要素 照合結果
------------------------------ */

.ng-warning {
  margin-bottom: 30px;
  padding: 20px;

  background: #c71585;
  color: #ffffff;
}

.ng-warning strong {
  font-size: 16px;
}

.ng-warning p {
  margin: 8px 0 0;
}


.match-group {
  margin-bottom: 30px;
}

.match-level-title {
  margin: 0 0 10px;

  font-size: 15px;
  font-weight: 700;
}


.match-target-row {
  padding: 10px 0;

  display: flex;
  justify-content: space-between;

  border-bottom: 1px solid #deddd7;
}


.no-match-result {
  padding: 22px 0;

  border-top: 1px solid #deddd7;
  border-bottom: 1px solid #deddd7;
}

/* ------------------------------
   苦手要素 詳細表示
------------------------------ */

.match-details {
  margin-top: 30px;
}

.match-detail-group + .match-detail-group {
  margin-top: 34px;
}

.match-detail-heading {
  margin: 0 0 12px;

  font-weight: 700;
}

.match-detail-item {
  padding: 14px 0;

  border-bottom: 1px solid #deddd7;
}

.match-detail-main {
  display: flex;

  justify-content: space-between;

  gap: 20px;
}

.match-detail-main span {
  color: #67655f;

  font-size: 13px;
}

.match-note {
  display: none;

  margin-top: 12px;

  padding: 14px 16px;

  background: #f0eee8;

  font-size: 13px;

  line-height: 1.8;
}

.match-note.is-visible {
  display: block;
}

.match-details .secondary-button {
  margin-top: 28px;
}

.all-scenario-details-button {
  margin-top: 18px;
}

.scenario-scope-help {
  margin-top: 34px;

  border: 1px solid #aaa79e;
  background: #ffffff;
}

.scenario-scope-help > summary {
  padding: 14px 16px;

  display: flex;
  align-items: center;
  gap: 9px;

  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.scenario-scope-help > summary::-webkit-details-marker {
  display: none;
}

.scenario-scope-help-icon {
  width: 23px;
  height: 23px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  border: 1px solid #77746d;
  border-radius: 50%;

  font-size: 12px;
  font-weight: 700;
}

.scenario-scope-help-content {
  padding: 0 18px 22px;
}

.scenario-scope-help-content section {
  margin-top: 22px;
}

.scenario-scope-help-content h4 {
  margin: 0 0 7px;
  font-size: 15px;
}

.scenario-scope-help-content p {
  margin: 0;
  line-height: 1.75;
}

.scenario-scope-help-important {
  padding: 14px;

  border-left: 4px solid #c71585;
  background: #f8f3f0;

  font-weight: 700;
}

.scenario-scope-help-example {
  margin-top: 6px !important;
  color: #67655f;
  font-size: 12px;
}

.scenario-scope-help-cases ul {
  margin: 9px 0 0;
  padding-left: 1.4em;
}


/* ==========================================
   苦手要素分類 Version 2
========================================== */

.v2-settings-item,
.v2-admin-item {
  padding: 24px 0;
  border-bottom: 1px solid #d8d3ca;
}

.v2-settings-item:last-child,
.v2-admin-item:last-child {
  border-bottom: 0;
}

.v2-settings-item h3 {
  margin: 0 0 16px;
  font-size: 1.08rem;
}

.v2-rule-item {
  padding: 15px 0;
}

.v2-rule-item + .v2-rule-item {
  border-top: 1px dashed #ddd7ce;
}

.v2-rule-label {
  margin: 0 0 10px;
  line-height: 1.7;
}

.v2-level-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.v2-level-option {
  position: relative;
  cursor: pointer;
}

.v2-level-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.v2-level-option span {
  display: block;
  padding: 10px 8px;
  border: 1px solid #b9b2a7;
  background: #fff;
  text-align: center;
  transition: 0.2s ease;
}

.v2-level-option input[value="ok"]:checked + span {
  color: #fff;
  border-color: #4e6657;
  background: #4e6657;
}

.v2-level-option input[value="caution"]:checked + span {
  color: #fff;
  border-color: #a46716;
  background: #a46716;
}

.v2-level-option input[value="ng"]:checked + span {
  color: #fff;
  border-color: #a52929;
  background: #a52929;
}

.v2-admin-category-content {
  padding: 0 24px 12px;
}

.v2-admin-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.v2-admin-status {
  color: #857d72;
  font-size: 0.85rem;
}

.v2-admin-status.is-set {
  color: #fff;
  padding: 4px 9px;
  background: #4e6657;
}

.v2-admin-fields {
  display: grid;
  gap: 16px;
}

.v2-field-label {
  display: grid;
  gap: 7px;
  font-size: 0.92rem;
}

.v2-field-label select,
.v2-field-label textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #b9b2a7;
  border-radius: 0;
  background: #fff;
  color: #171717;
  font: inherit;
}

.v2-extra-check,
.v2-scope-fields label,
.v2-specific-targets label {
  display: block;
  margin: 8px 0;
}

.v2-scope-fields,
.v2-specific-targets {
  padding: 15px;
  border: 1px solid #d8d3ca;
  background: #f7f4ee;
}

.v2-specific-targets {
  margin-top: 12px;
  background: #fff;
}

[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .v2-level-options {
    grid-template-columns: 1fr;
  }

  .v2-admin-category-content {
    padding-right: 16px;
    padding-left: 16px;
  }
}


/* ==========================================
   R18・R18G 閲覧前確認
========================================== */

.content-gate-checking body > *:not(.content-gate-overlay) {
  visibility: hidden;
}

.content-gate-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  box-sizing: border-box;
  min-height: 100vh;
  padding: 32px 20px;
  background: #f5f2ec;
}

.content-gate-dialog {
  width: min(620px, 100%);
  box-sizing: border-box;
  padding: clamp(34px, 7vw, 72px);
  border-top: 1px solid #171717;
  border-bottom: 1px solid #171717;
  background: #fff;
  text-align: center;
}

.content-gate-rating {
  display: inline-block;
  margin: 14px 0 20px;
  padding: 7px 13px;
  color: #fff;
  background: #cf0a83;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.content-gate-dialog h1 {
  margin: 0 0 24px;
  font-size: clamp(1.65rem, 4vw, 2.3rem);
}

.content-gate-message,
.content-gate-note {
  line-height: 1.9;
}

.content-gate-note {
  margin-top: 14px;
  font-weight: 700;
}

.content-gate-actions {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.content-gate-actions .primary-button,
.content-gate-actions .secondary-button {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.scenario-scope-help-cases li {
  margin: 7px 0;
  line-height: 1.65;
}

/* ------------------------------
   シナリオ詳細 導線
------------------------------ */

.scenario-links {
  margin-top: 38px;

  padding-top: 28px;

  border-top: 1px solid #deddd7;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 16px;
}

.sample-button {
  text-decoration: none;

  display: inline-block;
}

.booth-link {
  color: #171717;

  font-size: 13px;

  text-decoration: none;

  border-bottom: 1px solid #171717;
}

.booth-link:hover {
  opacity: 0.55;
}

.booth-link.distribution-ended {
  cursor: default;
  text-decoration: none;
  font-weight: 700;
}

.booth-link.distribution-ended:hover {
  opacity: 1;
}

.distribution-status-label {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 10px;

  border: 1px solid #171717;

  font-size: 12px;
  font-weight: 700;
}

/* ------------------------------
   作品サンプル
------------------------------ */

.sample-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 70px 70px 120px;
}

.sample-page > h2 {
  margin-bottom: 20px;
  font-size: 42px;
}

.sample-notice {
  margin-bottom: 60px;

  color: #67655f;
  font-size: 13px;
}

.sample-content {
  user-select: none;
  -webkit-user-select: none;
}

.sample-section + .sample-section {
  margin-top: 60px;
}

.sample-section h3 {
  margin: 0 0 22px;

  font-size: 24px;
  font-weight: 700;
}

.sample-section p {
  margin: 0;

  white-space: pre-line;

  font-size: 15px;
  line-height: 2;
}

.sample-spoiler-break {
  margin: 80px 0;
  padding: 36px 20px;

  border-top: 1px solid #171717;
  border-bottom: 1px solid #171717;

  text-align: center;
}

.sample-spoiler-break p {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

.sample-ending-message {
  margin: 80px 0 0;
  padding-top: 30px;

  border-top: 1px solid #c9c7bf;

  text-align: center;
  font-weight: 700;
}

.sample-ending-message a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sample-ending-message a:hover,
.sample-ending-message a:focus-visible {
  color: #cf0a83;
}

.sample-actions {
  margin-top: 80px;

  padding-top: 30px;

  border-top: 1px solid #c9c7bf;

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 30px;
}


/* スマートフォン */

@media (max-width: 700px) {

  .sample-page {
    padding: 50px 22px 80px;
  }

  .sample-page > h2 {
    font-size: 32px;
  }

  .sample-actions {
    align-items: flex-start;
    flex-direction: column;
  }

}

/* ------------------------------
   サンプル編集
------------------------------ */

.sample-editor-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 70px 70px 120px;
}

.sample-editor-page > h2 {
  margin-bottom: 14px;
  font-size: 42px;
}

.sample-editor-description {
  margin-bottom: 50px;

  color: #67655f;
}

.sample-editor-section {
  margin-bottom: 34px;

  padding: 28px;

  background: #ffffff;

  border-top: 1px solid #171717;
}

.sample-editor-section.is-spoiler-break {
  background: #f3efe7;
  border: 1px solid #171717;
}

.sample-editor-section-header {
  margin-bottom: 22px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.sample-editor-section-title {
  font-weight: 700;
}

.sample-editor-section-controls {
  display: flex;
  gap: 8px;
}

.sample-editor-section-controls button {
  padding: 5px 10px;

  border: 1px solid #aaa79e;

  background: transparent;

  cursor: pointer;
}

.sample-editor-section-controls button:hover {
  background: #171717;
  color: #ffffff;
}

.sample-editor-field + .sample-editor-field {
  margin-top: 22px;
}

.sample-editor-field label {
  display: block;

  margin-bottom: 8px;

  font-size: 13px;
  font-weight: 700;
}

.sample-editor-field input,
.sample-editor-field textarea {
  width: 100%;

  padding: 12px 14px;

  border: 1px solid #aaa79e;

  background: #ffffff;

  font: inherit;
}

.sample-editor-field textarea {
  min-height: 220px;

  resize: vertical;

  line-height: 1.8;
}

.sample-editor-actions {
  margin-top: 45px;

  padding-top: 30px;

  border-top: 1px solid #c9c7bf;

  display: flex;
  justify-content: space-between;
  align-items: center;

  flex-wrap: wrap;

  gap: 16px;
}

.back-link-dark {
  color: #171717;

  text-decoration: none;

  border-bottom: 1px solid #171717;
}

/* ------------------------------
   作者登録画面
------------------------------ */

.admin-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 70px 120px;
}

.admin-steps {
  margin-bottom: 55px;
  padding-bottom: 20px;

  display: flex;
  gap: 28px;

  border-bottom: 1px solid #c9c7bf;

  color: #77746d;
  font-size: 13px;
  font-weight: 700;
}

.admin-steps .is-current {
  color: #c71585;
}

.admin-section > h2 {
  margin-bottom: 45px;
  font-size: 36px;
}

.admin-field {
  margin: 0 0 38px;
  padding: 0;

  border: 0;
}

.admin-field > label,
.admin-field > legend {
  display: block;

  margin-bottom: 10px;

  font-size: 14px;
  font-weight: 700;
}

.required-mark {
  margin-left: 8px;
  padding: 2px 6px;

  background: #c71585;
  color: #ffffff;

  font-size: 10px;
  font-weight: 700;
}

.admin-field input[type="text"],
.admin-field input[type="url"],
.admin-field select,
.admin-field textarea {
  width: 100%;

  padding: 12px 14px;

  border: 1px solid #aaa79e;

  background: #ffffff;

  font: inherit;
}

.admin-field textarea {
  resize: vertical;
  line-height: 1.8;
}

.admin-options {
  display: flex;
  gap: 24px;
}

.admin-options-wrap {
  flex-wrap: wrap;
}

.admin-options label {
  cursor: pointer;
}

.admin-subsection {
  margin: 55px 0;

  padding: 35px;

  background: #ffffff;
}

.admin-subsection h3 {
  margin: 0 0 30px;

  font-size: 20px;
}

.field-error {
  min-height: 1.5em;
  margin: 6px 0 0;

  color: #c71585;

  font-size: 12px;
  font-weight: 700;
}

.admin-actions {
  margin-top: 60px;

  padding-top: 30px;

  border-top: 1px solid #c9c7bf;

  display: flex;
  justify-content: flex-end;
}

/* ------------------------------
   作者登録：影響対象
------------------------------ */

.admin-description {
  margin-bottom: 40px;

  color: #67655f;
}

.target-add-area {
  display: flex;

  gap: 16px;

  align-items: center;
}

.target-add-area input {
  flex: 1;

  padding: 12px 14px;

  border: 1px solid #aaa79e;

  background: #ffffff;

  font: inherit;
}

.target-list {
  margin-top: 35px;

  border-top: 1px solid #c9c7bf;
}

.target-item {
  padding: 14px 0;

  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  border-bottom: 1px solid #deddd7;
}

.target-item-name {
  font-weight: 700;
}

.target-delete-button {
  padding: 6px 10px;

  border: 1px solid #aaa79e;

  background: transparent;

  cursor: pointer;
}

.target-delete-button:hover {
  background: #171717;
  color: #ffffff;
}

.admin-actions-between {
  justify-content: space-between;
}

/* ------------------------------
   作者登録：苦手要素
------------------------------ */

.admin-heading-row {
  display: flex;

  justify-content: space-between;
  align-items: flex-end;

  gap: 30px;

  margin-bottom: 30px;
}

.admin-heading-row h2 {
  margin: 0;

  font-size: 36px;
}

.admin-tag-total {
  margin: 0;

  font-weight: 700;
}

.admin-scope-help {
  margin-top: 28px;

  border: 1px solid #aaa79e;
  background: #ffffff;
}

.admin-scope-help > summary {
  padding: 16px 20px;

  display: flex;
  align-items: center;
  gap: 10px;

  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.admin-scope-help > summary::-webkit-details-marker {
  display: none;
}

.admin-scope-help-icon,
.admin-scope-help-button {
  width: 24px;
  height: 24px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  border: 1px solid #77746d;
  border-radius: 50%;

  background: transparent;
  color: #171717;

  font-size: 13px;
  font-weight: 700;
}

.admin-scope-help-content {
  padding: 0 24px 28px;
}

.admin-scope-help-content section {
  margin-top: 24px;
}

.admin-scope-help-content h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.admin-scope-help-content p {
  margin: 0;
  line-height: 1.8;
}

.admin-scope-help-important {
  padding: 16px;

  border-left: 4px solid #c71585;
  background: #f8f3f0;

  font-weight: 700;
}

.admin-scope-help-example {
  margin-top: 7px !important;
  color: #67655f;
  font-size: 13px;
}

.admin-scope-help-cases ul {
  margin: 10px 0 0;
  padding-left: 1.5em;
}

.admin-scope-help-cases li {
  margin: 8px 0;
  line-height: 1.7;
}

.admin-tag-category-list {
  margin-top: 45px;
}

.admin-tag-category {
  border-top: 1px solid #b9b7b0;
}

.admin-tag-category:last-child {
  border-bottom: 1px solid #b9b7b0;
}

.admin-tag-category > summary {
  padding: 20px 4px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  cursor: pointer;

  list-style: none;

  font-weight: 700;
}

.admin-tag-category > summary::-webkit-details-marker {
  display: none;
}

.admin-tag-category-summary-right {
  display: flex;

  align-items: center;

  gap: 14px;
}

.admin-tag-count {
  min-width: 28px;
  height: 28px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  border: 1px solid #aaa79e;
  border-radius: 50%;

  font-size: 11px;
}

.admin-tag-warning {
  color: #c71585;

  font-size: 12px;
  font-weight: 700;
}

.admin-tag-category-content {
  padding: 0 4px 28px;
}

.admin-tag-item {
  border-top: 1px solid #deddd7;
}

.admin-tag-toggle-row {
  padding: 15px 0;

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 20px;
}

.admin-tag-toggle-label {
  display: flex;

  align-items: center;

  gap: 10px;

  cursor: pointer;

  font-weight: 700;
}

.admin-tag-item-status {
  color: #77746d;

  font-size: 12px;
}

.admin-tag-item-status.is-set {
  color: #c71585;

  font-weight: 700;
}

.admin-tag-panel {
  display: none;

  padding: 8px 0 30px 28px;
}

.admin-tag-panel.is-open {
  display: block;
}

.admin-tag-scope-group {
  margin-bottom: 24px;
}

.admin-tag-scope-group > p {
  margin: 0 0 10px;

  display: flex;
  align-items: center;
  gap: 8px;

  font-weight: 700;
}

.admin-scope-help-button {
  padding: 0;
  cursor: pointer;
}

.admin-scope-help-button:hover,
.admin-scope-help-button:focus-visible {
  background: #171717;
  color: #ffffff;
}

.admin-tag-scope-group label {
  display: block;

  margin: 8px 0;

  cursor: pointer;
}

.admin-specific-targets {
  display: none;

  margin-top: 18px;

  padding: 18px 20px;

  background: #ffffff;
}

.admin-specific-targets.is-visible {
  display: block;
}

.admin-specific-targets p {
  margin: 0 0 12px;

  font-size: 13px;
  font-weight: 700;
}

.admin-specific-target-list {
  display: flex;

  flex-wrap: wrap;

  gap: 14px 24px;
}

.admin-tag-note {
  margin-top: 24px;
}

.admin-tag-note label {
  display: block;

  margin-bottom: 8px;

  font-size: 13px;
  font-weight: 700;
}

.admin-tag-note textarea {
  width: 100%;

  min-height: 100px;

  padding: 12px 14px;

  border: 1px solid #aaa79e;

  background: #ffffff;

  font: inherit;

  line-height: 1.8;

  resize: vertical;
}

.admin-tag-error {
  margin: 12px 0 0;

  color: #c71585;

  font-size: 12px;
  font-weight: 700;
}

/* ------------------------------
   作者登録：確認・公開
------------------------------ */

.admin-confirm-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 2fr)
    minmax(280px, 1fr);

  gap: 40px;

  margin-top: 45px;
}

.admin-confirm-block {
  margin-top: 38px;

  padding-top: 24px;

  border-top: 1px solid #171717;
}

.admin-confirm-heading {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 20px;

  margin-bottom: 20px;
}

.admin-confirm-heading h3 {
  margin: 0;

  font-size: 20px;
}

.admin-edit-link {
  color: #171717;

  text-decoration: none;

  border-bottom: 1px solid #171717;

  font-size: 12px;
}

.admin-confirm-data {
  margin: 0;
}

.admin-confirm-data > div {
  display: grid;

  grid-template-columns:
    150px 1fr;

  gap: 20px;

  padding: 12px 0;

  border-bottom: 1px solid #deddd7;
}

.admin-confirm-data dt {
  color: #67655f;

  font-size: 13px;
}

.admin-confirm-data dd {
  margin: 0;

  font-weight: 700;
}

.admin-confirm-status {
  padding: 20px;

  background: #ffffff;
}

.admin-confirm-status p {
  margin: 6px 0;
}

.admin-confirm-status .is-ok {
  color: #171717;

  font-weight: 700;
}

.admin-confirm-status .is-error {
  color: #c71585;

  font-weight: 700;
}

.admin-confirm-targets {
  display: flex;

  flex-wrap: wrap;

  gap: 10px;
}

.admin-confirm-target-chip {
  padding: 5px 10px;

  border: 1px solid #aaa79e;

  background: #ffffff;

  font-size: 12px;
}

.admin-confirm-tag-category {
  border-top: 1px solid #deddd7;
}

.admin-confirm-tag-category:last-child {
  border-bottom: 1px solid #deddd7;
}

.admin-confirm-tag-category summary {
  padding: 16px 0;

  display: flex;

  justify-content: space-between;

  cursor: pointer;

  font-weight: 700;

  list-style: none;
}

.admin-confirm-tag-category summary::-webkit-details-marker {
  display: none;
}

.admin-confirm-tag-list {
  padding: 0 0 18px;
}

.admin-confirm-tag-item {
  padding: 12px 0;

  border-top: 1px solid #eeeeea;
}

.admin-confirm-tag-main {
  display: flex;

  justify-content: space-between;

  gap: 20px;
}

.admin-confirm-tag-main strong {
  font-size: 14px;
}

.admin-confirm-tag-main span {
  color: #67655f;

  font-size: 12px;
}

.admin-confirm-tag-note {
  margin-top: 8px;

  color: #67655f;

  font-size: 12px;
}

.admin-publish-actions {
  margin-top: 65px;

  padding-top: 30px;

  border-top: 1px solid #c9c7bf;

  display: flex;

  justify-content: space-between;

  align-items: center;
}

@media (max-width: 700px) {

  .admin-confirm-layout {
    grid-template-columns: 1fr;
  }

}


/* ------------------------------
   作者用：公開作品の管理一覧
------------------------------ */

.admin-header {
  padding: 46px 6vw 34px;

  border-bottom: 1px solid #b9b7b0;

  background: #ffffff;
}

.admin-header-inner {
  width: min(1180px, 100%);

  margin: 0 auto;

  display: flex;

  justify-content: space-between;
  align-items: flex-end;

  gap: 30px;
}

.admin-header h1 {
  margin: 5px 0 0;

  font-size: 38px;
}

.admin-management-page {
  width: min(1180px, calc(100% - 12vw));

  margin: 0 auto;

  padding-top: 70px;
  padding-bottom: 100px;
}

.admin-management-heading {
  display: flex;

  justify-content: space-between;
  align-items: flex-end;

  gap: 30px;
}

.admin-management-heading h2 {
  margin: 0 0 10px;

  font-size: 32px;
}

.admin-management-heading p {
  margin: 0;

  color: #67655f;
}

.admin-management-count {
  margin: 42px 0 12px;

  font-size: 13px;
  font-weight: 700;
}

.admin-management-list {
  border-top: 1px solid #171717;
}

.admin-management-item {
  padding: 30px 4px;

  display: grid;

  grid-template-columns: minmax(0, 1fr) auto;

  gap: 45px;

  border-bottom: 1px solid #b9b7b0;
}

.admin-management-title-row {
  display: flex;

  align-items: center;

  gap: 15px;
}

.admin-management-title-row h3 {
  margin: 0;

  font-size: 25px;
}

.admin-publish-status {
  padding: 4px 9px;

  border: 1px solid #aaa79e;

  font-size: 11px;
  font-weight: 700;
}

.admin-publish-status.is-published {
  border-color: #236b4d;

  color: #236b4d;
}

.admin-publish-status.is-private {
  color: #77746d;
}

.admin-management-data {
  margin: 22px 0 0;

  display: flex;

  flex-wrap: wrap;

  gap: 10px 30px;
}

.admin-management-data > div {
  display: flex;

  gap: 10px;
}

.admin-management-data dt {
  color: #77746d;

  font-size: 12px;
}

.admin-management-data dd {
  margin: 0;

  font-size: 12px;
  font-weight: 700;
}

.admin-management-actions {
  min-width: 220px;

  display: flex;

  flex-direction: column;
  align-items: flex-start;

  gap: 13px;
}

.admin-next-step-note {
  max-width: 220px;

  margin: 0;

  color: #77746d;

  font-size: 11px;
  line-height: 1.6;
}

.admin-private-message {
  max-width: 220px;

  margin: 0;

  color: #77746d;

  font-size: 12px;
  line-height: 1.6;
}

.admin-operation-buttons {
  width: 100%;

  padding-top: 13px;

  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  border-top: 1px solid #deddd7;
}

.admin-sample-edit-link {
  padding: 8px 12px;

  display: inline-block;

  border: 1px solid #171717;

  color: #171717;

  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.admin-sample-edit-link:hover {
  background: #171717;

  color: #ffffff;
}


/* ------------------------------
   作者用：作品画像登録
------------------------------ */

.admin-image-page {
  width: min(980px, calc(100% - 12vw));

  margin: 0 auto;

  padding-top: 70px;
  padding-bottom: 100px;
}

.admin-image-page h2 {
  margin: 5px 0 12px;

  font-size: 34px;
}

.admin-image-description {
  margin: 0;

  color: #67655f;

  line-height: 1.8;
}

.admin-image-layout {
  margin-top: 42px;

  display: grid;

  grid-template-columns: minmax(280px, 520px) minmax(230px, 1fr);

  gap: 55px;

  align-items: start;
}

.admin-image-preview {
  width: 100%;

  aspect-ratio: 1 / 1;

  display: flex;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: #deddd7;

  color: #77746d;

  font-size: 12px;
  letter-spacing: 0.16em;
}

.admin-image-preview img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

.admin-image-controls {
  display: flex;

  flex-direction: column;
  align-items: flex-start;

  gap: 18px;
}

.admin-image-input {
  position: absolute;

  width: 1px;
  height: 1px;

  overflow: hidden;

  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.admin-image-select {
  cursor: pointer;
}

.admin-image-help {
  margin: 0;

  color: #77746d;

  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .admin-image-page {
    width: calc(100% - 40px);
  }

  .admin-image-layout {
    grid-template-columns: 1fr;

    gap: 30px;
  }
}

.admin-operation-button {
  padding: 7px 10px;

  border: 1px solid #77746d;

  background: transparent;

  color: #171717;

  font: inherit;
  font-size: 11px;

  cursor: pointer;
}

.admin-operation-button:hover {
  background: #171717;

  color: #ffffff;
}

.admin-sort-buttons {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 5px;
}

.admin-operation-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.admin-operation-button:disabled:hover {
  background: transparent;
  color: inherit;
}

.admin-operation-button.is-delete {
  border-color: #a32929;

  color: #a32929;
}

.admin-operation-button.is-delete:hover {
  background: #a32929;

  color: #ffffff;
}

.admin-management-empty {
  padding: 70px 20px;

  text-align: center;

  border-bottom: 1px solid #b9b7b0;
}

.admin-management-empty h3 {
  margin-top: 0;
}

@media (max-width: 700px) {
  .admin-header-inner,
  .admin-management-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-management-page {
    width: calc(100% - 40px);
  }

.admin-management-item {
    grid-template-columns: 1fr;

    gap: 28px;
  }
}


/* ==========================================
   フィードバック反映：戻る導線・補足
========================================== */

.sample-return-actions {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.scenario-bottom-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid #c9c7bf;
}

.bottom-back-button {
  display: inline-block;
  box-sizing: border-box;
  padding: 17px 24px;
  border: 1px solid #171717;
  color: #fff;
  background: #171717;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
  transition: 0.2s ease;
}

.bottom-back-button:hover,
.bottom-back-button:focus-visible {
  color: #171717;
  background: #fff;
}

.v2-rule-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v2-rule-help {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  border: 1px solid #8d877e;
  border-radius: 50%;
  place-items: center;
  color: #171717;
  background: #fff;
  cursor: help;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.v2-rule-help-popup {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  left: 50%;
  display: none;
  width: min(390px, 75vw);
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid #8d877e;
  color: #171717;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  white-space: normal;
  transform: translateX(-50%);
}

.v2-rule-help:hover .v2-rule-help-popup,
.v2-rule-help:focus .v2-rule-help-popup,
.v2-rule-help:focus-within .v2-rule-help-popup {
  display: block;
}

@media (max-width: 700px) {
  .sample-actions {
    align-items: flex-start;
  }

  .bottom-back-button {
    width: 100%;
  }

  .v2-rule-help-popup {
    position: fixed;
    top: 50%;
    left: 18px;
    right: 18px;
    width: auto;
    max-height: min(70vh, 460px);
    overflow-y: auto;
    transform: translateY(-50%);
    overscroll-behavior: contain;
  }
}
