:root {
  color-scheme: light;
  --paper: #f7f3ed;
  --card: #fffdfa;
  --ink: #2d241f;
  --muted: #847970;
  --line: rgba(76, 55, 41, 0.12);
  --brown: #3b291f;
  --gold: #b8783f;
  --red: #c64e48;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.site-header { position: sticky; top: 0; z-index: 30; min-height: 72px; padding: 0 max(24px, calc((100vw - 1440px) / 2)); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 44px; background: rgba(255, 253, 250, .93); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand img { width: 126px; height: 38px; object-fit: contain; }
.brand span { padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
.site-header nav { display: flex; justify-content: center; gap: 8px; }
.site-header nav a { padding: 12px 15px; color: #655a52; text-decoration: none; font-size: 14px; border-radius: 10px; }
.site-header nav a:hover, .site-header nav a.active { color: var(--ink); background: #f2ebe3; }
.header-action { min-height: 42px; padding: 0 20px; display: inline-flex; align-items: center; border-radius: 999px; color: white; background: var(--brown); text-decoration: none; font-weight: 700; font-size: 14px; }
main { max-width: 1440px; margin: 0 auto; padding: 24px 24px 48px; }
.community-hero { min-height: 320px; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; padding: 48px 64px; border: 1px solid rgba(89, 61, 42, .08); border-radius: 24px; background: radial-gradient(circle at 78% 42%, rgba(246, 211, 161, .34), transparent 27%), linear-gradient(115deg, #f5eee5, #fffdf9 62%, #eee4d8); box-shadow: 0 18px 48px rgba(74, 50, 33, .08); }
.community-hero::before { content: ""; position: absolute; inset: auto 4% -55% 48%; height: 80%; border-radius: 50%; background: rgba(117, 78, 48, .09); filter: blur(20px); }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: block; margin-bottom: 12px; color: #8e6145; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; }
.hero-copy h1 { margin: 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(40px, 5vw, 68px); line-height: 1.08; letter-spacing: 0; }
.hero-copy > p { max-width: 600px; margin: 18px 0 32px; color: #675c54; font-size: 17px; line-height: 1.8; }
.community-stats { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); max-width: 620px; }
.community-stats div { padding: 0 18px; border-left: 1px solid var(--line); }
.community-stats div:first-child { padding-left: 0; border-left: 0; }
.community-stats dt { font-family: Georgia, serif; color: #81583d; font-size: 26px; font-weight: 700; }
.community-stats dd { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.hero-product { position: relative; align-self: stretch; display: flex; justify-content: center; align-items: center; min-height: 270px; }
.hero-product img { position: relative; z-index: 2; width: min(90%, 470px); height: 290px; object-fit: contain; filter: drop-shadow(0 24px 24px rgba(59, 37, 23, .22)); }
.hero-glow { position: absolute; width: 55%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 190, 92, .2); filter: blur(36px); }
.community-toolbar { position: sticky; top: 72px; z-index: 20; margin: 22px 0; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 250, .94); box-shadow: 0 10px 28px rgba(60, 40, 27, .05); backdrop-filter: blur(16px); }
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.category-tabs button, .sort-control { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: #62564d; cursor: pointer; }
.category-tabs button { padding: 0 16px; }
.category-tabs button:hover { background: #f4eee7; }
.category-tabs button.active { color: white; background: var(--brown); box-shadow: 0 6px 16px rgba(52, 33, 22, .18); }
.sort-control { padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.sort-control select { border: 0; outline: 0; color: var(--ink); background: transparent; cursor: pointer; }
.community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.showcase-grid { columns: 3 280px; column-gap: 18px; }
.work-card { break-inside: avoid; margin: 0 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 10px 28px rgba(57, 39, 26, .055); transition: transform .2s ease, box-shadow .2s ease; }
.work-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(57, 39, 26, .1); }
.comparison-media { position: relative; aspect-ratio: 1.16; overflow: hidden; background: #e9e1d8; }
.media-panel { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.media-panel.active { opacity: 1; pointer-events: auto; }
.media-panel img { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-panel figcaption { position: absolute; top: 10px; left: 10px; padding: 5px 9px; border-radius: 999px; color: white; background: rgba(36, 26, 20, .66); font-size: 11px; backdrop-filter: blur(10px); }
.media-switch { position: absolute; right: 10px; bottom: 10px; z-index: 4; padding: 3px; display: flex; border-radius: 999px; background: rgba(255, 253, 250, .88); box-shadow: 0 5px 16px rgba(42, 29, 21, .15); backdrop-filter: blur(10px); }
.media-switch button { min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px; color: #6b5c52; background: transparent; font-size: 11px; cursor: pointer; }
.media-switch button.active { color: white; background: var(--brown); }
.work-copy { padding: 15px 16px 13px; }
.work-copy header { display: grid; grid-template-columns: 36px 1fr auto; gap: 9px; align-items: center; }
.creator-avatar { width: 36px; height: 36px; overflow: hidden; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, #a96d45, #4d3023); font-size: 13px; }
.creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.work-copy header div:nth-child(2) { min-width: 0; }
.work-copy header strong, .work-copy header span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-copy header strong { font-size: 14px; }
.work-copy header span { margin-top: 2px; color: #a06d4f; font-size: 11px; }
.work-copy header small, .detail-rating { color: #c88b45; letter-spacing: 1px; }
.work-copy > p { min-height: 42px; margin: 14px 0 12px; color: #554a43; font-size: 13px; line-height: 1.65; }
.work-copy footer { display: flex; align-items: center; gap: 4px; padding-top: 10px; border-top: 1px solid rgba(76, 55, 41, .08); }
.work-copy footer button { min-width: 42px; min-height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 9px; color: #766a61; background: transparent; cursor: pointer; font-size: 12px; }
.work-copy footer button:hover, .work-copy footer button.active { color: var(--red); background: #fff1ef; }
.work-copy footer button i { font-style: normal; font-size: 18px; }
.work-copy footer .open-detail { margin-left: auto; padding: 0 11px; color: #5c4436; background: #f5eee7; }
.community-aside { position: sticky; top: 150px; display: grid; gap: 16px; }
.share-card, .trust-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 10px 28px rgba(57, 39, 26, .06); }
.share-card { overflow: hidden; position: relative; background: radial-gradient(circle at 90% 80%, rgba(231, 167, 88, .24), transparent 30%), #fbf2e5; }
.share-card span { color: #9c6847; font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.share-card h2 { margin: 12px 0; font-size: 24px; line-height: 1.3; }
.share-card p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.share-card a { min-height: 44px; margin-top: 14px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: white; background: var(--brown); text-decoration: none; font-weight: 700; }
.trust-card h2 { margin: 0 0 18px; font-size: 17px; }
.trust-card ul { margin: 0; padding: 0; display: grid; gap: 16px; list-style: none; }
.trust-card li { display: flex; gap: 11px; }
.trust-card li i { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #8b5c3d; background: #f4e7da; font-style: normal; }
.trust-card li strong, .trust-card li small { display: block; }
.trust-card li strong { font-size: 13px; }
.trust-card li small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.loading-state, .empty-state, .error-state { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed rgba(83, 58, 41, .2); border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.45); text-align: center; }
.loading-state span { width: 28px; height: 28px; margin-bottom: 12px; border: 3px solid #eadfd4; border-top-color: #6c4935; border-radius: 50%; animation: spin .8s linear infinite; }
.empty-state strong, .error-state strong { color: var(--ink); font-size: 18px; }
.empty-state p, .error-state p { margin: 8px 0 0; }
.error-state button { margin-top: 18px; padding: 10px 18px; border: 0; border-radius: 10px; color: white; background: var(--brown); cursor: pointer; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination { margin-top: 26px; display: flex; justify-content: center; gap: 7px; }
.pagination button, .pagination span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #665950; background: white; cursor: pointer; }
.pagination button.active { color: white; background: var(--brown); }
.community-values { margin-top: 34px; padding: 24px 18px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,250,.75); }
.community-values article { padding: 4px 24px; border-left: 1px solid var(--line); }
.community-values article:first-child { border-left: 0; }
.community-values strong, .community-values span { display: block; }
.community-values strong { font-size: 14px; }
.community-values span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.detail-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(30, 23, 19, .55); backdrop-filter: blur(8px); }
.detail-dialog { position: relative; width: min(1020px, 96vw); max-height: 92vh; overflow: auto; border-radius: 22px; background: #fffdfa; box-shadow: 0 30px 80px rgba(23, 15, 11, .28); }
.modal-close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #54483f; background: rgba(255,253,250,.9); cursor: pointer; font-size: 24px; }
#detailContent { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); }
.detail-media { min-width: 0; padding: 18px; }
.detail-comparison { aspect-ratio: 4 / 3; border-radius: 16px; }
.detail-copy { padding: 64px 36px 36px 18px; }
.detail-theme { padding: 7px 11px; display: inline-block; border-radius: 999px; color: #8a5a3d; background: #f5e8dc; font-size: 12px; }
.detail-copy h2 { margin: 16px 0 10px; font-size: 28px; }
.detail-rating span { margin-left: 8px; color: var(--muted); letter-spacing: 0; font-size: 13px; }
.detail-copy blockquote { margin: 24px 0; color: #4d423b; font-family: Georgia, "Microsoft YaHei", serif; font-size: 19px; line-height: 1.8; }
.detail-copy dl { margin: 0; display: grid; gap: 10px; }
.detail-copy dl div { padding: 10px 0; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.detail-copy dt { color: var(--muted); }
.detail-copy dd { margin: 0; text-align: right; }
.detail-actions { margin-top: 28px; display: grid; gap: 10px; }
.detail-actions button, .detail-actions a { min-height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 11px; text-decoration: none; font-weight: 700; cursor: pointer; }
.detail-actions button { border: 1px solid var(--line); color: var(--brown); background: white; }
.detail-actions a { color: white; background: var(--brown); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 150; max-width: min(90vw, 420px); padding: 12px 18px; border-radius: 12px; color: white; background: rgba(45, 33, 27, .94); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.modal-open { overflow: hidden; }
@media (max-width: 1100px) {
  .site-header { gap: 18px; }
  .site-header nav a { padding-inline: 9px; }
  .community-hero { padding: 42px; }
  .community-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .showcase-grid { columns: 2 260px; }
}
@media (max-width: 860px) {
  .site-header { min-height: 64px; padding: 0 16px; grid-template-columns: 1fr auto; }
  .brand img { width: 108px; }
  .brand span, .site-header nav { display: none; }
  .header-action { min-height: 38px; padding: 0 14px; }
  main { padding: 14px 14px 32px; }
  .community-hero { min-height: 420px; padding: 30px 24px; grid-template-columns: 1fr; align-content: start; border-radius: 18px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy > p { margin: 12px 0 20px; font-size: 14px; }
  .community-stats { grid-template-columns: repeat(2, 1fr); gap: 14px 0; }
  .community-stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-product { position: absolute; right: -20px; bottom: -24px; width: 55%; min-height: 210px; opacity: .8; }
  .hero-product img { height: 220px; }
  .community-toolbar { top: 64px; margin: 14px 0; padding: 10px; display: grid; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .category-tabs button { flex: 0 0 auto; }
  .sort-control { justify-self: end; }
  .community-layout { grid-template-columns: 1fr; }
  .community-aside { position: static; grid-template-columns: 1fr 1fr; }
  .community-values { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .community-values article:nth-child(3) { border-left: 0; }
  #detailContent { grid-template-columns: 1fr; }
  .detail-copy { padding: 10px 24px 28px; }
}
@media (max-width: 560px) {
  .community-hero { min-height: 455px; }
  .hero-product { width: 78%; opacity: .52; }
  .showcase-grid { columns: 1; }
  .community-aside { grid-template-columns: 1fr; }
  .community-values { grid-template-columns: 1fr; }
  .community-values article { border-left: 0; border-top: 1px solid var(--line); padding-block: 14px; }
  .community-values article:first-child { border-top: 0; }
  .detail-modal { padding: 8px; }
  .detail-dialog { max-height: 96vh; border-radius: 16px; }
  .detail-media { padding: 8px; }
  .detail-copy h2 { font-size: 23px; }
}
