:root {
  --bg: #f5f1ec;
  --bg-soft: #fbf8f4;
  --panel: #ffffff;
  --line: #eadbcb;
  --line-strong: #dec7b0;
  --text: #271d16;
  --muted: #776559;
  --accent: #ff6513;
  --accent-deep: #d84f00;
  --accent-soft: #fff1e6;
  --accent-wash: #fff8f2;
  --shadow: 0 10px 28px rgba(53, 28, 12, 0.06);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 152, 79, 0.08) 0, rgba(255, 152, 79, 0.02) 80px, transparent 80px),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

img {
  max-width: 100%;
  border: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent-deep);
}

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

button {
  cursor: pointer;
}

.container {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.ms-main {
  padding: 24px 0 58px;
}

.ms-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.ms-header:after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 101, 19, 0.45) 20%, rgba(255, 101, 19, 0.12) 100%);
}

.ms-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 78px;
}

.ms-brand {
  min-width: 0;
  flex: 1 1 auto;
}

.ms-brand__name {
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ms-brand__note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.ms-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
}

.ms-nav-shell {
  flex: 0 0 auto;
}

.ms-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.ms-nav li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.18s ease;
}

.ms-nav li.act a,
.ms-nav li a:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-color: rgba(255, 101, 19, 0.18);
}

.ms-hero,
.ms-panel,
.ms-comment-card,
.ms-state-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ms-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 28px 26px;
  border-top: 4px solid var(--accent);
  background: linear-gradient(135deg, #ffffff 0%, #fffaf6 100%);
}

.ms-hero:before {
  content: "";
  position: absolute;
  top: -64px;
  right: -48px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 142, 76, 0.18) 0%, rgba(255, 142, 76, 0) 70%);
}

.ms-hero__kicker,
.ms-panel__kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 14px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ms-hero h1,
.ms-panel h1,
.ms-panel h2,
.ms-state-card h1 {
  margin: 0;
  line-height: 1.28;
}

.ms-hero h1 {
  max-width: 720px;
  font-size: clamp(2rem, 3.1vw, 3rem);
}

.ms-hero p {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.ms-panel,
.ms-comment-card,
.ms-state-card {
  padding: 24px 22px;
}

.ms-section {
  margin-top: 20px;
}

.ms-section + .ms-section,
.ms-panel + .ms-panel,
.ms-panel + .ms-comment-card,
.ms-comment-card + .ms-panel {
  margin-top: 18px;
}

.ms-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ms-section__head h2,
.ms-panel h2,
.ms-download h2,
.ms-content-panel h2,
.ms-comment-card h2 {
  position: relative;
  padding-left: 14px;
  font-size: 1.2rem;
}

.ms-section__head h2:before,
.ms-panel h2:before,
.ms-download h2:before,
.ms-content-panel h2:before,
.ms-comment-card h2:before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 99px;
  background: var(--accent);
}

.ms-section__head p,
.ms-panel__subtext,
.ms-meta,
.ms-breadcrumb,
.ms-empty,
.ms-form-note,
.ms-state-card p {
  color: var(--muted);
  line-height: 1.75;
}

.ms-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.ms-breadcrumb span {
  color: #b89d87;
}

.ms-detail-summary {
  max-width: none;
  margin: 16px 0 0;
  font-size: 1.04rem;
  line-height: 1.9;
}

.ms-detail-panel {
  padding: 28px;
}

.ms-detail-stack {
  display: grid;
  gap: 26px;
}

.ms-detail-card {
  position: relative;
  overflow: hidden;
  padding: 22px 24px 22px 28px;
  border: 1px solid #f1dccb;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff9f4 0%, #ffffff 100%);
}

.ms-detail-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 5px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--accent) 0%, #ffb37f 100%);
}

.ms-detail-card--summary h1 {
  font-size: clamp(2rem, 3vw, 2.9rem);
}

.ms-detail-card--actions {
  padding: 18px 20px 18px 24px;
  background: #fffdfb;
}

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

.ms-detail-action {
  width: 100%;
  min-height: 50px;
  font-size: 1rem;
}

button.ms-detail-action {
  appearance: none;
  -webkit-appearance: none;
}

.ms-detail-action.is-copied {
  background: #ffe7d6;
  border-color: rgba(255, 101, 19, 0.22);
  color: var(--accent-deep);
}

.ms-detail-action--home {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.ms-detail-action--home:hover {
  background: #fdf7f1;
  border-color: rgba(255, 101, 19, 0.16);
  color: var(--accent-deep);
}

.ms-feed {
  display: grid;
  gap: 14px;
}

.ms-home-list {
  display: grid;
  gap: 14px;
}

.ms-home-item {
  position: relative;
  overflow: hidden;
  padding: 16px 18px 16px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 4px 12px rgba(48, 25, 10, 0.03);
}

.ms-home-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 8px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--accent) 0%, #ffb37f 100%);
}

.ms-home-item__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ms-home-item__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ms-home-item__index {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 1rem;
  font-weight: 800;
}

.ms-home-item__title {
  min-width: 0;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

.ms-home-item__title a {
  display: block;
  overflow-wrap: anywhere;
}

.ms-home-item__link {
  flex: 0 0 auto;
}

.ms-feed--compact {
  grid-template-columns: 1fr;
}

.ms-feed--compact .ms-card {
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  padding: 14px 18px 14px 14px;
}

.ms-feed--compact .ms-card__index {
  margin-top: 0;
}

.ms-feed--compact .ms-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ms-feed--compact .ms-card__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.ms-feed--compact .ms-card__title a {
  display: block;
  overflow-wrap: anywhere;
}

.ms-feed--compact .ms-link {
  flex: 0 0 auto;
}

.ms-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 18px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 4px 12px rgba(48, 25, 10, 0.03);
}

.ms-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: linear-gradient(180deg, var(--accent) 0%, #ffb37f 100%);
}

.ms-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 800;
}

.ms-card__body {
  min-width: 0;
}

.ms-card__meta,
.ms-card__tags,
.ms-inline-list,
.ms-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.ms-card__meta span,
.ms-chip-row a,
.ms-chip-row strong,
.ms-tag-cloud a,
.ms-stat span,
.ms-meta span,
.ms-meta a,
.ms-card__tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f7f1eb;
  color: var(--muted);
}

.ms-card__title,
.ms-link-list a,
.ms-column-card__title {
  font-weight: 700;
  line-height: 1.5;
}

.ms-card__title {
  margin: 0 0 10px;
  font-size: 1.12rem;
}

.ms-card__desc,
.ms-content,
.ms-prose {
  color: #5f4f43;
  line-height: 1.85;
}

.ms-card__desc {
  margin: 0 0 14px;
}

.ms-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transition: 0.18s ease;
}

.ms-link:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.ms-link--ghost {
  background: var(--accent-soft);
  border-color: rgba(255, 101, 19, 0.12);
  color: var(--accent-deep);
}

.ms-link--ghost:hover {
  background: #ffe7d6;
  border-color: rgba(255, 101, 19, 0.22);
  color: var(--accent-deep);
}

.ms-download {
  display: grid;
  gap: 16px;
  margin-top: 0;
  padding: 24px 24px 26px;
  border: 1px solid #f2d3bf;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fffaf6 0%, #fff 100%);
}

.ms-detail-download {
  gap: 18px;
}

.ms-detail-download__action {
  display: flex;
}

.ms-detail-download__link {
  width: 100%;
  min-height: 74px;
  gap: 14px;
  border-radius: 16px;
  font-size: 1.14rem;
  letter-spacing: 0.01em;
}

.ms-detail-download__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.ms-detail-download__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.ms-panel > h1 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.ms-content-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.ms-content img,
.ms-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 18px auto;
}

.ms-content p,
.ms-prose p {
  margin: 0 0 14px;
}

.ms-content h1,
.ms-content h2,
.ms-content h3,
.ms-prose h1,
.ms-prose h2,
.ms-prose h3 {
  margin: 24px 0 12px;
  font-size: 1.2rem;
}

.ms-content blockquote,
.ms-prose blockquote {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--accent-wash);
}

.ms-page-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.ms-page-links a {
  color: var(--accent-deep);
}

.ms-chip-row,
.ms-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.ms-column-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 4px 12px rgba(48, 25, 10, 0.03);
}

.ms-column-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.ms-link-list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.ms-link-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.ms-link-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ms-link-list span {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

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

.ms-stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: center;
  background: #fff;
}

.ms-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 1.28rem;
}

.ms-form,
.ms-search-form {
  display: grid;
  gap: 14px;
}

.ms-form__row {
  display: grid;
  gap: 14px;
}

.ms-form__inline {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
}

.ms-control,
.ms-search-form select,
.ms-search-form input,
.ms-search-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

.ms-control:focus,
.ms-search-form select:focus,
.ms-search-form input:focus,
.ms-search-form textarea:focus {
  outline: 0;
  border-color: rgba(255, 101, 19, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 101, 19, 0.08);
}

.ms-comment-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ms-comment {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.ms-comment__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ms-comment__author {
  font-weight: 700;
}

.ms-comment__date {
  color: var(--muted);
  font-size: 0.9rem;
}

.ms-comment__reply {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--muted);
}

.pagebar,
.pages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.pagebar a,
.pagebar span,
.pages a,
.pages span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}

.pagebar .current,
.pages .current,
.pagebar a:hover,
.pages a:hover {
  background: var(--accent-soft);
  border-color: rgba(255, 101, 19, 0.18);
  color: var(--accent-deep);
}

.ms-state-card {
  max-width: 720px;
  margin: 42px auto 0;
  text-align: center;
}

.ms-state-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  margin-bottom: 18px;
  border-radius: 26px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 2.3rem;
  font-weight: 900;
}

.ms-footer {
  padding: 6px 0 28px;
}

.ms-footer__inner {
  max-width: 936px;
  margin: 0 auto;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.ms-footer__line,
.ms-footer__copyright {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.ms-footer__line + .ms-footer__line,
.ms-footer__copyright {
  margin-top: 10px;
}

.ms-footer__line {
  font-size: 0.96rem;
  font-weight: 600;
}

.ms-footer__copyright {
  font-size: 0.98rem;
  font-weight: 700;
}

.ms-sitemap {
  width: min(920px, calc(100% - 32px));
  margin: 40px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ms-sitemap ul {
  padding-left: 18px;
}

.ms-sitemap li {
  margin: 8px 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .ms-header__inner {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .ms-nav-toggle {
    display: inline-flex;
  }

  .ms-nav-shell {
    display: none;
    width: 100%;
  }

  .ms-nav-shell.is-open {
    display: block;
  }

  .ms-nav {
    flex-direction: column;
    align-items: stretch;
    padding-top: 6px;
  }

  .ms-nav li a {
    width: 100%;
    justify-content: flex-start;
  }

  .ms-grid-columns,
  .ms-stat-grid,
  .ms-form__inline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 980px);
  }

  .ms-main {
    padding: 18px 0 46px;
  }

  .ms-hero,
  .ms-panel,
  .ms-comment-card,
  .ms-state-card {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .ms-hero h1,
  .ms-panel > h1 {
    font-size: 1.8rem;
  }

  .ms-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 14px 16px 12px;
  }

  .ms-card__index {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .ms-home-item {
    padding: 14px 14px 14px 22px;
  }

  .ms-home-item__body,
  .ms-home-item__main {
    align-items: flex-start;
    flex-direction: column;
  }

  .ms-home-item__main {
    gap: 12px;
  }

  .ms-home-item__link {
    width: 100%;
  }

  .ms-detail-panel {
    padding: 18px 16px;
  }

  .ms-detail-card {
    padding: 18px 16px 18px 22px;
  }

  .ms-detail-stack {
    gap: 20px;
  }

  .ms-detail-actions {
    grid-template-columns: 1fr;
  }

  .ms-detail-download {
    padding: 20px 16px 22px;
  }

  .ms-detail-download__link {
    min-height: 64px;
    font-size: 1.06rem;
  }

  .ms-feed--compact .ms-card {
    align-items: start;
  }

  .ms-feed--compact .ms-card__body {
    align-items: flex-start;
    flex-direction: column;
  }

  .ms-feed--compact .ms-link {
    min-width: 0;
    width: 100%;
  }

  .ms-link {
    min-width: 112px;
    min-height: 40px;
  }
}
