/**
 * T4 — keyword-density-checker mobile V2
 * Opt-in: html[data-tl-mobile-v2="tool-v1"]
 */

@media (max-width: 760px) {
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] {
    --kdc-m-text: #172033;
    --kdc-m-body: #334155;
    --kdc-m-accent: #2563eb;
    overflow-x: clip;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .tool-page-hero.kdc-checker-legacy-mobile {
    display: block !important;
    margin: 0 0 8px !important;
    padding: 16px 16px 12px !important;
    text-align: center;
    background: linear-gradient(180deg, #f8fbff, #f1f8ff);
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .tool-page-hero .eyebrow {
    display: block !important;
    margin-bottom: 6px !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .tool-page-hero h1 {
    margin: 0 auto !important;
    font-size: 28px !important;
    line-height: 1.12 !important;
    font-weight: 800 !important;
    color: #172033 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .tool-page-hero h1 .kdc-h1-line {
    display: block;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .tool-page-hero .c100kb-h1-tail {
    display: inline;
    margin-top: 0;
    margin-left: 0.28em;
    font-size: 0.78em;
    font-weight: 700;
    color: #2563eb !important;
    opacity: 1 !important;
    white-space: nowrap;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .tool-page-hero p,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .tool-page-hero .tool-hero-sub {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    margin: 10px auto 0 !important;
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
    color: #334155 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] #tool-workspace.tool-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-generator-pro {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: calc(100vw - 24px) !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    padding: 12px !important;
    padding-bottom: 88px !important;
    border-radius: 18px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
    position: relative !important;
    overflow: visible !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .utility-studio {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-result-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-result-nav button {
    min-height: 40px;
    padding: 6px 4px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    opacity: 1 !important;
    appearance: none;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-result-nav button.is-active {
    background: #fff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-tool:not(.kdc-panel-input) .kdc-m-panel-input,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-tool:not(.kdc-panel-results) .kdc-m-panel-results,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-tool:not(.kdc-panel-stats) .kdc-m-panel-stats {
    display: none !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-panel-input,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-panel-results,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-panel-stats {
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-panel-input {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-field :is(input, textarea) {
    min-height: 44px;
    padding: 10px 12px !important;
    font-size: 15px !important;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: #fff;
    color: #172033 !important;
    opacity: 1 !important;
    width: 100%;
    box-sizing: border-box;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-field textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 44px;
    padding: 8px 10px;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    opacity: 1 !important;
    cursor: pointer;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    flex: 0 0 18px;
    accent-color: #2563eb;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-phrase-mode-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 3px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-phrase-mode-nav button {
    min-height: 40px;
    padding: 6px 4px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    opacity: 1 !important;
    appearance: none;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-phrase-mode-nav button.is-active {
    background: #fff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-target-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-target-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #dbeafe;
    background: #f8fafc;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-target-card span {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-target-card strong {
    font-size: 1.125rem !important;
    font-weight: 800 !important;
    color: #2563eb !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-sort-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-sort-btn {
    min-height: 40px;
    padding: 6px 8px !important;
    border-radius: 10px !important;
    border: 1px solid #dbeafe !important;
    background: #fff !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    opacity: 1 !important;
    appearance: none;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-sort-btn.is-active {
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
    background: #eff6ff !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-density-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-density-table > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 52px 64px !important;
    align-items: center !important;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    box-shadow: none !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-density-table > div.is-target {
    border-color: #93c5fd !important;
    background: #eff6ff !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-density-table strong {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #172033 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-density-table span {
    justify-self: end !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-density-table .kdc-empty-row strong {
    color: #475569 !important;
    font-weight: 600 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-results-note {
    margin: 8px 0 0;
    font-size: 0.75rem !important;
    line-height: 1.45;
    color: #475569 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #dbeafe;
    background: #f8fafc;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-stat-card span {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-stat-card strong {
    font-size: 1.125rem !important;
    font-weight: 800 !important;
    color: #2563eb !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-list li.is-ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-list li.is-warn {
    border-color: #fde68a;
    background: #fffbeb;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-list li.is-info {
    border-color: #dbeafe;
    background: #f8fafc;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-list li strong {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #172033 !important;
    opacity: 1 !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-check-list li span {
    font-size: 0.8125rem !important;
    color: #334155 !important;
    opacity: 1 !important;
    line-height: 1.4;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-actions-desktop {
    display: none !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-sticky-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 6px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-sticky-primary,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-sticky-secondary,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-sticky-tertiary {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    appearance: none;
    border: 0;
    white-space: nowrap;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-sticky-primary {
    background: linear-gradient(135deg, #0b63ce, #2563eb);
    color: #fff !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-sticky-secondary {
    background: #fff;
    color: #334155 !important;
    border: 1px solid #dbeafe;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-sticky-tertiary {
    background: #f8fafc;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
    min-width: 56px;
  }

  html[data-tl-mobile-v2="tool-v1"] html[data-theme="dark"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-generator-pro,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools[data-theme="dark"] main[data-tool="keyword-density-checker"] .kdc-generator-pro {
    background: #fff !important;
    border-color: #e2e8f0 !important;
  }
}

@media (min-width: 761px) {
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-result-nav,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-m-sticky-bar {
    display: none !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-tool .kdc-m-panel-input,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-tool .kdc-m-panel-results,
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-tool .kdc-m-panel-stats {
    display: block !important;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-seo-tools main[data-tool="keyword-density-checker"] .kdc-actions-desktop {
    display: flex !important;
  }
}
