/* tappy 液态玻璃公共样式：tokens / 材质四层 / 按钮 / 顶栏 / 卡片 / 叠卡 / 抽屉 */
@property --angle-1 { syntax: '<angle>'; inherits: false; initial-value: -75deg; }
@property --angle-2 { syntax: '<angle>'; inherits: false; initial-value: -45deg; }

:root {
  --paper: #f0f0f0;
  --ink: #191919;
  --ink-70: rgba(25, 25, 25, .7);
  --ink-45: rgba(25, 25, 25, .45);
  --grey-500: #737373;
  --accent: #4F5B4A;
  --line: rgba(25, 25, 25, .08);

  --glass-border: #a8a49c2b;
  --glass-panel: #ffffff94;
  --glass-subtle: #ffffff61;
  --glass-highlight: #ffffffc2;

  --blur-sm: blur(6px);
  --blur-md: blur(14px) saturate(1.18);
  --blur-lg: blur(18px) saturate(1.2);
  --blur-xl: blur(32px) saturate(1.1);

  --shadow-glass:
    0 1px 3px rgba(17, 15, 11, .03),
    0 4px 8px -3px rgba(17, 15, 11, .04),
    inset 0 1px 1px rgba(255, 255, 255, .76),
    inset 0 -1px 1px rgba(17, 15, 11, .03);

  --ease-wabi: cubic-bezier(.25, 1, .5, 1);
  --ease-expo: cubic-bezier(.22, 1, .36, 1);

  --rim-a: rgba(0, 0, 0, .42);
  --rim-b: rgba(255, 255, 255, .5);

  --font-sans: "Inter", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: ui-serif, Georgia, "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -.1px;
  -webkit-font-smoothing: antialiased;
  padding-top: 92px;
}

/* ── 背景液态色块：玻璃需要有东西可折射 ───────────────── */
.liquid-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--paper); }
.liquid-bg i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(80px); opacity: .62;
  animation: drift 22s ease-in-out infinite alternate;
}
.liquid-bg i:nth-child(1) { width: 46vw; height: 46vw; left: -8vw; top: -6vw; background: #c9d5c6; }
.liquid-bg i:nth-child(2) { width: 40vw; height: 40vw; right: -6vw; top: 12vh; background: #e8d3c4; animation-delay: -7s; }
.liquid-bg i:nth-child(3) { width: 52vw; height: 52vw; left: 22vw; bottom: -22vw; background: #d2dbe9; animation-delay: -13s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 3vh, 0) scale(1.12); }
}

/* 颗粒，避免大面积渐变出现色带 */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── 玻璃材质四层 ──────────────────────────────────── */
.lg { position: relative; }
.lg > *:not(.mat) { position: relative; z-index: 1; }

.mat { position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none; overflow: hidden; }

.frost {
  position: absolute; inset: 0; border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 46%),
    linear-gradient(-75deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .2), rgba(255, 255, 255, .05)),
    rgba(255, 255, 255, .58);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  box-shadow: var(--shadow-glass);
  transition: box-shadow .4s var(--ease-wabi);
}

.sheen {
  position: absolute; inset: 1px; border-radius: inherit; opacity: .75;
  background: linear-gradient(var(--angle-2),
    rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .5) 40% 50%, rgba(255, 255, 255, 0) 55%);
  background-size: 200% 200%; background-position: 0% 50%; background-repeat: no-repeat;
  mix-blend-mode: screen;
  transition: background-position .5s var(--ease-wabi), --angle-2 .5s ease;
}

.rim {
  position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background:
    conic-gradient(from var(--angle-1) at 50% 50%,
      var(--rim-a), rgba(0, 0, 0, 0) 5% 40%,
      var(--rim-a) 50%, rgba(0, 0, 0, 0) 60% 95%, var(--rim-a)),
    linear-gradient(180deg, var(--rim-b), var(--rim-b));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .35);
  transition: --angle-1 .5s ease;
}

.lg:hover > .mat > .sheen { background-position: 25% 50%; }
.lg:hover > .mat > .rim { --angle-1: -125deg; }

.lg-dark { --rim-a: rgba(255, 255, 255, .55); --rim-b: rgba(255, 255, 255, .1); }
.lg-dark .frost {
  background: linear-gradient(180deg, rgba(28, 28, 28, .92), rgba(28, 28, 28, .84));
  box-shadow:
    0 10px 28px rgba(17, 15, 11, .14),
    0 2px 6px rgba(17, 15, 11, .1),
    inset 0 1px 1px rgba(255, 255, 255, .28);
  color: #fff;
}

/* 折射：不支持 url() 滤镜的浏览器丢弃第二条，自动退化为模糊 */
.refract .frost {
  backdrop-filter: var(--blur-lg);
  backdrop-filter: url(#refract) blur(3px) saturate(1.2);
}

/* ── 入场 ──────────────────────────────────────────── */
@keyframes blur-in {
  0%   { opacity: 0; filter: blur(14px); translate: 0 12px; }
  99%  { opacity: 1; filter: blur(0);    translate: 0 0; }
  100% { opacity: 1; filter: none;       translate: 0 0; }
}
.blur-in { animation: blur-in 1.05s var(--ease-expo) both; animation-delay: var(--d, 0s); }

/* ── 顶栏 ──────────────────────────────────────────── */
.topbar {
  position: fixed; top: 16px; left: 16px; right: 16px; z-index: 100;
  height: 60px;
  display: flex; align-items: center; gap: 22px;
  padding: 0 22px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: -.2px; }
.brand-mark {
  width: 24px; height: 24px; flex: none;
  background: url(logo.svg) center / contain no-repeat;
}
.nav { display: flex; gap: 20px; }
.nav a {
  font-size: 14px; color: var(--ink-70); text-decoration: none; padding: 3px 0;
  border-bottom: 1px solid transparent; transition: color .3s ease, border-color .3s ease;
}
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: rgba(25, 25, 25, .5); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.net {
  font-size: 12px; color: var(--ink-70); padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .45);
  box-shadow: inset 0 0 0 .5px rgba(25, 25, 25, .1), inset 0 1px 1px rgba(255, 255, 255, .8);
}

/* 玻璃按钮基类（chip / cta / close 共用） */
.gbtn {
  position: relative; border: 0; background: transparent; font-family: inherit;
  border-radius: 999px; cursor: pointer; color: var(--ink);
  transition: transform .4s var(--ease-wabi), color .3s ease;
}
.gbtn > span, .gbtn > em { position: relative; z-index: 1; font-style: normal; }
.gbtn::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0;
  background: linear-gradient(-75deg,
    rgba(255, 255, 255, .05), rgba(255, 255, 255, .3), rgba(255, 255, 255, .05)),
    rgba(255, 255, 255, .5);
  background-size: 200% 100%; background-position: 0% 50%;
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--shadow-glass);
  transition: background-position .5s var(--ease-wabi);
}
.gbtn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background:
    conic-gradient(from var(--angle-1) at 50% 50%,
      var(--rim-a), rgba(0, 0, 0, 0) 5% 40%,
      var(--rim-a) 50%, rgba(0, 0, 0, 0) 60% 95%, var(--rim-a)),
    linear-gradient(180deg, var(--rim-b), var(--rim-b));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .4);
  transition: --angle-1 .5s ease;
}
.gbtn:hover::before { background-position: 25% 50%; }
.gbtn:hover::after { --angle-1: -125deg; }
.gbtn:active { transform: perspective(600px) rotate3d(1, 0, 0, 18deg); }
.gbtn:focus-visible { outline: 2px solid rgba(25, 25, 25, .58); outline-offset: 3px; }

.wallet { padding: 9px 16px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.wallet .dot { width: 6px; height: 6px; border-radius: 50%; background: #6f9a68; }

/* ── 标题区 ────────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.intro { padding: 46px 8px 30px; max-width: 680px; }
.eyebrow {
  margin: 0 0 16px; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-45);
}
h1 {
  margin: 0 0 16px; font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(30px, 4.6vw, 60px); line-height: .98; letter-spacing: -.01em;
}
.lede { margin: 0; color: var(--ink-70); font-size: 15px; max-width: 520px; }

/* ── 筛选 ──────────────────────────────────────────── */
.filterbar {
  position: sticky; top: 88px; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; margin-bottom: 22px; border-radius: 999px;
}
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.chip { padding: 8px 16px; font-size: 13px; color: var(--ink-70); flex: none; }
.chip[aria-pressed="true"] { color: #fff; --rim-a: rgba(255, 255, 255, .55); --rim-b: rgba(255, 255, 255, .1); }
.chip[aria-pressed="true"]::before {
  background: linear-gradient(180deg, rgba(28, 28, 28, .92), rgba(28, 28, 28, .84));
  box-shadow: 0 6px 18px rgba(17, 15, 11, .16), inset 0 1px 1px rgba(255, 255, 255, .26);
}
.count { margin-left: auto; font-size: 12px; color: var(--ink-45); white-space: nowrap; padding-right: 6px; }

/* ── 卡片 ──────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 6px 0 78px; }

.card {
  border-radius: 24px; padding: 8px; text-align: left;
  font-family: inherit; color: inherit; border: 0; background: transparent;
  transition: transform .4s var(--ease-wabi);
}
.card:hover { transform: translateY(-3px); }
.card:hover .frost {
  box-shadow:
    0 2px 4px rgba(17, 15, 11, .04),
    0 18px 36px -12px rgba(17, 15, 11, .16),
    inset 0 1px 1px rgba(255, 255, 255, .85),
    inset 0 -1px 1px rgba(17, 15, 11, .04);
}
.card:active { transform: translateY(-1px) scale(.996); }
.card:focus-visible { outline: 2px solid rgba(25, 25, 25, .58); outline-offset: 4px; }

/* 扇形叠卡：前台一张，左右各露半张，可拖拽换张（参考 wabi deck-wrap） */
.art {
  position: relative; aspect-ratio: 3 / 4; border-radius: 18px;
  background: rgba(255, 255, 255, .36);
  box-shadow: inset 0 0 0 .5px rgba(25, 25, 25, .07);
}
.deck { position: absolute; inset: 0; cursor: grab; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.deck.is-dragging { cursor: grabbing; }
.deck.is-dragging .dcard { transition: none; }
.dcard {
  position: absolute; left: 50%; top: 50%; width: 80%; height: 92%;
  object-fit: cover; border-radius: 14px; transform-origin: 50% 45%;
  pointer-events: none; will-change: transform, opacity;
  box-shadow:
    0 14px 28px -14px rgba(17, 15, 11, .45),
    0 2px 6px -2px rgba(17, 15, 11, .18),
    inset 0 0 0 .5px rgba(255, 255, 255, .55);
  transition: transform .55s var(--ease-expo), opacity .45s var(--ease-wabi), filter .45s ease;
}
.deck-count {
  position: absolute; right: 4px; bottom: 6px; z-index: 20; font-size: 10.5px; color: var(--ink-70);
  padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(6px); box-shadow: inset 0 0 0 .5px rgba(25, 25, 25, .1);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.soldout {
  position: absolute; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center;
  border-radius: inherit;
  background: rgba(255, 255, 255, .55); color: var(--ink-70);
  font-size: 13px; letter-spacing: .06em; backdrop-filter: blur(2px);
}
.card.is-sold .soldout { display: flex; }

.card-body { padding: 14px 10px 0; display: flex; flex-direction: column; gap: 9px; }
.name-row { display: flex; align-items: center; gap: 9px; }
.name-row h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -.2px; }
.badge {
  font-size: 11px; letter-spacing: .04em; color: var(--accent);
  background: rgba(79, 91, 74, .09); border-radius: 999px; padding: 2px 9px;
  box-shadow: inset 0 0 0 .5px rgba(79, 91, 74, .16);
}
.desc { margin: 0; font-size: 13px; color: var(--ink-70); }
.tone { display: flex; gap: 6px; flex-wrap: wrap; }
.tone span {
  font-size: 11px; color: var(--ink-45); padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  box-shadow: inset 0 0 0 .5px rgba(25, 25, 25, .09);
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px 10px 4px; padding: 12px 0 10px;
  border-top: 1px solid var(--line);
}
.price { font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.price small { display: block; font-size: 10.5px; color: var(--ink-45); letter-spacing: .04em; }
.enter { padding: 8px 15px; font-size: 12.5px; cursor: pointer; }

/* ── 画室详情 ──────────────────────────────────────── */
.sheet-title { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sheet-title h2 { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 28px; letter-spacing: -.02em; }
.range { margin: 0 0 16px; font-size: 12px; color: var(--ink-45); font-variant-numeric: tabular-nums; }
.params {
  display: flex; flex-direction: column; gap: 12px; padding: 16px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.param { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.param .k { width: 74px; color: var(--ink-45); flex: none; }
.param .bar {
  flex: 1; height: 3px; border-radius: 2px; overflow: hidden;
  background: rgba(25, 25, 25, .09);
  box-shadow: inset 0 1px 1px rgba(25, 25, 25, .08);
}
.param .bar i { display: block; height: 100%; background: var(--accent); }
.param .v { width: 52px; text-align: right; color: var(--ink-70); font-variant-numeric: tabular-nums; flex: none; }

.section-label {
  margin: 20px 0 10px; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-45);
}
.history { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.history figure {
  margin: 0; position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  box-shadow: inset 0 0 0 .5px rgba(25, 25, 25, .1);
}
.history img { width: 100%; height: 100%; object-fit: cover; display: block; }
.history figcaption {
  position: absolute; left: 9px; bottom: 7px; font-size: 10px; color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5); letter-spacing: .04em;
}

.cta { padding: 11px 20px; font-size: 13.5px; margin-left: auto; }
.cta:disabled { opacity: .45; cursor: not-allowed; }
.cta:disabled::before { background: rgba(255, 255, 255, .4); }

/* ── 空态 / Toast ─────────────────────────────────── */
.empty { grid-column: 1 / -1; text-align: center; padding: 76px 0; color: var(--ink-45); }
.empty .gbtn { margin-top: 16px; padding: 9px 18px; font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 300;
  border-radius: 999px; padding: 11px 20px; font-size: 13px;
  transform: translate(-50%, 18px); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-wabi), transform .3s var(--ease-wabi);
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }

/* ── 响应式 ────────────────────────────────────────── */
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 680px) {
  body { padding-top: 84px; }
  .topbar { left: 10px; right: 10px; top: 10px; height: 56px; padding: 0 14px; gap: 12px; }
  .nav, .net { display: none; }
  .wrap { padding: 0 10px; }
  .intro { padding: 30px 8px 22px; }
  .filterbar { top: 76px; margin-bottom: 16px; padding: 8px; }
  .count { display: none; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ── 降级 ──────────────────────────────────────────── */
@media (prefers-reduced-transparency: reduce) {
  .frost { backdrop-filter: none !important; background: #fbfbfa; }
}
@supports not (backdrop-filter: blur(1px)) {
  .frost { background: #fbfbfa; }
  .gbtn::before { background: #f7f7f5; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}