﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
button { touch-action: manipulation; }


body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.7;
  overflow-x: hidden;
}

header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1a73e8;
  text-decoration: none;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

h2 {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

/* ヒーロー */
.hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}

.hero-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 1.9rem;
  font-weight: bold;
  margin-bottom: 0.6rem;
}

.description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* カード共通 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e0e0e0;
}

/* 検索カード */
.search-card {
  margin-bottom: 1.25rem;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.search-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

input[type="text"] {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  min-width: 0;
}

input[type="text"]:focus {
  outline: none;
  border-color: #1a73e8;
}

.btn-primary {
  padding: 0.7rem 1.5rem;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-primary:hover { background: #1558b0; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ccc;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.btn-random {
  width: 100%;
  padding: 0.75rem;
  border: 1px dashed #1a73e8;
  border-radius: 8px;
  background: #f0f6ff;
  color: #1a73e8;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-random:hover { background: #e0edff; }

/* ローディング */
.loading-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid #e0e0e0;
  text-align: center;
  margin-bottom: 1.25rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: #888;
  font-size: 0.95rem;
}

/* エラー */
.error-card {
  background: #fff0f0;
  border: 1px solid #ffcdd2;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  color: #c62828;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* 占いカード */
.fortune-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  text-align: center;
  color: #fff;
}

.fortune-date {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

.fortune-stars {
  font-size: 1.6rem;
  color: #ffd700;
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
}

.fortune-keyword {
  display: inline-block;
  background: rgba(255,215,0,0.2);
  color: #ffd700;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  letter-spacing: 0.05em;
}

.fortune-msg {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto;
}

/* ラッキーアイテムカード */
.lucky-card {
  background: linear-gradient(135deg, #fffbe6 0%, #fff8d6 50%, #fff3c0 100%);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
  border: 1px solid #ffd700;
}

.lucky-label {
  font-size: 0.82rem;
  color: #b8860b;
  font-weight: bold;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.lucky-icon {
  font-size: 2.8rem;
  margin-bottom: 0.3rem;
  line-height: 1;
}

.lucky-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #7a5c00;
  margin-bottom: 0.5rem;
}

.lucky-desc {
  font-size: 0.9rem;
  color: #6b5200;
  margin-bottom: 1rem;
  line-height: 1.7;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.lucky-amazon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.6rem;
  background: #FF9900;
  color: #fff;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

.lucky-amazon-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* 曲カード */
.song-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e0e0e0;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.artwork-wrap {
  flex-shrink: 0;
}

.artwork {
  width: 140px;
  height: 140px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  background: #eee;
}

.song-info {
  flex: 1;
  min-width: 0;
}

.song-recommend-label {
  font-size: 0.78rem;
  color: #1a73e8;
  font-weight: bold;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.song-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  line-height: 1.4;
  word-break: break-word;
}

.song-artist {
  font-size: 1rem;
  color: #555;
  margin-bottom: 0.15rem;
}

.song-album {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 1rem;
}

.preview-area {
  margin-top: auto;
}

.preview-label {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 0.35rem;
}

.audio-player {
  width: 100%;
  height: 36px;
  accent-color: #1a73e8;
}

/* サービスリンク */
.service-links {
  margin-bottom: 1.25rem;
}

.service-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  text-align: center;
}

.service-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.service-btn.amazon  { background: #FF9900; color: #fff; }

.service-icon { font-size: 1rem; }

/* SNSシェアエリア */
.share-area {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.share-label {
  font-size: 0.82rem;
  color: #888;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.share-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.share-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.share-x {
  background: #000;
  color: #fff;
}

.share-line {
  background: #06C755;
  color: #fff;
}

.share-copy {
  background: #f5f5f5;
  color: #555;
  border: 1px solid #e0e0e0;
}

.share-copy.copied {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #4CAF50;
}

/* 別の曲ボタン */
.next-area {
  text-align: center;
  margin-bottom: 1.25rem;
}

.btn-next {
  padding: 0.6rem 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-next:hover {
  background: #f0f6ff;
  border-color: #1a73e8;
  color: #1a73e8;
}

/* 説明カード */
.info-card p {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.8;
}

.hidden { display: none; }

/* ━━━ Amazonおすすめ ━━━ */
.amazon-card h2 { margin-bottom: 0.25rem; }
.amazon-note { font-size: 0.82rem; color: #999; margin-bottom: 1rem; }
.amazon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.amazon-item {
  display: block;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.9rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.amazon-item:hover {
  border-color: #FF9900;
  box-shadow: 0 2px 8px rgba(255,153,0,0.15);
  transform: translateY(-1px);
}
.amazon-item-icon { font-size: 1.7rem; margin-bottom: 0.35rem; }
.amazon-item-name { font-size: 0.88rem; font-weight: bold; margin-bottom: 0.2rem; }
.amazon-item-desc { font-size: 0.76rem; color: #888; line-height: 1.5; margin-bottom: 0.45rem; }
.amazon-item-link { font-size: 0.78rem; color: #FF9900; font-weight: bold; }

footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.875rem;
}

footer a {
  color: #999;
  text-decoration: none;
  margin: 0 0.5rem;
}

footer a:hover { color: #1a73e8; }
footer p { margin-bottom: 0.3rem; }

/* ─── Tips grid (rank-tracker 統一パターン) ──────── */
.tips-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.tip-item { display: flex; gap: .65rem; }
.tip-icon { font-size: 1.4rem; flex-shrink: 0; }
.tip-text strong { display: block; font-weight: 700; margin-bottom: .15rem; font-size: .88rem; }
.tip-text p { font-size: .8rem; color: #78716c; line-height: 1.55; }

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }

  .song-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .artwork { width: 160px; height: 160px; }

  /* song-info が align-items:center の影響で縮まないよう全幅に固定 */
  .song-info { width: 100%; }

  /* プレビューエリアを縦並び中央寄せに */
  .preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .audio-player { width: 100%; }
  .tips-grid { grid-template-columns: 1fr; }
}

.amazon-notice {
  font-size: 0.72rem;
  color: #bbb;
  margin-top: 0.2rem;
}

/* ━━━ ヒーローバッジ ━━━ */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.badge {
  display: inline-block;
  padding: 5px 13px;
  background: #dbeafe;
  color: #1a73e8;
  border: 1.5px solid #bfdbfe;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ━━━ 活用シーン ━━━ */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}
.scene-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  background: #f0f6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
}
.scene-icon { font-size: 1.7rem; flex-shrink: 0; }
.scene-body strong { display: block; font-size: .88rem; font-weight: 700; color: #1a56db; margin-bottom: .2rem; }
.scene-body p { font-size: .78rem; color: #4b5563; line-height: 1.55; margin: 0; }

/* ━━━ 関連ツール ━━━ */
.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}
.related-tool-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  border: 1.5px solid #e8edf5;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.related-tool-item:hover { border-color: #1a73e8; box-shadow: 0 2px 8px rgba(26,115,232,.1); }
.related-tool-icon { font-size: 1.6rem; flex-shrink: 0; }
.related-tool-item strong { display: block; font-size: .88rem; font-weight: 700; color: #1a73e8; margin-bottom: .2rem; }
.related-tool-item p { font-size: .76rem; color: #888; line-height: 1.5; margin: 0; }

@media (max-width: 600px) {
  .scene-grid { grid-template-columns: 1fr; }
  .related-tools { grid-template-columns: 1fr; }
}

/* ━━━ FAQ ━━━ */
.faq-list { display: flex; flex-direction: column; }
.faq-item { padding: .9rem 0; border-bottom: 1px solid #f0f0f0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q { font-size: .9rem; font-weight: 700; color: #1a73e8; margin-bottom: .35rem; }
.faq-a { font-size: .85rem; color: #555; line-height: 1.75; }
