﻿* {
  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;
}

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;
}

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

.input-group {
  margin-bottom: 1.2rem;
}

.input-group:last-child {
  margin-bottom: 0;
}

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

textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}

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

select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
}

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

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-row input[type="color"] {
  width: 48px;
  height: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
  background: #fff;
}

.color-row span {
  font-size: 0.9rem;
  color: #555;
  font-family: monospace;
}

.qr-output-area {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  padding: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  min-height: 200px;
  justify-content: center;
}

.qr-placeholder {
  color: #bbb;
  font-size: 0.95rem;
  text-align: center;
}

#qr-display canvas,
#qr-display img {
  display: block;
  border-radius: 4px;
}

.btn {
  display: inline-block;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

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

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

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

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

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

/* ━━━ 入力タイプタブ ━━━ */
.type-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.type-tab {
  padding: .45rem .9rem;
  font-size: .85rem;
  font-weight: 600;
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.type-tab:hover { border-color: #1a73e8; color: #1a73e8; }
.type-tab.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.type-panel.hidden { display: none; }
.wifi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 1rem;
}
@media (max-width: 560px) { .wifi-grid { grid-template-columns: 1fr; } }
.wifi-input {
  width: 100%;
  padding: .55rem .85rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: .95rem;
  transition: border-color .15s;
}
.wifi-input:focus { outline: none; border-color: #1a73e8; }
.wifi-select {
  width: 100%;
  padding: .55rem .85rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: .9rem;
  background: #fff;
  cursor: pointer;
}
.type-hint {
  font-size: .8rem;
  color: #64748b;
  margin-top: .6rem;
  padding: .45rem .75rem;
  background: #f0f4ff;
  border-radius: 8px;
}

/* ━━━ 活用シーン ━━━ */
.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: #f0f4ff;
  border: 1.5px solid #c7d7fd;
  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 #c7d7fd;
  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: #666; line-height: 1.5; margin: 0; }

/* ━━━ ヒーロー ━━━ */
.hero {
  text-align: center;
  padding: 28px 0 20px;
  margin-bottom: 1.5rem;
}
.hero-icon { font-size: 3rem; margin-bottom: 10px; }
.hero h1 { font-size: 1.8rem; font-weight: bold; margin-bottom: 6px; color: #1e293b; }
.hero .description { color: #666; font-size: 0.95rem; line-height: 1.7; margin-bottom: 0; }
.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;
}

/* ━━━ QRコード仕様早見表 ━━━ */
.table-note-top { font-size: 0.83rem; color: #666; margin-bottom: 10px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 10px; }
.qr-ref-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; min-width: 460px; }
.qr-ref-table th {
  background: #1a73e8;
  color: #fff;
  font-weight: 700;
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap;
}
.qr-ref-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f4ff;
  color: #374151;
  vertical-align: top;
  line-height: 1.55;
}
.qr-ref-table tr:last-child td { border-bottom: none; }
.qr-ref-table .hl-row td { background: #f0f4ff; }
.table-note { font-size: 0.78rem; color: #888; line-height: 1.6; margin-top: 8px; }

/* エラー訂正レベルグリッド */
.ec-level-wrap { margin-top: 4px; }
.ec-level-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.ec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8faff;
  border: 1px solid #e0eaff;
  border-radius: 8px;
  font-size: 0.82rem;
}
.ec-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.ec-l { background: #6b7280; }
.ec-m { background: #2563eb; }
.ec-q { background: #d97706; }
.ec-h { background: #dc2626; }
.ec-desc { color: #4b5563; line-height: 1.45; }

@media (max-width: 560px) {
  .ec-level-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.4rem; }
}

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