/* ガイドチュートリアル overlay スタイル。
 * 既存テーマの CSS 変数（--accent, --border-color 等）を参照する。
 */

/* --- DialogueRenderer リッチマークアップ --- */
.guide-bold {
  font-weight: 700;
  color: var(--text-primary, #fff);
}
.guide-screenshot {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color, #333);
  margin: 8px 0;
}
.guide-list {
  margin: 6px 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
  line-height: 1.6;
}
.guide-list li {
  margin-bottom: 2px;
}

/* モックボタン（見た目だけ、クリック不可） */
.guide-mockbtn {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: default;
  margin: 4px 2px;
  text-align: center;
}
.guide-mockbtn--accept {
  background: var(--accent, #c8a84e);
  color: #fff;
}
.guide-mockbtn--reward {
  background: var(--accent, #c8a84e);
  color: #fff;
}
.guide-mockbtn--mode {
  background: var(--card-bg, #2a2a2a);
  color: var(--text-primary, #fff);
  border: 1px solid var(--border-color, #444);
}
.guide-mockbtn--mode-rec {
  background: var(--card-bg, #2a2a2a);
  color: var(--text-primary, #fff);
  border: 2px solid var(--accent, #c8a84e);
}
/* ライブイベント参加ボタン風（オレンジ、横長） */
.guide-mockbtn--event {
  background: #e07830;
  color: #fff;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* タイピング開始ボタン風（オレンジ、縦レイアウト） */
.guide-mockbtn--cta {
  background: #e07830;
  color: #fff;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 0.85rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.3;
}
.guide-mockbtn--cta::before {
  content: "\f450"; /* bi-keyboard-fill */
  font-family: "bootstrap-icons";
  font-size: 0.9rem;
}
.guide-mockbtn--cta::after {
  content: "ローマ字 / かな / フリック入力";
  font-size: 0.6rem;
  opacity: 0.85;
}
.guide-mockbtn--character {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-bg, #2a2a2a);
  border: 2px solid var(--border-color, #444);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  vertical-align: middle;
  padding: 0;
  font-size: 1rem;
}
.guide-mockbtn--hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg, #2a2a2a);
  border: 1px solid var(--border-color, #444);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 1.1rem;
}

/* サイドバーアイテムのモック表示 */
.guide-sidebar-mock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--card-bg, #2a2a2a);
  border: 1px solid var(--border-color, #444);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary, #fff);
  vertical-align: middle;
}
.guide-sidebar-mock i {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* スコア表示 */
.guide-score {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent, #c8a84e);
  font-family: monospace;
}

/* 統計値（ラベル: 値） */
.guide-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 2px 8px 2px 0;
}
.guide-stat__label {
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  text-transform: uppercase;
}
.guide-stat__value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

/* パネル風ブロック */
.guide-panel {
  background: var(--card-bg, #1a1a1a);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}
.guide-panel__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #aaa);
  margin-bottom: 8px;
}
.guide-panel__body {
  font-size: 0.9rem;
}

/* 横並びカラム */
.guide-cols {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.guide-col {
  flex: 1;
  min-width: 80px;
  text-align: center;
}

/* インフォ（details/summary によるネイティブ開閉） */
.guide-info {
  display: inline;
}
.guide-info__label {
  display: inline;
  cursor: pointer;
  color: var(--accent, #3b82f6);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  font-weight: 500;
  list-style: none;
}
/* Chrome/Safari のデフォルト三角アイコンを非表示 */
.guide-info__label::-webkit-details-marker {
  display: none;
}
.guide-info__label::marker {
  content: "";
}
.guide-info__detail {
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--bg-elevated, #1a1a1a);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary, #ccc);
}
/* details をインライン表示にする（改行防止） */
.tutorial-bubble__text details.guide-info {
  display: inline;
}
.tutorial-bubble__text details.guide-info > summary {
  display: inline;
  list-style: none;
}
.tutorial-bubble__text details.guide-info > .guide-info__detail {
  display: block;
}

.guide-info-panel {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: min(360px, calc(100vw - 32px));
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border-color, #ddd);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 12px 16px;
  z-index: 9998;
  font-size: 14px;
}

.guide-info-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.guide-info-panel__header h2 {
  font-size: 15px;
  margin: 0;
}

.guide-info-panel__close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted, #888);
}

.guide-info-panel__items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-info-panel__item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
}

.guide-info-panel__item:last-child {
  border-bottom: none;
}

.guide-info-panel__label {
  font-weight: 600;
  grid-column: 2 / 3;
}

.guide-info-panel__description {
  grid-column: 2 / 3;
  color: var(--text-secondary, #555);
  font-size: 13px;
}

.guide-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  background: var(--accent, #3b82f6);
  border-radius: 4px;
  grid-row: 1 / 3;
  grid-column: 1 / 2;
  align-self: start;
  margin-top: 2px;
}

.guide-action-prompt {
  background: var(--accent, #3b82f6);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  max-width: 280px;
}

.guide-action-prompt--pulse {
  animation: guide-pulse 1.6s ease-in-out infinite;
}

@keyframes guide-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.guide-target-highlight {
  outline: 3px solid var(--accent, #3b82f6) !important;
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2) !important;
}

.guide-inline-button {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent, #3b82f6);
  color: #fff;
  border-radius: 4px;
  font-size: 0.9em;
}

.guide-term {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bg-subtle, rgba(0, 0, 0, 0.06));
  border-radius: 3px;
  font-weight: 600;
}

.guide-ref {
  color: var(--accent, #3b82f6);
  text-decoration: underline;
}

/* スマホレイアウト */
@media (max-width: 640px) {
  .guide-info-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 50vh;
    border-radius: 12px 12px 0 0;
  }
  .guide-mockbtn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .guide-cols {
    gap: 4px;
  }
  .guide-col {
    min-width: 60px;
  }
  .guide-stat__value {
    font-size: 0.9rem;
  }
  .guide-score {
    font-size: 1.2rem;
  }
}

/* ガイドダッシュボード (/my/guide) 用 */
.guide-dashboard {
  max-width: 720px;
  margin: 24px auto;
  padding: 16px;
}

.guide-dashboard__progress-bar {
  background: var(--border-subtle, rgba(0, 0, 0, 0.08));
  border-radius: 6px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 6px;
}

.guide-dashboard__progress-fill {
  background: var(--accent, #3b82f6);
  height: 100%;
  transition: width 300ms ease;
}

.guide-worlds {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.guide-worlds__header {
  margin-bottom: 1.25rem;
}
.guide-worlds__header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}
.guide-worlds__header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.guide-worlds__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guide-worlds__card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.guide-worlds__card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.375rem;
}
.guide-worlds__card > p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

.guide-worlds__meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0;
  margin: 0 0 0.75rem;
  list-style: none;
  display: flex;
  gap: 1rem;
}
.guide-worlds__meta li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.guide-worlds__action {
  margin-top: 0.5rem;
}

/* ユーザー向けガイド画面のボタンスタイル */
.guide-dashboard .btn,
.guide-worlds .btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
.guide-dashboard .btn:hover,
.guide-worlds .btn:hover {
  opacity: 0.85;
}

.guide-dashboard .btn-primary,
.guide-worlds .btn-primary {
  background: var(--accent);
  color: #fff;
}

.guide-dashboard .btn-outline,
.guide-worlds .btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.guide-dashboard .btn-text {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  text-decoration: underline;
}

/* 卒業通知 */
.guide-graduated-notice {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--accent, #3b82f6);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  font-size: 14px;
}

.guide-graduated-notice__link {
  color: var(--accent, #3b82f6);
  text-decoration: underline;
}

.guide-graduated-notice__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

/* セミ自動配置モーダル */
.guide-semi-auto-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-semi-auto-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.guide-semi-auto-modal__panel {
  position: relative;
  background: var(--bg-elevated, #fff);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: calc(100vw - 32px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.guide-semi-auto-modal__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
}

.guide-info-panel__actions {
  display: flex;
  gap: 4px;
}

.guide-info-panel__next {
  background: var(--accent, #3b82f6);
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

