/**
 * 商城全站样式。每条属性单独换行；账户页仍使用 account.css。
 * 修改整体颜色：统一在 theme.css 修改；内容宽度：调整 --content-width。
 */
:root {
  --ink: var(--color-ink);
  --muted: var(--color-muted);
  --accent: var(--color-primary);
  --accent-deep: var(--color-primary-hover);
  --soft: var(--color-soft);
  --line: var(--color-line);
  --background: var(--color-canvas);
  --paper: var(--color-surface);
  --content-width: 1160px;
  --radius: 18px;
  --shadow: var(--shadow-card);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 1;
  background: var(--color-disabled-bg);
  color: var(--color-muted);
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

h1, h2, h3, p {
  margin-top: 0;
}

.container {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
}

.narrow-container {
  max-width: 960px;
}

.reading-container {
  max-width: 960px;
}

.tool-container {
  max-width: 760px;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--color-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.17em;
}

.ui-icon {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.button .ui-icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.button-primary {
  background: var(--accent);
  color: var(--color-on-primary);
}

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

.button-soft {
  background: var(--soft);
  color: var(--accent-deep);
}

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

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

.button-white:hover {
  border-color: var(--color-selected-border);
  color: var(--accent-deep);
}

.icon-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-muted);
  place-items: center;
}

.icon-button:hover {
  background: var(--soft);
  color: var(--accent-deep);
}

/* 固定高度的公共页头；导航在所有内容页中保持相同位置。 */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--color-glass);
}

.header-inner {
  display: flex;
  width: min(1520px, calc(100% - 48px));
  height: 72px;
  align-items: center;
  gap: 16px;
  margin: auto;
}

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.brand strong {
  display: block;
  max-width: var(--brand-name-max-width);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 750;
  line-height: 22px;
}

.brand > span {
  min-width: 0;
}

.brand small {
  display: block;
  max-width: var(--brand-name-max-width);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.company-emblem {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 30px;
  line-height: 1;
}

.desktop-navigation {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.desktop-navigation a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--color-muted);
  font-size: 13px;
  white-space: nowrap;
}

.desktop-navigation .ui-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.desktop-navigation a:hover, .desktop-navigation a[aria-current] {
  background: var(--soft);
  color: var(--accent-deep);
}

.header-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  margin-left: auto;
}

.site-main {
  min-height: calc(100svh - 190px);
  padding: 64px 0 80px;
}

.page-heading {
  max-width: 650px;
  margin: 0 auto 48px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.page-heading h1 {
  margin-bottom: 13px;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.page-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.site-footer {
  padding: 25px 0;
  border-top: 1px solid var(--line);
  background: var(--color-surface);
}

.footer-inner {
  display: flex;
  width: min(1520px, calc(100% - 48px));
  align-items: center;
  gap: 12px;
  margin: auto;
}

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

.footer-brand strong {
  font-size: 13px;
}

.footer-brand p {
  margin: 1px 0;
  color: var(--color-muted);
  font-size: 10px;
  line-height: 1.6;
}

.company-label {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 13px;
  margin-left: 14px;
  color: var(--color-muted);
  font-size: 11px;
  white-space: nowrap;
}

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

.mobile-navigation {
  display: none;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 16px;
  padding: 10px;
  background: var(--color-surface);
}

.skip-link:focus {
  top: 8px;
}

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

/* 购物首页：介绍与搜索处于同一行，左侧品牌分类，右侧商品。 */
.store-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 24px;
}

.store-hero h1 {
  margin: 8px 0 10px;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.store-hero h1 span {
  display: block;
  margin-top: 5px;
  color: var(--color-accent);
}

.hero-description {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
}

.store-hero-actions {
  display: flex;
  width: min(515px, 49%);
  align-items: center;
  gap: 8px;
}

.store-hero-actions .search-form {
  flex: 1;
  min-width: 0;
}

.store-hero-actions .button-white span {
  white-space: nowrap;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-input {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-muted);
  box-shadow: var(--shadow-card);
}

.search-input input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.search-input:focus-within {
  border-color: var(--color-selected-border);
  box-shadow: var(--focus-ring);
}

.search-input .ui-icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.search-input input::placeholder {
  color: var(--color-placeholder);
}

.catalog-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
}

.category-panel {
  align-self: start;
  overflow: hidden;
}

.category-panel header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.category-panel h2 {
  margin: 0;
  font-size: 19px;
  line-height: 27px;
}

.category-panel nav {
  display: grid;
  gap: 3px;
  padding: 10px;
}

.category-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--color-text);
  font-size: 13px;
}

.category-link:hover {
  background: var(--color-surface-alt);
}

.category-link[aria-current] {
  border-color: var(--color-selected-border);
  background: var(--soft);
  color: var(--color-primary-hover);
  font-weight: 700;
}

.category-link small {
  min-width: 22px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--color-surface-alt);
  color: var(--color-muted);
  font-size: 10px;
  text-align: center;
}

.category-link[aria-current] small {
  background: var(--color-surface);
}

.category-image {
  display: block;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 8px;
  object-fit: contain;
}

.category-fallback, .all-products {
  display: grid;
  background: var(--color-soft);
  color: var(--color-accent);
  place-items: center;
}

.all-products {
  background: var(--color-soft);
  color: var(--color-accent);
}

.category-image.large {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.category-image.large .ui-icon {
  width: 28px;
  height: 28px;
}

.catalog-content {
  min-width: 0;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.catalog-toolbar h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.catalog-toolbar .muted {
  font-size: 12px;
}

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

.product-card {
  display: flex;
  min-height: 285px;
  flex-direction: column;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.product-card-main {
  display: block;
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tag {
  display: inline-flex;
  width: max-content;
  padding: 2px 7px;
  border: 1px solid var(--color-selected-border);
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.product-card h3 {
  margin: 18px 0 9px;
  font-size: 16px;
  line-height: 1.5;
}

.product-card p {
  margin: 0 0 22px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.8;
}

.product-card-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--color-line-soft);
}

.price {
  color: var(--color-primary);
  font-size: 19px;
  font-weight: 750;
  white-space: nowrap;
}

.price small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 400;
}

.product-card-bottom .button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 11px;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 22px;
  border-radius: 20px;
  background: var(--color-soft);
  color: var(--color-accent);
  place-items: center;
}

.empty-icon .ui-icon {
  width: 34px;
  height: 34px;
}

.empty-state h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.5;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-status {
  margin: 12px 0 0;
  font-size: 12px;
}

/* 教程列表的封面、摘要与分页。 */
.blog-search {
  max-width: 460px;
  margin: 0 auto 38px;
}

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

.blog-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  transition: transform 0.2s;
}

.blog-card:hover {
  transform: translateY(-3px);
}

.blog-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 2.1;
  background: var(--color-soft);
}

.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-cover img {
  transform: scale(1.035);
}

.cover-placeholder {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  color: var(--color-primary);
  font-weight: 700;
}

.blog-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 20px;
}

.card-meta time {
  margin-left: auto;
  font-size: 11px;
}

.blog-card h2 {
  margin: 18px 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.blog-card h2 a:hover {
  color: var(--accent-deep);
}

.blog-card-content > p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.read-more {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--color-muted);
  font-size: 12px;
}

.read-more .ui-icon {
  width: 15px;
  height: 15px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 13px;
}

/* 公告列表使用横向图标卡片，详情页和教程共用阅读模板。 */
.notice-list {
  display: grid;
  gap: 20px;
}

.notice-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  transition: transform 0.2s;
}

.notice-card:hover {
  transform: translateX(-3px);
}

.notice-card > div {
  flex: 1;
  min-width: 0;
}

.notice-symbol {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid var(--color-selected-border);
  border-radius: 14px;
  background: var(--color-soft);
  color: var(--accent);
  place-items: center;
}

.notice-symbol .ui-icon {
  width: 30px;
  height: 30px;
}

.notice-card h2 {
  margin: 7px 0 3px;
  font-size: 20px;
  line-height: 1.5;
}

.notice-card p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-card .card-meta time {
  margin-left: 0;
}

.breadcrumbs {
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  color: var(--color-muted);
  font-size: 12px;
  white-space: nowrap;
}

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

.breadcrumbs a {
  flex-shrink: 0;
}

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

.article-panel {
  padding: 42px;
  border-radius: 24px;
}

.article-cover {
  display: block;
  width: 100%;
  max-height: 400px;
  margin-bottom: 36px;
  border-radius: 16px;
  object-fit: cover;
}

.article-heading {
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.article-heading .card-meta {
  justify-content: flex-start;
}

.article-heading time {
  margin-left: 0;
}

.article-heading h1 {
  margin: 20px 0 15px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.article-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.prose {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.prose h2 {
  margin: 32px 0 14px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.5;
}

.prose h3 {
  margin: 26px 0 12px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.5;
}

.prose p {
  margin-bottom: 16px;
}

.prose > :first-child {
  margin-top: 0;
}

.prose a {
  color: var(--color-primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose img, .prose video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.prose video {
  width: 100%;
  max-height: 600px;
  background: var(--color-media);
}

.prose figure {
  margin: 22px 0;
}

.prose figcaption {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.prose pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 12px;
  background: var(--color-surface-alt);
  font-size: 13px;
}

.prose code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--color-surface-alt);
  font-size: 0.9em;
}

.prose pre code {
  padding: 0;
}

.prose blockquote {
  margin: 20px 0;
  padding: 8px 18px;
  border-left: 3px solid var(--color-selected-border);
  background: var(--color-info-bg);
}

.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 13px;
}

.prose th, .prose td {
  padding: 10px 12px;
  border: 1px solid var(--line);
}

.article-return {
  margin-top: 28px;
}

/* 历史订单及工具表单的实际页面布局。 */
.field {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--color-line);
  border-radius: 11px;
  outline: none;
  background: var(--color-surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 22px;
}

.field:focus {
  border-color: var(--color-selected-border);
  box-shadow: var(--focus-ring);
}

.field::placeholder {
  color: var(--color-placeholder);
}

textarea.field {
  resize: vertical;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}

.form-hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.inline-feedback {
  margin: 16px 0 0;
  padding: 12px 15px;
  border: 1px solid var(--color-warning-border);
  border-radius: 10px;
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  font-size: 13px;
}

.order-panel {
  padding: 25px;
}

.order-form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 10px;
}

.order-empty {
  margin-top: 25px;
}

.order-empty .empty-state {
  padding: 55px 20px;
}

.privacy-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: -24px 0 30px;
}

.privacy-pills span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--color-selected-border);
  border-radius: 99px;
  background: var(--color-soft);
  color: var(--color-primary);
  font-size: 11px;
}

.privacy-pills .ui-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.tool-panel, .info-panel {
  padding: 30px;
}

.tool-panel h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.4;
}

.tool-panel > .muted {
  margin-bottom: 25px;
  font-size: 13px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.form-actions small {
  margin-left: auto;
  font-size: 11px;
}

[data-demo-form="x-check"] > .button {
  margin-top: 16px;
}

.local-privacy {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 18px;
  color: var(--color-info-text);
}

.local-privacy .ui-icon {
  margin-top: 3px;
}

.local-privacy strong {
  font-size: 12px;
}

.local-privacy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.info-panel h2 {
  font-size: 18px;
}

.info-panel ul {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2.1;
}

.totp-result {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--color-info-border);
  border-radius: 14px;
  background: var(--color-info-bg);
  text-align: center;
}

.totp-result output {
  display: block;
  margin: 10px 0;
  color: var(--color-primary);
  font-family: ui-monospace, monospace;
  font-size: 42px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.totp-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-info-text);
  font-size: 12px;
}

.totp-result progress {
  width: 100%;
  height: 5px;
  margin-top: 17px;
  accent-color: var(--accent);
}

/* 商品详情：展示区与购买区并排。 */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.product-display {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: radial-gradient(circle at 50% 40%, var(--color-gradient-start) 0, var(--color-gradient-end) 65%);
}

.product-display .large {
  width: 95px;
  height: 95px;
  border-radius: 25px;
}

.product-display .large .ui-icon {
  width: 52px;
  height: 52px;
}

.product-display > span:not(.category-image) {
  font-size: 30px;
  font-weight: 700;
}

.product-display > small {
  color: var(--color-muted);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.product-purchase {
  padding: 30px;
}

.product-purchase h1 {
  margin: 16px 0 12px;
  font-size: 25px;
  line-height: 1.45;
}

.detail-price {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 25px 0;
  padding: 18px;
  border-radius: 12px;
  background: var(--color-surface-alt);
}

.detail-price > span {
  color: var(--muted);
  font-size: 12px;
}

.detail-price strong {
  color: var(--accent-deep);
  font-size: 28px;
}

.detail-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--color-muted);
  font-size: 11px;
}

/* 【直接下单】三个渠道按配置显示；留空的渠道不占位置。 */
.direct-purchase h2 {
  margin-bottom: 5px;
  font-size: 17px;
}

.direct-purchase > .muted {
  margin-bottom: 14px;
  font-size: 13px;
}

.purchase-example-note {
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  font-size: 12px;
  line-height: 1.7;
}

.purchase-channels {
  display: grid;
  gap: 10px;
}

.purchase-channel {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid var(--color-selected-border);
  border-radius: 13px;
  background: var(--color-soft);
  color: var(--color-primary-hover);
  transition: background 150ms, border-color 150ms;
}

.purchase-channel:hover {
  border-color: var(--color-primary);
  background: var(--color-soft-hover);
}

.purchase-channel > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.purchase-channel strong {
  font-size: 15px;
  font-weight: 600;
}

.purchase-channel small {
  color: var(--color-muted);
  font-size: 12px;
}

.purchase-channel > .ui-icon {
  flex: 0 0 18px;
}

.purchase-after-payment {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--color-surface-alt);
}

.purchase-after-payment h3 {
  margin-bottom: 7px;
  font-size: 15px;
}

.purchase-after-payment p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.purchase-after-payment .button {
  width: 100%;
  min-height: 44px;
}

.purchase-empty,
.purchase-handoff {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.purchase-notes {
  padding-left: 20px;
}

.purchase-guide-steps {
  margin: 0 0 24px;
  padding-left: 22px;
}

.purchase-guide-steps li {
  padding-left: 5px;
}

.purchase-guide-steps p {
  margin: 5px 0 18px;
  color: var(--muted);
}

.purchase-guide-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.purchase-guide-products .button {
  justify-content: space-between;
  white-space: normal;
  text-align: left;
}

.product-purchase,
.direct-purchase,
.purchase-after-payment {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .product-purchase {
    padding: 22px;
  }

  .product-purchase h1 {
    font-size: 22px;
  }

  .purchase-channel {
    min-height: 66px;
    padding: 12px 15px;
  }

  .purchase-after-payment {
    padding: 15px;
  }
}

.detail-benefits span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-benefits .ui-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.product-description {
  margin-top: 28px;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.9;
}

.product-description h2 {
  color: var(--ink);
  font-size: 22px;
}

.product-description h3 {
  margin-top: 28px;
  color: var(--ink);
  font-size: 17px;
}

.info-note {
  margin-top: 25px;
  padding: 15px 18px;
  border-radius: 10px;
  background: var(--color-surface-alt);
  color: var(--color-muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: 30px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--color-toast);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-floating);
  font-size: 13px;
  transform: translateX(-50%);
}

/* 平板：导航收紧，卡片改成两列，避免横向拥挤。 */
@media (max-width: 1180px) {
  .header-inner {
    width: calc(100% - 32px);
    gap: 10px;
  }
  .brand strong {
    max-width: 170px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .company-emblem {
    display: none;
  }
  .desktop-navigation a {
    gap: 4px;
    padding: 8px;
    font-size: 12px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .store-hero h1 {
    font-size: 36px;
  }
  .store-hero-actions {
    width: 48%;
  }
  .footer-links {
    gap: 10px;
    margin-left: 0;
    font-size: 10px;
  }
  .footer-brand p {
    max-width: 420px;
  }
  .order-form {
    grid-template-columns: 1fr 1fr;
  }
}

/* 较窄平板优先保证导航文字可读。 */
@media (min-width: 851px) and (max-width: 1040px) {
  .desktop-navigation a {
    padding-right: 6px;
    padding-left: 6px;
  }

  .desktop-navigation .ui-icon {
    display: none;
  }
}

/* 离线文章中的彩色说明框同步采用全站提示配色，保留警告语义。 */
.prose [style*="#eff6ff"],
.prose [style*="#e0f2fe"],
.prose [style*="#f0f9ff"] {
  border-color: var(--color-info-border) !important;
  background: var(--color-info-bg) !important;
}

.prose [style*="#fffbeb"],
.prose [style*="#fefce8"] {
  border-color: var(--color-warning-border) !important;
  background: var(--color-warning-bg) !important;
}

.prose [style*="#fef2f2"] {
  border-color: var(--color-error-border) !important;
  background: var(--color-error-bg) !important;
}

.prose [style*="color:#b91c1c"] {
  color: var(--color-error-text) !important;
}

/* iPhone 与安卓：顶部保留品牌和两个操作，底部导航固定。 */
@media (max-width: 850px) {
  .brand {
    min-width: 0;
    flex-shrink: 1;
  }

  .desktop-navigation {
    display: none;
  }
  .site-header .header-inner {
    height: 62px;
  }
  .company-emblem {
    display: block;
    margin-right: auto;
    font-size: 24px;
  }
  .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .brand strong {
    font-size: 13px;
  }
  .header-actions .icon-button {
    width: 36px;
    height: 36px;
  }
  .header-actions {
    gap: 6px;
  }
  .container {
    width: calc(100% - 32px);
  }
  .site-main {
    min-height: 65svh;
    padding: 34px 0 45px;
  }
  .page-heading {
    margin-bottom: 32px;
    padding-bottom: 25px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .store-hero {
    display: block;
    margin-bottom: 25px;
  }
  .store-hero h1 {
    font-size: 34px;
  }
  .store-hero-actions {
    width: 100%;
    margin-top: 24px;
  }
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .category-panel {
    border-radius: 14px;
  }
  .category-panel header {
    display: none;
  }
  .category-panel nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 8px;
    scrollbar-width: thin;
  }
  .category-link {
    flex: 0 0 auto;
    padding: 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .category-link small {
    min-width: 18px;
    margin-left: 0;
  }
  .category-image {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .blog-card-content {
    padding: 18px;
  }
  .blog-card h2 {
    font-size: 16px;
  }
  .footer-inner {
    width: calc(100% - 32px);
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .footer-brand {
    flex-basis: calc(100% - 60px);
  }
  .footer-brand p {
    max-width: none;
    font-size: 11px;
  }
  .footer-links {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 7px;
    font-size: 12px;
  }
  .site-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .mobile-navigation {
    position: fixed;
    z-index: 10;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    display: flex;
    height: 58px;
    align-items: center;
    justify-content: space-around;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--color-glass);
    box-shadow: var(--shadow-floating);
    backdrop-filter: blur(15px);
  }
  .mobile-navigation a {
    display: flex;
    width: 19%;
    height: 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 12px;
    color: var(--color-muted);
    font-size: 10px;
  }
  .mobile-navigation a[aria-current] {
    background: var(--soft);
    color: var(--accent-deep);
  }
  .mobile-navigation .ui-icon {
    width: 20px;
    height: 20px;
  }
  .article-panel {
    padding: 26px;
  }
  .article-heading h1 {
    font-size: 28px;
  }
  .article-heading > p {
    font-size: 15px;
  }
  .article-cover {
    margin-bottom: 28px;
  }
  .prose {
    font-size: 16px;
  }
  .prose h2 {
    font-size: 22px;
  }
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
  .product-display {
    min-height: 270px;
  }
  .toast {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .company-emblem {
    display: none;
  }
  .container {
    width: calc(100% - 28px);
  }
  .header-inner {
    width: calc(100% - 24px);
  }
  .brand {
    gap: 8px;
  }
  .brand strong {
    max-width: 180px;
    font-size: 12px;
  }
  .brand small {
    font-size: 7px;
  }
  .store-hero h1 {
    font-size: 30px;
  }
  .store-hero-actions {
    flex-wrap: wrap;
  }
  .store-hero-actions .search-form {
    flex-basis: 100%;
  }
  .store-hero-actions > .button-white {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
  }
  .product-grid, .blog-grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    min-height: 245px;
  }
  .blog-card-content {
    padding: 22px;
  }
  .blog-card h2 {
    font-size: 18px;
  }
  .blog-card-content > p {
    font-size: 14px;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .page-heading p:not(.eyebrow) {
    font-size: 13px;
  }
  .notice-card {
    gap: 12px;
    padding: 22px;
  }
  .notice-symbol {
    display: none;
  }
  .notice-card h2 {
    font-size: 17px;
  }
  .notice-card p {
    display: -webkit-box;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .article-panel {
    padding: 22px;
    border-radius: 18px;
  }
  .article-heading h1 {
    font-size: 26px;
  }
  .order-panel, .tool-panel, .info-panel {
    padding: 22px;
  }
  .order-form {
    grid-template-columns: 1fr;
  }
  .field, .search-input input {
    font-size: 16px;
  }
  .privacy-pills {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: -12px;
  }
  .privacy-pills span {
    padding: 4px 7px;
    font-size: 10px;
  }
  .tool-panel h2 {
    font-size: 22px;
  }
  .form-actions small {
    width: 100%;
    margin: 0;
  }
  .totp-result {
    padding: 18px;
  }
  .totp-result output {
    font-size: 34px;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

