:root {
  --page: #f8f8f6;
  --rail: #f4f4f2;
  --ink: #34332f;
  --muted: #817f78;
  --line: #e4e2dc;
  --soft-line: #d8d6cf;
  --orange: #d87957;
  --shadow: 0 18px 52px rgba(35, 34, 30, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
textarea {
  font: inherit;
}

input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-frame {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--page);
}

.rail {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 24px;
  min-height: 100vh;
  padding: 24px 0 22px;
  background: #fbfbf9;
  border-right: 1px solid var(--line);
}

.rail-nav,
.rail-bottom {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.rail-nav {
  align-content: start;
  padding-top: 16px;
}

.rail-bottom {
  align-self: end;
}

.rail-button,
.plain-icon,
.top-ghost {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #22211f;
}

.rail-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.rail-button.active,
.rail-button:hover {
  background: #ecebe7;
}

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #3d3d39;
  font-size: 20px;
  font-weight: 800;
}

.stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 100vh;
  padding: 28px 24px;
}

.top-ghost {
  position: absolute;
  top: 27px;
  right: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.top-ghost:hover {
  background: #efeee9;
}

.center-card {
  display: grid;
  align-content: center;
  justify-items: center;
  width: min(100%, 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 128px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
}

.greeting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 50px;
}

.brand-sun {
  position: relative;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
}

.brand-sun::before,
.brand-sun::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 4deg,
    transparent 0deg 12deg,
    var(--orange) 12deg 18deg,
    transparent 18deg 30deg
  );
}

.brand-sun::after {
  inset: 11px;
  background: var(--page);
}

h1 {
  margin: 0;
  color: #3b3935;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(38px, 5.2vw, 62px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.composer {
  display: grid;
  grid-template-rows: 1fr auto;
  width: min(100%, 916px);
  min-height: 168px;
  padding: 26px 28px 22px;
  border: 1px solid var(--soft-line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

textarea {
  width: 100%;
  min-height: 62px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.45;
}

textarea::placeholder {
  color: #85837c;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
}

.right-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.plain-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.plain-icon:hover {
  background: #f1f0eb;
}

.model-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #3f3d38;
  font-size: 20px;
  font-weight: 600;
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.mode-row button {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: #fff;
  color: #1f1e1b;
  font-size: 20px;
  box-shadow: 0 2px 7px rgba(35, 34, 30, 0.08);
}

.mode-row button:hover {
  background: #f7f7f4;
}

.service-note {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.home-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 916px);
  margin-top: 18px;
}

.home-summary article {
  display: grid;
  gap: 5px;
  min-height: 84px;
  padding: 14px 16px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(35, 34, 30, 0.05);
}

.home-summary strong {
  font-size: 16px;
}

.home-summary span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sub-view {
  align-content: center;
  width: min(100%, 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 128px;
}

.sub-panel {
  width: min(100%, 760px);
  margin: 0 auto;
}

.wide-panel {
  width: min(100%, 1040px);
}

.page-head {
  margin-bottom: 22px;
  text-align: center;
}

.page-head p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sub-panel h2,
.page-head h2 {
  margin: 0 0 22px;
  color: #3b3935;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
}

.page-head h2 {
  margin-bottom: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 20px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
}

.result-list,
.thread-list,
.status-grid,
.keyword-grid,
.article-grid,
.service-grid,
.pricing-grid,
.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.result-list article,
.thread-list button,
.status-grid article,
.keyword-grid span,
.article-grid article,
.service-grid article,
.pricing-grid article,
.faq-list details,
.contact-card,
.process-card {
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(35, 34, 30, 0.05);
}

.result-list article,
.status-grid article,
.article-grid article,
.service-grid article,
.pricing-grid article,
.process-card,
.faq-list details {
  padding: 16px 18px;
}

.result-list span,
.status-grid span,
.article-grid span,
.pricing-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-list strong,
.status-grid strong,
.article-grid strong,
.pricing-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.result-list p,
.status-grid p,
.article-grid p,
.service-grid p,
.pricing-grid p,
.process-card li,
.faq-list p,
.contact-card span,
.fine-print {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.thread-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 18px;
  color: var(--ink);
  text-align: left;
}

.thread-list span {
  color: var(--muted);
  font-size: 13px;
}

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

.article-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

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

.keyword-grid span {
  padding: 14px 16px;
  font-weight: 700;
}

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

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

.service-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
}

.service-grid h3,
.pricing-grid h3,
.process-card h3 {
  margin: 0;
  font-size: 18px;
}

.service-grid ul,
.process-card ol {
  margin: 4px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.pricing-grid article {
  display: grid;
  gap: 12px;
  min-height: 270px;
}

.pricing-grid article.featured {
  border-color: rgba(216, 121, 87, 0.62);
  box-shadow: 0 14px 36px rgba(216, 121, 87, 0.13);
}

.pricing-grid strong {
  color: #2e2d29;
  font-size: 22px;
}

.pricing-grid button,
.order-form button,
.contact-card a {
  align-self: end;
  justify-self: start;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #34332f;
  font-weight: 700;
  text-decoration: none;
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.order-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(35, 34, 30, 0.05);
}

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

.order-form label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.order-form input,
.order-form select,
.order-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  outline: 0;
  background: #fbfbf9;
  color: var(--ink);
  font-size: 15px;
}

.order-form textarea {
  min-height: 100px;
  padding: 12px;
  resize: vertical;
}

.process-card {
  min-height: 100%;
}

.faq-list details {
  padding: 0;
}

.faq-list summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 780;
}

.faq-list p {
  margin: 0;
  padding: 0 18px 16px;
}

.contact-panel {
  width: min(100%, 680px);
}

.contact-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
}

.contact-card strong {
  font-size: clamp(22px, 4vw, 32px);
  word-break: break-word;
}

.fine-print {
  margin-top: 14px;
  font-size: 13px;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

i[data-lucide] {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.mode-row i[data-lucide] {
  width: 24px;
  height: 24px;
  color: #727069;
}

@media (max-width: 820px) {
  .app-frame {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .rail {
    padding-top: 18px;
  }

  .rail-nav {
    gap: 14px;
  }

  .avatar {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .stage {
    padding: 18px 12px;
  }

  .center-card {
    padding-bottom: 70px;
  }

  .sub-view {
    padding-bottom: 70px;
  }

  .greeting {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 34px;
  }

  h1 {
    font-size: 36px;
  }

  .composer {
    min-height: 154px;
    padding: 22px 20px 18px;
    border-radius: 24px;
  }

  textarea {
    font-size: 20px;
  }

  .model-pill,
  .mode-row button {
    font-size: 16px;
  }

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

  .home-summary,
  .article-grid,
  .service-grid,
  .pricing-grid,
  .order-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .rail {
    position: fixed;
    inset: auto 0 0;
    z-index: 5;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 1fr;
    gap: 0;
    min-height: 58px;
    padding: 6px 10px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .rail > .rail-button,
  .rail-bottom {
    display: none;
  }

  .rail-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    width: 100%;
    padding: 0;
  }

  .center-card {
    min-height: calc(100vh - 70px);
    padding-bottom: 112px;
  }

  .sub-view {
    min-height: calc(100vh - 70px);
    padding-bottom: 112px;
  }

  .greeting {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand-sun {
    width: 38px;
    height: 38px;
  }

  h1 {
    font-size: 34px;
  }

  .right-tools {
    gap: 9px;
  }

  .mode-row {
    gap: 8px;
  }

  .mode-row button {
    height: 38px;
    font-size: 14px;
  }

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

  .home-summary {
    grid-template-columns: 1fr;
  }

  .thread-list button {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}
