.codex-comparison-mobile { display: none; }
.codex-compare-mobile-head { display: none; }

@media (max-width: 767px) {
  .codex-detail-page .codex-tool-comparison { padding: 42px var(--phone-edge, 18px) 56px; background: #fff; }
  .codex-detail-page .codex-tool-comparison__intro { display: none; }
  .codex-detail-page .codex-comparison-mobile { display: block; width: 100%; max-width: 560px; margin: 26px auto 0; color: #08183d; font-family: "Noto Sans JP", system-ui, sans-serif; }
  .codex-detail-page .codex-comparison-mobile :is(h3,p,ul) { margin: 0; padding: 0; }
  .codex-detail-page .codex-comparison-mobile ul { list-style: none; }
  .codex-detail-page .codex-comparison-mobile__topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .codex-detail-page .codex-comparison-mobile__topline p { color: #0675f8; font-family: "Inter", system-ui, sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .02em; }
  .codex-detail-page .codex-comparison-mobile__topline span { padding: 5px 15px; border-radius: 999px; background: #0768f4; color: #fff; font-family: "Inter", system-ui, sans-serif; font-size: 14px; line-height: 1.3; white-space: nowrap; }
  .codex-detail-page .codex-comparison-mobile h3 { margin-top: 14px; font-size: clamp(23px, 6vw, 28px); font-weight: 900; line-height: 1.35; letter-spacing: -.04em; }
  .codex-detail-page .codex-comparison-mobile__body { margin-top: 13px; font-size: 15px; line-height: 1.7; }
  .codex-detail-page .codex-comparison-mobile__body + .codex-comparison-mobile__body { margin-top: 8px; }
  .codex-detail-page .codex-comparison-mobile__devices { position: relative; width: 100%; height: 53vw; max-height: 297px; margin-top: 16px; overflow: hidden; }
  .codex-detail-page .codex-comparison-mobile__devices img { display: block; position: absolute; top: 0; right: 0; width: 170%; max-width: none; height: auto; }
  .codex-detail-page .codex-comparison-mobile__benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
  .codex-detail-page .codex-comparison-mobile__benefits li { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0 5px; text-align: center; }
  .codex-detail-page .codex-comparison-mobile__benefits li + li { border-left: 1px solid #c4d1e3; }
  .codex-detail-page .codex-comparison-mobile__benefits svg { display: block; width: 34px; height: 34px; margin-bottom: 5px; fill: none; stroke: #0ca95d; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
  .codex-detail-page .codex-comparison-mobile__benefits li:nth-child(3) svg { stroke: #ef9200; }
  .codex-detail-page .codex-comparison-mobile__benefits span { color: #24395c; font-size: clamp(10px, 2.9vw, 13px); line-height: 1.45; }
  .codex-detail-page .codex-comparison-mobile__benefits strong { display: block; margin-top: 4px; color: #08183d; font-size: clamp(15px, 4.1vw, 18px); font-weight: 800; line-height: 1.25; }
  .codex-detail-page .codex-comparison-mobile__benefits em { color: #f38100; font-family: "Inter", system-ui, sans-serif; font-size: 1.35em; font-style: normal; font-weight: 900; }
  .codex-detail-page .codex-comparison-mobile__source { margin-top: 10px; color: #75849c; font-size: 10px; line-height: 1.5; text-align: center; }
}

@media (max-width: 359px) {
  .codex-detail-page .codex-comparison-mobile__topline p { font-size: 12px; }
  .codex-detail-page .codex-comparison-mobile h3 { font-size: 19.5px; }
  .codex-detail-page .codex-comparison-mobile__body { font-size: 14px; }
  .codex-detail-page .codex-comparison-mobile__benefits strong { font-size: 13px; }
}

@media (max-width: 767px) {
  .codex-detail-page .codex-compare-mobile-head {
    display: block;
    max-width: 560px;
    margin: 42px auto 0;
    font-family: "Noto Sans JP", system-ui, sans-serif;
  }
  .codex-detail-page .codex-compare-mobile-head h3 {
    margin: 0;
    color: #082b50;
    font-size: clamp(24px, 6.5vw, 30px);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -.03em;
  }
  .codex-detail-page .codex-compare-mobile-head p {
    display: none;
    margin: 12px 0 0;
    color: #627387;
    font-size: 15px;
    line-height: 1.5;
  }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-mobile-head p { display: block; }
  .codex-detail-page .codex-compare-mobile-tabs { display: none; }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 16px;
  }
  .codex-detail-page .codex-compare-mobile-tabs button {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 52px;
    padding: 6px 3px;
    border: 1px solid #8ebcf3;
    border-radius: 7px;
    background: #fff;
    color: #082b50;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(12px, 3.6vw, 15px);
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
  }
  .codex-detail-page .codex-compare-mobile-tabs button[aria-pressed="true"] {
    border-color: #3280ce;
    background: #3280ce;
    color: #fff;
  }
  .codex-detail-page .codex-compare-mobile-tabs button:focus-visible {
    outline: 3px solid #092b50;
    outline-offset: 3px;
  }
  .codex-detail-page .codex-tool-comparison .codex-compare-table-wrap { margin-top: 18px; }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table-wrap {
    max-width: 560px;
    overflow: hidden;
    border-radius: 8px;
  }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table-wrap::before { display: none; }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-family: "Noto Sans JP", system-ui, sans-serif;
  }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table tr > :nth-child(2),
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table tr > :nth-child(3),
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table tr > :nth-child(4) { display: none; }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table-wrap[data-comparison="chat"] tr > :nth-child(2),
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table-wrap[data-comparison="editor"] tr > :nth-child(3),
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table-wrap[data-comparison="claude"] tr > :nth-child(4) { display: table-cell; }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table thead th:first-child {
    position: static;
    width: 27%;
    background: #2f7dca;
    box-shadow: none;
    color: #fff;
  }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table thead th:last-child { width: 38%; }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table :is(th, td) {
    height: auto;
    padding: 15px 8px;
    font-size: clamp(13px, 3.7vw, 15px);
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table thead th {
    padding: 13px 4px;
    font-size: clamp(13px, 3.8vw, 16px);
  }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table tbody th {
    position: static;
    min-width: 0;
    box-shadow: none;
    font-size: clamp(11.5px, 3.3vw, 13px);
    font-weight: 800;
  }
  .codex-detail-page .codex-compare-table__nowrap { white-space: nowrap; }
  .codex-detail-page .codex-tool-comparison.is-interactive .codex-compare-table tbody td.is-codex { font-weight: 800; }
  .codex-detail-page .codex-tool-comparison__note {
    max-width: 560px;
    margin-top: 18px;
    padding: 17px 16px;
    font-size: 15px;
    line-height: 1.75;
  }
}
