/* Mẫu SEN NỞ (sen-no, thêm 07/10/2026 — đi cặp giao diện "sen"). Bìa: nụ sen khép 7 cánh (3 lớp) đứng trên lá sen, gợn nước
   lan; nhãn "Thân gửi" trên thẻ giấy ở chân. Chạm -> lớp cánh trước tách ra (.05s), lớp giữa (.2s), lớp ngoài (.35s) như sen nở
   thật, nhụy vàng sáng dần và chữ lồng hiện giữa bông (.5s), cả bông nở lớn rồi tan (từ 1,2s) đúng lúc thiệp vòm hiện lên.
   Màu cánh = hồng sen pha accent của giao diện (hợp mọi giao diện). Chỉ transform/opacity. */
.ic--sen-no {
  --ic-out-delay: 1.24s;
  --sno-c1: color-mix(in srgb, var(--accent) 42%, #e48aa6);
  --sno-c2: color-mix(in srgb, var(--sno-c1) 16%, #fff);
  --sno-leaf: #6d9c87; --sno-leaf-2: #9cc2b0;
  --sno-petal: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 125' preserveAspectRatio='none'><path d='M50 0C66 18 92 46 96 78c4 28-16 47-46 47S0 106 4 78C8 46 34 18 50 0z'/></svg>");
}
[data-theme="demsao"] .ic--sen-no { --sno-c1: #d9a7c4; --sno-leaf: #3d6a73; --sno-leaf-2: #5d8a91; }

/* ── Bìa ── */
.ic--sen-no .ic-env-btn { width: min(340px, 84vw, calc((100vh - 150px) * .84)); aspect-ratio: 5 / 6; }
.sno, .sno > span, .sno-bud > span { position: absolute; display: block; }
.sno { inset: 0; }
/* Gợn nước + lá sen */
.sno-ripple { left: 50%; bottom: 13%; width: 92%; aspect-ratio: 3.4; translate: -50% 0; }
.sno-ripple i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--sno-leaf) 55%, transparent); animation: sno-rip 4.8s ease-out infinite; }
.sno-ripple i + i { animation-delay: 2.4s; }
@keyframes sno-rip { from { transform: scale(.45); opacity: 0; } 20% { opacity: .9; } to { transform: scale(1.15); opacity: 0; } }
.sno-pad {
  left: 50%; bottom: 15%; width: 78%; aspect-ratio: 2.9; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 0 4%, rgba(255, 255, 255, .0) 4%),
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, .16) 0 1deg, transparent 1deg 22.5deg),
    radial-gradient(ellipse at 40% 35%, var(--sno-leaf-2), var(--sno-leaf) 70%);
  -webkit-mask: conic-gradient(from -8deg at 50% 50%, transparent 0 16deg, #000 16deg); mask: conic-gradient(from -8deg at 50% 50%, transparent 0 16deg, #000 16deg);
  box-shadow: 0 16px 30px -18px rgba(30, 60, 50, .6);
}
.sno-stem { left: 50%; bottom: 24%; width: 3px; height: 8%; margin-left: -1.5px; border-radius: 2px; background: #4f7d6a; }
.sno-bud { left: 50%; bottom: 28%; width: 54%; height: 58%; translate: -50% 0; transform-origin: 50% 100%;
  transition: transform .5s var(--ic-ease) .9s, opacity .3s ease 1.1s; }
.sno-p {
  left: 50%; bottom: 0; transform-origin: 50% 100%;
  background: linear-gradient(180deg, var(--sno-c1) 0%, color-mix(in srgb, var(--sno-c1) 55%, #fff) 52%, var(--sno-c2) 100%);
  -webkit-mask: var(--sno-petal) center / 100% 100% no-repeat; mask: var(--sno-petal) center / 100% 100% no-repeat;
  transition: transform .7s cubic-bezier(.3, 1.2, .5, 1);
}
/* lớp ngoài (sau cùng, đậm), lớp giữa, lớp trước (sáng) */
.sno-o1, .sno-o2 { width: 52%; height: 64%; margin-left: -26%; filter: brightness(.94); transition-delay: .35s; }
.sno-o1 { transform: rotate(-16deg); } .sno-o2 { transform: rotate(16deg); }
.sno-b1, .sno-b2, .sno-b3 { width: 46%; height: 92%; margin-left: -23%; transition-delay: .2s; }
.sno-b1 { transform: rotate(-9deg); } .sno-b3 { transform: rotate(9deg); } .sno-b2 { height: 100%; }
.sno-f1, .sno-f2 { width: 50%; height: 84%; margin-left: -25%; transition-delay: .05s;
  background: linear-gradient(180deg, var(--sno-c1) 0%, color-mix(in srgb, var(--sno-c1) 38%, #fff) 46%, #fff 100%); }
.sno-f1 { transform: translateX(-14%) rotate(-4deg); } .sno-f2 { transform: translateX(14%) rotate(4deg); }
/* Nhụy + chữ lồng giữa bông (ẩn khi nụ còn khép) */
.sno-glow { left: 50%; bottom: 6%; width: 120%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; opacity: 0; transform: scale(.4);
  background: radial-gradient(circle, rgba(255, 236, 190, .95) 0%, rgba(255, 226, 170, .45) 32%, transparent 62%); transition: opacity .6s ease .45s, transform .9s var(--ic-ease) .45s; }
.sno-heart { left: 50%; bottom: 10%; width: 62px; height: 62px; margin-left: -31px; border-radius: 50%; display: grid; place-items: center; opacity: 0; transform: scale(.5) translateY(14px);
  background: radial-gradient(circle at 50% 40%, #fff6dc, #f3d796 70%, #e7b35a); box-shadow: 0 0 0 3px rgba(255, 255, 255, .7), 0 6px 14px -6px rgba(120, 80, 20, .5);
  transition: opacity .4s ease .5s, transform .6s cubic-bezier(.3, 1.4, .5, 1) .5s; }
.sno-heart > span { display: flex; align-items: center; gap: 1px; font: var(--name-style, normal) 400 1.2rem/1 var(--f-name, Georgia, serif); color: #7a4d1a; }
.sno-heart i { font-style: normal; font-size: .6em; opacity: .8; }
/* Nhãn: thẻ giấy nhỏ trên mặt nước */
.ic--sen-no .ic-env-to { left: 11%; right: 11%; bottom: 2%; justify-items: center; text-align: center; padding: 9px 14px 10px; border-radius: 16px;
  background: color-mix(in srgb, var(--ic-paper) 94%, transparent); box-shadow: 0 0 0 1px var(--ic-line), 0 12px 24px -16px rgba(0, 0, 0, .45); }
/* Bông nở hơi đung đưa khi chờ chạm */
.ic--sen-no:not(.is-opening) .sno-bud { animation: sno-idle 5s ease-in-out infinite alternate; }
@keyframes sno-idle { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }

/* ── Mở: trước .05s -> giữa .2s -> ngoài .35s -> nhụy .45–.6s -> bông nở lớn .9s -> tan 1.2s ── */
.ic--sen-no.is-opening .sno-f1 { transform: translateX(-30%) rotate(-38deg) scaleY(.88); }
.ic--sen-no.is-opening .sno-f2 { transform: translateX(30%) rotate(38deg) scaleY(.88); }
.ic--sen-no.is-opening .sno-b1 { transform: rotate(-56deg); } .ic--sen-no.is-opening .sno-b3 { transform: rotate(56deg); }
.ic--sen-no.is-opening .sno-b2 { transform: scaleY(.94); }
.ic--sen-no.is-opening .sno-o1 { transform: rotate(-82deg) scale(1.06); } .ic--sen-no.is-opening .sno-o2 { transform: rotate(82deg) scale(1.06); }
.ic--sen-no.is-opening .sno-glow { opacity: 1; transform: scale(1); }
.ic--sen-no.is-opening .sno-heart { opacity: 1; transform: none; }
.ic--sen-no.is-opening .sno-bud { transform: scale(1.22); }
.ic--sen-no.is-opening .ic-env { animation-name: sno-env-out; }
@keyframes sno-env-out { to { opacity: 0; transform: scale(1.08) translateY(-10px); } }

/* ── Thiệp mở: thẻ vòm cánh sen, bông sen nở trên đỉnh ── */
.ic--sen-no .ic-card { margin-top: 62px; padding: 92px 34px 34px; border-radius: 50% 50% 22px 22px / 120px 120px 22px 22px; }
.ic--sen-no .ic-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--ic-line); border-radius: 50% 50% 14px 14px / 112px 112px 14px 14px; pointer-events: none; }
.ic--sen-no.is-open .ic-card { animation: sno-card-in .8s var(--ic-ease) both; }
@keyframes sno-card-in { from { opacity: .15; transform: translateY(26px) scale(.93); } 25% { opacity: 1; } to { opacity: 1; transform: none; } }
.ic--sen-no .ic-card > .sno-top { inset: auto; left: 50%; top: -56px; width: 190px; height: 104px; margin-left: -95px; }
.sno-top svg { width: 100%; height: 100%; overflow: visible; }
.sno-tp path { fill: var(--sno-c1); stroke: #fff; stroke-width: 1.2; transform-origin: 100px 104px; }
.sno-tp path:nth-child(3), .sno-tp path:nth-child(4) { fill: color-mix(in srgb, var(--sno-c1) 60%, #fff); }
.sno-tp .sno-tc { fill: color-mix(in srgb, var(--sno-c1) 30%, #fff); }
.ic--sen-no.is-open:not(.is-instant) .sno-tp path { animation: sno-tp-in .9s cubic-bezier(.3, 1.3, .5, 1) both .15s; }
.ic--sen-no.is-open:not(.is-instant) .sno-tp path:nth-child(n + 3) { animation-delay: .28s; }
.ic--sen-no.is-open:not(.is-instant) .sno-tp .sno-tc { animation-delay: .4s; }
@keyframes sno-tp-in { from { transform: scale(.3) rotate(0deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ic--sen-no .ic-mono { display: none; }
.ic--sen-no .ic-rule span { color: var(--sno-c1); }
.ic--sen-no .sno-end { position: relative; height: 34px; margin: 18px auto -6px; width: 200px; }
.sno-end i { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid var(--ic-line); translate: -50% -50%; }
.sno-end i:nth-child(1) { width: 60px; height: 14px; } .sno-end i:nth-child(2) { width: 120px; height: 26px; opacity: .7; } .sno-end i:nth-child(3) { width: 190px; height: 38px; opacity: .4; }
@media (max-width: 420px) { .ic--sen-no .ic-card { padding: 86px 22px 28px; border-radius: 50% 50% 18px 18px / 96px 96px 18px 18px; }
  .ic--sen-no .ic-card::before { border-radius: 50% 50% 12px 12px / 88px 88px 12px 12px; } }
@media (max-height: 500px) { .ic--sen-no .ic-env-to { bottom: 0; padding: 5px 10px; } .sno-heart { width: 46px; height: 46px; margin-left: -23px; } }

/* 07/10 (QA-NT-03): nhãn bìa nằm trên thẻ giấy --ic-paper -> chữ theo --ink/--muted (cùng độ sáng tối với giấy). */
.ic--sen-no .ic-env-to small { color: color-mix(in srgb, var(--muted) 60%, var(--ink)); } .ic--sen-no .ic-env-to b { color: var(--ink); }

/* QA2 rà soát (25/10): luật "> span { display:block }" thắng display:grid của .sno-heart -> đặt lại với độ ưu tiên cao hơn. */
.ic .sno-heart { display: grid; }
