/* ============================================================
   qiuyu API · Liquid Glass overlay (iOS-style)
   Loaded after the app bundle CSS. Deepens the built-in glass
   surfaces: stronger blur + saturation, specular top edge,
   bright refractive border, layered depth shadows.
   Palette follows the app theme (teal primary, cosmos dark).
   ============================================================ */

/* --- ambient glow under everything (shows through the glass) --- */
body {
  background-image:
    radial-gradient(1100px 750px at 88% -10%, rgba(20, 184, 166, .13), transparent 60%),
    radial-gradient(950px 700px at -12% 108%, rgba(59, 130, 246, .11), transparent 60%),
    radial-gradient(700px 500px at 55% 120%, rgba(168, 85, 247, .07), transparent 60%);
  background-attachment: fixed;
}

/* --- cards: the main glass surface --- */
body .card,
body .card-glass {
  background-color: rgba(255, 255, 255, .46);
  background-image: linear-gradient(155deg,
    rgba(255, 255, 255, .66) 0%,
    rgba(255, 255, 255, .30) 38%,
    rgba(255, 255, 255, .42) 72%,
    rgba(255, 255, 255, .58) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .22),
    inset 1px 0 0 rgba(255, 255, 255, .30),
    0 16px 44px rgba(19, 50, 47, .13);
}
body .card:is(.dark *),
body .card-glass:is(.dark *) {
  background-color: rgba(10, 24, 27, .44);
  background-image: linear-gradient(155deg,
    rgba(32, 64, 68, .55) 0%,
    rgba(12, 28, 31, .42) 40%,
    rgba(18, 40, 44, .48) 74%,
    rgba(28, 56, 60, .52) 100%);
  border-color: rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 1px rgba(255, 255, 255, .05),
    inset 1px 0 0 rgba(255, 255, 255, .07),
    0 16px 44px rgba(0, 0, 0, .42);
}
body .card-hover {
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease;
}
body .card-hover:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .22),
    0 22px 54px rgba(19, 50, 47, .18);
}
body .card-hover:is(.dark *):hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 1px rgba(255, 255, 255, .05),
    0 22px 54px rgba(0, 0, 0, .5);
}

/* --- top header bar --- */
body .app-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, .68), rgba(255, 255, 255, .46));
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, .65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 10px 30px rgba(19, 50, 47, .07);
}
body .app-header:is(.dark *) {
  background: linear-gradient(180deg, rgba(20, 42, 46, .66), rgba(10, 24, 27, .52));
  border-bottom-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 30px rgba(0, 0, 0, .3);
}
body .app-header__inner,
body .app-header__inner--usage {
  background: transparent;
}

/* --- sidebar --- */
body .app-shell aside {
  background: linear-gradient(165deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .38));
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 12px 0 36px rgba(19, 50, 47, .06);
}
body .app-shell aside:is(.dark *) {
  background: linear-gradient(165deg, rgba(22, 46, 50, .58), rgba(9, 22, 25, .46));
  border-right-color: rgba(255, 255, 255, .11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 12px 0 36px rgba(0, 0, 0, .28);
}

/* --- dialogs & modals --- */
body .dialog-panel,
body .modal-content {
  background-color: rgba(255, 255, 255, .55);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .38) 55%, rgba(255, 255, 255, .55));
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 28px 70px rgba(10, 30, 28, .25);
}
body .dialog-panel:is(.dark *),
body .modal-content:is(.dark *) {
  background-color: rgba(12, 27, 30, .55);
  background-image: linear-gradient(160deg, rgba(34, 66, 70, .5), rgba(12, 27, 30, .45) 55%, rgba(24, 48, 52, .5));
  border-color: rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    0 28px 70px rgba(0, 0, 0, .55);
}
body .dialog-overlay,
body .modal-overlay {
  background: rgba(5, 14, 15, .40);
  -webkit-backdrop-filter: blur(7px) saturate(150%);
  backdrop-filter: blur(7px) saturate(150%);
}

/* --- buttons: glossy liquid primary --- */
body .btn-primary {
  background-image: linear-gradient(180deg, #34d8c3 0%, #14b8a6 46%, #0d9488 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(0, 0, 0, .14),
    0 8px 22px rgba(20, 184, 166, .35);
  border-radius: 12px;
}
body .btn-primary:hover {
  filter: brightness(1.07);
}
body .btn-primary:active {
  transform: translateY(1px);
}
body .btn-secondary {
  background: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 14px rgba(19, 50, 47, .08);
}
body .btn-secondary:is(.dark *) {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

/* --- tables inside glass cards --- */
body .mtable thead th {
  background: rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
body .mtable thead th:is(.dark *) {
  background: rgba(255, 255, 255, .05);
}
body .mtable tbody tr {
  transition: background .15s ease;
}
body .mtable tbody tr:hover {
  background: rgba(20, 184, 166, .06);
}

/* --- small polish --- */
::selection {
  background: rgba(20, 184, 166, .30);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 145, 145, .45) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(110, 145, 145, .40);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   公益福利 custom page · iOS liquid glass + perspective stage
   Scoped to .markdown-page-content .gy-* (CustomPageView).
   Headings lose their attributes to the TOC injector, so they
   are styled through .gy-wrap h1 / h2 element selectors.
   ============================================================ */
.markdown-page-content .gy-wrap {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 4px 30px;
  perspective: 1400px;
}
.markdown-page-content .gy-orbs {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.markdown-page-content .gy-orb { position: absolute; border-radius: 50%; filter: blur(46px); }
.markdown-page-content .gy-orb-a {
  width: 340px; height: 340px; top: -70px; right: -30px;
  background: radial-gradient(circle, rgba(20, 184, 166, .50), rgba(20, 184, 166, 0) 68%);
}
.markdown-page-content .gy-orb-b {
  width: 300px; height: 300px; top: 260px; left: -90px;
  background: radial-gradient(circle, rgba(59, 130, 246, .42), rgba(59, 130, 246, 0) 68%);
}
.markdown-page-content .gy-orb-c {
  width: 260px; height: 260px; bottom: -70px; right: 14%;
  background: radial-gradient(circle, rgba(168, 85, 247, .34), rgba(168, 85, 247, 0) 68%);
}
.markdown-page-content .gy-hero {
  position: relative; z-index: 1; text-align: center;
  padding: 42px 28px 34px; border-radius: 30px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .30) 45%, rgba(255, 255, 255, .48));
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .25),
    0 24px 60px rgba(19, 50, 47, .16);
}
.markdown-page-content .gy-hero:is(.dark *) {
  background: linear-gradient(150deg, rgba(34, 66, 70, .55), rgba(12, 28, 31, .42) 45%, rgba(24, 48, 52, .50));
  border-color: rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 1px rgba(255, 255, 255, .05),
    0 24px 60px rgba(0, 0, 0, .45);
}
.markdown-page-content .gy-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  font-size: 12px; letter-spacing: .28em; font-weight: 600; color: #0d9488;
  background: rgba(20, 184, 166, .12);
  border: 1px solid rgba(20, 184, 166, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.markdown-page-content .gy-badge:is(.dark *) { color: #2dd4bf; }
.markdown-page-content .gy-wrap h1 {
  border: 0; padding: 0; margin: 18px 0 10px;
  font-size: 40px; font-weight: 800; line-height: 1.15; letter-spacing: .01em;
  background: linear-gradient(92deg, #0f766e, #14b8a6 40%, #2563eb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.markdown-page-content .gy-sub { margin: 0 auto; max-width: 560px; font-size: 15px; color: #64748b; }
.markdown-page-content .gy-sub:is(.dark *) { color: #94a3b8; }
.markdown-page-content .gy-stats {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 24px;
}
.markdown-page-content .gy-stat {
  padding: 10px 20px; border-radius: 16px;
  background: rgba(255, 255, 255, .40);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 8px 20px rgba(19, 50, 47, .08);
  -webkit-backdrop-filter: blur(12px) saturate(170%);
  backdrop-filter: blur(12px) saturate(170%);
  font-size: 13px; color: #64748b;
}
.markdown-page-content .gy-stat:is(.dark *) {
  background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .13); color: #94a3b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.markdown-page-content .gy-stat b { font-size: 17px; color: #0f766e; margin-right: 4px; }
.markdown-page-content .gy-stat b:is(.dark *) { color: #2dd4bf; }
.markdown-page-content .gy-wrap h2 {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  margin: 36px 0 16px; font-size: 22px; font-weight: 700;
}
.markdown-page-content .gy-wrap h2::before {
  content: ""; width: 5px; height: 22px; border-radius: 99px;
  background: linear-gradient(180deg, #2dd4bf, #2563eb);
  box-shadow: 0 0 12px rgba(20, 184, 166, .55);
}
.markdown-page-content .gy-tiers {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  transform-style: preserve-3d;
}
.markdown-page-content .gy-tier {
  position: relative; overflow: hidden;
  border-radius: 26px; padding: 24px 22px 22px;
  background: linear-gradient(158deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .28) 42%, rgba(255, 255, 255, .44));
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .70);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .92),
    inset 0 -1px 1px rgba(255, 255, 255, .20),
    0 18px 44px rgba(19, 50, 47, .14);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s ease;
}
.markdown-page-content .gy-tier:is(.dark *) {
  background: linear-gradient(158deg, rgba(32, 64, 68, .52), rgba(12, 28, 31, .40) 42%, rgba(22, 46, 50, .48));
  border-color: rgba(255, 255, 255, .15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .20),
    inset 0 -1px 1px rgba(255, 255, 255, .05),
    0 18px 44px rgba(0, 0, 0, .42);
}
.markdown-page-content .gy-tier:nth-child(1) { transform: rotateY(6deg); }
.markdown-page-content .gy-tier:nth-child(2) { transform: translateZ(36px) scale(1.02); }
.markdown-page-content .gy-tier:nth-child(3) { transform: rotateY(-6deg); }
.markdown-page-content .gy-tier:hover {
  transform: rotateY(0deg) translateY(-6px) translateZ(48px) scale(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .22),
    0 30px 64px rgba(19, 50, 47, .22);
}
.markdown-page-content .gy-tier::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .38) 48%, transparent 62%);
  transform: translateX(-130%);
  transition: transform .8s ease;
}
.markdown-page-content .gy-tier:hover::after { transform: translateX(130%); }
.markdown-page-content .gy-ribbon {
  position: absolute; top: 16px; right: -36px; z-index: 2;
  transform: rotate(38deg);
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .14em;
  padding: 4px 42px;
  box-shadow: 0 6px 16px rgba(249, 115, 22, .40);
}
.markdown-page-content .gy-tier-top { display: flex; justify-content: space-between; align-items: center; }
.markdown-page-content .gy-tier-name { font-size: 13px; letter-spacing: .18em; font-weight: 600; color: #64748b; }
.markdown-page-content .gy-tier-name:is(.dark *) { color: #94a3b8; }
.markdown-page-content .gy-tier-rate {
  font-size: 12px; font-weight: 700; color: #0d9488;
  background: rgba(20, 184, 166, .14);
  border: 1px solid rgba(20, 184, 166, .30);
  padding: 3px 10px; border-radius: 999px;
}
.markdown-page-content .gy-tier-rate:is(.dark *) { color: #2dd4bf; }
.markdown-page-content .gy-tier-spend { margin-top: 18px; font-size: 14px; color: #64748b; }
.markdown-page-content .gy-tier-spend:is(.dark *) { color: #94a3b8; }
.markdown-page-content .gy-tier-spend strong { font-size: 21px; color: #0f172a; margin-left: 2px; }
.markdown-page-content .gy-tier-spend strong:is(.dark *) { color: #f1f5f9; }
.markdown-page-content .gy-tier-back {
  margin-top: 8px; font-size: 46px; font-weight: 800; line-height: 1;
  background: linear-gradient(92deg, #0f766e, #14b8a6 45%, #2563eb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.markdown-page-content .gy-tier-unit { margin-top: 7px; font-size: 12px; letter-spacing: .22em; color: #94a3b8; }
.markdown-page-content .gy-bar {
  margin-top: 18px; height: 8px; border-radius: 99px; overflow: hidden;
  background: rgba(15, 118, 110, .12);
  box-shadow: inset 0 1px 2px rgba(19, 50, 47, .12);
}
.markdown-page-content .gy-bar i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #2dd4bf, #14b8a6, #3b82f6);
  box-shadow: 0 0 12px rgba(20, 184, 166, .55);
}
.markdown-page-content .gy-fill-1 { width: 56%; }
.markdown-page-content .gy-fill-2 { width: 72%; }
.markdown-page-content .gy-fill-3 { width: 100%; }
.markdown-page-content .gy-rules {
  position: relative; z-index: 1;
  border-radius: 24px; padding: 22px 26px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .52), rgba(255, 255, 255, .30) 50%, rgba(255, 255, 255, .42));
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 16px 40px rgba(19, 50, 47, .12);
}
.markdown-page-content .gy-rules:is(.dark *) {
  background: linear-gradient(155deg, rgba(30, 58, 62, .50), rgba(12, 28, 31, .40) 50%, rgba(22, 46, 50, .46));
  border-color: rgba(255, 255, 255, .14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 16px 40px rgba(0, 0, 0, .4);
}
.markdown-page-content .gy-rules ul { list-style: none; padding: 0; margin: 0; }
.markdown-page-content .gy-rules li { position: relative; padding-left: 27px; margin-bottom: 10px; }
.markdown-page-content .gy-rules li:last-child { margin-bottom: 0; }
.markdown-page-content .gy-rules li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: #0d9488; font-weight: 800;
}
.markdown-page-content .gy-rules li::before:is(.dark *) { color: #2dd4bf; }
@media (max-width: 760px) {
  .markdown-page-content .gy-tiers { grid-template-columns: 1fr; }
  .markdown-page-content .gy-tier:nth-child(1),
  .markdown-page-content .gy-tier:nth-child(2),
  .markdown-page-content .gy-tier:nth-child(3) { transform: none; }
  .markdown-page-content .gy-wrap h1 { font-size: 32px; }
  .markdown-page-content .gy-hero { padding: 32px 20px 28px; }
}
