/**
 * かんたんギター - ガイドページ共通スタイル
 * guide.html, guide-*.html 共通
 */

/* ========================================
   Table of Contents
======================================== */
.toc {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin: -30px 16px 40px;
  box-shadow: var(--shadow);
  position: relative;
}

.toc-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-list a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.toc-list a:hover {
  background: #fff5e6;
  text-decoration: none;
}

/* ========================================
   Section
======================================== */
section {
  margin: 48px 0;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary-light);
}

.section-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ========================================
   Chord Example
======================================== */
.chord-example {
  background: #f8f8f8;
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 20px 0;
  font-family: "M PLUS 1 Code", monospace;
  overflow-x: auto;
}

.chord-example .chord {
  color: #cc0000;
  font-weight: 600;
}

.chord-example .bar {
  color: #cc0000;
}

/* ========================================
   Explanation Box
======================================== */
.explanation {
  background: linear-gradient(135deg, #fff9e6, #fff3cc);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}

.explanation-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========================================
   Chord List
======================================== */
.chord-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.chord-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #eee;
  background: #fff;
}

.chord-row:nth-child(odd) {
  background: #fdfdfd;
}

.chord-diagram {
  width: 120px;
  flex-shrink: 0;
}

.chord-diagram img {
  width: 100%;
  height: auto;
  display: block;
}

.chord-info {
  flex: 1;
}

.chord-info-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 6px;
}

.chord-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  font-family: "M PLUS 1 Code", monospace;
}

.chord-text-main {
  font-size: 14px;
  margin-bottom: 4px;
}

.chord-text-sub {
  font-size: 12px;
  color: var(--text-light);
}

/* ========================================
   Replace Table
======================================== */
.replace-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.replace-table th,
.replace-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.replace-table th {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  font-weight: 600;
}

.replace-table tr:hover td {
  background: #fff9e6;
}

.replace-table .chord-name {
  font-family: "M PLUS 1 Code", monospace;
  font-weight: 700;
  font-size: 18px;
}

.replace-table .arrow {
  color: var(--primary);
  font-size: 20px;
}

/* ========================================
   F-Chord Tips
======================================== */
.f-tips {
  counter-reset: tip;
}

.f-tip {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 16px 0;
  border-left: 4px solid var(--primary);
  position: relative;
}

.f-tip::before {
  counter-increment: tip;
  content: "TIP " counter(tip);
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 2px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
}

.f-tip-title {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 8px;
  margin-top: 8px;
}

.f-tip-img {
  width: 100%;
  max-width: 300px;
  height: 150px;
  background: #f0f0f0;
  border-radius: 8px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
}

/* ========================================
   Encouragement Box
======================================== */
.encouragement {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: #fff;
  margin: 40px 0;
}

.encouragement-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.encouragement-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.encouragement-text {
  font-size: 15px;
  opacity: 0.95;
}

.encouragement-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary-dark);
  padding: 12px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 20px;
  transition: all 0.2s;
}

.encouragement-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  text-decoration: none;
}

/* ========================================
   Back Link
======================================== */
.back-link {
  margin-top: 24px;
  font-size: 14px;
}

.back-link a {
  color: var(--primary-dark);
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 600px) {
  .section-title {
    font-size: 20px;
  }
  
  .replace-table th,
  .replace-table td {
    padding: 10px 12px;
    font-size: 14px;
  }

  .chord-row {
    flex-direction: column;
  }
  
  .chord-diagram {
    width: 100%;
    max-width: 200px;
  }
}
