[data-card-shimmer], [data-card-shimmer-icon] { position: relative; isolation: isolate; }
@media (prefers-reduced-motion: no-preference) {
  [data-audio-reactive] [data-card-shimmer], [data-audio-reactive] [data-card-shimmer-icon] {
    border-color: color-mix(in srgb, var(--border), var(--audio-accent) calc(18% + var(--audio-pulse) * 78%));
    border-block-start-color: color-mix(in srgb, var(--border), var(--primary) calc(25% + var(--audio-pulse) * 70%));
  }
  [data-card-shimmer]:is(:hover, :focus-within, [data-card-shimmer-replay]) {
    --shimmer-edge: linear-gradient(132deg, transparent 24%, #e5bc822b 38%, #e5bc82b0 46%, #fff4db 50%, #e5bc82b0 54%, #e5bc822b 62%, transparent 76%);
    --shimmer-surface: linear-gradient(132deg, transparent 24%, #e5bc8209 38%, #e5bc8227 50%, #e5bc8209 62%, transparent 76%);
  }
  [data-card-shimmer]:is(:hover, :focus-within, [data-card-shimmer-replay]):not([data-card-shimmer-reset])::before,
  [data-card-shimmer]:is(:hover, :focus-within, [data-card-shimmer-replay]):not([data-card-shimmer-reset]) [data-card-shimmer-icon]::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: var(--shimmer-surface) 100% 50% / 260% 100% no-repeat;
    animation: card-shimmer 1.2s ease-out both;
  }
  @supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
    [data-card-shimmer]:is(:hover, :focus-within, [data-card-shimmer-replay]):not([data-card-shimmer-reset])::after {
      content: ""; position: absolute; inset: -1px; border: 1px solid transparent; border-radius: inherit; pointer-events: none; z-index: 2;
      background: var(--shimmer-edge) 100% 50% / 260% 100% border-box;
      -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
      mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
      mask-composite: exclude;
      animation: card-shimmer 1.2s ease-out both;
    }
  }
}
@keyframes card-shimmer {
  0% { background-position: 100% 50%; opacity: 0; }
  5%, 25% { opacity: 1; }
  30%, 100% { background-position: 0% 50%; opacity: 0; }
}
.price { display: grid; justify-items: center; gap: .35rem; }
.price-visual { display: inline-flex; align-items: center; gap: .06em; font: 800 clamp(2.5rem, 8vw, 4.5rem)/1.14 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
.price-digit { display: grid; place-items: center; min-width: .72em; padding: .025em .08em; border: 1px solid #e5bc822b; border-radius: .12em; background: var(--raised-surface); box-shadow: var(--raised-shadow); }
.price-symbol { margin-inline-start: .17em; color: var(--primary); }
.price-visual[data-flip] .price-digit { animation: price-tick 550ms ease-in-out both; }
@keyframes price-tick { from { transform: translateY(-.24em); opacity: .35; } }
.player { display: flex; align-items: center; justify-content: center; gap: .75rem; }
.player .details { display: grid; justify-items: center; line-height: 1.25; }
.player small { color: var(--muted-foreground); margin-top: .15rem; }
.player button { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid var(--border); border-radius: 50%; background: var(--raised-surface); color: var(--primary); box-shadow: var(--raised-shadow); cursor: pointer; }
.player button:hover { color: var(--foreground); }
.equalizer { display: inline-flex; gap: 3px; height: 23px; align-items: end; color: var(--primary); }
.equalizer i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform: scaleY(.18); transform-origin: bottom; }
.bar { accent-color: var(--primary); width: 100%; min-height: .85rem; }
.pulse-meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; width: min(19rem, 100%); }
.pulse-meter i { height: .55rem; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--primary) calc(13% + var(--audio-pulse) * 63%), var(--background)); }
details { padding-block: .75rem; border-bottom: 1px solid var(--border); }
details summary { cursor: pointer; font-weight: 680; }
details p { padding-top: .6rem; }
dialog { width: min(calc(100% - 2rem), 29rem); max-height: min(80svh, 35rem); border: 1px solid var(--warm-border); border-radius: var(--radius-md); background: var(--raised-surface); color: var(--foreground); padding: 1.5rem; }
dialog::backdrop { background: #000b; }
dialog[data-demo-dialog][open] {
  position: fixed; inset: 0; display: grid; gap: .85rem; block-size: fit-content; margin: auto;
  padding: clamp(1.25rem, 5vw, 2rem); overflow: auto; text-align: center;
}
dialog[data-demo-dialog] form { display: flex; justify-content: center; padding: .4rem; }
[data-sample-form] output { text-align: center; }
.surface details { text-align: center; }
.surface details > summary { list-style-position: inside; }
[data-example-filled] table { max-inline-size: 36rem; margin-inline: auto; border-collapse: collapse; table-layout: fixed; }
[data-example-filled] :is(th, td) { inline-size: 50%; padding: .6rem .35rem; text-align: center; overflow-wrap: anywhere; }
[data-example-filled] thead { border-block-end: 1px solid var(--border); }
.layout-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; }
.layout-controls .action { min-width: 0; }
.layout-controls .action[aria-pressed=true] { color: var(--primary); box-shadow: var(--recessed-shadow); }
.layout-stage { min-height: 12rem; display: grid; align-content: center; justify-items: center; text-align: center; gap: .7rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--recessed-surface); }
.layout-stage[data-device=mobile] { width: min(100%, 19rem); margin-inline: auto; }
.status-list { margin: 0; padding: 0; list-style: none; }
.status-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--border); padding: .8rem 0; }
.badge { border: 1px solid currentColor; border-radius: 1rem; padding: .12rem .55rem; color: var(--muted-foreground); font-size: .82rem; }
.badge.good { color: var(--success); }
.badge.warning { color: var(--warning); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .price-visual[data-flip] .price-digit { animation: none; } [data-motion-only] { display: none !important; } }
.player-message { text-align: center; font-size: .88rem; }
.player-message:empty { display: none; }
.bar { appearance: none; border: 0; border-radius: 999px; background: var(--recessed-surface); box-shadow: var(--recessed-shadow); overflow: hidden; }
.bar::-webkit-progress-bar { background: var(--recessed-surface); }
.bar::-webkit-progress-value { border-radius: 999px; background: repeating-linear-gradient(132deg, #e5bc82 0 8px, #cba375 8px 16px); }
.bar::-moz-progress-bar { border-radius: 999px; background: repeating-linear-gradient(132deg, #e5bc82 0 8px, #cba375 8px 16px); }
