/* ==========================================================================
   星辉娱乐 · 场刊设计系统
   文件 3/4：layer-stage.css —— 舞台组件库
   标志性母题：黑胶唱机（.xh-deck/.xh-vinyl）、票根（.xh-ticket）、
   曲目单点线（.xh-setlist）、黄铜铭牌（.xh-plate）、审核钢印（.xh-stamp）。
   全部视觉由 CSS 渲染，零图片依赖。
   ========================================================================== */

@layer stage {
  /* ---------- 1. 黑胶唱机舞台 ---------- */
  .xh-deck {
    position: relative;
    display: grid;
    gap: 22px;
    padding: clamp(24px, 4vw, 40px);
    background:
      radial-gradient(120% 90% at 78% 8%, rgba(220, 174, 78, .22), transparent 62%),
      linear-gradient(160deg, #14120e, #0c1417 62%, #12100c);
    color: #f2ece0;
    border: 1px solid rgba(242, 236, 224, .16);
    overflow: hidden;
    container-type: inline-size;
    container-name: deck;
  }
  .xh-deck::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(242, 236, 224, .09) 1px, transparent 1px);
    background-size: 5px 5px;
    opacity: .55; pointer-events: none;
  }
  .xh-deck__top {
    position: relative; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    font-family: var(--xh-mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
    color: rgba(242, 236, 224, .7);
  }
  .xh-deck__now { position: relative; display: grid; gap: 6px; }
  .xh-deck__now b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
  .xh-deck__now i { font-style: normal; font-family: var(--xh-mono); font-size: .72rem; letter-spacing: .14em; color: var(--xh-brass-hi); }
  .xh-deck__row { display: grid; gap: 24px; align-items: center; }
  @container deck (min-width: 560px) { .xh-deck__row { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); } }

  .xh-vinyl {
    position: relative;
    width: 100%; max-width: 240px; aspect-ratio: 1;
    margin-inline: auto;
    border-radius: 50%;
    background:
      repeating-radial-gradient(circle at 50% 50%, #0a0806 0 2px, #1b1712 2px 4px);
    box-shadow:
      inset 0 0 0 1px rgba(242, 236, 224, .2),
      inset 0 0 60px rgba(0, 0, 0, .8),
      0 26px 50px -24px rgba(0, 0, 0, .9);
    animation: xh-rot var(--xh-spin) linear infinite;
  }
  .xh-vinyl::before {
    content: ""; position: absolute; inset: 27%;
    border-radius: 50%;
    background: conic-gradient(from 200deg, var(--xh-cue), var(--xh-brass) 40%, #7a2f14 72%, var(--xh-cue) 100%);
  }
  .xh-vinyl::after {
    content: ""; position: absolute; inset: 47.5%;
    border-radius: 50%; background: #0a0806;
    box-shadow: 0 0 0 3px rgba(242, 236, 224, .28);
  }
  .xh-vinyl b {
    position: absolute; inset: 31% 31% auto 31%;
    font-family: var(--xh-mono); font-size: .56rem; letter-spacing: .16em;
    text-align: center; color: rgba(20, 14, 8, .78); font-weight: 700;
  }
  .xh-vinyl--slow { --xh-spin: 26s; }
  @keyframes xh-rot { to { transform: rotate(360deg); } }

  .xh-arm {
    position: absolute; top: 6%; right: 4%; width: 46%; height: 46%;
    pointer-events: none;
  }
  .xh-arm::before {
    content: ""; position: absolute; right: 6%; top: 6%;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--xh-brass-hi); box-shadow: 0 0 0 4px rgba(220, 174, 78, .2);
  }
  .xh-arm::after {
    content: ""; position: absolute; right: 9%; top: 12%;
    width: 62%; height: 3px; transform-origin: right center;
    transform: rotate(34deg);
    background: linear-gradient(90deg, rgba(242, 236, 224, .95), rgba(242, 236, 224, .35));
    border-radius: 3px;
  }

  /* 频谱条 */
  .xh-eq { display: flex; align-items: flex-end; gap: 3px; height: 46px; }
  .xh-eq i {
    flex: 1; min-width: 2px; height: var(--h, 40%);
    background: linear-gradient(180deg, var(--xh-brass-hi), var(--xh-cue));
    animation: xh-bounce 1.1s var(--dl, 0s) ease-in-out infinite alternate;
    transform-origin: bottom;
  }
  @keyframes xh-bounce { from { transform: scaleY(.28); } to { transform: scaleY(1); } }

  /* 走带进度 */
  .xh-track-bar { position: relative; height: 3px; background: rgba(242, 236, 224, .2); }
  .xh-track-bar span { position: absolute; inset: 0 auto 0 0; width: var(--p, 42%); background: var(--xh-brass-hi); }

  @media (prefers-reduced-motion: reduce) {
    .xh-vinyl { animation: none; }
    .xh-eq i { animation: none; }
  }

  /* ---------- 2. 票根卡 ---------- */
  .xh-ticket {
    position: relative;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    background: var(--xh-surface);
    border: 1px solid var(--xh-line-2);
    overflow: hidden;
    transition: transform .2s var(--xh-ease), box-shadow .2s var(--xh-ease), border-color .2s var(--xh-ease);
  }
  .xh-ticket:hover { transform: translateY(-3px); border-color: var(--xh-brass); box-shadow: var(--xh-lift); }
  .xh-ticket__stub {
    position: relative;
    display: grid; place-content: center; gap: 6px;
    padding: 14px 8px;
    background: var(--xh-cue);
    color: var(--xh-on-accent);
    text-align: center;
  }
  .xh-ticket__stub b { font-family: var(--xh-mono); font-size: 1.3rem; letter-spacing: -.02em; }
  .xh-ticket__stub i { font-style: normal; font-family: var(--xh-mono); font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; opacity: .82; }
  /* 撕票线：虚线 + 两端半圆缺口 */
  .xh-ticket__stub::after {
    content: ""; position: absolute; top: 0; right: -1px; bottom: 0; width: 0;
    border-left: 1.5px dashed rgba(255, 255, 255, .55);
  }
  .xh-ticket__body { padding: 16px 18px; display: grid; gap: 8px; align-content: start; }
  .xh-ticket__body h3 { margin: 0; font-size: 1.1rem; }
  .xh-ticket__body p { margin: 0; font-size: .92rem; color: var(--xh-fg-2); }
  .xh-ticket__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--xh-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--xh-fg-3); }
  /* CSS 条形码 */
  .xh-ticket__code {
    height: 22px; margin-top: 4px;
    background: repeating-linear-gradient(90deg,
      var(--xh-fg) 0 1.5px, transparent 1.5px 3px,
      var(--xh-fg) 3px 5px, transparent 5px 8px,
      var(--xh-fg) 8px 9px, transparent 9px 13px);
    opacity: .72;
  }

  /* ---------- 3. 曲目单（点线目录） ---------- */
  .xh-setlist { display: grid; gap: 0; border-top: 1px solid var(--xh-line); }
  .xh-setlist a, .xh-setlist li, .xh-setlist > div {
    display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; align-items: baseline;
    padding: 15px 6px; border-bottom: 1px solid var(--xh-line);
    transition: background .2s var(--xh-ease), padding-left .2s var(--xh-ease);
  }
  .xh-setlist a:hover { background: var(--xh-surface-2); padding-left: 14px; }
  .xh-setlist em { font-style: normal; font-family: var(--xh-mono); font-size: .74rem; color: var(--xh-brass); letter-spacing: .06em; }
  .xh-setlist b { font-weight: 700; }
  .xh-setlist small { display: block; color: var(--xh-fg-3); font-size: .86rem; font-weight: 400; }
  .xh-setlist u {
    text-decoration: none; font-family: var(--xh-mono); font-size: .74rem; letter-spacing: .08em;
    color: var(--xh-fg-2); text-align: right; white-space: nowrap;
  }

  /* ---------- 4. 通用卡与栅格 ---------- */
  .xh-card {
    position: relative;
    display: grid; gap: 12px; align-content: start;
    padding: 22px;
    background: var(--xh-surface);
    border: 1px solid var(--xh-line-2);
    transition: transform .2s var(--xh-ease), box-shadow .2s var(--xh-ease);
  }
  .xh-card:hover { transform: translateY(-3px); box-shadow: var(--xh-lift); }
  /* 四角定位标记（唱机刻线） */
  .xh-card::before, .xh-card::after {
    content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
    border: 1px solid var(--xh-brass);
  }
  .xh-card::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
  .xh-card::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
  .xh-card h3 { margin: 0; }
  .xh-card p { margin: 0; color: var(--xh-fg-2); font-size: .94rem; }
  .xh-card__no { font-family: var(--xh-mono); font-size: .68rem; letter-spacing: .2em; color: var(--xh-cue); }

  .xh-grid { display: grid; gap: var(--xh-gap); }
  @media (min-width: 700px) { .xh-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 860px) { .xh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (min-width: 1000px) { .xh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

  /* ---------- 5. CSS 图版（零图片抽象视觉） ---------- */
  .xh-art {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden;
    border: 1px solid var(--xh-line-2); background: var(--xh-surface-2);
  }
  .xh-art--stage {
    background:
      radial-gradient(60% 46% at 50% 104%, rgba(220, 174, 78, .5), transparent 70%),
      repeating-linear-gradient(112deg, #0f4f5c 0 22px, #0b3d47 22px 44px),
      linear-gradient(#08252c, #06181d);
  }
  .xh-art--stage::after {
    content: ""; position: absolute; inset: auto 12% 12% 12%; height: 34%;
    background: repeating-linear-gradient(90deg, rgba(242, 236, 224, .22) 0 2px, transparent 2px 12px);
    mask-image: linear-gradient(180deg, #000, transparent);
  }
  .xh-art--wave {
    background:
      repeating-radial-gradient(circle at 50% 128%, var(--xh-brass) 0 3px, transparent 3px 16px),
      radial-gradient(80% 60% at 50% 100%, rgba(179, 64, 27, .35), transparent 70%),
      linear-gradient(180deg, var(--xh-surface-2), var(--xh-bg-2));
  }
  .xh-art--note {
    background:
      repeating-linear-gradient(0deg, transparent 0 26px, var(--xh-line-2) 26px 27px),
      linear-gradient(120deg, var(--xh-surface), var(--xh-bg-2));
  }
  .xh-art--note::after {
    content: "♪"; position: absolute; left: 18%; bottom: 8%;
    font-size: 5.6rem; line-height: 1; color: var(--xh-cue); opacity: .85;
  }
  .xh-art--note::before {
    content: "♬"; position: absolute; right: 14%; top: 14%;
    font-size: 3.4rem; line-height: 1; color: var(--xh-teal); opacity: .7;
  }
  .xh-art--brass {
    background:
      conic-gradient(from 220deg at 30% 30%, var(--xh-brass-hi), var(--xh-cue) 32%, var(--xh-band) 62%, var(--xh-brass) 100%);
  }
  .xh-art--brass::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(0, 0, 0, .32) 1.1px, transparent 1.1px);
    background-size: 4px 4px;
  }
  .xh-art__tag {
    position: absolute; left: 0; bottom: 0; z-index: 2;
    padding: 7px 13px; background: var(--xh-fg); color: var(--xh-bg);
    font-family: var(--xh-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
  }

  /* ---------- 6. 黄铜铭牌与钢印 ---------- */
  .xh-plate {
    display: grid; gap: 3px; padding: 12px 16px;
    background: linear-gradient(150deg, var(--xh-brass-hi), var(--xh-brass) 58%, #8a6216);
    color: #1a1305; border: 1px solid rgba(0, 0, 0, .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
    font-family: var(--xh-mono);
  }
  .xh-plate b { font-size: .92rem; letter-spacing: .04em; font-family: var(--xh-body); }
  .xh-plate span { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }

  .xh-stamp {
    display: inline-grid; place-content: center; gap: 2px;
    width: 108px; height: 108px; border-radius: 50%;
    border: 2px solid var(--xh-cue);
    box-shadow: inset 0 0 0 4px var(--xh-surface), inset 0 0 0 5px var(--xh-cue);
    color: var(--xh-cue); text-align: center; transform: rotate(-9deg);
    font-family: var(--xh-mono); font-size: .66rem; letter-spacing: .1em; line-height: 1.4;
  }
  .xh-stamp b { font-size: .96rem; letter-spacing: .04em; font-family: var(--xh-display); }

  /* ---------- 7. 数据条与规格表 ---------- */
  .xh-kpi { display: grid; gap: 14px; }
  @media (min-width: 640px) { .xh-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  .xh-kpi div { padding: 16px 18px; border: 1px solid var(--xh-line-2); background: var(--xh-surface); }
  .xh-kpi b { display: block; font-family: var(--xh-mono); font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--xh-cue); }
  .xh-kpi b i { font-style: normal; font-size: .5em; color: var(--xh-brass); margin-left: 2px; }
  .xh-kpi span { display: block; margin-top: 6px; font-size: .84rem; color: var(--xh-fg-2); }

  .xh-spec { border: 1px solid var(--xh-line-2); background: var(--xh-surface); }
  .xh-spec table { font-size: .92rem; }
  .xh-spec caption {
    padding: 12px 16px; background: var(--xh-fg); color: var(--xh-bg);
    font-family: var(--xh-mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; text-align: left;
  }
  .xh-spec th, .xh-spec td { padding: 12px 16px; border-bottom: 1px solid var(--xh-line); }
  .xh-spec th { width: 30%; font-family: var(--xh-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--xh-fg-3); font-weight: 700; }
  .xh-spec tr:last-child th, .xh-spec tr:last-child td { border-bottom: 0; }
  .xh-spec tbody tr:hover { background: var(--xh-surface-2); }
  @media (max-width: 640px) {
    .xh-spec table { table-layout: fixed; }
    .xh-spec th { width: 38%; }
  }

  /* ---------- 8. 排期表 ---------- */
  .xh-slot { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px dashed var(--xh-line-2); }
  .xh-slot__head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
  .xh-slot__time { font-family: var(--xh-mono); font-size: 1.02rem; font-weight: 700; color: var(--xh-cue); letter-spacing: .02em; }
  .xh-slot__day { font-family: var(--xh-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--xh-fg-3); }

  /* ---------- 9. 筛选条 ---------- */
  .xh-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
  .xh-tabs button {
    padding: 8px 15px; border: 1px solid var(--xh-line-2); border-radius: 999px;
    font-size: .88rem; font-weight: 600; color: var(--xh-fg-2); background: var(--xh-surface);
    transition: all .18s var(--xh-ease);
  }
  .xh-tabs button:hover { border-color: var(--xh-brass); color: var(--xh-brass); }
  .xh-tabs button[aria-pressed="true"] { background: var(--xh-fg); color: var(--xh-bg); border-color: var(--xh-fg); }

  /* ---------- 10. 折叠问答 ---------- */
  .xh-faq { display: grid; gap: 12px; }
  .xh-faq details { border: 1px solid var(--xh-line-2); background: var(--xh-surface); }
  .xh-faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 18px; cursor: pointer; font-weight: 700; list-style: none;
  }
  .xh-faq summary::-webkit-details-marker { display: none; }
  .xh-faq summary::after { content: "+"; font-family: var(--xh-mono); color: var(--xh-cue); font-size: 1.2rem; transition: transform .2s var(--xh-ease); }
  .xh-faq details[open] summary::after { transform: rotate(45deg); }
  .xh-faq details[open] summary { border-bottom: 1px dashed var(--xh-line-2); }
  .xh-faq div { padding: 16px 18px; color: var(--xh-fg-2); font-size: .95rem; }
  .xh-faq div p:last-child { margin-bottom: 0; }

  /* ---------- 11. 表单（入驻申请 / 登录演示） ---------- */
  .xh-form { display: grid; gap: 18px; }
  .xh-field { display: grid; gap: 7px; }
  .xh-field label { font-family: var(--xh-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--xh-fg-3); }
  .xh-field input, .xh-field select, .xh-field textarea {
    width: 100%; padding: 13px 14px; background: var(--xh-surface);
    border: 0; border-bottom: 1.5px solid var(--xh-line-3); border-radius: 0;
    transition: border-color .2s var(--xh-ease), background .2s var(--xh-ease);
  }
  .xh-field input:focus, .xh-field select:focus, .xh-field textarea:focus {
    outline: 0; border-color: var(--xh-cue); background: var(--xh-surface-2);
  }
  .xh-field small { color: var(--xh-fg-3); font-size: .8rem; }
  .xh-form__row { display: grid; gap: 18px; }
  @media (min-width: 700px) { .xh-form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .xh-check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--xh-fg-2); }
  .xh-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--xh-cue); }
  .xh-form__note { font-size: .84rem; color: var(--xh-fg-3); border-left: 3px solid var(--xh-brass); padding-left: 12px; }
  .xh-form__done { padding: 14px 16px; background: var(--xh-cue); color: var(--xh-on-accent); font-weight: 700; }
  .xh-form__done[hidden] { display: none; }

  /* ---------- 12. 提示块与引用 ---------- */
  .xh-note {
    padding: 16px 18px; border: 1px dashed var(--xh-line-3); background: var(--xh-surface-2);
    font-size: .92rem; color: var(--xh-fg-2);
  }
  .xh-note b { color: var(--xh-cue); }
  .xh-note--cue { border-color: var(--xh-cue); background: var(--xh-cue-soft); }

  /* ---------- 13. 长文排版 ---------- */
  .xh-article { display: grid; gap: 20px; }
  .xh-article > * { max-width: 74ch; }
  .xh-article h2 { margin-top: 26px; }
  .xh-article h3 { color: var(--xh-teal); }
  .xh-article p { color: var(--xh-fg-2); }
  .xh-article p > b { color: var(--xh-fg); }
  .xh-bullets li {
    position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--xh-fg-2);
  }
  .xh-bullets li::before {
    content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px;
    background: var(--xh-brass); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  }
  .xh-quote {
    margin: 8px 0; padding: 22px 24px;
    background: var(--xh-fg); color: var(--xh-bg);
    font-size: 1.14rem; font-weight: 700; line-height: 1.6; letter-spacing: -.01em;
    position: relative; overflow: hidden;
  }
  .xh-quote::before {
    content: "”"; position: absolute; right: 10px; bottom: -34px;
    font-size: 9rem; line-height: 1; opacity: .14; font-family: var(--xh-display);
  }
  .xh-quote cite { display: block; margin-top: 10px; font-size: .74rem; font-family: var(--xh-mono); letter-spacing: .14em; text-transform: uppercase; font-style: normal; opacity: .7; }

  .xh-byline { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--xh-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--xh-fg-3); }

  /* ---------- 14. 滚动揭示 ---------- */
  .xh-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--xh-ease), transform .6s var(--xh-ease); }
  .xh-reveal.is-in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { .xh-reveal { opacity: 1; transform: none; transition: none; } }
}
