/* assets/css/hint.css */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Shippori Mincho', serif;
  margin: 0;
  padding: 0 0 2rem;
  background: #f8f9fa;
  color: #333;
  line-height: 1.7;
}

.hint-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 1.2rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}
.hint-header h1 {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.2rem;
  font-weight: 500;
  color: #333;
  letter-spacing: 0.05em;
}

.hint-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem;
}

.hint-intro {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  padding: 0.8rem 1rem;
  background: #f0f3f5;
  border-radius: 8px;
  border-left: 3px solid #4a6d7c;
}

/* セクション（レイヤー別） */
.hint-section {
  margin-bottom: 0.5rem;
  border: 1px solid #e8ecef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.hint-section > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease;
  user-select: none;
}

.hint-section > summary::-webkit-details-marker { display: none; }

.hint-section > summary::before {
  content: '▸';
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #aaa;
  transition: transform 0.2s ease;
}

.hint-section[open] > summary::before {
  transform: rotate(90deg);
}

.hint-section > summary:hover {
  background: rgba(74, 109, 124, 0.04);
}

.hint-section > summary .hint-section__pages {
  font-size: 0.75rem;
  color: #8c96a0;
  font-weight: 400;
  margin-left: auto;
}

.hint-section__body {
  padding: 0 1.1rem 1rem;
}

/* 個別ヒント（段階開示） */
.hint-item {
  margin-bottom: 0.4rem;
  border: 1px solid #eef1f3;
  border-radius: 6px;
  overflow: hidden;
}

.hint-item > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
  color: #555;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease;
  user-select: none;
}

.hint-item > summary::-webkit-details-marker { display: none; }

.hint-item > summary::before {
  content: '？';
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  font-size: 0.7rem;
  color: #4a6d7c;
  background: rgba(74, 109, 124, 0.08);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.hint-item[open] > summary::before {
  content: '✓';
  background: rgba(74, 109, 124, 0.15);
}

.hint-item > summary:hover {
  background: rgba(74, 109, 124, 0.03);
}

.hint-item__content {
  padding: 0.5rem 0.8rem 0.7rem;
  font-size: 0.82rem;
  color: #555;
  line-height: 1.8;
  border-top: 1px solid #f0f0f0;
  background: #fafbfc;
}

.hint-item__content code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  background: rgba(74, 109, 124, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: #3a5a68;
}

/* ヒントレベルバッジ */
.hint-level {
  font-size: 0.68rem;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  font-weight: 400;
  margin-left: auto;
}

.hint-level--1 {
  color: #4a6d7c;
  background: rgba(74, 109, 124, 0.08);
}

.hint-level--2 {
  color: #b8860b;
  background: rgba(184, 134, 11, 0.08);
}

.hint-level--3 {
  color: #8b3a3a;
  background: rgba(139, 58, 58, 0.08);
}

/* サブセクションラベル */
.hint-subsection-label {
  font-size: 0.75rem;
  color: #8c96a0;
  letter-spacing: 0.06em;
  padding: 0.6rem 0 0.25rem;
  margin-top: 0.3rem;
  border-top: 1px solid #eef1f3;
}

.hint-subsection-label:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.hint-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.72rem;
  color: #bbb;
}

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.78rem;
  color: #a0aab5;
  line-height: 1.8;
  letter-spacing: 0.04em;
  margin-top: 3rem;
  background: #f8f9fa;
}

.site-footer p {
  margin: 0.2rem 0;
}

@media (max-width: 480px) {
  .hint-header { padding: 0.8rem 1rem; }
  .hint-header h1 { font-size: 1rem; }
  .hint-container { padding: 1rem; }
  .hint-section > summary { font-size: 0.85rem; padding: 0.75rem 0.9rem; }
  .hint-item > summary { font-size: 0.78rem; padding: 0.5rem 0.7rem; }
  .hint-item__content { font-size: 0.78rem; }
}
