:root {
  --bg: #edfafa;
  --panel: rgba(255, 255, 255, 0.86);
  --ink: #123142;
  --muted: #65808c;
  --line: #cde8ee;
  --brand: #118ba5;
  --brand-deep: #0f3d52;
  --mint: #2dbd9c;
  --soft: #e5f8f5;
  --cream: #fff8df;
  --danger: #b85f5b;
  --shadow: 0 18px 42px rgba(20, 93, 110, 0.14);
  --radius: 18px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% 6%, rgba(17, 139, 165, 0.18), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(45, 189, 156, 0.2), transparent 32%),
    linear-gradient(160deg, #fbfeff 0%, var(--bg) 58%, #daf6ef 100%);
}

button, input, textarea, select {
  font: inherit;
}

.sticky-consult {
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 20;
  display: none;
  grid-template-columns: 1fr auto;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid rgba(205, 232, 238, 0.92);
  border-radius: 18px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 61, 82, 0.2);
  backdrop-filter: blur(14px);
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 16px 14px 98px;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(205, 232, 238, 0.9);
  border-radius: 22px;
  padding: 28px 22px 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(230, 249, 247, 0.88)),
    radial-gradient(circle at 80% 20%, rgba(45, 189, 156, 0.24), transparent 30%);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -54px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(15, 61, 82, 0.08);
}

.brand-mark {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  color: #116f7e;
  background: #dff7f4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero h1 {
  position: relative;
  margin: 16px 0 10px;
  max-width: 420px;
  font-size: clamp(32px, 9vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.hero-actions {
  position: relative;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  box-shadow: 0 14px 30px rgba(15, 61, 82, 0.22);
}

.btn.ghost {
  color: #126f7f;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
}

.hero-note {
  position: relative;
  margin-top: 18px;
  border-left: 4px solid var(--mint);
  border-radius: 10px;
  padding: 11px 12px;
  color: #315d68;
  background: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 760;
}

.filters {
  margin: 18px 0 14px;
  border: 1px solid rgba(205, 232, 238, 0.86);
  border-radius: 18px;
  padding: 14px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(20, 93, 110, 0.08);
  backdrop-filter: blur(12px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.section-head strong {
  color: var(--brand);
  font-size: 13px;
}

.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 10px;
}

.filter-scroll:last-child {
  padding-bottom: 2px;
}

.filter-label {
  margin: 10px 0 8px;
  color: #315d68;
  font-size: 12px;
  font-weight: 850;
}

.filter-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: #315d68;
  background: #fbfeff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
}

.filter-pill.active {
  color: white;
  border-color: var(--brand-deep);
  background: var(--brand-deep);
}

.case-list {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.song-card, .empty-card, .consult-card {
  border: 1px solid rgba(205, 232, 238, 0.92);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.song-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.song-card.shared-highlight {
  border-color: rgba(45, 189, 156, 0.92);
  box-shadow: 0 20px 48px rgba(20, 93, 110, 0.18), 0 0 0 4px rgba(45, 189, 156, 0.12);
}

.cover-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 15%, rgba(45, 189, 156, 0.34), transparent 30%),
    linear-gradient(145deg, #15465b, #0f3143);
}

.cover-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255, 255, 255, 0.86);
  font-size: 72px;
  font-weight: 900;
}

.song-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
}

.song-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.song-title-row h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.style-tag, .tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 820;
}

.style-tag {
  color: #0f6d79;
  background: #dff7f4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.tag-row span {
  color: #566b37;
  background: var(--cream);
}

.summary {
  display: -webkit-box;
  min-height: calc(1.65em * 3);
  margin: 0;
  color: #315d68;
  line-height: 1.65;
  font-size: 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

blockquote {
  display: flex;
  align-items: center;
  margin: 0;
  border-left: 4px solid var(--mint);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--brand-deep);
  background: var(--soft);
  line-height: 1.6;
  font-size: 13px;
  font-weight: 760;
}

.song-playback {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

audio {
  width: 100%;
  height: 40px;
  accent-color: var(--brand);
}

.song-actions {
  display: grid;
  gap: 8px;
}

.share-btn {
  width: 100%;
  border: 1px solid rgba(45, 189, 156, 0.32);
  border-radius: 12px;
  padding: 11px 14px;
  color: #0f6d79;
  background: linear-gradient(135deg, #e4fbf8, #f7fffe);
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

.link-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #315d68;
  background: rgba(246, 252, 253, 0.94);
  cursor: pointer;
  font-size: 13px;
  font-weight: 820;
}

.share-btn:active {
  transform: translateY(1px);
}

.share-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.empty-card {
  display: grid;
  gap: 6px;
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.empty-card strong {
  color: var(--ink);
}

.ritual-card, .consult-card {
  margin-top: 18px;
  border: 1px solid rgba(205, 232, 238, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ritual-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.88);
}

.ritual-card span {
  color: #0f6d79;
  font-size: 13px;
  font-weight: 850;
}

.ritual-card h2 {
  margin: 8px 0;
  font-size: 24px;
  letter-spacing: 0;
}

.ritual-card p {
  margin: 0;
  color: #315d68;
  line-height: 1.8;
}

.ritual-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ritual-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(205, 232, 238, 0.84);
  border-radius: 12px;
  padding: 12px;
  background: #fbfeff;
}

.ritual-grid strong {
  color: var(--brand-deep);
  font-size: 15px;
}

.ritual-grid small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.consult-card {
  padding: 20px;
  background: linear-gradient(145deg, #123a4e, #0f6f7e);
  color: white;
}

.consult-card span {
  color: #aee7e5;
  font-size: 13px;
  font-weight: 820;
}

.consult-card h2 {
  margin: 8px 0;
  font-size: 24px;
  letter-spacing: 0;
}

.consult-card p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.wechat-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.wechat-qr {
  display: block;
  width: 168px;
  height: 168px;
  border: 8px solid white;
  border-radius: 12px;
  background: white;
  object-fit: cover;
}

.wechat-info {
  display: grid;
  gap: 10px;
}

.wechat-info p {
  margin: 0;
}

.wechat-id {
  display: grid;
  gap: 3px;
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.wechat-id small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wechat-id strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.consult-tip {
  margin-top: 12px !important;
  font-size: 13px;
}

@media (min-width: 820px) {
  .app-shell {
    padding-top: 24px;
  }

  .case-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ritual-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .sticky-consult {
    display: grid;
  }

  .sticky-consult .btn {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 14px;
  }

  .wechat-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .wechat-qr {
    width: min(260px, 100%);
    height: auto;
    aspect-ratio: 1;
  }

  .wechat-info {
    width: 100%;
  }
}
