/* 白玉京前台 · 动效附加层（motion，2026-11-23）
   只动「动效与滚动手感」：滑动顺滑、按压 Q 弹、弹窗弹性落位。
   在 style.css 之后加载，靠后置覆盖生效；不改视觉设计与业务逻辑。
   红线：动画只用 transform / opacity；减动效偏好时全部降级。 */
:root {
  --m-spring: cubic-bezier(.34, 1.35, .44, 1);   /* 主弹簧：轻微过冲 */
  --m-spring-soft: cubic-bezier(.3, 1.22, .4, 1);
  --m-out: cubic-bezier(.22, .9, .28, 1);        /* 顺滑出场 */
}

/* ---------- 滑动：锚点平滑滚动 + 去点按灰闪/双击缩放延迟 ---------- */
html { scroll-behavior: smooth; }
* { -webkit-tap-highlight-color: transparent; }
a, button, .btn, .dock-item, .chip, .ltab,
input, select, textarea, label { touch-action: manipulation; }

/* ---------- Q 弹按压：按下快入（.1s），松开走弹簧回弹 ----------
   只重定 transform 的过渡曲线/时长，其余属性沿用 style.css 原过渡。 */
.btn { transition: transform .34s var(--m-spring), box-shadow .2s, background .2s; }
button { transition: border-color .2s, transform .3s var(--m-spring), box-shadow .2s; }
.icon-btn { transition: background .2s, color .2s, transform .3s var(--m-spring); }
.dock-item { transition: color .25s, transform .3s var(--m-spring); }
.col-cell { transition: transform .32s var(--m-spring), border-color .2s; }
.art-card { transition: transform .34s var(--m-spring), border-color .2s; }
.chip { transition: color .25s, background .2s, transform .3s var(--m-spring); }
.chip:active { transform: scale(.96); }
.btn:active, button:active, .icon-btn:active, .dock-item:active,
.col-cell:active, .art-card:active, .chip:active { transition-duration: .1s; }

/* ---------- 弹窗：背景淡入 + 面板滑入弹性落位 ---------- */
.ann-modal { transition: opacity .3s var(--m-out), visibility 0s linear .3s; }
.ann-modal.open { transition: opacity .3s var(--m-out); }
.ann-modal-panel { transition: transform .42s var(--m-spring), opacity .3s var(--m-out); }
.login-overlay { transition: opacity .3s var(--m-out); }
.login-card { transition: transform .38s var(--m-spring); overscroll-behavior: contain; }
.toast { transition: opacity .3s var(--m-out), transform .4s var(--m-spring); }

/* ---------- 登录/注册页签切换：新面板一次性淡入升起 ----------
   面板靠 hidden 属性切换，脱离 display:none 时动画自然重播；
   只加在容器层，不碰内部表单与验证码逻辑。 */
@keyframes m-pane-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
#panePw, #paneCode, #paneSms, #regEm, #regPh { animation: m-pane-in .32s var(--m-out); }

/* ---------- 减动效偏好：全部降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #panePw, #paneCode, #paneSms, #regEm, #regPh { animation: none; }
}

/* =====================================================================
   Q-MOTION LAYER v1 · springy interaction layer
   Appended to the end of motion.css; works with motion.js (html.q-js).
   Delete from this marker down to roll back.
   ===================================================================== */

/* ---------- Spring curves (old browsers fall back to cubic-bezier) ---------- */
:root {
  --q-spring: cubic-bezier(.34, 1.56, .4, 1);
  --q-spring-soft: cubic-bezier(.3, 1.3, .4, 1);
  --q-out: cubic-bezier(.22, .9, .28, 1);
  --q-press: cubic-bezier(.3, .6, .4, 1);
  --q-rel: .62s;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* zeta .42: lively rebound for press release / toggles */
    --q-spring: linear(0, 0.049, 0.174, 0.347, 0.539, 0.727, 0.896, 1.033, 1.135, 1.199, 1.23, 1.231, 1.211, 1.176, 1.133, 1.088, 1.045, 1.009, 0.98, 0.961, 0.949, 0.945, 0.948, 0.954, 0.963, 0.974, 0.984, 0.993, 1.001, 1.007, 1.011, 1.012, 1.013, 1.012, 1.01, 1.008, 1.005, 1.003, 1.001, 0.999, 0.998, 0.997, 0.997, 0.997, 0.997, 0.998, 0.999, 1);
    /* zeta .6: entrances for modals / panels / drawers */
    --q-spring-soft: linear(0, 0.022, 0.08, 0.163, 0.262, 0.369, 0.478, 0.584, 0.683, 0.772, 0.85, 0.916, 0.971, 1.014, 1.047, 1.07, 1.085, 1.093, 1.095, 1.092, 1.087, 1.079, 1.069, 1.059, 1.049, 1.039, 1.03, 1.021, 1.014, 1.008, 1.002, 0.998, 0.995, 0.993, 0.992, 0.991, 0.991, 0.991, 0.992, 0.993, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.999, 1);
    --q-rel: .9s;
  }
}

/* ---------- 1. Press rebound: down = quick squash, release = spring back ----------
   Uses the standalone `scale` property, so it never conflicts with the transform your existing JS writes */
html.q-js .q-pressable {
  transition: scale var(--q-rel) var(--q-spring), translate .6s var(--q-spring-soft),
              transform .5s var(--q-spring-soft), box-shadow .3s var(--q-out),
              background-color .3s var(--q-out), border-color .3s var(--q-out),
              color .25s var(--q-out), opacity .3s var(--q-out), filter .4s var(--q-out),
              width .45s var(--q-spring);
}
html.q-js .q-pressable.q-down {
  scale: .955;
  transition: scale .14s var(--q-press), box-shadow .2s var(--q-out), background-color .2s,
              border-color .2s, color .2s, transform .2s var(--q-out);
}
html.q-js :is(.dock-item, .chip, .icon-btn, .ann-dot, .ltab).q-down { scale: .9; }
html.q-js :is(.art-card, .card, .tbl-wrap, .ord-row).q-down { scale: .975; }
/* neutralize the old transform-based :active so the two don't stack */
html.q-js :is(.btn, button, .icon-btn, .dock-item, .col-cell, .art-card, .chip, .card, .ord-row,
  label.opt, .btn-arrow, .side-row, .side-subrow, .side-select, .side-primary, .side-reset,
  .prod-name, .ltab, .svc-item, .pager-link, .login-x, .flip-close):active { transform: none; }
/* no-JS fallback */
html:not(.q-js) :is(.btn, .col-cell, .art-card, .chip, .dock-item):active { scale: .96; }

/* ---------- 2. Frost ripple: a ring of frost blooms from the touch point ---------- */
.q-ripple-host {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.q-ripple {
  position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .75) 0 30%, rgba(200, 228, 255, .35) 55%, rgba(200, 228, 255, 0) 70%);
  scale: 0; opacity: .9;
  animation: q-ripple .7s var(--q-out) forwards;
}
.btn:not(.ghost):not(.btn-soft) .q-ripple { background: radial-gradient(circle, rgba(255, 255, 255, .55) 0 28%, rgba(255, 255, 255, .18) 55%, rgba(255, 255, 255, 0) 70%); }
html[data-theme="dark"] .q-ripple { background: radial-gradient(circle, rgba(190, 225, 255, .35) 0 30%, rgba(150, 200, 255, .14) 55%, rgba(150, 200, 255, 0) 70%); }
@keyframes q-ripple { to { scale: var(--q-rs, 18); opacity: 0; } }

/* ---------- 3. Jelly: the capsule squashes and rebounds while it slides ---------- */
.q-jelly { animation: q-jelly .7s var(--q-out); }
@keyframes q-jelly {
  0% { scale: 1 1; }
  22% { scale: 1.14 .84; }
  46% { scale: .95 1.06; }
  68% { scale: 1.03 .98; }
  100% { scale: 1 1; }
}
.dock-item svg { transition: transform .35s var(--q-spring), filter .3s; }
.q-pop svg { animation: q-pop .62s var(--q-out); }
@keyframes q-pop {
  0% { translate: 0 0; scale: 1; }
  28% { translate: 0 -5px; scale: 1.08 .92; }
  52% { translate: 0 0; scale: .94 1.06; }
  74% { translate: 0 -1px; scale: 1.02 .99; }
  100% { translate: 0 0; scale: 1; }
}

/* ---------- 4. Top bar hides on scroll down, reappears on scroll up ---------- */
.topbar { transition: translate .6s var(--q-spring-soft), box-shadow .3s var(--q-out), opacity .3s var(--q-out); }
html.q-top-hide .topbar { translate: 0 calc(-100% - 24px); }
.chips { transition: top .55s var(--q-spring-soft), box-shadow .3s; }
html.q-top-hide .chips { top: calc(10px + env(safe-area-inset-top)); }

/* ---------- 5. Frost reveal: content clears up as if frost were melting off ---------- */
.q-rv { opacity: 0; translate: 0 18px; scale: .975; filter: blur(8px); }
.q-rv.q-in {
  opacity: 1; translate: 0 0; scale: 1; filter: blur(0);
  transition: opacity .55s var(--q-out), translate .9s var(--q-spring-soft),
              scale .9s var(--q-spring-soft), filter .6s var(--q-out);
}
/* same treatment for your existing .rv reveal */
.rv { filter: blur(6px); transition: transform .8s var(--q-spring-soft), opacity .5s var(--q-out), filter .6s var(--q-out); }
.rv.in { filter: blur(0); }

/* heading "ice crystal develop": per-character stagger from blur to sharp */
.q-ch { display: inline-block; opacity: 0; filter: blur(6px); translate: 0 .28em; animation: q-ch .7s var(--q-out) forwards; white-space: pre; }
@keyframes q-ch { to { opacity: 1; filter: blur(0); translate: 0 0; } }

/* ---------- 6. Modal / drawer / toast spring entrances ---------- */
html.q-js .login-card { transition: transform .7s var(--q-spring-soft), opacity .3s var(--q-out); }
@starting-style {
  .login-overlay { opacity: 0; }
  html .login-card { transform: translateY(28px) scale(.92); opacity: 0; }
}
html.q-js .ann-modal.open .ann-modal-panel { transition: transform .7s var(--q-spring-soft), opacity .3s var(--q-out); }
html.q-js .side-layer.open .side-panel { transition: transform .7s var(--q-spring-soft); }
html.q-js .toast.show { transition: opacity .25s var(--q-out), transform .7s var(--q-spring); }

/* phones: login sheet slides up from the bottom (overrides the centered pop-in) */
@media (max-width: 640px) {
  @starting-style { html .login-card { transform: translateY(70%); opacity: 1; } }
}

/* ---------- 7. Snow particle canvas ---------- */
.q-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.q-snow.q-snow-hero { position: absolute; z-index: 4; }

/* ---------- 8. Page transitions: frost crossfade + top bar / dock persist across pages ---------- */
@view-transition { navigation: auto; }
.topbar { view-transition-name: q-topbar; }
.dock { view-transition-name: q-dock; }
::view-transition-old(root) { animation: q-vt-out .26s var(--q-out) both; }
::view-transition-new(root) { animation: q-vt-in .48s var(--q-out) both; }
::view-transition-group(q-topbar), ::view-transition-group(q-dock) { animation-duration: .4s; }
@keyframes q-vt-out { to { opacity: 0; filter: blur(10px); scale: .99; } }
@keyframes q-vt-in { from { opacity: 0; filter: blur(12px); scale: 1.012; } }

/* ---------- 9. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .q-rv { opacity: 1; translate: none; scale: none; filter: none; }
  .rv { filter: none; }
  .q-ch { opacity: 1; filter: none; translate: none; animation: none; }
  .q-ripple, .q-jelly, .q-pop svg { animation: none; }
  .q-snow { display: none; }
  html.q-top-hide .topbar { translate: none; }
  @view-transition { navigation: none; }
}
/* ==================== END Q-MOTION LAYER ==================== */

/* =====================================================================
   Q-MOTION LAYER v2 · 2026-11-27 · Apple interaction
   Append to the very end of motion.css (after Q-MOTION v1).
   Rollback: delete everything from this marker to "END Q-MOTION v2".
   Works with motion.js v2 (which sets html.q-apple). With the old motion.js still live, the rules below don't apply.
   ===================================================================== */

/* ---------- 1. Apple spring curves (SwiftUI-style parameters) ---------- */
:root {
  --a-snappy: cubic-bezier(.25, .9, .3, 1);     /* bounce .15: near-zero overshoot, decisive */
  --a-smooth: cubic-bezier(.3, .8, .3, 1);      /* bounce 0: critically damped */
  --a-bouncy: cubic-bezier(.3, 1.25, .45, 1);   /* bounce .3: small bounce, for press release / capsule */
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --a-snappy: linear(0, 0.023, 0.08, 0.159, 0.248, 0.341, 0.432, 0.519, 0.598, 0.669, 0.732, 0.785, 0.831, 0.869, 0.901, 0.927, 0.947, 0.964, 0.976, 0.986, 0.993, 0.998, 1.002, 1.004, 1.005, 1.006, 1.006, 1.006, 1.006, 1.005, 1.005, 1.004, 1.004, 1.003, 1.003, 1.002, 1.002, 1.001, 1.001, 1);
    --a-smooth: linear(0, 0.025, 0.084, 0.163, 0.25, 0.337, 0.422, 0.501, 0.572, 0.636, 0.692, 0.74, 0.782, 0.818, 0.849, 0.874, 0.896, 0.914, 0.929, 0.942, 0.952, 0.961, 0.968, 0.974, 0.979, 0.983, 0.986, 0.989, 0.991, 0.992, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, 0.998, 0.999, 0.999, 1);
    --a-bouncy: linear(0, 0.031, 0.111, 0.218, 0.338, 0.459, 0.575, 0.68, 0.771, 0.847, 0.909, 0.956, 0.992, 1.017, 1.033, 1.042, 1.046, 1.046, 1.043, 1.038, 1.033, 1.027, 1.022, 1.017, 1.012, 1.009, 1.005, 1.003, 1.001, 1, 0.999, 0.998, 0.998, 0.998, 0.998, 0.998, 0.998, 0.999, 0.999, 1);
  }
}

/* ---------- 2. Press feedback: Apple-style (no ripple)
   filled buttons dim and shrink slightly / glass controls grow and brighten (Liquid Glass) / cards sink slightly ---------- */
html.q-apple .q-pressable {
  transition: scale .6s var(--a-bouncy), filter .35s var(--a-smooth), translate .5s var(--a-snappy),
              transform .5s var(--a-snappy), box-shadow .3s var(--a-smooth),
              background-color .25s var(--a-smooth), border-color .25s var(--a-smooth),
              color .2s var(--a-smooth), opacity .25s var(--a-smooth), width .45s var(--a-snappy);
}
html.q-apple .q-pressable.q-down {
  scale: .97; filter: brightness(.96);
  transition: scale .12s var(--a-smooth), filter .12s var(--a-smooth), box-shadow .15s,
              background-color .12s, border-color .12s, color .12s;
}
html.q-apple .btn:not(.ghost):not(.btn-soft).q-down { scale: .97; filter: brightness(.88); }
html[data-theme="dark"].q-apple .btn:not(.ghost):not(.btn-soft).q-down { filter: brightness(1.15); }
html.q-apple :is(.icon-btn, .btn.ghost, .btn-soft, .btn-arrow, .chip, .ltab, .login-x, .flip-close).q-down {
  scale: 1.07; filter: brightness(1.06) saturate(1.15);
}
html.q-apple :is(.art-card, .card, .col-cell, .ord-row, .svc-item, label.opt, .pager-link, .side-row, .side-subrow).q-down {
  scale: .975; filter: brightness(.97);
}
html[data-theme="dark"].q-apple :is(.art-card, .card, .col-cell, .ord-row, .svc-item, label.opt, .pager-link).q-down { filter: brightness(1.12); }
/* dock items: the item doesn't shrink; the icon magnifies like it's under a lens */
html.q-apple .dock-item.q-down { scale: 1; filter: none; }
html.q-apple .dock-item svg { transition: scale .55s var(--a-bouncy), translate .55s var(--a-bouncy), filter .3s; }
html.q-apple :is(.dock-item.q-down, .dock-item.q-hover) svg { scale: 1.16; translate: 0 -1px; }
html.q-apple .q-ripple-host { display: none; }   /* the ripple is Material language; Apple doesn't use it */
html.q-apple .q-pop svg { animation: none; }

/* ---------- 3. Dock minimizes on scroll down, restores on scroll up (iOS 26 tab bar) ---------- */
html.q-apple .dock { transition: scale .55s var(--a-snappy), translate .55s var(--a-snappy), box-shadow .3s; transform-origin: 50% 100%; }
html.q-apple.q-dock-mini .dock { scale: .86; translate: 0 6px; }
html.q-apple.q-dock-mini .dock-item span { opacity: 0; }
html.q-apple.q-dock-mini .dock-item svg { translate: 0 6px; }
html.q-apple .dock.q-drag { scale: 1.02; }
/* the top bar no longer hides on scroll (iOS nav bars stay put); the large title collapses into it instead */
html.q-apple.q-top-hide .topbar { translate: none; }
html.q-apple.q-top-hide .chips { top: calc(70px + env(safe-area-inset-top)); }
@media (max-width: 640px) { html.q-apple.q-top-hide .chips { top: calc(66px + env(safe-area-inset-top)); } }
.q-navtitle { transition: opacity .28s var(--a-smooth), translate .45s var(--a-snappy); }

/* ---------- 4. Sheets: drag-to-dismiss + page behind steps back (iOS card stack) ---------- */
html.q-apple .q-sheet-dragging { transition: none !important; }
html.q-apple .q-sheet-release { transition: translate .5s var(--a-snappy), opacity .3s var(--a-smooth) !important; }
html.q-apple .login-card { transition: transform .55s var(--a-snappy), translate .5s var(--a-snappy), opacity .3s var(--a-smooth); }
html.q-apple .ann-modal.open .ann-modal-panel { transition: transform .55s var(--a-snappy), translate .5s var(--a-snappy), opacity .3s var(--a-smooth); }
/* login sheet open: the page behind shrinks slightly and its corners round (the login overlay sits outside main, so this is safe) */
html.q-apple main.page, html.q-apple main.home-main {
  transition: scale .55s var(--a-snappy), border-radius .55s var(--a-snappy), filter .4s var(--a-smooth);
  transform-origin: 50% 0;
}
html.q-apple.q-sheet-open main.page, html.q-apple.q-sheet-open main.home-main {
  scale: .94; border-radius: 22px; filter: brightness(.94); overflow: clip;
}
@media (max-width: 640px) {
  @starting-style { html.q-apple .login-card { transform: translateY(100%); opacity: 1; } }
}

/* ---------- 5. Reveal: Apple restraint (short travel, light blur, no tilt) ---------- */
html.q-apple .rv { filter: blur(3px); transform: translateY(12px) scale(.99); }
html.q-apple .rv.in { filter: none; transform: none; transition: transform .6s var(--a-snappy), opacity .45s var(--a-smooth), filter .45s var(--a-smooth); }
html.q-apple .q-rv { translate: 0 12px; scale: .99; filter: blur(3px); }
html.q-apple .q-rv.q-in { translate: 0 0; scale: 1; filter: blur(0); transition: opacity .45s var(--a-smooth), translate .6s var(--a-snappy), scale .6s var(--a-snappy), filter .45s var(--a-smooth); }
/* page transitions: quick crossfade, lighter blur */
::view-transition-old(root) { animation: q-vt-out .2s var(--q-out) both; }
::view-transition-new(root) { animation: q-vt-in .34s var(--q-out) both; }
@keyframes q-vt-out { to { opacity: 0; filter: blur(4px); } }
@keyframes q-vt-in { from { opacity: 0; filter: blur(5px); scale: 1.006; } }

@media (prefers-reduced-motion: reduce) {
  html.q-apple.q-sheet-open main.page, html.q-apple.q-sheet-open main.home-main { scale: none; border-radius: 0; filter: none; }
  html.q-apple.q-dock-mini .dock { scale: none; translate: none; }
  html.q-apple.q-dock-mini .dock-item span { opacity: 1; }
  html.q-apple .rv, html.q-apple .q-rv { filter: none; transform: none; translate: none; scale: none; }
}
/* ==================== END Q-MOTION v2 ==================== */

/* =====================================================================
   Q-MOTION LAYER v4 · 2026-11-27 · performance
   Append to the very end of motion.css (after Q-MOTION v3).
   Rollback: delete everything from this marker to "END Q-MOTION v4".
   ===================================================================== */
/* always on: page transitions become a plain crossfade (blurring a full-page snapshot is expensive even on mid-range phones) */
@keyframes q-vt-out { to { opacity: 0; } }
@keyframes q-vt-in { from { opacity: 0; } }

/* lite mode: press feedback scales only (filter animations are expensive) */
html.q-lite .q-pressable, html.q-lite .q-pressable.q-down { filter: none !important; }
html.q-lite .q-pressable {
  transition: scale .45s var(--a-snappy), background-color .2s, border-color .2s, color .2s, opacity .2s !important;
}
html.q-lite .q-pressable.q-down { transition: scale .1s var(--a-smooth) !important; }
html.q-lite.q-apple :is(.dock-item.q-down, .dock-item.q-hover) svg { scale: 1.1; }

/* lite mode: reveal animations use opacity + translate only, no blur */
html.q-lite :is(.rv, .q-rv) { filter: none !important; }
html.q-lite :is(.rv.in, .q-rv.q-in) {
  transition: opacity .35s var(--a-smooth), transform .45s var(--a-snappy), translate .45s var(--a-snappy), scale .45s var(--a-snappy) !important;
}

/* lite mode: no full-page scaling behind sheets (re-rastering the whole page on low-end is very costly) */
html.q-lite.q-sheet-open :is(main.page, main.home-main) { scale: none !important; filter: none !important; border-radius: 0 !important; overflow: visible !important; }
/* lite mode: dock doesn't minimize (scaling a blurred element is expensive) */
html.q-lite.q-dock-mini .dock { scale: none; translate: none; }
html.q-lite.q-dock-mini .dock-item span { opacity: 1; }
html.q-lite.q-dock-mini .dock-item svg { translate: none; }
html.q-lite .q-snow { display: none !important; }
html.q-lite .q-sound-btn[aria-pressed="true"] svg path { animation: none; }
/* ==================== END Q-MOTION v4 ==================== */
