:root {
  color-scheme: light;
  --bg: #f2eadc;
  --surface: #fffaf1;
  --surface-strong: #e7d8c3;
  --surface-hover: #f4e7d3;
  --ink: #2b2721;
  --muted: #6f6558;
  --muted-light: #9a8975;
  --line: #ddcbb4;
  --line-strong: #bfa98b;
  --accent: #c24e34;
  --accent-dark: #823226;
  --accent-soft: #f4d7cd;
  --warn: #c24e34;
  --sumi: #2f2b25;
  --shoji: #fffdf8;
  --washi: #f2eadc;
  --sakura: #f4d7cd;
  --akebono: #c24e34;
  --ai-blue: #dfecef;
  --take-green: #dfe9d8;
  --shadow: 0 12px 32px rgba(76, 57, 35, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(194, 78, 52, 0.07) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, #fff7ea 0%, var(--bg) 48%, #f8efe2 100%);
  background-size: 34px 100%, auto;
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Hiragino Sans GB",
    system-ui,
    sans-serif;
  font-size: 15px;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell > * {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 12px;
  border-right: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, #e8d7bf 0%, #efe3d2 48%, #e2d2ba 100%);
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 12px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  border-color: rgba(194, 78, 52, 0.35);
  background: var(--accent);
  color: var(--shoji);
  font-size: 13px;
  font-weight: 700;
}

.brand h1,
.brand-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 650;
}

.brand p,
.workspace-header p,
.eyebrow {
  margin: 0;
  color: var(--muted);
}

.brand p {
  margin-top: 2px;
  font-size: 12px;
}

.quota-card,
.account-card {
  display: grid;
  gap: 4px;
  margin: -6px 2px 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
}

.quota-card span,
.quota-card p,
.account-card span,
.account-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quota-card strong,
.account-card strong {
  color: var(--ink);
  font-size: 15px;
}

.quota-card-with-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.quota-card-with-action > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-card .quota-card.account-quota-block {
  margin: 8px 0 4px;
  padding: 10px;
  border-radius: 8px;
  box-shadow: none;
  background: rgba(255, 252, 246, 0.6);
  border-color: rgba(152, 108, 70, 0.2);
}

.account-card .quota-card.account-quota-block strong {
  font-size: 14px;
}

.quota-vip-button {
  min-width: 78px;
  margin-top: 0;
  justify-self: end;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 8px 18px rgba(130, 50, 38, 0.22);
}

.quota-empty {
  color: var(--warn) !important;
}

.vip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  margin-top: 4px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: var(--shoji);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.vip-button:hover {
  background: var(--accent-dark);
}

.compact-button {
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.account-card > .compact-button {
  width: 100%;
  margin-top: 4px;
}

.account-card #profileButton,
.account-card #sidebarLogoutButton {
  min-height: 36px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-card #profileButton {
  border-color: rgba(176, 64, 42, 0.42);
  background: rgba(255, 252, 246, 0.94);
  color: var(--accent-dark);
}

.account-card #profileButton:hover {
  border-color: rgba(176, 64, 42, 0.7);
  background: rgba(176, 64, 42, 0.08);
}

.account-card #sidebarLogoutButton {
  color: var(--muted);
}

.sidebar-search {
  display: grid;
  gap: 6px;
  margin: -4px 2px 0;
}

.sidebar-search span {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-search input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--shoji);
  color: var(--ink);
  outline: none;
}

.sidebar-search input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 2px rgba(55, 53, 47, 0.08);
}

.tool-nav {
  display: grid;
  gap: 2px;
}

.home-nav-button {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.home-nav-button:hover,
.home-nav-button.active {
  background: var(--accent-soft);
}

.tool-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-weight: 650;
}

.tool-group:hover,
.tool-group.active {
  background: var(--surface-hover);
}

.tool-group strong {
  color: var(--muted);
  font-size: 16px;
}

.tool-group em {
  margin-left: auto;
  margin-right: 8px;
  color: var(--muted-light);
  font-size: 12px;
  font-style: normal;
}

.tool-group-panel {
  display: none;
  gap: 2px;
  margin: 2px 0 8px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.tool-group-panel.open {
  display: grid;
}

.tool-subtab {
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.tool-subtab:hover {
  background: var(--surface-hover);
}

.tool-subtab.active {
  border-color: transparent;
  background: var(--accent-soft);
}

.tool-subtab strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 600;
}

.tool-subtab span,
.tool-empty {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.tool-empty {
  padding: 8px 10px;
}

.workspace {
  padding: 48px 44px;
}

.home-view,
.tool-view {
  max-width: 1080px;
  margin: 0 auto;
}

.home-view {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 96px);
}

[hidden] {
  display: none !important;
}

body.privacy-modal-open {
  overflow: hidden;
}

.privacy-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(47, 43, 37, 0.42);
  backdrop-filter: blur(2px);
}

.privacy-modal {
  width: min(520px, 100%);
  max-height: min(78vh, 640px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(47, 43, 37, 0.24);
}

.privacy-modal h2 {
  margin: 8px 0 12px;
  font-size: 24px;
  line-height: 1.25;
}

.privacy-modal p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.privacy-modal a {
  color: var(--accent-dark);
  font-weight: 700;
}

.privacy-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.privacy-modal-actions .primary-button,
.privacy-modal-actions .secondary-button {
  flex: 0 0 auto;
  min-width: 112px;
}

.home-hero {
  position: relative;
  padding: 54px 0 38px;
  border-bottom: 1px solid var(--line);
}

.form-first-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.home-hero::before {
  content: "";
  display: block;
  width: 74px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--accent);
}

.home-hero h2 {
  max-width: 760px;
  margin: 10px 0 16px;
  color: var(--ink);
  font-size: 48px;
  line-height: 1.12;
  font-weight: 750;
}

.home-hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.flow-card span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--shoji);
  font-size: 12px;
  font-weight: 750;
}

.preview-lines i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-soft), rgba(223, 203, 180, 0.42));
}

.preview-lines i:nth-child(2) {
  width: 78%;
}

.preview-lines i:nth-child(3) {
  width: 56%;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.home-stats div {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
}

.home-stats strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.home-stats span {
  color: var(--muted);
  font-size: 12px;
}

.quota-note {
  margin-top: 14px !important;
  color: var(--warn) !important;
  font-size: 14px;
}

.home-section {
  padding-top: 28px;
}

.home-entry-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.beginner-flow-section {
  padding-top: 24px;
}

.beginner-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.flow-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.flow-card:hover {
  border-color: var(--line-strong);
  background: #fff8f1;
}

.flow-card strong {
  align-self: center;
  font-size: 18px;
}

.flow-card p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.seo-entry-grid a {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink);
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.seo-entry-grid a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: #fff8f1;
}

.home-entry-card {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.home-entry-card:hover {
  border-color: var(--line-strong);
  background: #fff8f1;
}

.home-entry-card:nth-child(1),
.focus-card:nth-child(1) {
  border-color: rgba(166, 64, 45, 0.34);
  border-left-color: var(--accent);
  background: #fff8f1;
}

.home-entry-card:nth-child(2),
.focus-card:nth-child(2) {
  border-color: rgba(45, 75, 116, 0.24);
  border-left-color: #557f91;
  background: var(--ai-blue);
}

.home-entry-card:nth-child(3),
.focus-card:nth-child(3) {
  border-color: rgba(83, 116, 76, 0.24);
  border-left-color: #6d8b5f;
  background: var(--take-green);
}

.home-entry-card span {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 700;
}

.home-entry-card strong {
  font-size: 17px;
  line-height: 1.35;
}

.home-entry-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.scenario-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
  text-align: left;
}

.scenario-card:hover {
  border-color: var(--line-strong);
  background: #fff8f1;
}

.scenario-card span {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 700;
}

.scenario-card strong {
  font-size: 16px;
}

.scenario-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.focus-card {
  display: grid;
  gap: 8px;
  min-height: 152px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
  text-align: left;
}

.focus-card:hover {
  border-color: var(--line-strong);
  background: #fff8f1;
}

.focus-card span {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.focus-card strong {
  font-size: 17px;
}

.focus-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.conversion-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(194, 78, 52, 0.42);
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff8f1 0%, var(--shoji) 55%, var(--take-green) 100%);
  box-shadow: var(--shadow);
}

.conversion-strip h3 {
  margin: 6px 0 8px;
}

.conversion-strip p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.knowledge-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.knowledge-banner h3,
.knowledge-layout h3 {
  margin: 6px 0 8px;
}

.knowledge-banner p:last-child,
.knowledge-layout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.maturity-grid,
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.maturity-grid section,
.trust-grid p {
  min-height: 150px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.maturity-grid span {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 700;
}

.maturity-grid h4 {
  margin: 12px 0 8px;
  font-size: 18px;
}

.maturity-grid p,
.trust-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#knowledgeCatalog {
  grid-template-columns: 1fr;
}

.knowledge-card {
  display: grid;
  gap: 10px;
  min-height: 198px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  text-align: left;
}

.knowledge-card:hover {
  border-color: var(--line-strong);
  background: #fff8f1;
}

.knowledge-card span,
.knowledge-card small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 600;
}

.knowledge-card strong {
  font-size: 18px;
}

.knowledge-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.knowledge-trust-row em {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8efe1;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.knowledge-domain {
  display: grid;
  gap: 10px;
}

.knowledge-domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.knowledge-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.personal-kb-drop {
  cursor: pointer;
  min-height: 78px;
}

.personal-kb-drop.dragging {
  background: var(--accent-soft);
  border-color: var(--ink);
}

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

.muted-card {
  text-align: left;
  background: #f8efe1;
  border-style: dashed;
}

.knowledge-detail {
  display: grid;
  gap: 12px;
}

.knowledge-detail ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.knowledge-entry-list {
  display: grid;
  gap: 10px;
}

.knowledge-entry-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.knowledge-entry-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.knowledge-entry-list strong {
  display: block;
  color: var(--ink);
}

.knowledge-entry-list p {
  margin: 4px 0 0;
}

.disclaimer-panel {
  border-color: #e8c7bd;
  background: #fff8f1;
}

.vip-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vip-plan strong {
  display: block;
  margin: 10px 0;
  font-size: 24px;
}

.vip-plan.featured {
  border-color: var(--line-strong);
  background: #fff8f1;
}

.vip-benefit-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.payment-method-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink);
  font-weight: 650;
}

.payment-method-note {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.muted-benefit-list {
  color: var(--muted-light);
}

.knowledge-selector {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
}

.form-intro {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(194, 78, 52, 0.36);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8f1 0%, rgba(255, 253, 248, 0.94) 100%);
  box-shadow: var(--shadow);
}

.form-intro span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
}

.form-intro strong {
  font-size: 18px;
}

.form-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-intro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.form-intro-tags em {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--shoji);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.knowledge-selector label {
  font-size: 14px;
  font-weight: 600;
}

.knowledge-selector small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inline-link {
  width: fit-content;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

.knowledge-recommendation {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
}

.recommendation-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.recommendation-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.recommendation-head span,
.knowledge-option span,
.tool-meta-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.knowledge-recommendation p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.knowledge-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-option {
  display: grid;
  gap: 4px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.knowledge-option.active {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.neutral-kb {
  background: var(--shoji);
  border-style: dashed;
}

.tool-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-meta-strip span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff8f1;
}

.tool-guidance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
}

.tool-guidance div {
  display: grid;
  gap: 4px;
}

.tool-guidance span {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 700;
}

.tool-guidance strong {
  font-size: 14px;
}

.tool-guidance p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.advanced-fields {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8efe1;
}

.advanced-fields summary {
  cursor: pointer;
  font-weight: 700;
}

.advanced-fields[open] summary {
  margin-bottom: 2px;
}

.file-drop {
  display: grid;
  gap: 8px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.file-drop-zone {
  display: grid;
  gap: 4px;
  min-height: 92px;
  place-items: center;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f8efe1;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.file-drop-zone span,
.file-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.file-status {
  margin: 0;
}

.file-drop.dragging .file-drop-zone {
  background: var(--accent-soft);
  border-color: var(--ink);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 14px;
}

.section-heading h3 {
  margin: 6px 0 0;
  font-size: 22px;
}

.home-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 14px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.88);
  color: var(--ink);
  font-size: 13px;
}

.filter-chip span {
  color: var(--muted);
  font-size: 12px;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  display: grid;
  gap: 8px;
  min-height: 158px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  text-align: left;
}

.tool-card:hover {
  border-color: var(--line-strong);
  border-left-color: var(--accent);
  background: #fff8f1;
}

.more-card {
  border-style: dashed;
  background: var(--accent-soft);
}

.tool-card span {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 600;
}

.tool-card strong {
  font-size: 17px;
  font-weight: 650;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tool-card small {
  align-self: end;
  color: var(--muted-light);
  font-size: 12px;
}

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

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 12px;
}

.auth-panel {
  align-content: start;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.single-account {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
}

.settings-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.settings-panel label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.status-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.status-list p {
  margin: 0;
}

.success-message {
  color: var(--accent) !important;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin: 0 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.workspace-header h2 {
  margin: 8px 0 10px;
  font-size: 38px;
  line-height: 1.12;
  font-weight: 700;
}

.workspace-header p:last-child {
  max-width: 680px;
  line-height: 1.65;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted-light);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(380px, 1.12fr);
  gap: 18px;
  margin: 0;
}

.app-seo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(150px, .75fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, .92);
  box-shadow: var(--shadow);
}

.app-seo-panel h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

.app-seo-lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.app-seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.app-seo-actions .primary-button,
.app-seo-actions .secondary-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 36px;
  padding: 0 18px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.app-seo-card {
  min-height: 112px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .62);
  font-size: 13px;
}

.app-seo-card strong {
  display: block;
  margin-bottom: 6px;
}

.app-seo-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.app-seo-card p {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.55;
}

.app-seo-card.warning {
  background: rgba(223, 233, 216, .62);
}

.tool-seo-content {
  display: grid;
  gap: 16px;
  max-width: 1080px;
  margin: 42px auto 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(191, 169, 139, 0.58);
  background: transparent;
  box-shadow: none;
}

.tool-seo-content .seo-section {
  padding: 0;
}

.tool-seo-content h2 {
  max-width: 720px;
  margin: 0;
  font-size: 22px;
  line-height: 1.28;
}

.tool-seo-content h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.tool-seo-content p,
.tool-seo-content li {
  color: var(--muted);
  line-height: 1.68;
}

.tool-seo-content p {
  max-width: 860px;
  margin: 0;
}

.tool-seo-content ul {
  margin: 0;
  padding-left: 18px;
}

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

.tool-seo-card {
  border: 1px solid rgba(191, 169, 139, 0.54);
  border-radius: 10px;
  padding: 16px 17px;
  background: rgba(255, 253, 248, .7);
}

.tool-seo-faq {
  display: grid;
  gap: 10px;
  padding: 16px 17px;
  border: 1px solid rgba(191, 169, 139, 0.42);
  border-radius: 10px;
  background: rgba(253, 246, 235, .68);
}

.tool-seo-faq li + li {
  margin-top: 4px;
}

.tool-seo-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-top: 2px;
}

.tool-seo-links strong {
  margin-right: 2px;
  color: var(--muted);
  font-size: 13px;
}

.tool-seo-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(191, 169, 139, 0.62);
  border-radius: 999px;
  background: rgba(255, 253, 248, .82);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.tool-seo-links a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-panel {
  padding: 20px;
}

.field-stack {
  display: grid;
  gap: 16px;
}

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

.field label {
  font-size: 14px;
  font-weight: 600;
}

.field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.control {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--shoji);
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

.control:focus {
  border-color: var(--line-strong);
  background: #fff8f1;
  box-shadow: 0 0 0 2px rgba(166, 64, 45, 0.12);
}

textarea.control {
  min-height: 150px;
  resize: vertical;
  line-height: 1.65;
}

.action-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.auth-actions > .primary-button,
.auth-actions > .secondary-button {
  flex: 1;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border: 0;
  border-radius: 6px;
  min-height: 38px;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.primary-button {
  flex: 1;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--shoji);
  font-weight: 600;
  padding: 0 16px;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 248, 0.88);
  color: var(--ink);
  padding: 0 14px;
  font-weight: 600;
}

.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  background: var(--surface-hover);
}

.ghost-button {
  white-space: nowrap;
}

.form-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--warn);
  font-size: 13px;
}

.result-panel {
  display: flex;
  flex-direction: column;
  min-height: 540px;
  overflow: hidden;
}

.result-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f4d7cd 0%, #f8efe1 42%, #fffaf1 100%);
}

.result-toolbar h3 {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 650;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--shoji);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.result-box {
  flex: 1;
  padding: 22px 24px;
  overflow: auto;
  color: var(--ink);
  line-height: 1.78;
  white-space: pre-wrap;
}

.result-content {
  margin: 0;
  white-space: pre-wrap;
  color: inherit;
  font: inherit;
}

.result-boundary {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #e8c7bd;
  border-radius: 8px;
  background: #fff8f1;
  color: var(--accent-dark);
  font-size: 13px;
  line-height: 1.65;
  white-space: normal;
}

.followup-box {
  display: grid;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  background: var(--shoji);
}

.followup-box[hidden] {
  display: none;
}

.followup-box label {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 700;
}

.followup-box div {
  display: flex;
  gap: 8px;
}

.followup-box .control {
  flex: 1;
}

.conversion-result {
  display: grid;
  gap: 12px;
  width: 100%;
}

.conversion-actions {
  display: flex;
  justify-content: flex-end;
}

.conversion-result pre {
  overflow: auto;
  max-height: 520px;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8efe1;
  color: var(--ink);
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.image-result {
  display: grid;
  gap: 16px;
}

.image-result img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8efe1;
}

.image-result p {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.empty-result-preview {
  display: grid;
  gap: 12px;
  min-height: 220px;
  align-content: center;
  justify-items: center;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.empty-result-preview span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
}

.empty-result-preview strong {
  color: var(--ink);
  font-size: 18px;
}

.preview-lines {
  display: grid;
  gap: 8px;
  width: min(360px, 100%);
  margin-top: 8px;
}

.loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  max-width: min(340px, calc(100vw - 40px));
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-button,
.sidebar-overlay {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 920px) {
  .mobile-menu-button {
    display: inline-flex;
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 50;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 168px;
    min-height: 54px;
    padding: 0 22px;
    border: 1px solid rgba(130, 50, 38, 0.42);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fffdf8;
    font-weight: 800;
    letter-spacing: 0;
    transform: translateX(-50%);
    box-shadow:
      0 16px 34px rgba(130, 50, 38, 0.32),
      0 0 0 7px rgba(194, 78, 52, 0.12);
    animation: mobileFabPulse 2.4s ease-in-out infinite;
  }

  .mobile-menu-button::before {
    content: "";
    width: 18px;
    height: 12px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    box-shadow: inset 0 4px 0 0 currentColor;
    opacity: 0.95;
  }

  body.sidebar-open .mobile-menu-button {
    background: var(--ink);
    border-color: rgba(47, 43, 37, 0.42);
    box-shadow:
      0 14px 30px rgba(47, 43, 37, 0.28),
      0 0 0 7px rgba(47, 43, 37, 0.1);
    animation: none;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: block;
    background: rgba(15, 15, 15, 0.28);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform 0.18s ease;
    gap: 12px;
    padding: 12px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    max-width: 100vw;
    overflow: auto;
    box-shadow: 16px 0 40px rgba(15, 15, 15, 0.14);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .tool-nav {
    display: grid;
    gap: 6px;
    overflow: visible;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .tool-group-panel {
    flex: 0 0 auto;
    display: none;
    gap: 6px;
    margin: 0;
    padding-left: 0;
    border-left: 0;
  }

  .tool-group-panel.open {
    display: grid;
  }

  .tool-group,
  .tool-subtab {
    width: 100%;
  }

  .workspace {
    padding: 28px 18px;
  }

  .home-view {
    min-height: calc(100vh - 56px);
  }

  .workspace-header,
  .app-seo-panel,
  .content-grid {
    max-width: none;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .app-seo-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .result-panel {
    min-height: 420px;
  }

  .home-hero {
    padding-top: 26px;
  }

  .form-first-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-hero h2 {
    font-size: 34px;
  }

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

  .home-stats,
  .beginner-flow-grid,
  .home-entry-grid,
  .seo-entry-grid,
  .scenario-grid,
  .focus-grid,
  .maturity-grid,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-grid,
  .auth-layout,
  .single-account {
    grid-template-columns: 1fr;
  }

  .knowledge-layout {
    grid-template-columns: 1fr;
  }

  .knowledge-domain-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-upload-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-option-list {
    grid-template-columns: 1fr;
  }

  .vip-layout {
    grid-template-columns: 1fr;
  }
}

@keyframes mobileFabPulse {
  0%, 100% {
    box-shadow:
      0 16px 34px rgba(130, 50, 38, 0.32),
      0 0 0 7px rgba(194, 78, 52, 0.12);
  }
  50% {
    box-shadow:
      0 18px 40px rgba(130, 50, 38, 0.4),
      0 0 0 12px rgba(194, 78, 52, 0.18);
  }
}

@media (max-width: 560px) {
  .sidebar {
    gap: 10px;
    padding: 10px;
  }

  .brand {
    padding: 4px 6px 8px;
  }

  .quota-card,
  .account-card {
    padding: 10px;
  }

  .sidebar-search {
    margin: 0;
  }

  .brand h1 {
    font-size: 15px;
  }

  .workspace {
    padding: 22px 14px;
  }

  .workspace-header h2 {
    font-size: 30px;
  }

  .workspace-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    flex-direction: column;
  }

  .recommendation-head {
    flex-direction: column;
  }

  .ghost-button {
    width: 100%;
  }

  .action-row {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .result-toolbar {
    align-items: flex-start;
  }

  .home-hero h2 {
    font-size: 28px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .home-stats,
  .beginner-flow-grid,
  .home-entry-grid,
  .seo-entry-grid,
  .scenario-grid,
  .focus-grid,
  .maturity-grid,
  .trust-grid,
  .tool-guidance {
    grid-template-columns: 1fr;
  }

  .conversion-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .followup-box div {
    flex-direction: column;
  }

  .knowledge-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-upload-grid {
    grid-template-columns: 1fr;
  }

}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.site-footer p {
  margin: 0;
  line-height: 1.7;
}

.site-footer nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.legal-page {
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
}

.legal-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 64px;
}

.legal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.legal-header h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
}

.legal-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.legal-content {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.legal-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.legal-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.78;
}

.legal-card p {
  margin: 0 0 10px;
}

.legal-card ul {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 760px) {
  .app-seo-panel h1 {
    font-size: 28px;
  }

  .app-seo-lead {
    line-height: 1.5;
  }

  .app-seo-card {
    display: none;
  }

  .tool-seo-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tool-seo-content {
    margin-top: 22px;
    padding: 16px;
    border-radius: 8px;
  }

  .tool-seo-content .seo-section {
    padding: 14px;
  }

  .tool-seo-content h2 {
    font-size: 18px;
  }

  .tool-seo-card,
  .tool-seo-faq {
    padding: 13px;
  }

  .tool-seo-links {
    gap: 8px;
  }

  .tool-seo-links strong {
    flex-basis: 100%;
  }

  .app-seo-actions .primary-button,
  .app-seo-actions .secondary-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 12px;
  }

  .site-footer,
  .legal-header {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

body.android-app {
  --bg: #f6f1e8;
  --surface: #fffdf8;
  --surface-strong: #efe7da;
  --surface-hover: #f8efe1;
  --ink: #2f2b25;
  --muted: #746d62;
  --muted-light: #9d8f7e;
  --line: #e2d7c6;
  --line-strong: #cdbfa9;
  --accent: #a6402d;
  --accent-dark: #742f25;
  --accent-soft: #f1dfd5;
  --warn: #a6402d;
  --shadow: 0 8px 24px rgba(56, 43, 29, 0.07);
  background: #f6f1e8;
  font-size: 14px;
}

body.android-app .mobile-menu-button {
  top: auto;
  left: 50%;
  right: auto;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: auto;
  min-width: 168px;
  height: 54px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a6402d 0%, #742f25 100%);
  color: #fffdf8;
  font-size: 14px;
  transform: translateX(-50%);
  box-shadow:
    0 16px 34px rgba(116, 47, 37, 0.32),
    0 0 0 7px rgba(166, 64, 45, 0.12);
}

body.android-app .mobile-menu-button::before {
  content: "";
  width: 18px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: transparent;
  box-shadow: inset 0 4px 0 0 currentColor;
}

body.android-app .workspace {
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(100px + env(safe-area-inset-bottom));
  background:
    linear-gradient(90deg, rgba(166, 64, 45, 0.05) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, #fbf7ee 0%, #f6f1e8 42%, #f8f4ed 100%);
  background-size: 32px 100%, auto;
}

body.android-app .home-view,
body.android-app .tool-view {
  max-width: none;
  min-height: 0;
}

body.android-app .home-hero {
  padding: 10px 48px 10px 0;
  border-bottom: 0;
}

body.android-app .home-hero .eyebrow {
  color: #9b3f31;
  font-size: 12px;
  font-weight: 700;
}

body.android-app .home-hero h2 {
  margin: 5px 0 0;
  color: #2f2b25;
  font-size: 21px;
  line-height: 1.22;
  font-weight: 760;
}

body.android-app .home-hero > p:not(.eyebrow),
body.android-app .home-stats,
body.android-app .scenario-section,
body.android-app .focus-section,
body.android-app .maturity-section,
body.android-app .trust-section {
  display: none;
}

body.android-app .home-section {
  padding-top: 6px;
}

body.android-app .section-heading {
  margin-bottom: 8px;
}

body.android-app .section-heading .eyebrow {
  display: none;
}

body.android-app .section-heading h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

body.android-app .home-entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 10px;
}

body.android-app .home-entry-card {
  min-height: 0;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  border-color: #e2d7c6;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 10px 26px rgba(56, 43, 29, 0.06);
}

body.android-app .home-entry-card:nth-child(n + 5) {
  display: none;
}

body.android-app .home-entry-card:nth-child(1) {
  border-color: rgba(166, 64, 45, 0.34);
  background: #fff8f1;
}

body.android-app .home-entry-card:nth-child(2) {
  border-color: rgba(45, 75, 116, 0.28);
  background: #f7f9fb;
}

body.android-app .home-entry-card:nth-child(3),
body.android-app .home-entry-card:nth-child(4) {
  background: #fffdf8;
}

body.android-app .home-entry-card span {
  color: #9d8f7e;
  font-size: 11px;
}

body.android-app .home-entry-card strong {
  color: #2f2b25;
  font-size: 14px;
  line-height: 1.3;
}

body.android-app .home-entry-card p {
  display: none;
}

body.android-app .home-filter-row {
  flex-wrap: nowrap;
  gap: 7px;
  margin: 0 -12px 10px;
  padding: 0 12px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

body.android-app .home-filter-row::-webkit-scrollbar {
  display: none;
}

body.android-app .filter-chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border-color: #ded0bd;
  background: rgba(255, 253, 248, 0.9);
  color: #3a352e;
  font-size: 12px;
}

body.android-app .filter-chip.active {
  border-color: rgba(166, 64, 45, 0.42);
  background: #f1dfd5;
  color: #742f25;
}

body.android-app .tool-grid {
  grid-template-columns: 1fr;
  gap: 7px;
}

body.android-app .tool-card {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 0;
  gap: 4px 8px;
  padding: 10px;
  border-color: #e4dacb;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

body.android-app .tool-card span,
body.android-app .tool-card p {
  display: none;
}

body.android-app .tool-card strong {
  color: #2f2b25;
  font-size: 15px;
  line-height: 1.25;
}

body.android-app .tool-card small {
  grid-column: 2;
  grid-row: 1;
  max-width: 118px;
  color: #746d62;
  font-size: 11px;
  line-height: 1.25;
  text-align: right;
}

body.android-app .more-card {
  border-style: dashed;
  background: #f1dfd5;
  color: #742f25;
}

body.android-app .sidebar {
  width: min(88vw, 300px);
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
  gap: 10px;
  background: #efe7da;
}

body.android-app .quota-card,
body.android-app .account-card {
  margin: 0;
  padding: 9px;
  border-color: #e2d7c6;
  background: #fffdf8;
}

body.android-app .tool-nav {
  gap: 5px;
}

body.android-app .workspace-header {
  gap: 10px;
  margin-bottom: 12px;
}

body.android-app .workspace-header h2 {
  font-size: 24px;
  line-height: 1.2;
}

body.android-app .workspace-header p:last-child {
  line-height: 1.5;
}

body.android-app .content-grid,
body.android-app .knowledge-layout,
body.android-app .vip-layout,
body.android-app .auth-layout {
  gap: 12px;
}

body.android-app .form-panel,
body.android-app .result-panel,
body.android-app .knowledge-selector,
body.android-app .advanced-fields {
  padding: 12px;
  border-radius: 8px;
}

body.android-app .field-stack,
body.android-app .form-panel {
  gap: 12px;
}

body.android-app textarea,
body.android-app input,
body.android-app select {
  min-height: 42px;
  font-size: 14px;
}

body.android-app textarea {
  min-height: 128px;
}

body.android-app .result-panel {
  min-height: 260px;
}
