/* ============================================
   アニメーション
   ============================================ */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   ページコンテナ
   ============================================ */
.speedtest-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.speed-test-content.entry-content {
  max-width: 864px;
  margin: 0 auto;
}

.st-updated {
  margin-top: 10px;
  color: #999;
  font-size: 12px;
}

/* ============================================
   ヒーローセクション
   ============================================ */
.lp-hero {
  position: relative;
  overflow: visible;
  border-radius: 18px;
  margin: 24px 0 32px;
  padding-bottom: 10px;
  background: linear-gradient(135deg, rgba(18,215,219,0.08), rgba(18,215,219,0.06));
  --st-gap: 24px;
}

.lp-hero__inner {
  display: block;
  align-items: center;
  justify-content: space-between;
  gap: var(--st-gap);
  padding: 28px 20px;
}

.lp-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.lp-hero__content h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 10px;
  color: #222;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-align: center;
}

.lp-hero__content > p {
  margin: 0 0 16px;
  color: #555;
  font-size: 15px;
  text-align: center;
}

.lp-hero__content > div {
  margin: 0 0 16px;
}

.lp-hero__content .lp-hero__cta {
  display: inline-block;
}

.lp-hero__content > p:last-of-type {
  margin: 8px 0 0;
  color: #6b6b7a;
  font-size: 11px;
  text-align: center;
}

.lp-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(18,215,219,0.25);
}

.lp-hero__cta--primary {
  background: #ff6a00;
}

.lp-hero__cta--primary:hover {
  filter: brightness(0.95);
}

.lp-hero__scroll {
  margin-top: 24px;
  text-align: center;
  color: #6b6b7a;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lp-hero__scroll:after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
}

/* ============================================
   速度測定パネル
   ============================================ */
.speedtest-panel {
  width: 100%;
  max-width: 600px;
  margin: 24px auto 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  padding: 20px;
  min-height: 280px;
}

.speedtest-emphasis {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: 0;
}

/* 測定開始画面 */
.speed-test-start {
  text-align: center;
}

.start-button-container {
  margin-bottom: 16px;
}

.start-icon {
  width: 80px;
  height: 80px;
  background: var(--brand-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(18,215,219,0.3);
}

.start-icon i {
  font-size: 32px;
  color: #fff;
  margin-left: 4px;
}

#speedtest-start-label {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.speed-test-start p {
  color: #666;
  font-size: 13px;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.start-test-btn {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(18,215,219,0.3);
}

.start-test-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(18,215,219,0.4) !important;
}

.start-test-btn:active {
  transform: translateY(0);
}

.start-test-btn i {
  font-size: 14px;
  margin-right: 6px;
}

/* 測定中画面 */
.speed-test-running {
  display: none;
}

.test-progress {
  text-align: center;
  margin-bottom: 24px;
}

.progress-circle {
  width: 80px;
  height: 80px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid var(--brand-primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

#testStatus {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

#testDescription {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-fill {
  height: 100%;
  background: var(--brand-primary);
  transition: width 0.3s ease;
}

/* 結果表示画面 */
.speed-test-results {
  display: none;
}

.results-header {
  text-align: center;
  margin-bottom: 24px;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(76,175,80,0.3);
}

.success-icon i {
  font-size: 24px;
  color: #fff;
}

.results-header > div:not(.success-icon) {
  color: #333;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.results-header p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.result-card {
  padding: 16px;
  border-radius: 12px;
}

.result-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.result-card > div:first-child > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-card i {
  font-size: 20px;
}

.result-label {
  color: #666;
  font-size: 13px;
  font-weight: 500;
}

.result-value {
  color: #333;
  font-size: 24px;
  font-weight: 700;
}

.result-value span {
  font-size: 14px;
  font-weight: 400;
  color: #999;
}

.result-badge {
  margin-top: 6px;
}

.result-card > div:last-child {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.graph-fill {
  height: 100%;
  transition: width 1s ease-out;
}

/* ダウンロード結果カード */
.download-card {
  background: linear-gradient(135deg, rgba(33,150,243,0.1), rgba(33,150,243,0.05));
  border: 1px solid rgba(33,150,243,0.2);
}

.download-card i {
  color: #2196F3;
}

.download-card > div:last-child {
  background: rgba(33,150,243,0.1);
}

#downloadGraph {
  background: linear-gradient(90deg, #2196F3, #1976D2);
}

/* アップロード結果カード */
.upload-card {
  background: linear-gradient(135deg, rgba(156,39,176,0.1), rgba(156,39,176,0.05));
  border: 1px solid rgba(156,39,176,0.2);
}

.upload-card i {
  color: #9C27B0;
}

.upload-card > div:last-child {
  background: rgba(156,39,176,0.1);
}

#uploadGraph {
  background: linear-gradient(90deg, #9C27B0, #7B1FA2);
}

/* Ping結果カード */
.ping-card {
  background: linear-gradient(135deg, rgba(255,193,7,0.1), rgba(255,152,0,0.05));
  border: 1px solid rgba(255,193,7,0.2);
  padding: 16px;
}

.ping-card i {
  color: #FFC107;
}

.ping-card > div:last-child {
  background: rgba(255,193,7,0.1);
}

#pingGraph {
  background: linear-gradient(90deg, #FFC107, #FF9800);
}

/* 結果アクション */
.results-actions {
  text-align: center;
}

.results-actions button {
  width: 160px;
  height: 44px;
}

.results-actions button i {
  font-size: 12px;
}

/* ============================================
   セクション
   ============================================ */
.st-section {
  margin-top: 48px;
  padding: 32px 0;
}

.st-section:first-of-type {
  margin-top: 24px;
}

.st-section.st-card {
  background: transparent;
  border: none;
  padding: 32px 0;
  box-shadow: none;
}

.st-section__header {
  margin-bottom: 20px;
}

.st-section__title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 24px;
  background: var(--brand-primary);
  border-radius: 8px;
  padding: 14px 24px;
  display: block;
  width: 100%;
  text-align: center;
  box-shadow: 0 2px 8px rgba(18,215,219,0.15);
}

.st-section__title--center {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.st-section__title--icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.st-section__title--icon .fas {
  color: #ffc107;
}

.st-section__lead {
  margin: 0;
  color: #555;
  font-size: 15px;
  line-height: 1.85;
}

.st-section h3 {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.st-section__subtitle {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 32px 0 16px;
  padding-left: 0;
}

/* ============================================
   カード
   ============================================ */
.st-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.st-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.st-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 12px;
  text-align: center;
}

.st-card--compact {
  margin-top: 16px;
}

.st-card--accent {
  background: linear-gradient(180deg, #f7fafc 0%, #ffffff 100%);
  border: 1px solid #cbd5e0;
}

.st-card--shadow {
  box-shadow: 0 8px 16px rgba(0,0,0,0.08), 0 12px 24px rgba(0,0,0,0.12);
}

/* 用途別カード */
.speed-test-content.entry-content .usecases {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 1.2em 0;
}

.speed-test-content.entry-content .usecase {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.speed-test-content.entry-content .usecase:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.speed-test-content.entry-content .usecase-title {
  font-weight: 700;
  color: #fff;
  margin: 0;
  font-size: 17px;
  text-align: center;
  background: var(--brand-primary);
  border-radius: 0;
  padding: 12px 16px;
  box-shadow: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.speed-test-content.entry-content .usecase-title i {
  font-size: 1em;
  opacity: 0.95;
}

.speed-test-content.entry-content .kv {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0;
  font-size: 16px;
  color: #4a5568;
  padding: 16px 24px;
  flex: 1;
}

.speed-test-content.entry-content .kv .k {
  color: #64748b;
  font-weight: 600;
  padding-bottom: 4px;
  margin-bottom: 4px;
  font-size: 0.9em;
}

.speed-test-content.entry-content .kv .v {
  color: #1e293b;
  font-weight: 700;
  padding-top: 0;
  margin-top: 0;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.speed-test-content.entry-content .kv .v:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.speed-test-content.entry-content .badge {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 6px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* ============================================
   グリッド
   ============================================ */
.st-grid {
  display: grid;
  gap: 20px;
}

.st-grid--cards {
  grid-template-columns: 1fr;
}

/* ============================================
   テーブル
   ============================================ */
.st-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.st-table {
  width: 100%;
  min-width: 320px;
  font-size: 14px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.st-table th,
.st-table td {
  padding: 18px 24px;
  text-align: left;
  color: #2c3e50;
  white-space: nowrap;
}

.st-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0.3px;
  border: none;
}

.st-table td {
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  transition: background-color 0.2s ease;
}

.st-table tbody tr:hover td {
  background: #f7fafc;
}

.st-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   リスト
   ============================================ */
.st-list {
  margin: 0;
  padding-left: 24px;
  color: #4a5568;
  line-height: 1.85;
  font-size: 16px;
}

.st-list li {
  margin-bottom: 10px;
  position: relative;
}

.st-list li:marker {
  color: var(--brand-primary);
}

.st-list--compact {
  padding-left: 22px;
  line-height: 1.85;
}

.st-list--styled {
  list-style: none;
  padding-left: 0;
}

.st-list--styled li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.st-list--styled li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--brand-primary);
  border-radius: 50%;
  box-shadow: none;
}

.st-ol {
  margin: 0;
  padding-left: 24px;
  color: #4a5568;
  font-size: 16px;
  line-height: 1.85;
}

.st-ol li {
  margin-bottom: 12px;
  padding-left: 8px;
}

.st-ol--styled {
  list-style: none;
  padding-left: 0;
  counter-reset: list-counter;
}

.st-ol--styled li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 14px;
  counter-increment: list-counter;
}

.st-ol--styled li:before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

/* ============================================
   目次
   ============================================ */
.st-toc {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 24px 32px;
  margin: 16px 0 32px;
  box-shadow: 0 12px 30px rgba(26,46,84,0.08);
}

.st-toc__title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin: 0 0 20px 0;
  text-align: center;
}

.st-toc__list {
  margin: 0;
  padding: 0;
  display: block;
  text-align: center;
}

.st-toc__list li {
  list-style: none;
  margin-bottom: 12px;
}

.st-toc__list a {
  color: #333;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s;
}

.st-toc__list a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

/* ============================================
   FAQ
   ============================================ */
.st-faq {
  display: grid;
  gap: 28px;
}

.faq-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.faq-question .faq-label {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Arial', sans-serif;
}

.faq-question h3 {
  flex: 1;
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.5;
  background: transparent !important;
  border: none !important;
  text-align: left !important;
}

.faq-answer {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-left: 0;
}

.faq-answer .faq-label {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: #f0f9ff;
  color: var(--brand-primary);
  border: 2px solid var(--brand-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Arial', sans-serif;
  margin-top: 2px;
}

.faq-answer > div {
  flex: 1;
  color: #4a5568;
  line-height: 1.85;
  font-size: 16px;
  padding-top: 0;
}

/* ============================================
   その他コンポーネント
   ============================================ */
/* 段落 */
.st-paragraph {
  color: #4a5568;
  font-size: 16px;
  line-height: 1.85;
  margin-top: 20px;
}

.st-paragraph strong {
  color: #2c3e50;
  font-weight: 700;
}

.st-paragraph-group {
  margin-top: 24px;
  color: #4a5568;
  font-size: 16px;
  line-height: 1.85;
  display: grid;
  gap: 16px;
}

.st-paragraph-group p {
  margin: 0;
}

/* 注釈 */
.st-note {
  margin-top: 16px;
  font-size: 14px;
  color: #666;
  font-style: normal;
  padding: 12px 16px;
  background: #f7fafc;
  border-left: 3px solid var(--brand-primary);
  border-radius: 4px;
}

/* 用語ボックス */
.st-term-box {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.st-term-box--compact {
  margin-bottom: 8px;
}

.st-term-box__title {
  color: #2c3e50;
  font-weight: 700;
}

/* CTA */
.st-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
  text-decoration: none;
}

.st-cta--primary {
  background: var(--brand-primary);
  color: #fff;
}

.st-cta--secondary {
  background: #fff;
  color: #333;
  border: 1px solid #e0e3e7;
}

/* チャート */
.speed-chart {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-item__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 14px;
}

.chart-item__label {
  font-weight: 600;
  color: #333;
}

.chart-item__meta {
  color: #666;
  font-size: 13px;
}

.chart-item__bar {
  background: rgba(0,0,0,0.1);
  border-radius: 8px;
  height: 8px;
  position: relative;
  overflow: hidden;
}

.chart-item__bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--fill, 0);
  border-radius: 8px;
}

.chart-item__bar--green::after {
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.chart-item__bar--blue::after {
  background: linear-gradient(90deg, #2196F3, #03A9F4);
}

.chart-item__bar--orange::after {
  background: linear-gradient(90deg, #FF9800, #FFC107);
}

.chart-item__bar--purple::after {
  background: linear-gradient(90deg, #9C27B0, #E91E63);
}

.chart-item__bar--red::after {
  background: linear-gradient(90deg, #F44336, #FF5722);
}

.chart-note {
  font-size: 11px;
  text-align: center;
  color: #999;
  margin: 0;
}

.chart-description {
  color: #666;
  font-size: 13px;
  line-height: 1.8;
  margin-top: 12px;
}

/* ============================================
   レスポンシブ: タブレット (768px以下)
   ============================================ */
@media (max-width: 768px) {
/* ページコンテナ */
  .speedtest-page {
    padding: 0 12px 32px;
  }

  /* ヒーロー */
  .lp-hero__inner {
    padding: 24px 12px;
    flex-direction: column;
    text-align: center;
  }

  .lp-hero__content h1 {
    font-size: 28px !important;
  }

  .lp-hero__content > p {
    font-size: 16px !important;
  }

  .lp-hero__content > p:last-of-type {
    font-size: 13px !important;
  }

  /* 速度測定 */
  #speedtest-start-label {
    font-size: 18px !important;
  }

  .speed-test-start p {
    font-size: 15px !important;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* セクション */
  .st-section {
    margin-top: 32px;
    padding: 20px 0;
  }

  .st-section__title {
    font-size: 22px;
    padding: 14px 12px;
    margin-bottom: 20px;
  }

  .st-section h3 {
    font-size: 20px;
    margin: 24px 0 12px;
  }

  .st-section__subtitle {
    font-size: 18px;
  }

  /* カード */
  .st-card {
    padding: 18px;
  }

  .speed-test-content.entry-content .usecase-title {
    font-size: 17px;
    margin: 0;
    padding: 10px 12px;
  }

  .speed-test-content.entry-content .kv {
    font-size: 16px;
    row-gap: 0;
    padding: 12px 14px;
  }

  .speed-test-content.entry-content .kv .k {
    padding-bottom: 2px;
    margin-bottom: 2px;
  }

  .speed-test-content.entry-content .kv .v {
    padding-top: 2px;
    margin-top: 2px;
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .speed-test-content.entry-content .kv .v:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  /* テーブル */
  .st-table {
    font-size: 14px;
    min-width: 800px;
  }

  .st-table th,
  .st-table td {
    padding: 14px 16px;
  }

  /* テキスト */
  .st-paragraph,
  .st-paragraph-group {
    font-size: 16px;
    line-height: 1.85;
  }

  .st-list,
  .st-ol {
    font-size: 16px;
  }

  .st-list--styled li {
    padding-left: 28px;
  }

  .st-ol--styled li {
    padding-left: 36px;
  }

  .st-note {
    font-size: 15px;
  }

  /* FAQ */
  .faq-item {
    padding: 20px;
  }

  .faq-question h3 {
    font-size: 17px;
  }

  .faq-answer > div {
    font-size: 15px;
  }
}

@media (min-width: 768px) {
  /* グリッド */
  .st-grid--cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .speed-test-content.entry-content .usecases {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   レスポンシブ: モバイル (480px以下)
   ============================================ */
@media (max-width: 480px) {
  /* ページコンテナ */
  .speedtest-page {
    padding: 0 8px 24px;
  }

  /* ヒーロー */
  .lp-hero__inner {
    padding: 20px 8px;
  }

  .lp-hero__content h1 {
    font-size: 26px !important;
    line-height: 1.3 !important;
  }

  .lp-hero__content > p {
    font-size: 15px !important;
  }

  .lp-hero__content > p:last-of-type {
    font-size: 12px !important;
  }

  /* 速度測定 */
  #speedtest-start-label {
    font-size: 17px !important;
  }

  .speed-test-start p {
    font-size: 15px !important;
  }

  .start-test-btn {
    font-size: 16px !important;
    padding: 12px 28px !important;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* セクション */
  .st-section {
    margin-top: 24px;
    padding: 16px 0;
  }

  .st-section__title {
    font-size: 20px;
    padding: 12px 8px;
    margin-bottom: 16px;
  }

  .st-section h3 {
    font-size: 18px;
    margin: 20px 0 10px;
  }

  .st-section__subtitle {
    font-size: 17px;
  }

  /* カード */
  .st-card {
    padding: 16px;
  }

  .speed-test-content.entry-content .usecase-title {
    font-size: 16px;
    margin: 0;
    padding: 8px 10px;
  }

  .speed-test-content.entry-content .kv {
    font-size: 15px;
    row-gap: 0;
    grid-template-columns: 1fr;
    padding: 10px 12px;
  }

  .speed-test-content.entry-content .kv .k {
    padding-bottom: 2px;
    margin-bottom: 2px;
  }

  .speed-test-content.entry-content .kv .v {
    padding-top: 2px;
    margin-top: 2px;
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .speed-test-content.entry-content .kv .v:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  /* テーブル */
  .st-table {
    font-size: 13px;
    min-width: 700px;
  }

  .st-table th,
  .st-table td {
    padding: 12px 14px;
  }

  /* テキスト */
  .st-paragraph,
  .st-paragraph-group {
    font-size: 15px;
    line-height: 1.8;
  }

  .st-list,
  .st-ol {
    font-size: 15px;
  }

  .st-list--styled li {
    padding-left: 26px;
  }

  .st-ol--styled li {
    padding-left: 34px;
  }

  .st-note {
    font-size: 14px;
  }

  /* FAQ */
  .faq-item {
    padding: 16px;
  }

  .faq-question .faq-label,
  .faq-answer .faq-label {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .faq-question {
    gap: 12px;
    margin-bottom: 12px;
  }

  .faq-answer {
    gap: 12px;
  }

  .faq-question h3 {
    font-size: 16px;
  }

  .faq-answer > div {
    font-size: 14px;
  }
}

/* ============================================
   レスポンシブ: デスクトップ (992px以上)
   ============================================ */
@media (min-width: 992px) {
  .lp-hero__inner {
    padding: 32px 24px;
  }

  .results-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (min-width: 1024px) {
  .st-grid--cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   テーマオーバーライド
   ============================================ */
.speed-test-section {
  padding: 0;
  background: none !important;
  box-shadow: none !important;
}

.speed-test-container {
  padding: 0;
}

.custom-speed-test-container {
  padding: 0;
}

table {
  border-collapse: collapse;
}

th, td {
  vertical-align: top;
}

/* ============================================
   テーブル: 用途別の必要速度の目安
   ============================================ */
.st-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}

.st-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 16px;
}

.st-table--usecase {
  min-width: 600px;
}

.st-table--usecase thead {
  background: var(--brand-primary);
  color: #fff;
}

.st-table--usecase thead th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.st-table--usecase thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 11;
  background: var(--brand-primary);
}

.st-table--usecase tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s ease;
}

.st-table--usecase tbody tr:hover {
  background-color: #f8fafc;
}

.st-table--usecase tbody td {
  padding: 16px 20px;
  color: #4a5568;
}

.st-table--usecase tbody td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 9;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  min-width: 200px;
}

.st-table--usecase tbody tr:hover td:first-child {
  background: #f8fafc;
}

.st-table--usecase tbody td:first-child i {
  margin-right: 8px;
  color: var(--brand-primary);
  font-size: 1em;
}

.st-table--usecase tbody td:first-child .badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #e0f2fe;
  color: var(--brand-primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .st-table-wrapper {
    margin: 20px -16px;
    padding: 0 16px;
  }

  .st-table--usecase {
    min-width: 550px;
    font-size: 14px;
  }

  .st-table--usecase thead th {
    padding: 12px 16px;
    font-size: 14px;
  }

  .st-table--usecase tbody td {
    padding: 14px 16px;
  }

  .st-table--usecase tbody td:first-child {
    min-width: 180px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .st-table-wrapper {
    margin: 16px -12px;
    padding: 0 12px;
  }

  .st-table--usecase {
    min-width: 500px;
    font-size: 13px;
  }

  .st-table--usecase thead th {
    padding: 10px 14px;
    font-size: 13px;
  }

  .st-table--usecase tbody td {
    padding: 12px 14px;
  }

  .st-table--usecase tbody td:first-child {
    min-width: 160px;
    font-size: 12px;
  }
}
