:root {
  --td-ink: #071735;
  --td-muted: #526174;
  --td-line: #dbe6ec;
  --td-paper: #fbfdfb;
  --td-card: #ffffff;
  --td-teal: #078a75;
  --td-teal-dark: #056b5b;
  --td-blue: #2456d6;
  --td-amber: #a96506;
  --td-amber-bg: #fff7e8;
  --td-red: #c92a2a;
  --td-shadow: 0 18px 48px rgba(7, 23, 53, .08);
}

* {
  box-sizing: border-box;
}

body.td-page.textdata-ui-v1009 {
  margin: 0;
  background: var(--td-paper);
  color: var(--td-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

.td-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  padding: 0 38px;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--td-line);
}

.td-brand,
.td-header nav a,
.td-free,
.td-related-card {
  color: inherit;
  text-decoration: none;
}

.td-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 950;
}

.td-brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #13aa8e, var(--td-teal));
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.td-brand b {
  font-size: clamp(23px, 2vw, 31px);
}

.td-header nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.td-free {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #12a98f, var(--td-teal));
  color: #fff;
  font-weight: 950;
  white-space: nowrap;
}

.td-shell {
  width: min(100%, 1860px);
  margin: 0 auto;
  padding: 28px 42px 0;
}

.td-hero {
  display: grid;
  grid-template-columns: minmax(340px, 520px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 52px);
  align-items: center;
  min-height: 740px;
}

.td-hero > * {
  min-width: 0;
}

.td-kicker {
  margin: 0 0 14px;
  color: var(--td-teal-dark);
  font-size: 18px;
  font-weight: 950;
}

.td-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(44px, 4.7vw, 78px);
  line-height: 1.1;
  font-weight: 950;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.td-lead {
  margin: 0;
  color: #293a55;
  font-size: clamp(19px, 1.65vw, 25px);
  font-weight: 780;
}

.td-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.td-benefits article,
.td-workbench,
.td-result-card,
.td-panel,
.td-related,
.td-note,
.td-faq details {
  background: var(--td-card);
  border: 1px solid var(--td-line);
  border-radius: 8px;
  box-shadow: var(--td-shadow);
}

.td-benefits article {
  min-height: 144px;
  padding: 24px;
}

.td-benefits span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #e8f9f3;
  color: var(--td-teal);
  font-size: 30px;
  font-weight: 950;
}

.td-benefits b {
  display: block;
  font-size: 20px;
  line-height: 1.35;
}

.td-benefits small {
  display: block;
  margin-top: 8px;
  color: var(--td-muted);
  font-size: 15px;
  font-weight: 750;
}

.td-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 26px;
  padding: clamp(22px, 2.3vw, 32px);
}

.td-side {
  min-width: 0;
}

.td-section-title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 950;
}

.td-input-wrap {
  position: relative;
}

.td-input-wrap textarea {
  width: 100%;
  min-height: 330px;
  border: 1px solid #cbd9e3;
  border-radius: 8px;
  background: #fff;
  color: #17243b;
  padding: 18px;
  resize: vertical;
  font: 17px/1.72 ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono", monospace;
}

.td-live-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--td-muted);
  font-size: 15px;
  font-weight: 900;
  background: rgba(255, 255, 255, .92);
  padding: 2px 8px;
  border-radius: 999px;
}

.td-presets,
.td-actions,
.td-limit-row {
  display: grid;
  gap: 12px;
}

.td-presets {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
}

.td-presets button {
  min-height: 48px;
  border: 1px solid #cbd9e3;
  border-radius: 8px;
  background: #fff;
  color: var(--td-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.td-presets .is-active {
  border-color: var(--td-teal);
  color: var(--td-teal-dark);
  box-shadow: inset 0 0 0 1px var(--td-teal);
}

.td-limit-row {
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  align-items: center;
  margin-top: 18px;
}

.td-limit-row input {
  height: 58px;
  border: 1px solid #cbd9e3;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--td-ink);
  font: inherit;
  font-size: 19px;
  font-weight: 900;
}

.td-limit-row span {
  color: var(--td-muted);
  font-weight: 820;
}

.td-actions {
  grid-template-columns: minmax(180px, 1fr) 150px 150px;
  margin-top: 18px;
}

.td-actions button,
.td-copy-button {
  min-height: 58px;
  border: 1px solid var(--td-line);
  border-radius: 8px;
  background: #fff;
  color: var(--td-ink);
  font: inherit;
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.td-primary {
  border: 0 !important;
  background: linear-gradient(180deg, #12a98f, var(--td-teal-dark)) !important;
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(7, 138, 117, .23);
}

.td-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.td-result-card {
  min-width: 0;
  min-height: 104px;
  padding: 18px;
  box-shadow: none;
}

.td-result-card span {
  display: block;
  color: var(--td-ink);
  font-size: 16px;
  font-weight: 900;
}

.td-result-card b {
  display: block;
  margin-top: 10px;
  color: var(--td-teal-dark);
  font-size: 38px;
  line-height: 1;
  font-weight: 950;
}

.td-result-card small {
  color: var(--td-muted);
  font-weight: 850;
}

.td-meter,
.td-sns,
.td-readability,
.td-output {
  margin-top: 18px;
}

.td-panel {
  min-width: 0;
  padding: 18px;
  box-shadow: none;
}

.td-meter-head,
.td-output-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.td-meter-head b,
.td-output-head h2,
.td-panel h2 {
  margin: 0;
  font-size: 21px;
}

.td-status {
  color: var(--td-teal-dark);
  font-weight: 950;
}

.td-bar {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef2;
}

.td-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--td-teal), var(--td-blue));
  transition: width .18s ease;
}

.td-sns-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 100px 64px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--td-line);
}

.td-sns-row:last-child {
  border-bottom: 0;
}

.td-sns-row b,
.td-sns-row span {
  font-size: 15px;
  font-weight: 900;
}

.td-sns-row em {
  width: 100%;
  height: 8px;
  display: block;
  border-radius: 999px;
  background: #e8eef2;
}

.td-sns-row em i {
  height: 100%;
  display: block;
  width: 0%;
  border-radius: inherit;
  background: var(--td-teal);
}

.td-sns-row.is-warn em i,
.td-status.is-warn,
.td-read-score.is-warn {
  color: var(--td-amber);
}

.td-sns-row.is-over em i,
.td-status.is-over,
.td-read-score.is-over {
  color: var(--td-red);
}

.td-sns-row.is-warn em i {
  background: var(--td-amber);
}

.td-sns-row.is-over em i {
  background: var(--td-red);
}

.td-readability {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.td-read-score {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border: 12px solid #dce4ea;
  border-radius: 999px;
  color: var(--td-teal-dark);
  font-size: 28px;
  font-weight: 950;
}

.td-read-list {
  margin: 0;
  padding-left: 20px;
  color: #34445c;
  font-weight: 800;
}

.td-output pre {
  min-height: 170px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--td-line);
  border-radius: 8px;
  background: #fff;
  color: #17243b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 16px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono", monospace;
}

.td-band {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 26px 0;
  padding: 22px 26px;
}

.td-band-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--td-teal);
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.td-band h2,
.td-related h2,
.td-note h2,
.td-faq h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.35;
}

.td-band p,
.td-note p,
.td-faq p {
  margin: 0;
  color: #293b56;
  font-size: 18px;
  font-weight: 740;
}

.td-related,
.td-note {
  margin: 22px 0;
  padding: 24px;
  box-shadow: none;
}

.td-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.td-related-card {
  min-height: 86px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--td-line);
  border-radius: 8px;
  background: #fff;
}

.td-related-card span {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ecfaf6;
  color: var(--td-teal-dark);
  font-weight: 950;
}

.td-related-card b,
.td-related-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.td-related-card b {
  font-size: 16px;
  line-height: 1.35;
}

.td-related-card small {
  color: var(--td-muted);
  font-size: 13px;
  font-weight: 740;
}

.td-faq {
  display: grid;
  gap: 12px;
  margin: 24px 0 46px;
}

.td-faq details {
  padding: 20px 24px;
  box-shadow: none;
}

.td-faq summary {
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.td-footer {
  padding: 30px;
  background: #062f58;
  color: #eff8ff;
  text-align: center;
  font-weight: 900;
}

@media (max-width: 1380px) {
  .td-header {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 20px;
  }

  .td-header nav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .td-hero,
  .td-workbench {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

@media (max-width: 820px) {
  .td-shell {
    padding: 18px 14px 0;
  }

  .td-copy h1 {
    font-size: 39px;
  }

  .td-benefits,
  .td-presets,
  .td-limit-row,
  .td-actions,
  .td-results-grid,
  .td-readability,
  .td-band {
    grid-template-columns: 1fr;
  }

  .td-input-wrap textarea {
    min-height: 260px;
  }

  .td-read-score {
    width: 118px;
    height: 118px;
  }
}
