:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --subtle: #f6f8fa;
  --subtle-2: #eef1f4;
  --field: #ffffff;
  --text: #1f2328;
  --muted: #59636e;
  --muted-2: #6e7781;
  --line: #d8dee4;
  --line-strong: #afb8c1;
  --primary: #0969da;
  --primary-hover: #0757b8;
  --primary-soft: #f0f6ff;
  --primary-text: #ffffff;
  --ok: #1a7f37;
  --error: #cf222e;
  --code-bg: #f6f8fa;
  --code-text: #24292f;
  --focus: rgba(9, 105, 218, 0.22);
  --radius: 4px;
  --radius-sm: 3px;
}

:root.dark {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #0d1117;
  --subtle: #161b22;
  --subtle-2: #1f242c;
  --field: #0d1117;
  --text: #e6edf3;
  --muted: #8b949e;
  --muted-2: #7d8590;
  --line: #30363d;
  --line-strong: #484f58;
  --primary: #2f81f7;
  --primary-hover: #58a6ff;
  --primary-soft: #10233f;
  --primary-text: #ffffff;
  --ok: #3fb950;
  --error: #ff7b72;
  --code-bg: #161b22;
  --code-text: #e6edf3;
  --focus: rgba(47, 129, 247, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 650;
}

h2 {
  font-size: 0.96rem;
  line-height: 1.35;
  font-weight: 650;
}

h3 {
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 650;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 60;
  transform: translateY(-150%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 7px 10px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--focus);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-bar {
  width: min(1180px, calc(100% - 40px));
  min-height: 52px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.tool-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.tool-tabs::-webkit-scrollbar {
  display: none;
}

.nav-button,
.icon-button,
.secondary-button,
.primary-button,
.mode-button,
.example-row button,
.action-row button,
.action-row a {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav-button {
  min-height: 30px;
  background: transparent;
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.86rem;
  font-weight: 550;
  white-space: nowrap;
}

.nav-button:hover {
  color: var(--text);
  background: var(--subtle);
}

.nav-button.is-active {
  color: var(--text);
  background: var(--subtle);
  border-color: var(--line);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 31px;
  min-width: 31px;
  min-height: 31px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--subtle);
  color: var(--text);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  min-width: 0;
  margin: 0 auto;
  padding: 30px 0 64px;
}

.utility-layout {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.context-column {
  position: sticky;
  top: 74px;
  min-width: 0;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.context-lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.context-list {
  display: grid;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.context-list div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.context-list dt {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.context-list dd {
  min-width: 0;
  color: var(--text);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.tool-column,
.tool-workbench,
.tool-panel,
.result-section,
.result-list,
.result-item,
.result-output,
.doc-section {
  min-width: 0;
}

.tool-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tool-panel,
.result-section {
  min-width: 0;
  padding: 16px;
}

.result-section {
  border-top: 1px solid var(--line);
}

.panel-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.panel-heading span {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.section-heading.compact {
  margin-bottom: 0;
}

.section-kicker {
  margin-bottom: 3px;
  color: var(--muted-2);
  font-size: 0.74rem;
  font-weight: 650;
}

.tool-form {
  display: grid;
  gap: 10px;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.field-grid {
  display: grid;
  gap: 10px;
}

.field-grid.two {
  grid-template-columns: minmax(0, 1fr) 150px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 620;
}

input {
  min-width: 0;
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--text);
  padding: 0 11px;
  outline: none;
}

input::placeholder {
  color: var(--muted-2);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus);
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.form-meta {
  display: grid;
  gap: 7px;
}

.mode-row::before {
  content: "格式";
  align-self: center;
  margin-right: 2px;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.mode-button {
  min-height: 30px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.mode-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--subtle);
}

.mode-button.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.primary-button {
  min-height: 43px;
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-text);
  padding: 0 16px;
  font-weight: 650;
}

.primary-button:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.secondary-button {
  min-height: 30px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: var(--subtle);
  color: var(--text);
}

.example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}

.example-row::before {
  content: "示例";
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.example-row button {
  min-height: 26px;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  font-size: 0.82rem;
  font-weight: 560;
}

.example-row button:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.message {
  min-height: 1.35em;
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 600;
}

.message.is-ok {
  color: var(--ok);
}

.result-empty {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 114px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--subtle);
  color: var(--muted);
  padding: 18px;
}

.result-empty p {
  color: var(--text);
  font-weight: 620;
}

.result-empty span {
  color: var(--muted-2);
  font-size: 0.86rem;
}

.result-list {
  display: grid;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.result-list:empty {
  display: none;
}

.result-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  padding: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.result-item:last-child {
  border-bottom: 0;
}

.result-node {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  background: var(--subtle);
}

.result-node strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
}

.result-node span {
  color: var(--muted);
  font-size: 0.75rem;
}

.result-host {
  color: var(--primary);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.result-output {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 11px 0;
}

.result-meta {
  color: var(--muted-2);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.output-code {
  display: block;
  min-width: 0;
  max-width: 100%;
  max-height: 82px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--code-text);
  padding: 7px 8px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.55;
  white-space: pre;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
  justify-content: flex-end;
  min-width: 126px;
  padding: 11px 12px;
}

.action-row button,
.action-row a {
  min-height: 29px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 0 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
}

.action-row button:hover,
.action-row a:hover {
  border-color: var(--line-strong);
  background: var(--subtle);
  color: var(--text);
}

.doc-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.guide-list {
  display: grid;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.guide-detail,
.seo-faq details {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.guide-detail:last-child,
.seo-faq details:last-child {
  border-bottom: 0;
}

.guide-detail summary,
.stats-history summary,
.seo-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 620;
  list-style: none;
}

.guide-detail summary::-webkit-details-marker,
.stats-history summary::-webkit-details-marker,
.seo-faq summary::-webkit-details-marker {
  display: none;
}

.guide-detail summary::after,
.stats-history summary::after,
.seo-faq summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  color: var(--muted-2);
}

.guide-detail[open] summary::after,
.stats-history[open] summary::after,
.seo-faq details[open] summary::after {
  transform: rotate(225deg);
}

.guide-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.guide-body ul,
.seo-grid ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.1rem;
}

.guide-body li,
.seo-grid li {
  color: var(--muted);
  line-height: 1.6;
}

.guide-code pre {
  min-width: 0;
  max-width: 100%;
  max-height: 220px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--code-text);
  padding: 10px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.6;
}

.guide-content {
  display: none;
}

.ad-slot {
  margin-top: 16px;
}

.ad-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  text-decoration: none;
}

.ad-link.has-image {
  grid-template-columns: 120px auto minmax(0, 1fr) auto;
}

.ad-link:hover {
  border-color: var(--line-strong);
  background: var(--subtle);
}

.ad-image {
  width: 120px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--subtle);
  object-fit: cover;
}

.ad-label {
  color: var(--muted-2);
  font-size: 0.74rem;
  font-weight: 650;
}

.ad-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ad-body strong,
.ad-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-body strong {
  font-size: 0.88rem;
  font-weight: 650;
}

.ad-body small {
  color: var(--muted);
  font-size: 0.78rem;
}

.ad-cta {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 650;
}

.extension-section {
  display: grid;
  gap: 12px;
}

.extension-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.extension-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.extension-summary img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.extension-summary strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}

.extension-summary p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.install-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 11px 12px 11px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--subtle);
}

.install-steps li {
  color: var(--muted);
  line-height: 1.6;
  padding-left: 2px;
}

.install-steps code {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1px 4px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 0 11px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
}

.download-button:hover {
  border-color: var(--line-strong);
  background: var(--subtle);
}

.stats-panel {
  margin-top: 24px;
}

.stats-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 9px;
}

.stats-head span {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}

.stats-head small {
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stat-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.stat-item:last-child {
  border-bottom: 0;
}

.stat-item span {
  color: var(--muted);
  font-size: 0.77rem;
}

.stat-item strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.stats-history {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stats-history-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.stats-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 31px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.stats-history-row:last-child {
  border-bottom: 0;
}

.stats-history-row time {
  color: var(--text);
}

.stats-history-row.muted {
  display: block;
  padding: 8px 10px;
}

.seo-section p,
.comments-note {
  max-width: 820px;
  color: var(--muted);
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 14px;
}

.seo-grid h3 {
  margin: 0 0 8px;
}

.seo-grid li {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.seo-faq {
  display: grid;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.seo-faq p {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 0.88rem;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.seo-links a {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  padding: 6px 9px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.seo-links a:hover {
  border-color: var(--line-strong);
  background: var(--subtle);
  color: var(--text);
}

.comments-section {
  padding-bottom: 8px;
}

.comments-note {
  margin-top: 8px;
}

#waline {
  margin-top: 14px;
  --waline-theme-color: var(--primary);
  --waline-active-color: var(--primary-hover);
  --waline-bgcolor: var(--surface);
  --waline-bgcolor-light: var(--subtle);
  --waline-border-color: var(--line);
  --waline-disable-bgcolor: var(--subtle);
  --waline-color: var(--text);
  --waline-light-grey: var(--muted);
  --waline-dark-grey: var(--muted-2);
  --waline-badge-color: var(--primary);
  --waline-info-bgcolor: var(--subtle);
  --waline-info-color: var(--muted);
  --waline-border: 1px solid var(--line);
  --waline-radius: var(--radius-sm);
  font-size: 14px;
}

.wl-panel,
.wl-card {
  box-shadow: none !important;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 36px));
}

.toast {
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 9px 11px;
  font-weight: 620;
}

.toast.is-error {
  border-left-color: var(--error);
}

.qr-dialog {
  width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 16px;
  box-shadow: none;
}

.qr-dialog::backdrop {
  background: rgba(31, 35, 40, 0.48);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.qr-dialog img {
  display: block;
  width: 230px;
  height: 230px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
}

.qr-dialog p {
  margin: 14px 0 0;
  max-height: 100px;
  overflow: auto;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  word-break: break-all;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .site-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 0;
  }

  .tool-tabs {
    grid-column: 1 / -1;
    order: 3;
  }

  .utility-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .context-column {
    position: static;
  }

  .context-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .context-list div {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px;
    border-right: 1px solid var(--line);
  }

  .context-list div:last-child {
    border-right: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stat-item {
    grid-template-columns: 1fr;
    gap: 2px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .stat-item:last-child {
    border-right: 0;
  }

  .result-item {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .action-row {
    grid-column: 2;
    justify-content: flex-start;
    min-width: 0;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .site-bar,
  .page-shell {
    width: min(100% - 24px, 560px);
  }

  .page-shell {
    padding: 22px 0 44px;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tool-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .nav-button {
    border-color: var(--line);
    background: var(--surface);
  }

  h1 {
    font-size: 1.25rem;
  }

  .context-lead {
    font-size: 0.9rem;
  }

  .context-list,
  .stats-grid,
  .seo-grid,
  .extension-layout {
    grid-template-columns: 1fr;
  }

  .context-list div,
  .stat-item {
    border-right: 0;
  }

  .context-list div {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .stat-item {
    grid-template-columns: minmax(0, 1fr) auto;
    border-bottom: 1px solid var(--line);
  }

  .stat-item:last-child {
    border-bottom: 0;
  }

  .tool-panel,
  .result-section {
    padding: 12px;
  }

  .ad-link {
    grid-template-columns: 1fr auto;
  }

  .ad-link.has-image {
    grid-template-columns: 96px minmax(0, 1fr) auto;
  }

  .ad-image {
    width: 96px;
    grid-row: span 2;
  }

  .ad-label {
    grid-column: 1 / -1;
  }

  .ad-link.has-image .ad-label {
    grid-column: auto;
  }

  .panel-heading,
  .section-heading {
    align-items: flex-start;
  }

  .panel-heading span {
    display: none;
  }

  .field-grid.two {
    grid-template-columns: 1fr;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .result-item {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .result-node {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .result-output {
    padding: 10px 12px;
  }

  .action-row {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 12px 12px;
  }

  .stats-history-row {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 8px 10px;
  }
}
