/* ── 套餐区 + 署名 ─────────────────── */
.shop { padding-top: 48px; scroll-margin-top: 80px; }

/* ── 商品卡 ───────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.p-card { display: flex; flex-direction: column; padding: 14px 14px 20px; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.p-card:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 48px -24px rgba(15,15,15,.28); }

/* 票面 + 存根：和下单后撕下的那张是同一张票 */
.ticket { --tooth: 10px; position: relative; aspect-ratio: 1.45; display: flex; flex-direction: column; font-family: var(--mono); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.p-card:hover .ticket { transform: rotate(-1.2deg) scale(1.015); }
.t-face, .t-stub { background: var(--sunk); }
.t-face {
  flex: 1; display: grid; grid-template-rows: auto 1fr; padding: 16px 18px 12px; border-radius: 14px 14px 0 0;
}
.t-stub {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  margin-top: calc(var(--tooth) / -2 - 1px); padding: 15px 18px 13px; border-radius: 0 0 14px 14px;
  font-size: 11px; letter-spacing: .1em; color: var(--ink-2);
  transform-origin: 0 0; transition: transform .55s cubic-bezier(.3,1.6,.5,1);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) calc(50% + var(--tooth) / 2) 0 / var(--tooth) 100%;
          mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) calc(50% + var(--tooth) / 2) 0 / var(--tooth) 100%;
}
.t-stub::before { /* 打孔线 */
  content: ""; position: absolute; left: 10px; right: 10px; top: calc(var(--tooth) / 2 + 1px);
  border-top: 1.5px dashed color-mix(in srgb, var(--ink-3) 60%, transparent); transition: opacity .25s;
}
/* 票面下缘的锯齿只在存根动起来时出现，静止时是一整张、没有接缝 */
.p-card:hover .t-face, .p-card:active .t-face,
.tear.dragging .tear-main, .tear.auto .tear-main, .tear.torn .tear-main {
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
}
/* 悬停 / 按住：存根被轻轻扯开一角，暗示下单后能撕下来 */
.p-card:hover .t-stub, .p-card:active .t-stub { transform: translateY(3px) rotate(2.4deg); }
.p-card:hover .t-stub::before, .p-card:active .t-stub::before { opacity: 0; }
.t-row { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .14em; color: var(--ink-2); }
/* 海报票面 */
.poster {
  --paper: #E38A55; --cream: #F6F1E7; --print: #141414;
  position: relative; overflow: hidden; grid-template-rows: auto auto 1fr; align-content: start;
  background-color: var(--paper) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.poster .t-row { position: relative; z-index: 1; align-items: center; color: color-mix(in srgb, var(--print) 70%, transparent); }
.pz-label { padding: 3px 8px 2px; background: var(--cream); color: var(--print); font: 400 clamp(17px, 1.7vw, 21px)/1.1 "Iowan Old Style", "Palatino", Georgia, "Times New Roman", "Songti SC", serif; letter-spacing: -.01em; }
.pz-kind { position: relative; z-index: 1; margin: 12px 0 0 -.3em; font: 900 clamp(22px, 2.3vw, 28px)/1 var(--sans); letter-spacing: -.02em; color: var(--print); }
.pz-kind.long { font-size: clamp(17px, 1.75vw, 22px); }
html[lang="en"] .pz-kind { margin-left: 0; font-size: clamp(15px, 1.45vw, 19px); font-weight: 800; letter-spacing: 0; }
.pz-head { position: absolute; right: 0; bottom: -7%; width: 33%; transform: rotate(-4deg); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.pz-head svg { display: block; width: 100%; height: auto; }
.pz-paper { fill: var(--cream); filter: drop-shadow(0 2px 0 rgba(0,0,0,.08)); }
.pz-burst path { fill: none; stroke: var(--print); stroke-width: 1.4; stroke-linejoin: round; }
.pz-burst circle { fill: var(--cream); stroke: var(--print); stroke-width: 1.4; }
.pz-burst { transform: translate(60px, 40px); transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.p-card:hover .pz-head { transform: rotate(-1deg) translateY(-3px); }
.p-card:hover .pz-burst { transform: translate(60px, 40px) rotate(30deg); }
.ticket.agent .poster { --paper: var(--ink); --cream: color-mix(in srgb, var(--bg) 14%, var(--ink)); --print: var(--accent); }
.ticket.agent .pz-label { background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 13px; letter-spacing: .1em; padding: 5px 8px; }
.ticket.agent .pz-kind { color: var(--bg); }
.ticket.agent .poster .t-row { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.ticket.agent .pz-burst circle { fill: var(--accent); }
@media (prefers-color-scheme: dark) { .poster { --paper: #CF7849; } }
@media (prefers-reduced-motion: reduce) { .pz-head, .pz-burst { transition: none; } }
.t-main { align-self: center; font: 800 clamp(30px, 3.2vw, 40px)/1 var(--sans); letter-spacing: -.03em; color: var(--ink); }
.t-bar { width: 64px; height: 14px; background: repeating-linear-gradient(90deg, currentColor 0 1.5px, transparent 1.5px 3px, currentColor 3px 5px, transparent 5px 6.5px, currentColor 6.5px 7px, transparent 7px 9px); opacity: .7; }
.ticket.agent .t-face, .ticket.agent .t-stub { background: var(--ink); }
.ticket.agent .t-row, .ticket.agent .t-stub { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.ticket.agent .t-main { color: var(--accent); }
.ticket.agent .t-stub::before { border-color: color-mix(in srgb, var(--bg) 25%, transparent); }
@media (prefers-reduced-motion: reduce) { .t-stub, .ticket { transition: none; } }

.p-body { display: flex; flex-direction: column; flex: 1; padding: 18px 6px 0; }
.p-body h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.p-kind { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.p-price { margin: 16px 0 0; display: flex; align-items: baseline; gap: 6px; }
.p-price b { font: 800 30px/1 var(--sans); letter-spacing: -.03em; }
.p-price span { font-size: 13px; color: var(--ink-2); }
.p-meta { margin: 18px 0 20px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; }
.p-meta div:nth-child(even) { text-align: right; }
.p-meta dt { color: var(--ink-2); }
.p-meta dd { margin: 2px 0 0; font-weight: 600; }
.p-body .btn { margin-top: auto; }
.p-card.soldout .ticket { filter: grayscale(1); opacity: .6; }

/* 暂停接单：保留票面颜色，盖一个章，不显示价格 */
.pz-stamp {
  position: absolute; left: 16px; bottom: 13%; z-index: 2; padding: 5px 10px 4px;
  border: 2px solid var(--print); border-radius: 4px; color: var(--print);
  background: color-mix(in srgb, var(--cream) 78%, transparent);
  font: 800 13px/1 var(--mono); letter-spacing: .14em; transform: rotate(-7deg);
}
.p-card.paused .poster { filter: saturate(.6); }
.p-price.is-paused { flex-direction: column; align-items: flex-start; gap: 6px; }
.p-price.is-paused b { font-size: 24px; letter-spacing: -.01em; }

/* 代理：和成品号不是一类，单独占一整行，横向排 */
@media (min-width: 561px) {
  .p-card.agent-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 290px) 1fr; gap: 36px; align-items: center; padding: 14px; }
  .agent-card .p-body { padding: 0 14px 0 0; display: grid; grid-template-columns: 1fr auto minmax(180px, 240px); column-gap: 36px; align-items: center; }
  .agent-card .p-body h3 { grid-area: 1 / 1; }
  .agent-card .p-kind { grid-area: 2 / 1; }
  .agent-card .p-price { grid-area: 1 / 2 / 3 / 3; margin: 0; }
  .agent-card .p-meta { display: none; }
  .agent-card .p-body .btn { grid-area: 1 / 3 / 3 / 4; margin: 0; }
}
@media (min-width: 561px) and (max-width: 860px) {
  .agent-card .p-body { grid-template-columns: 1fr auto; row-gap: 14px; }
  .agent-card .p-body .btn { grid-area: 3 / 1 / 4 / 3; }
}


/* ── 常见问题 ─────────────────────────── */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 4px; font-weight: 600; cursor: pointer; list-style: none; transition: color .15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-mark { font: 18px/1 var(--mono); font-style: normal; color: var(--ink-3); transition: transform .2s; }
.faq-item[open] .faq-mark { transform: rotate(45deg); color: var(--accent); }
.faq-item p { margin: 0; padding: 0 4px 20px; color: var(--ink-2); line-height: 1.75; white-space: pre-line; }

/* ── 最近动态 ─────────────────────────── */
.news-more { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.news-more:hover { color: var(--accent); }
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-list a {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline;
  padding: 20px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color .15s;
}
.news-list a:hover { background: color-mix(in srgb, var(--sunk) 60%, transparent); }
.news-date { font: 13px/1.5 var(--mono); color: var(--ink-2); }
.news-text { min-width: 0; }
.news-text p { margin: 0; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.news-head { -webkit-line-clamp: 2; font-weight: 600; }
.news-sum { margin-top: 4px !important; -webkit-line-clamp: 2; font-size: 14px; color: var(--ink-2); }
.news-go { font: 13px/1 var(--mono); color: var(--ink-3); transition: color .15s, transform .2s; }
.news-list a:hover .news-go { color: var(--accent); transform: translate(2px, -2px); }

/* ── 详情弹窗 ─────────────────────────── */
.sheet {
  width: min(560px, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 0;
  border: 0; border-radius: 26px; background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.45);
}
.sheet[open] { animation: sheet-in .32s cubic-bezier(.2,.8,.2,1); }
.sheet::backdrop { background: rgba(10,10,12,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.sheet-inner { padding: 28px 30px 30px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sheet-head h2 { margin: 8px 0 0; font: 800 28px/1.15 var(--sans); letter-spacing: -.02em; }
.sheet-head .icon-btn { margin: -4px -8px 0 0; flex: none; }
.s-price { margin: 18px 0 0; display: flex; align-items: baseline; gap: 6px; }
.s-price b { font: 800 34px/1 var(--sans); letter-spacing: -.03em; }
.s-price span { color: var(--ink-2); font-size: 14px; }
.s-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.s-meta div { display: flex; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--sunk); font-size: 13px; }
.s-meta dt { color: var(--ink-2); }
.s-meta dd { margin: 0; font-weight: 600; }
.s-list { margin: 22px 0 0; padding: 0; list-style: none; }
.s-list li { position: relative; padding: 6px 0 6px 20px; color: var(--ink); }
.s-list li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 1.5px; background: var(--accent); }
.s-notice { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; color: var(--ink); }
.s-form { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.s-form-title { margin: 0 0 14px; font-weight: 700; font-size: 17px; }
.captcha { margin-top: 18px; }
.s-submit { margin-top: 22px; height: 52px; }

/* 购买前提示条 */
.a-box { margin-top: 18px; padding: 20px 20px 18px; border-radius: 16px; background: var(--sunk); border-left: 3px solid var(--accent); }
.a-tag { margin: 0; font-size: 11px; letter-spacing: .14em; color: var(--accent); }
.a-title { margin: 10px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.a-text { margin: 10px 0 0; font-size: 15px; line-height: 1.75; color: var(--ink-2); white-space: pre-line; }
.a-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 18px; }
.r-title { margin: 6px 0 0; text-align: center; font-size: 22px; font-weight: 800; }
.r-sub { margin: 6px 0 0; text-align: center; font-size: 14px; }
.r-actions { display: grid; gap: 10px; margin-top: 22px; animation: rise .45s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ── 存根：撕下来 ─────────────────────── */
.tear { --tooth: 12px; position: relative; max-width: 360px; margin: 24px auto 0; font-family: var(--mono); -webkit-user-select: none; user-select: none; }
.tear-main, .tear-stub { position: relative; display: block; width: 100%; background: var(--sunk); color: var(--ink-2); }
.tear-main {
  padding: 18px 20px 20px; border-radius: 16px 16px 0 0;
}
.tear-tag { margin: 22px 0 24px; font: 800 44px/1 var(--sans); letter-spacing: -.035em; color: var(--ink); }
.tear-stamp {
  position: absolute; right: 18px; top: 52px; padding: 5px 9px; border: 1.5px solid var(--accent); border-radius: 6px;
  font-size: 12px; letter-spacing: .16em; color: var(--accent); transform: rotate(-8deg);
}
.tear-stub {
  margin-top: calc(var(--tooth) / -2 - 1px); padding: 22px 20px 16px; border: 0; border-radius: 0 0 16px 16px;
  font: inherit; text-align: left; cursor: grab; touch-action: none; transform-origin: 0 0;
  transition: transform .5s cubic-bezier(.3,1.7,.5,1);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) calc(50% + var(--tooth) / 2) 0 / var(--tooth) 100%;
          mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) calc(50% + var(--tooth) / 2) 0 / var(--tooth) 100%;
}
.tear-stub::before { /* 打孔线 */
  content: ""; position: absolute; left: 12px; right: 12px; top: calc(var(--tooth) / 2 + 2px);
  border-top: 1.5px dashed color-mix(in srgb, var(--ink-3) 70%, transparent); transition: opacity .2s;
}
.tear-stub:focus-visible { outline: none; background: color-mix(in srgb, var(--accent) 8%, var(--sunk)); }
.tear-stub .t-row { display: flex; }
.tear-id { display: block; margin: 14px 0 12px; font-size: 22px; font-weight: 700; letter-spacing: .06em; color: var(--ink); }
.tear-hint { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--ink-2); }
.tear-hint i { display: inline-block; font-style: normal; color: var(--accent); animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }

.tear.dragging .tear-stub { cursor: grabbing; transition: none; }
.tear.dragging .tear-main { transition: none; }
.tear-main { transition: transform .5s cubic-bezier(.3,1.7,.5,1); }
.tear.auto .tear-stub, .tear.auto .tear-main { transition: transform .26s cubic-bezier(.5,0,.8,.4); }
.tear.torn .tear-stub { transform: translateY(26px) rotate(-1.8deg); cursor: copy; transition: transform .7s cubic-bezier(.2,1.5,.35,1); }
.tear.torn .tear-stub::before { opacity: 0; }
.tear.torn .tear-main { animation: jolt .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes jolt { 35% { transform: translateY(-6px) rotate(.8deg); } }
.tear.torn + .tear-hint { visibility: hidden; }

.tear.agent .tear-main, .tear.agent .tear-stub { background: var(--ink); color: color-mix(in srgb, var(--bg) 60%, transparent); }
.tear.agent .tear-tag { color: var(--accent); }
.tear.agent .tear-id { color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  .tear-stub, .tear-main, .tear.torn .tear-stub { transition: none; }
  .tear.torn .tear-main, .tear-hint i, .r-actions { animation: none; }
}

html.lock { overflow: hidden; }

/* ── 响应式 ───────────────────────────── */
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .shop { padding-top: 24px; }
  .news-list a { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .news-date { grid-column: 1; }
  .news-text { min-width: 0; }
.news-text p { margin: 0; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.news-head { -webkit-line-clamp: 2; font-weight: 600; }
.news-sum { margin-top: 4px !important; -webkit-line-clamp: 2; font-size: 14px; color: var(--ink-2); }
  .news-go { grid-column: 2; grid-row: 1; }
  .sheet { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet[open] { animation-name: sheet-up; }
  .sheet-inner { padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .p-card { display: grid; grid-template-columns: 108px 1fr; gap: 16px; padding: 12px; }
  .p-card:hover { transform: none; }
  .ticket { aspect-ratio: auto; min-height: 128px; }
  .t-face { padding: 10px 12px 8px; }
  .t-row span:last-child, .t-stub span { display: none; }
  .t-main { font-size: 21px; white-space: nowrap; letter-spacing: -.04em; }
  .pz-label { font-size: 12.5px; padding: 2px 5px 1px; white-space: nowrap; }
  .pz-kind { display: none; }
  .pz-head { width: 74%; right: -10%; bottom: -14%; }
  .pz-stamp { left: 8px; bottom: 34%; padding: 3px 5px 2px; font-size: 10px; letter-spacing: .08em; border-width: 1.5px; }
  .p-price.is-paused b { font-size: 19px; }
  .t-stub { padding: 12px 12px 10px; justify-content: flex-end; }
  .t-bar { width: 44px; }
  .p-body { padding: 2px 4px 0 0; }
  .p-body h3 { font-size: 16px; }
  .p-kind { font-size: 12px; }
  .p-price { margin-top: 8px; }
  .p-price b { font-size: 24px; }
  .p-meta { display: none; }
  .p-body .btn { --h: 38px; margin-top: 10px; font-size: 14px; }
}
