
:root {
  --xm-orange: #ff6b35;
  --xm-orange-dark: #e85a28;
  --xm-orange-light: #fff3ee;
  --xm-pink-bar: #ffe8df;
  --xm-text: #333;
  --xm-muted: #888;
  --xm-line: #f0e6e0;
  --xm-card: #fff;
  --xm-radius: 10px;
}

body {
  background: #faf7f5;
  color: var(--xm-text);
  font-family: "Microsoft YaHei", Arial, sans-serif;
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 14px;
}


.xm-top {
  background: var(--xm-card);
  border-bottom: 1px solid var(--xm-line);
  margin-bottom: 12px;
}

.xm-store-bar {
  background: #fff7f3;
  border-bottom: 1px solid var(--xm-line);
}

.xm-store-inner {
  display: flex;
  align-items: center;
  min-height: 42px;
}

.xm-store-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.xm-store-logo {
  display: block;
  width: auto;
  max-width: 140px;
  height: 34px;
  object-fit: contain;
}

.xm-store-brand:hover {
  opacity: 0.92;
  text-decoration: none;
}

.xm-crumb {
  padding: 8px 0 0;
  font-size: 12px;
  color: var(--xm-muted);
  line-height: 1.5;
}

.xm-crumb a {
  color: var(--xm-muted);
  text-decoration: none;
}

.xm-crumb a:hover {
  color: var(--xm-orange);
}

.xm-crumb-sep {
  margin: 0 6px;
  color: #ccc;
}

.xm-crumb-current {
  color: var(--xm-text);
}


.xm-search-bar {
  padding-top: 10px;
  padding-bottom: 0;
}

.scout-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.scout-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.scout-category {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #666;
  text-decoration: none;
}

.scout-category.scout-selected {
  background: var(--xm-orange);
  color: #fff;
}

.scout-form {
  display: flex;
  flex: 1;
  min-width: 200px;
  gap: 6px;
  margin-bottom: 0;
}

.scout-query {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
}

.scout-button {
  padding: 8px 14px;
  background: var(--xm-orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

.xm-page-h1 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--xm-text);
  font-weight: 700;
  text-align: center;
}

.xm-app-hero {
  display: flex;
  gap: 14px;
  padding: 16px 0 12px;
  align-items: flex-start;
}

.xm-app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.xm-app-body {
  flex: 1;
  min-width: 0;
}

.xm-app-body h1 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
}

.xm-app-name {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}

.xm-index-title {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--xm-line);
}

.xm-index-title h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--xm-text);
  font-weight: 700;
}

.xm-app-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--xm-muted);
  line-height: 1.45;
}

.xm-app-meta span {
  margin: 0;
}

.xm-dl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.xm-dl-btn {
  display: block;
  box-sizing: border-box;
  padding: 10px 12px;
  background: var(--xm-orange);
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
  min-height: 44px;
  line-height: 24px;
}

.xm-dl-btn--primary {
  grid-column: 1 / -1;
}

.xm-dl-btn:hover {
  background: var(--xm-orange-dark);
  text-decoration: none;
  color: #fff;
}

.xm-dl-btn--ghost {
  background: #fff;
  color: var(--xm-orange);
  border: 1px solid var(--xm-orange);
}


.xm-tabs-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--xm-card);
  border-bottom: 1px solid var(--xm-line);
  padding-bottom: 8px;
  padding-top: env(safe-area-inset-top, 0);
}

.xm-tabs-wrap {
  padding: 0;
}

.xm-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--xm-pink-bar);
  border-radius: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.xm-tabs::-webkit-scrollbar {
  display: none;
}

.xm-tabs li {
  flex: 0 0 auto;
  min-width: 56px;
  text-align: center;
}

.xm-tabs a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--xm-orange);
  text-decoration: none;
  border-radius: 18px;
  white-space: nowrap;
  min-height: 44px;
  line-height: 24px;
  box-sizing: border-box;
}

.xm-tabs a.is-active {
  background: var(--xm-orange);
  color: #fff;
  font-weight: 600;
}


.xm-main {
  padding-bottom: 24px;
}

.xm-card {
  background: var(--xm-card);
  border-radius: var(--xm-radius);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--xm-line);
}

.xm-card h2 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--xm-text);
  padding-left: 10px;
  border-left: 3px solid var(--xm-orange);
}

.xm-note {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--xm-muted);
  line-height: 1.55;
}

.xm-editor-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fff8f5;
  border-left: 3px solid var(--xm-orange);
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.xm-editor-tip strong {
  color: var(--xm-orange-dark);
}


.xm-shots {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 14px;
}

.xm-shots img {
  height: min(240px, 52vh);
  width: auto;
  max-width: 85vw;
  border-radius: 8px;
  border: 1px solid var(--xm-line);
  flex-shrink: 0;
  scroll-snap-align: start;
}


.xm-prose p,
.xm-prose li {
  font-size: 14px;
  line-height: 1.65;
  color: #444;
}

.xm-prose h3 {
  margin: 16px 0 8px;
  font-size: 15px;
}

.xm-step {
  margin-bottom: 18px;
}

.xm-step p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.65;
  color: #444;
}

.xm-step-img {
  display: block;
  max-width: 300px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid var(--xm-line);
}

.xm-step-num {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: var(--xm-orange);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-size: 12px;
  margin-right: 6px;
}


.xm-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.xm-info-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--xm-line);
  font-size: 14px;
}

.xm-info-list li:last-child {
  border-bottom: none;
}

.xm-info-list strong {
  color: var(--xm-muted);
  font-weight: normal;
  flex-shrink: 0;
}

.xm-info-list span {
  text-align: right;
  word-break: break-all;
}


.xm-app-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.xm-app-list li {
  border-bottom: 1px solid var(--xm-line);
}

.xm-app-list li:last-child {
  border-bottom: none;
}

.xm-app-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--xm-text);
  text-decoration: none;
}

.xm-app-list a:hover {
  color: var(--xm-orange);
}

.xm-app-list-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--xm-orange-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--xm-orange);
  flex-shrink: 0;
  text-align: center;
  line-height: 1.2;
  padding: 4px;
}

.xm-app-list-body {
  flex: 1;
  min-width: 0;
}

.xm-app-list-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.xm-app-list-body p {
  margin: 0;
  font-size: 12px;
  color: var(--xm-muted);
  line-height: 1.4;
}

.xm-app-list-go {
  color: var(--xm-orange);
  font-size: 13px;
  flex-shrink: 0;
}


.xm-topic-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--xm-line);
}

.xm-topic-card:last-child {
  border-bottom: none;
}

.xm-topic-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.xm-topic-card h3 a {
  color: var(--xm-text);
  text-decoration: none;
}

.xm-topic-card p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--xm-muted);
  line-height: 1.5;
}

.xm-topic-meta {
  font-size: 12px;
  color: #aaa;
}


.xm-tag-panel {
  background: var(--xm-card);
  border: 1px solid var(--xm-line);
  border-radius: var(--xm-radius);
  padding: 20px 16px;
  text-align: center;
}

.xm-tag-panel h1 {
  margin: 0 0 12px;
  font-size: 20px;
}

.xm-tag-panel p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--xm-muted);
  line-height: 1.6;
  text-align: left;
}

.xm-tag-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.xm-tag-actions a {
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px;
  text-decoration: none;
}

.xm-tag-actions .xm-dl-btn--primary {
  background: var(--xm-orange);
  color: #fff;
}

.xm-tag-actions .xm-dl-btn--ghost {
  background: #fff;
  color: var(--xm-orange);
  border: 1px solid var(--xm-orange);
}


.xm-footer {
  background: #fff;
  border-top: 1px solid var(--xm-line);
  padding: 16px 0;
  font-size: 12px;
  color: var(--xm-muted);
  text-align: center;
  line-height: 1.6;
}

.xm-footer a {
  color: var(--xm-orange);
}

.xm-hottag-wrap {
  padding: 8px 0 16px;
}

.xm-hottag-wrap .hottag {
  background: var(--xm-card);
  border-radius: var(--xm-radius);
  padding: 14px 16px;
  border: 1px solid var(--xm-line);
  margin: 0;
}

.xm-hottag-wrap .hottag-title h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--xm-text);
  font-weight: 600;
}

.xm-hottag-wrap .hottagmain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.xm-hottag-wrap .hottagmain a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--xm-orange-light);
  color: var(--xm-orange-dark);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  word-break: break-word;
}


@media (max-width: 480px) {
  .dl-link--desktop {
    display: none;
  }

  .xm-dl-row {
    grid-template-columns: 1fr;
  }

  .wrap {
    padding: 0 12px;
  }

  .xm-top-body {
    padding-top: 4px;
  }

  .xm-app-hero {
    gap: 12px;
    padding: 12px 0 10px;
  }

  .xm-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .xm-app-body h1 {
    font-size: 18px;
  }

  .xm-app-meta {
    font-size: 11px;
  }

  .xm-card {
    padding: 14px 12px;
  }

  .xm-tabs a {
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .xm-info-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .xm-info-list span {
    text-align: left;
  }

  .xm-app-list-go {
    display: none;
  }
}
