/* ==========================================================================
   セッション体験ミニシナリオ(2026-07-30、ユーザー指示「超簡単なオリジナル
   シナリオを5分くらいで、2~3あるといい」)。第1弾の試作。
   キャラクターシートツール(shinen-character-sheet.css)と統一感を持たせた
   ダークトーン+クリーム色フォーム。
   ========================================================================== */
.shn-ts {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 5vw 80px;
  color: var(--shn-text, #d8cfc0);
  font-size: 14.5px;
  line-height: 1.9;
}
.shn-ts h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(20px, 3vw, 26px);
  color: var(--shn-paper, #d9d0b8);
  margin: 0 0 6px;
}
.shn-ts-meta {
  color: #8e9b93;
  font-size: 12.5px;
  margin: 0 0 22px;
}
.shn-ts-select-wrap {
  border: 1px solid rgba(201,164,92,.25);
  background: rgba(201,164,92,.04);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.shn-ts-select-wrap label {
  display: block;
  font-size: 12.5px;
  color: #8e9b93;
  margin-bottom: 6px;
}
.shn-ts-select-wrap select {
  width: 100%;
  max-width: 360px;
  font-family: inherit;
  font-size: 13.5px;
  padding: 7px 9px;
  background: #f2ead8;
  color: #262019;
  border: 1px solid rgba(201,164,92,.4);
}
.shn-ts-mode-toggle {
  display: flex;
  gap: 8px;
}
.shn-ts-mode-btn {
  font-family: inherit;
  font-size: 12.5px;
  padding: 7px 14px;
  border: 1px solid rgba(201,164,92,.5);
  background: transparent;
  color: #c9a45c;
  cursor: pointer;
  border-radius: 3px;
}
.shn-ts-mode-btn:hover { background: rgba(201,164,92,.15); }
.shn-ts-mode-btn.is-active { background: #c9a45c; color: #0b0d12; font-weight: 600; }
.shn-ts-kpnote {
  font-size: 12px;
  line-height: 1.7;
  color: #b9a06a;
  background: rgba(201,164,92,.08);
  border: 1px dashed rgba(201,164,92,.4);
  padding: 10px 12px;
  margin-bottom: 14px;
}
/* ---- マスコット(案内役) ---- */
.shn-ts-mascot-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
}
.shn-ts-mascot-badge {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  /* 淡すぎる旧値だと台座がほぼ見えず、背景抜き画像がそのまま浮いて見えていたため濃くした(2026-07-30)。 */
  background: radial-gradient(circle at 50% 42%, rgba(201,164,92,.55), rgba(201,164,92,.22) 62%, rgba(201,164,92,.05) 100%);
  border: 1.5px solid rgba(201,164,92,.55);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
:root[data-theme="light"] .shn-ts-mascot-badge {
  background: radial-gradient(circle at 50% 42%, rgba(156,113,48,.35), rgba(156,113,48,.15) 62%, rgba(156,113,48,.04) 100%);
  border-color: rgba(156,113,48,.5);
}
.shn-ts-mascot-avatar {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.45));
}
.shn-ts-mascot-bubble {
  position: relative;
  flex: 1;
  background: rgba(201,164,92,.08);
  border: 1px solid rgba(201,164,92,.3);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.75;
  color: #e8e2d0; /* テーマの継承変数に頼らず明示指定(2026-07-30、文字が薄くて読めない不具合の再発防止) */
}
.shn-ts-mascot-bubble::before {
  content: '';
  position: absolute;
  left: -7px; top: 14px;
  width: 12px; height: 12px;
  background: rgba(201,164,92,.08);
  border-left: 1px solid rgba(201,164,92,.3);
  border-bottom: 1px solid rgba(201,164,92,.3);
  transform: rotate(45deg);
}

/* ---- シーンの行動一覧・手がかりログ ---- */
.shn-ts-clues {
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 3px solid #c9a45c;
  background: rgba(201,164,92,.04);
  font-size: 13px;
}
.shn-ts-clues-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  letter-spacing: .08em;
  color: #c9a45c;
  margin-bottom: 6px;
}
.shn-ts-clues p { margin: 0 0 6px; }
.shn-ts-clues p:last-child { margin-bottom: 0; }
.shn-ts-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.shn-ts-action-btn.is-used {
  opacity: .5;
  cursor: default;
}
.shn-ts-action-btn.is-used:hover { background: rgba(201,164,92,.05); }
.shn-ts-move-on-label {
  font-size: 12px;
  color: #8e9b93;
  margin: 20px 0 4px;
}

/* ---- キーパー視点: 技能割り当てクイズ ---- */
.shn-ts-quiz {
  padding: 4px 0;
}
.shn-ts-quiz-label {
  font-size: 13.5px;
  margin-bottom: 12px;
}
.shn-ts-quiz-feedback {
  margin-top: 10px;
  font-size: 12.5px;
  color: #d68080;
}

.shn-ts-hp {
  font-size: 13px;
  font-weight: 600;
  color: #d68080;
  margin: 12px 0;
}
.shn-ts-select-summary {
  margin-top: 10px;
  font-size: 12px;
  color: #8e9b93;
}

.shn-ts-stage {
  min-height: 40px;
}
.shn-ts-scene-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border: 1px solid rgba(201,164,92,.3);
  margin-bottom: 16px;
  display: block;
}
.shn-ts-text p {
  margin: 0 0 14px;
}
.shn-ts-text p:last-child { margin-bottom: 0; }

.shn-ts-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.shn-ts-choice-btn {
  text-align: left;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 12px 16px;
  border: 1px solid rgba(201,164,92,.4);
  background: rgba(201,164,92,.05);
  color: var(--shn-text, #d8cfc0);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.shn-ts-choice-btn:hover { background: rgba(201,164,92,.15); border-color: #c9a45c; }

.shn-ts-check {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px dashed rgba(201,164,92,.4);
  text-align: center;
}
.shn-ts-check-label {
  font-size: 12.5px;
  color: #8e9b93;
  margin-bottom: 10px;
}
.shn-ts-check-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border: 1px solid #c9a45c;
  background: #c9a45c;
  color: #0b0d12;
  cursor: pointer;
}
.shn-ts-check-btn:hover { background: #e0bb70; }
.shn-ts-check-result {
  margin-top: 12px;
  font-size: 13px;
}
.shn-ts-check-result.is-success { color: #8fbf9a; }
.shn-ts-check-result.is-fail { color: #d68080; }

.shn-ts-ending {
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 3px solid #c9a45c;
  background: rgba(201,164,92,.05);
}
.shn-ts-ending-tag {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  letter-spacing: .1em;
  color: #c9a45c;
  margin-bottom: 8px;
}
.shn-ts-restart-row {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.shn-ts-btn {
  font-family: inherit;
  font-size: 12.5px;
  padding: 8px 16px;
  border: 1px solid rgba(201,164,92,.5);
  background: transparent;
  color: #c9a45c;
  cursor: pointer;
}
.shn-ts-btn:hover { background: rgba(201,164,92,.15); }

.shn-ts-progress {
  font-size: 11px;
  color: #8e9b93;
  margin-bottom: 16px;
}

:root[data-theme="light"] .shn-ts-select-wrap,
:root[data-theme="light"] .shn-ts-check { background: rgba(156,113,48,.05); border-color: rgba(156,113,48,.3); }
:root[data-theme="light"] .shn-ts-choice-btn { color: #2a2620; border-color: rgba(156,113,48,.4); background: rgba(156,113,48,.05); }
:root[data-theme="light"] .shn-ts-choice-btn:hover { background: rgba(156,113,48,.15); }
:root[data-theme="light"] .shn-ts-ending { background: rgba(156,113,48,.06); border-left-color: #8a6a2f; }
:root[data-theme="light"] .shn-ts-ending-tag { color: #8a6a2f; }
:root[data-theme="light"] .shn-ts-btn { color: #8a6a2f; border-color: rgba(156,113,48,.4); }
:root[data-theme="light"] .shn-ts-check-btn { background: #8a6a2f; border-color: #8a6a2f; color: #fff; }
:root[data-theme="light"] .shn-ts-mode-btn { color: #8a6a2f; border-color: rgba(156,113,48,.4); }
:root[data-theme="light"] .shn-ts-mode-btn.is-active { background: #8a6a2f; color: #fff; }
:root[data-theme="light"] .shn-ts-kpnote { background: rgba(156,113,48,.08); border-color: rgba(156,113,48,.4); color: #6b5222; }
:root[data-theme="light"] .shn-ts-mascot-bubble,
:root[data-theme="light"] .shn-ts-mascot-bubble::before { background: rgba(156,113,48,.07); border-color: rgba(156,113,48,.35); }
:root[data-theme="light"] .shn-ts-mascot-bubble { color: #3a2f1a; }
:root[data-theme="light"] .shn-ts-clues { background: rgba(156,113,48,.05); border-left-color: #8a6a2f; }
:root[data-theme="light"] .shn-ts-clues-title { color: #8a6a2f; }
/* 継承色(#8e9b93)がライトテーマでコントラスト不足だったため明示上書き(全体レビューで発見、2026-07-30)。 */
:root[data-theme="light"] .shn-ts-meta,
:root[data-theme="light"] .shn-ts-select-wrap label,
:root[data-theme="light"] .shn-ts-move-on-label,
:root[data-theme="light"] .shn-ts-select-summary,
:root[data-theme="light"] .shn-ts-check-label,
:root[data-theme="light"] .shn-ts-progress,
:root[data-theme="light"] .shn-ts-tag.is-fail,
:root[data-theme="light"] .shn-ts-die-face.is-rolling { color: #5f6f63; }

/* ==========================================================================
   判定・技能クイズ用モーダル(レイヤー表示)。ユーザー指摘(2026-07-30)
   「判定のたびに画面がコロコロ変わって分かりにくい」への対応。
   シーンの本体は裏に表示されたまま、判定・クイズだけを上に重ねて表示する。
   ========================================================================== */
.shn-ts-modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(5,8,7,.75);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.shn-ts-modal-backdrop.is-open { display: flex; }
.shn-ts-modal {
  max-width: 480px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  background: #14181a;
  border: 1px solid rgba(201,164,92,.4);
  padding: 24px 24px 22px;
  color: var(--shn-text, #d8cfc0);
  font-size: 13.5px;
  line-height: 1.85;
}
:root[data-theme="light"] .shn-ts-modal { background: #fbf7ec; color: #2a2620; border-color: rgba(156,113,48,.4); }

/* ---- 判定結果タグ・時間経過による状況変化 ---- */
.shn-ts-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.shn-ts-tag.is-success { background: rgba(143,191,154,.15); color: #8fbf9a; }
.shn-ts-tag.is-fail { background: rgba(142,155,147,.15); color: #8e9b93; }
.shn-ts-tag.is-critical { background: rgba(201,164,92,.22); color: #e0bb70; }
.shn-ts-tag.is-fumble { background: rgba(214,128,128,.2); color: #d68080; }
.shn-ts-result-text { margin: 0; }
.shn-ts-escalation {
  margin: 14px 0;
  padding: 10px 14px;
  border: 1px solid rgba(214,128,128,.4);
  background: rgba(214,128,128,.08);
  color: #d68080;
  font-size: 12.5px;
  line-height: 1.7;
}
:root[data-theme="light"] .shn-ts-escalation { background: rgba(180,70,70,.06); border-color: rgba(180,70,70,.3); color: #a24949; }

/* ==========================================================================
   演出の強化(2026-07-30、ユーザー指摘「やっつけ感がある、もう少し演出を」)。
   ダイスの着地演出・フェードイン・カード/画像の質感を整える。
   ========================================================================== */
.shn-ts-die-stage {
  display: flex;
  justify-content: center;
  margin: 18px 0;
}
.shn-ts-die-face {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  background: linear-gradient(145deg, #262b23, #12161600);
  background-color: #171b17;
  border: 2px solid #c9a45c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #e0bb70;
  box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
  transition: border-color .2s ease;
}
.shn-ts-die-face.is-rolling {
  animation: shn-ts-die-shake .11s linear infinite;
  color: #8e9b93;
  border-color: rgba(201,164,92,.35);
}
.shn-ts-die-face.is-landed {
  animation: shn-ts-die-pop .32s cubic-bezier(.34,1.56,.64,1);
}
@keyframes shn-ts-die-shake {
  0% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
  100% { transform: rotate(-4deg); }
}
@keyframes shn-ts-die-pop {
  0% { transform: scale(1.3); }
  55% { transform: scale(.94); }
  100% { transform: scale(1); }
}
.shn-ts-fade-in { animation: shn-ts-fadein .4s ease; }
@keyframes shn-ts-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.shn-ts-mascot-row { animation: shn-ts-fadein .35s ease; }

/* ---- カード・画像・見出しの質感を底上げ ---- */
.shn-ts-scene-img {
  position: relative;
  border-radius: 4px;
}
.shn-ts h1 {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201,164,92,.25);
  margin-bottom: 14px;
}
.shn-ts-choice-btn {
  position: relative;
  transition: background .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.shn-ts-choice-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.shn-ts-choice-btn:active:not(:disabled) { transform: translateY(0); }
.shn-ts-check-btn, .shn-ts-btn {
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.shn-ts-check-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(201,164,92,.25); }
.shn-ts-clues { animation: shn-ts-fadein .3s ease; }
.shn-ts-tag { animation: shn-ts-fadein .3s ease; }
