﻿* {
  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: 2rem auto;
  padding: 0 1.5rem;
}

/* ━━━ ヒーロー ━━━ */
.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero-icon { font-size: 2.8rem; margin-bottom: .4rem; }
.hero-badges {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: .5rem; margin-top: .75rem;
}
.badge {
  display: inline-block;
  background: #eff6ff; color: #1a73e8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  padding: .2rem .75rem;
}

h1 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.description {
  color: #666;
  margin-bottom: 1.5rem;
}

/* タブ（横スクロール対応） */
.tab-scroll {
  overflow-x: auto;
  margin-bottom: 1.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-scroll::-webkit-scrollbar {
  display: none;
}

.tab-bar {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
  padding-bottom: 2px;
}

.tab-btn {
  padding: 0.55rem 1.1rem;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  color: #555;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab-btn.active {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

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

/* 入力行 */
.input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

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

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

select {
  padding: 0.7rem 0.9rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.2s;
}

select:focus {
  outline: none;
  border-color: #1a73e8;
}

/* 結果リスト */
.result-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.result-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-row:first-child {
  padding-top: 0;
}

.result-row.is-from {
  background: #f0f7ff;
  margin: 0 -1.5rem;
  padding: 0.7rem 1.5rem;
  border-bottom: 1px solid #d0e4ff;
}

.result-label {
  font-size: 0.88rem;
  color: #555;
}

.result-label .unit-symbol {
  font-size: 0.78rem;
  color: #999;
  display: block;
}

.result-value {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: 'Courier New', 'Menlo', monospace;
  color: #222;
  word-break: break-all;
}

.result-row.is-from .result-value {
  color: #1a73e8;
}

.copy-btn {
  padding: 0.3rem 0.7rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f9f9f9;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #1a73e8;
}

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

.empty-msg {
  color: #aaa;
  font-size: 0.95rem;
  text-align: center;
  padding: 1.5rem 0;
}

/* ━━━ 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.4rem; }

  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  select {
    min-width: 0;
  }

  .result-row {
    grid-template-columns: 140px 1fr auto;
    gap: 0.5rem;
  }

  .tips-grid { grid-template-columns: 1fr; }
}

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

/* ━━━ 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; }

/* ━━━ クイックリファレンス表 ━━━ */
.table-wrap { overflow-x: auto; }
.table-note-top { font-size: .8rem; color: #aaa; margin-bottom: .65rem; }
.table-note     { font-size: .75rem; color: #bbb; margin-top: .5rem; }

.unit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
  min-width: 500px;
}
.unit-table th {
  background: #1a73e8;
  color: #fff;
  padding: .5rem .75rem;
  text-align: left;
  font-weight: 700;
  font-size: .78rem;
  white-space: nowrap;
}
.unit-table th.val-col { text-align: right; }
.unit-table td {
  padding: .45rem .75rem;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
  vertical-align: middle;
}
.unit-table tr:hover td { background: #f0f4ff; }
.unit-val { text-align: right; font-weight: 700; color: #1a73e8; font-variant-numeric: tabular-nums; }
.hl-row td { background: #eff6ff !important; font-weight: 600; }

/* ━━━ 活用シーン ━━━ */
.scene-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
.scene-item { display: flex; gap: .65rem; align-items: flex-start; }
.scene-icon { font-size: 1.5rem; flex-shrink: 0; }
.scene-body strong { display: block; font-size: .88rem; font-weight: 700; margin-bottom: .15rem; color: #333; }
.scene-body p { font-size: .8rem; color: #666; 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: 560px) {
  .scene-grid { grid-template-columns: 1fr; }
}
