:root {
    --pm-ink: #1b2420;
    --pm-forest: #2a4a3d;
    --pm-forest-deep: #1d342c;
    --pm-cream: #f6f1e8;
    --pm-paper: #fffaf2;
    --pm-gold: #b0894a;
    --pm-gold-soft: #efe2c8;
    --pm-muted: #6d675c;
    --pm-line: #e4d8c4;
    --pm-urgent: #8d3a2f;
    --pm-urgent-bg: #f4e4de;
    --pm-svg-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm1 11h-2V7h2zm0 4h-2v-2h2z'/%3E%3C/svg%3E");
    --pm-svg-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 3h8v8H3zm10 0h8v8h-8zM3 13h8v8H3zm10 0h8v8h-8z'/%3E%3C/svg%3E");
    --pm-svg-flame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2s4 4.2 4 8a4 4 0 0 1-8 0c0-2.4 2-5.2 4-8zm0 20a7 7 0 0 0 7-7c0-3.3-2.2-5.8-4.4-8.1C13.8 8.6 13 10 13 11.5A3 3 0 0 1 10 14c0 3.3 2 5.5 2 8z'/%3E%3C/svg%3E");
    --pm-svg-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l2.9 6.9L22 10l-5 4.6L18.2 22 12 18.3 5.8 22 7 14.6 2 10l7.1-1.1z'/%3E%3C/svg%3E");
    --pm-svg-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5C6 5 1.7 10.1 1 12c.7 1.9 5 7 11 7s10.3-5.1 11-7c-.7-1.9-5-7-11-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z'/%3E%3C/svg%3E");
    --pm-svg-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 11h10.2l-3.6-3.6L13 6l6 6-6 6-1.4-1.4L15.2 13H5z'/%3E%3C/svg%3E");
    --pm-svg-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle fill='black' cx='12' cy='12' r='6'/%3E%3C/svg%3E");
}

.pm-ico {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: var(--pm-ico) center / contain no-repeat;
    mask: var(--pm-ico) center / contain no-repeat;
    vertical-align: middle;
}

.pm-ico-clock { --pm-ico: var(--pm-svg-clock); }
.pm-ico-grid { --pm-ico: var(--pm-svg-grid); }
.pm-ico-flame { --pm-ico: var(--pm-svg-flame); }
.pm-ico-star { --pm-ico: var(--pm-svg-star); }
.pm-ico-eye { --pm-ico: var(--pm-svg-eye); }
.pm-ico-arrow { --pm-ico: var(--pm-svg-arrow); }
.pm-ico-dot { --pm-ico: var(--pm-svg-dot); }

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    padding: 0;
}

body.pm-page {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--pm-cream);
    color: var(--pm-ink);
    line-height: 1.6;
}

.pm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 16px 0;
    color: #efe7d6;
    font-size: 13px;
}

.pm-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.pm-brand-name {
    display: block;
}

.pm-mark {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--pm-gold);
    color: #241c10;
    font-size: 13px;
}

.pm-topbar-meta {
    color: rgba(246, 241, 232, 0.72);
}

.pm-mast-photo,
.pm-promo-bar,
.pm-sticky,
.pm-issue {
    display: none;
}

.pm-mast {
    position: relative;
    background: #22332c;
    color: #f8f2e7;
    overflow: hidden;
}

.pm-mast::before {
    content: "";
    position: absolute;
    inset: -8%;
    background:
        radial-gradient(circle at 12% 20%, rgba(176, 137, 74, 0.22), transparent 36%),
        radial-gradient(circle at 88% 10%, rgba(255, 250, 242, 0.08), transparent 28%),
        repeating-linear-gradient(-18deg, transparent, transparent 22px, rgba(255, 255, 255, 0.03) 22px, rgba(255, 255, 255, 0.03) 23px);
    pointer-events: none;
    animation: pmDrift 18s ease-in-out infinite alternate;
}

.pm-mast-inner {
    position: relative;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.pm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: none;
    color: var(--pm-gold);
    font-weight: 700;
}

.pm-kicker::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--pm-gold);
    transform-origin: left center;
    animation: pmLineIn 0.7s ease 0.08s both;
}

.pm-mast h1 {
    margin: 0 0 12px;
    max-width: 16ch;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 720;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.pm-lead {
    margin: 0 0 28px;
    max-width: 34em;
    font-size: 1.05rem;
    color: rgba(248, 242, 231, 0.78);
}

.pm-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pm-hero-stat {
    min-width: 128px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 250, 242, 0.12);
    border-radius: 12px;
    background: rgba(255, 250, 242, 0.06);
    transition: transform 0.25s ease, background 0.25s ease;
}

.pm-hero-stat:hover {
    transform: translateY(-4px);
    background: rgba(255, 250, 242, 0.12);
}

.pm-hero-stat b {
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
}

.pm-hero-stat span {
    color: rgba(248, 242, 231, 0.62);
    font-size: 12px;
}

.pm-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: -28px auto 0;
    padding-bottom: 48px;
    position: relative;
}

.pm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 10px;
    background: var(--pm-paper);
    border: 1px solid var(--pm-line);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(34, 32, 24, 0.06);
}

.pm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pm-filter {
    height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--pm-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.pm-filter::after {
    content: attr(aria-label);
}

.pm-filter:hover {
    color: var(--pm-ink);
    background: #f3ebdd;
    transform: translateY(-1px);
}

.pm-filter.is-active,
.pm-filter.is-active:hover {
    background: var(--pm-forest);
    color: #f7f2e8;
}

.pm-toolbar-note {
    color: var(--pm-muted);
    font-size: 13px;
    padding-right: 8px;
}

.pm-toolbar-note::after {
    content: " 件正在展示";
}

.pm-shelf {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.pm-shelf.is-fading {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.pm-card {
    display: flex;
    flex-direction: column;
    background: var(--pm-paper);
    border: 1px solid var(--pm-line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(34, 32, 24, 0.05);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.pm-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 40px rgba(34, 32, 24, 0.14);
}

.pm-card.is-featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}

.pm-shelf.is-solo .pm-card,
.pm-shelf.is-solo .pm-card.is-featured {
    grid-column: auto;
    display: flex;
    grid-template-columns: none;
}

.pm-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: #e7dcc8;
    overflow: hidden;
}

.pm-card.is-featured .pm-cover {
    aspect-ratio: auto;
    min-height: 100%;
}

.pm-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    animation: pmImgIn 0.9s ease both;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.pm-card:hover .pm-cover img {
    transform: translateZ(0) scale(1.045);
}

.pm-cover img.is-broken {
    opacity: 0;
}

.pm-ribbon {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(27, 36, 32, 0.78);
    color: #f8f2e7;
    font-size: 12px;
    font-weight: 700;
}

.pm-ribbon::after {
    content: attr(aria-label);
}

.pm-card.is-urgent .pm-ribbon,
.pm-ribbon.is-ended {
    background: #8d3a2f;
}

.pm-card.is-urgent .pm-ribbon {
    animation: pmGlow 2.4s ease-in-out infinite;
}

.pm-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: 18px 18px 16px;
}

.pm-card.is-featured .pm-body {
    justify-content: center;
    padding: 28px 26px;
}

.pm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pm-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf3ef;
    color: var(--pm-forest);
    font-size: 11px;
    font-weight: 700;
}

.pm-tag.is-ico::after {
    content: attr(title);
}

.pm-tag.is-watch::after {
    content: " 次关注";
}

.pm-tag.is-watch .pm-ico {
    display: none;
}

.pm-tag.is-watch {
    font-variant-numeric: tabular-nums;
}

.pm-tag.is-hot {
    background: var(--pm-gold-soft);
    color: #7a5a22;
}

.pm-tag.is-offer {
    background: var(--pm-urgent-bg);
    color: var(--pm-urgent);
}

.pm-price {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: var(--pm-ink);
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.pm-price:not(.is-plain)::before {
    content: "¥";
    margin-right: 1px;
    font-size: 0.72em;
    font-weight: 700;
}

.pm-footrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.pm-body h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 720;
    line-height: 1.35;
}

.pm-card.is-featured .pm-body h2 {
    font-size: 1.7rem;
}

.pm-desc {
    margin: 0;
    color: var(--pm-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pm-card.is-featured .pm-desc {
    -webkit-line-clamp: 3;
    font-size: 0.98rem;
}

.pm-count {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.pm-theme-magazine .pm-count,
.pm-theme-retail .pm-count,
.pm-theme-nocturne .pm-count {
    display: inline-flex;
    flex: 0 0 auto;
    width: max-content;
    max-width: 100%;
    gap: 0;
    white-space: nowrap;
}

.pm-theme-magazine .pm-count-unit,
.pm-theme-retail .pm-count-unit,
.pm-theme-nocturne .pm-count-unit {
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.pm-theme-magazine .pm-count-unit b,
.pm-theme-retail .pm-count-unit b,
.pm-theme-nocturne .pm-count-unit b {
    display: inline;
    font-variant-numeric: tabular-nums;
}

.pm-theme-magazine .pm-count-unit span,
.pm-theme-retail .pm-count-unit span,
.pm-theme-nocturne .pm-count-unit span {
    display: none;
}

.pm-theme-magazine .pm-count-unit:first-of-type span,
.pm-theme-retail .pm-count-unit:first-of-type span,
.pm-theme-nocturne .pm-count-unit:first-of-type span {
    display: inline;
    margin: 0 6px 0 1px;
    font-size: 11px;
}

.pm-theme-magazine .pm-count > i:first-of-type,
.pm-theme-retail .pm-count > i:first-of-type,
.pm-theme-nocturne .pm-count > i:first-of-type {
    display: none;
}

.pm-theme-magazine .pm-count.is-short .pm-count-unit:first-of-type,
.pm-theme-retail .pm-count.is-short .pm-count-unit:first-of-type,
.pm-theme-nocturne .pm-count.is-short .pm-count-unit:first-of-type {
    display: none;
}

.pm-count .pm-ico,
.pm-count i {
    display: none;
}

.pm-count-unit {
    min-width: 52px;
    padding: 8px 6px 7px;
    border-radius: 10px;
    background: #f3ebdd;
    text-align: center;
}

.pm-count.is-urgent .pm-count-unit {
    background: var(--pm-urgent-bg);
}

.pm-count-unit b {
    display: block;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.pm-count-unit b.is-tick {
    animation: pmTick 0.28s ease;
}

.pm-count-unit span {
    font-size: 11px;
    color: var(--pm-muted);
}

.pm-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    background: var(--pm-forest);
    color: #f7f2e8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    transition: background 0.25s ease, transform 0.25s ease;
}

.pm-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 46%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-20deg);
}

.pm-cta::after {
    content: attr(aria-label);
}

.pm-cta:hover {
    background: var(--pm-forest-deep);
    transform: translateY(-2px);
}

.pm-cta:hover::before {
    animation: pmShine 0.7s ease;
}

.pm-empty {
    padding: 40px 24px;
    text-align: center;
    border: 1px solid var(--pm-line);
    border-radius: 18px;
    background: var(--pm-paper);
}

.pm-empty-mark {
    display: none;
}

.pm-empty h2 {
    display: none;
}

.pm-empty p {
    display: none;
}

.pm-empty .pm-ico {
    width: 22px;
    height: 22px;
    color: var(--pm-muted);
}

.pm-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    border-top: 1px solid var(--pm-line);
    padding: 22px 0 36px;
    color: var(--pm-muted);
    font-size: 0;
}

.pm-foot .pm-ico {
    width: 18px;
    height: 18px;
}

.pm-card.is-hidden {
    display: none;
}

.pm-topbar,
.pm-kicker,
.pm-mast h1,
.pm-lead,
.pm-hero-stat,
.pm-toolbar,
.pm-empty,
.pm-foot {
    animation: pmRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pm-topbar { animation-delay: 0.04s; }
.pm-kicker { animation-delay: 0.1s; }
.pm-mast h1 { animation-delay: 0.16s; }
.pm-lead { animation-delay: 0.24s; }
.pm-hero-stat:nth-child(1) { animation-delay: 0.32s; }
.pm-hero-stat:nth-child(2) { animation-delay: 0.4s; }
.pm-hero-stat:nth-child(3) { animation-delay: 0.48s; }
.pm-toolbar,
.pm-empty { animation-delay: 0.36s; }
.pm-foot { animation-delay: 0.55s; }

.pm-card,
.pm-card.is-entering {
    animation: pmCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pm-card:nth-child(1) { animation-delay: 0.16s; }
.pm-card:nth-child(2) { animation-delay: 0.26s; }
.pm-card:nth-child(3) { animation-delay: 0.36s; }
.pm-card:nth-child(4) { animation-delay: 0.46s; }
.pm-card:nth-child(5) { animation-delay: 0.56s; }
.pm-card:nth-child(6) { animation-delay: 0.66s; }

@keyframes pmRise {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pmCardIn {
    from {
        opacity: 0;
        translate: 0 32px;
    }
    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes pmImgIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pmTick {
    from {
        opacity: 0.25;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pmShine {
    from { left: -120%; }
    to { left: 140%; }
}

@keyframes pmLineIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes pmDrift {
    to { transform: translate3d(16px, -8px, 0) scale(1.03); }
}

@keyframes pmGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
    .pm-mast::before,
    .pm-topbar,
    .pm-kicker,
    .pm-kicker::before,
    .pm-mast h1,
    .pm-lead,
    .pm-hero-stat,
    .pm-toolbar,
    .pm-empty,
    .pm-foot,
    .pm-card,
    .pm-card.is-entering,
    .pm-card.is-urgent .pm-ribbon,
    .pm-count-unit b.is-tick,
    .pm-cover img,
    .pm-cta::before {
        animation: none !important;
    }

    .pm-card,
    .pm-cover img,
    .pm-cta,
    .pm-filter,
    .pm-shelf {
        transition: none !important;
    }
}

.pm-theme-forest .pm-mast-photo {
    display: block;
    position: absolute;
    inset: 0;
}

.pm-theme-forest .pm-mast-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
}

.pm-theme-forest .pm-mast-inner,
.pm-theme-forest .pm-topbar {
    position: relative;
    z-index: 1;
}

.pm-filter-empty[hidden] {
    display: none !important;
}

.pm-filter-empty {
    margin-top: 8px;
}

@media (max-width: 960px) {
    .pm-shelf,
    .pm-card.is-featured {
        grid-template-columns: 1fr;
    }

    .pm-card.is-featured {
        grid-column: auto;
    }

    .pm-card.is-featured .pm-cover {
        aspect-ratio: 16 / 10;
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .pm-topbar,
    .pm-mast-inner,
    .pm-wrap {
        width: calc(100% - 28px);
    }

    .pm-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .pm-hero-stat {
        flex: 1 1 calc(50% - 12px);
    }
}
