/* 2-7 心愿单（许愿树）。class 一律 ws- 开头
   一幅仰视的油画树铺满一屏；心愿是米白信笺（细横线、小火漆、底边蕾丝），丝带系着挂在枝上，随风摇：
   左右摆 + 绕竖轴轻轻翻（像纸被风吹得转过来一点），时不时来一阵大点的风；花瓣斜着飘过 */
.ws { position: relative; min-height: 100%; padding-bottom: calc(14px + var(--safe-b)); display: flex; flex-direction: column; }
.ws .lace-edge { top: 0; }
.cl-btn.ghost { visibility: hidden; }

/* 一屏油画 */
.ws-tree-pg { padding: 0; height: 100%; background: #CFC6BF; overflow: hidden; }
.ws-scene { position: relative; flex: 1; min-height: 100%; overflow: hidden; }
.ws-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.ws-veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(137, 123, 141, .16), rgba(169, 154, 170, .06) 45%, rgba(248, 243, 236, 0) 62%, rgba(248, 243, 236, .55) 100%); }
.ws-bar { position: absolute; z-index: 5; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--status-h) + 6px) 18px 0; }
.ws-tags { position: absolute; inset: 0; z-index: 2; }

/* 油画分区动起来：花簇绕支点轻摇，雾往一边飘，逆光一明一暗地呼吸 */
.ws-zone { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; pointer-events: none;
  -webkit-mask: radial-gradient(ellipse var(--rx) var(--ry) at var(--cx) var(--cy), #000 55%, transparent 100%); mask: radial-gradient(ellipse var(--rx) var(--ry) at var(--cx) var(--cy), #000 55%, transparent 100%);
  transform-origin: var(--ox) var(--oy); animation: ws-bough var(--t) ease-in-out var(--dl) infinite; will-change: transform; }
@keyframes ws-bough { 0%, 100% { transform: rotate(0) translate(0, 0); } 30% { transform: rotate(.7deg) translate(1px, -1px); } 55% { transform: rotate(-.35deg) translate(-.5px, .5px); } 78% { transform: rotate(.45deg) translate(.5px, 0); } }
.ws-mist { position: absolute; left: -40%; right: -40%; top: 58%; height: 30%; pointer-events: none; opacity: .55;
  background: radial-gradient(ellipse 30% 40% at 25% 50%, rgba(255, 252, 246, .9), transparent 70%), radial-gradient(ellipse 26% 34% at 70% 40%, rgba(250, 246, 240, .8), transparent 70%);
  animation: ws-mist 26s ease-in-out infinite alternate; }
@keyframes ws-mist { from { transform: translateX(-8%); } to { transform: translateX(8%); } }
.ws-glow { position: absolute; left: 30%; top: 50%; width: 46%; height: 26%; pointer-events: none; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 248, 228, .55), transparent 70%); mix-blend-mode: screen; animation: ws-glow 7s ease-in-out infinite; }
@keyframes ws-glow { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: .85; transform: scale(1.08); } }

/* 信笺 */
.ws-hang { --rb: #B9A7BC; --pa: #FDFAF5; --pb: #F5EFE6; --ink-t: #5E5260; --wx: #8C7591;
  position: absolute; z-index: 1; width: 0; height: 0; padding: 0; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
.ws-hang.ai { --rb: #9DAEB3; --wx: #637479; --ink-t: #4A585E; }
.ws-hang.done { --rb: #CDB58C; --pa: #FFF9EC; --pb: #F5EAD3; --wx: #AB9473; --ink-t: #6E5C42; }
.ws-hang .sway { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; width: 54px; margin-left: -27px;
  transform-origin: 50% 0; transform: scale(var(--k)); transform-style: preserve-3d;
  animation: ws-in .9s cubic-bezier(.3, 1.3, .5, 1) var(--d) both, ws-wind var(--sw) ease-in-out calc(var(--d) + .9s + var(--ph)) infinite; }
.ws.again .ws-hang .sway { animation-delay: 0s, calc(.9s + var(--ph)); }
.ws-hang .rb { width: 1.4px; height: var(--len); background: linear-gradient(90deg, rgba(0, 0, 0, .08), var(--rb) 40%, rgba(255, 255, 255, .5)); border-radius: 1px; }
.ws-hang .knot { width: 16px; height: 9px; margin-top: -3px; position: relative; z-index: 2;
  background: radial-gradient(ellipse at 28% 50%, var(--rb) 0 42%, transparent 46%), radial-gradient(ellipse at 72% 50%, var(--rb) 0 42%, transparent 46%), radial-gradient(circle, var(--rb) 0 22%, transparent 26%); }
.lt { position: relative; width: 44px; height: 74px; box-sizing: border-box; margin-top: -2px; padding: 12px 0 12px; display: flex; flex-direction: column; align-items: center;
  background: repeating-linear-gradient(transparent 0 9px, rgba(169, 154, 170, .2) 9px 10px) 0 6px / 100% calc(100% - 14px) no-repeat, linear-gradient(var(--pa), var(--pb));
  box-shadow: 0 4px 8px rgba(60, 45, 55, .28), inset 0 0 0 1px rgba(201, 187, 203, .55); border-radius: 2px 2px 0 0; }
.lt .wax { position: absolute; top: 3px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .4), transparent 55%), var(--wx); box-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.lt b { writing-mode: vertical-rl; font-size: 11px; font-weight: 500; line-height: 1.15; letter-spacing: 1px; color: var(--ink-t); max-height: 52px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 1; }
.lt .gy { position: absolute; right: -8px; bottom: 2px; width: 20px; transform: rotate(18deg); z-index: 2; }
/* 底边蕾丝：一排小扇贝 + 镂空小孔 */
.lt .lace { position: absolute; left: 0; right: 0; bottom: -7px; height: 8px;
  background: radial-gradient(circle at 50% 0, var(--pb) 0 3.6px, transparent 4px) 0 0 / 7.33px 8px repeat-x;
  -webkit-mask: radial-gradient(circle at 50% 2.4px, transparent 0 1.1px, #000 1.4px) 0 0 / 7.33px 8px repeat-x; mask: radial-gradient(circle at 50% 2.4px, transparent 0 1.1px, #000 1.4px) 0 0 / 7.33px 8px repeat-x;
  filter: drop-shadow(0 1px 0 rgba(201, 187, 203, .7)); }
.ws-hang.fresh .lt { box-shadow: 0 0 0 3px rgba(255, 255, 255, .6), 0 4px 10px rgba(60, 45, 55, .3); }
.ws-hang:active .lt { filter: brightness(1.04); }
/* 挂上来：从上面落下来、晃一下停住；随风：左右摆 + 绕竖轴翻一点，中间来一阵大风 */
@keyframes ws-in { from { opacity: 0; transform: scale(var(--k)) translateY(-40px) rotate(8deg); } to { opacity: 1; transform: scale(var(--k)) rotate(0); } }
@keyframes ws-wind {
  0%, 100% { transform: scale(var(--k)) rotate(0) rotateY(0); }
  18% { transform: scale(var(--k)) rotate(3deg) rotateY(14deg); }
  36% { transform: scale(var(--k)) rotate(-2deg) rotateY(-8deg); }
  52% { transform: scale(var(--k)) rotate(6deg) rotateY(26deg); }
  64% { transform: scale(var(--k)) rotate(-4deg) rotateY(-16deg); }
  80% { transform: scale(var(--k)) rotate(1.5deg) rotateY(6deg); }
}
.ws-empty { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 13px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); }

/* 被风吹过的花瓣 */
.ws-petal { position: absolute; z-index: 3; top: 20%; left: -20px; width: 9px; height: 7px; border-radius: 70% 0 70% 0; background: rgba(214, 199, 220, .9); box-shadow: 0 1px 2px rgba(60, 45, 55, .2); opacity: 0; pointer-events: none; animation: ws-blow 11s linear infinite; }
.ws-petal.a { animation-delay: 1.5s; } .ws-petal.b { top: 34%; animation-delay: 5s; background: rgba(250, 244, 230, .95); }
.ws-petal.c { top: 12%; animation-delay: 8s; } .ws-petal.d { top: 44%; animation-delay: 10.5s; background: rgba(250, 244, 230, .95); }
@keyframes ws-blow { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 8% { opacity: 1; } 50% { transform: translate(210px, 120px) rotate(260deg); } 92% { opacity: .9; } 100% { opacity: 0; transform: translate(440px, 300px) rotate(560deg); } }

/* 底下的雾里：标题、数字、筛选、挂一封心愿 */
.ws-bottom { position: absolute; z-index: 4; left: 0; right: 0; bottom: calc(18px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ws-bottom h1 { margin: 0; display: flex; flex-direction: column; align-items: center; font-size: 24px; font-weight: 600; letter-spacing: 8px; padding-left: 8px; color: var(--teal-deep); text-shadow: 0 0 12px rgba(248, 243, 236, .95); }
.ws-bottom h1 i { font-family: var(--font-script); font-style: normal; font-weight: 400; font-size: 24px; letter-spacing: 0; color: var(--mauve-deep); margin-top: -2px; }
.ws-sum { margin: 0; font-size: 12px; letter-spacing: 1px; color: var(--ink); }
.ws-sum em { font-style: normal; font-family: var(--font-serif); font-size: 16px; color: var(--teal); }
.ws-f { display: flex; justify-content: center; gap: 8px; }
.ws-f button { height: 26px; padding: 0 12px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(252, 249, 244, .7); font-size: 11.5px; color: var(--ink-2); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ws-f button[aria-pressed="true"] { background: var(--mauve-btn); border-color: var(--mauve-btn); color: var(--paper); }
.ws-add { margin-top: 2px; height: 44px; padding: 0 28px; border-radius: 22px; border: 0; background: var(--mauve-btn); color: var(--paper); font-size: 14px; letter-spacing: 2px; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-accent); }
.ws-key { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-2); }
.ws-key i { width: 9px; height: 12px; border-radius: 1px; margin-left: 6px; background: #FBF7F0; }
.ws-key i.me { box-shadow: inset 0 3px 0 #8C7591; } .ws-key i.ai { box-shadow: inset 0 3px 0 #637479; } .ws-key i.dn { background: #F5EAD3; box-shadow: inset 0 3px 0 #AB9473; }
.ws-pg { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-size: 12px; color: var(--ink); padding: 4px 6px; border-radius: 16px; background: rgba(252, 249, 244, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ws-pg:empty { display: none; }
.ws-pg button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--mauve-deep); padding: 0; display: flex; align-items: center; justify-content: center; }
.ws-pg button.r .ico { transform: scaleX(-1); }
.ws-pg button:disabled { opacity: .35; }

/* 挂一封心愿 */
.ws-addf h3 { margin: 0 0 12px; text-align: center; font-size: 15px; font-weight: 600; letter-spacing: 2px; }
.ws-addrow { display: flex; gap: 18px; align-items: flex-start; }
.lt.big { --pa: #FDFAF5; --pb: #F5EFE6; --ink-t: #5E5260; --wx: #8C7591; width: 96px; height: 180px; padding: 24px 0 14px; flex: none; margin: 4px 0 10px;
  background: repeating-linear-gradient(transparent 0 15px, rgba(169, 154, 170, .25) 15px 16px) 0 10px / 100% calc(100% - 22px) no-repeat, linear-gradient(var(--pa), var(--pb)); }
.lt.big .wax { top: 6px; width: 14px; height: 14px; margin-left: -7px; }
.lt.big .lace { bottom: -9px; height: 10px; background-size: 9.6px 10px; -webkit-mask-size: 9.6px 10px; mask-size: 9.6px 10px; }
.lt.big textarea { position: relative; z-index: 1; writing-mode: vertical-rl; width: 100%; height: 100%; border: 0; background: none; resize: none; outline: 0; font: inherit; font-size: 15px; line-height: 1.6; letter-spacing: 3px; color: var(--ink-t); padding: 0 16px; box-sizing: border-box; }
.lt.big b { font-size: 16px; max-height: 140px; letter-spacing: 3px; line-height: 1.6; white-space: normal; }
.ws-addrow .opt { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.ws-addrow label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.ws-addrow input { height: 36px; border: 0; border-bottom: 1px solid var(--lace); background: none; font-family: var(--font-serif); font-size: 16px; color: var(--teal); outline: 0; }
.ws-addrow small { font-size: 11px; line-height: 1.7; color: var(--ink-2); }
.ws-addf .dy-save { width: 100%; height: 42px; margin-top: 16px; border-radius: 21px; }

/* 点一封信笺：蕾丝边框弹窗。四边蕾丝（上下用横的 lace-h.png，左右用竖的 lace.png）+ 四只蕾丝角 + 顶上蝴蝶结 */
.ws-mask { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 26px 22px; background: rgba(60, 50, 62, 0); transition: background .25s; }
.ws-mask.on { background: rgba(60, 50, 62, .38); }
.ws-pop { --wx: #8C7591; position: relative; width: 100%; max-width: 340px; max-height: 100%; display: flex; flex-direction: column; box-sizing: border-box; padding: 34px 30px 18px;
  background-color: #FCF9F4; background-image: radial-gradient(rgba(169, 154, 170, .16) .6px, transparent .7px); background-size: 5px 5px;
  box-shadow: inset 0 0 0 4px #FCF9F4, inset 0 0 0 18px rgba(214, 199, 216, .5), 0 0 0 1px #E8DED4, 0 18px 40px rgba(50, 35, 50, .35); border-radius: 4px; opacity: 0; transform: translateY(16px) scale(.94); transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .3, 1.2); }
.ws-mask.on .ws-pop { opacity: 1; transform: none; }
.ws-pop.ai { --wx: #637479; } .ws-pop.done { --wx: #AB9473; }
.ws-pop .lc { position: absolute; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(81, 75, 74, .14)); }
.ws-pop .lc.t, .ws-pop .lc.b { left: 12px; right: 12px; height: 14px; background: url(../assets/lace-h.png) repeat-x; background-size: auto 14px; }
.ws-pop .lc.t { top: 4px; } .ws-pop .lc.b { bottom: 4px; transform: scaleY(-1); }
.ws-pop .lc.l, .ws-pop .lc.r { top: 12px; bottom: 12px; width: 14px; background: url(../assets/lace.png) repeat-y; background-size: 14px auto; }
.ws-pop .lc.l { left: 4px; } .ws-pop .lc.r { right: 4px; transform: scaleX(-1); }
.ws-pop .cn { position: absolute; width: 46px; pointer-events: none; }
.ws-pop .c1 { left: -2px; top: -2px; } .ws-pop .c2 { right: -2px; top: -2px; transform: scaleX(-1); }
.ws-pop .c3 { left: -2px; bottom: -2px; transform: scaleY(-1); } .ws-pop .c4 { right: -2px; bottom: -2px; transform: scale(-1, -1); }
.ws-pop .bw { position: absolute; left: 50%; top: -22px; width: 58px; margin-left: -29px; filter: drop-shadow(0 2px 3px rgba(70, 50, 70, .25)); pointer-events: none; }
.ws-pop .x { position: absolute; right: 20px; top: 20px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--lace); background: var(--card); color: var(--ink-2); padding: 0; display: flex; align-items: center; justify-content: center; }
.ws-pop .in { min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ws-pop .in::-webkit-scrollbar { display: none; }
.ws-pop .hd { margin: 0; display: flex; align-items: center; gap: 8px; }
.ws-pop .hd .wax { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .4), transparent 55%), var(--wx); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.ws-pop .hd em { font-family: var(--font-script); font-style: normal; font-size: 22px; color: var(--mauve-deep); }
.ws-pop h2 { margin: 10px 4px 0; font-size: 19px; font-weight: 600; line-height: 1.6; letter-spacing: 2px; color: var(--ink); }
.ws-pop .who { margin: 10px 0 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; font-size: 12px; color: var(--ink-2); }
.ws-pop .who .dy-av { width: 20px; height: 20px; font-size: 9.5px; }
.ws-pop .due { color: var(--mauve-deep); }
.ws-pop .ok { margin: 12px 0 0; display: flex; align-items: baseline; gap: 8px; }
.ws-pop .ok b { font-size: 14px; letter-spacing: 4px; color: #9A876F; }
.ws-pop .ok span { font-family: var(--font-serif); font-size: 13px; color: var(--ink-2); }
.ws-pop .note { margin: 4px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink); }
.ws-done { margin-top: 14px; height: 40px; padding: 0 22px; border-radius: 20px; border: 0; background: linear-gradient(120deg, #B9A27F, #A08AA3); color: #fff; font-size: 14px; letter-spacing: 2px; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 12px rgba(150, 120, 100, .3); }
.ws-pop .cm { align-self: stretch; text-align: left; margin-top: 8px; }
.ws-pop .cm .dy-cmts { margin: 10px 0 0; }
.ws-pop .dy-input { position: static; margin: 10px 0 0; padding: 0; background: none; }
.ws-burst { position: absolute; left: 50%; top: 40%; }
.ws-burst { position: absolute; left: 66px; top: 70px; }
.ws-burst b { position: absolute; width: 8px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #E6D5B8; transform: rotate(var(--a)) translateY(0); animation: ws-burst 1.1s ease-out forwards; }
.ws-burst b:nth-child(even) { background: #D8CADB; }
@keyframes ws-burst { to { transform: rotate(var(--a)) translateY(-70px) scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ws-hang .sway, .ws-petal, .ws-zone, .ws-mist, .ws-glow { animation: none !important; opacity: 1; } }
