/* Mẫu 8 — REN CẮT LASER (lasercut). Bìa: 5 lớp giấy thật sự cách nhau theo chiều sâu (translateZ) — nền ánh xà cừ màu
   nhấn, thiệp trong (tên cô dâu chú rể + ngày), lớp REN cắt laser (mask họa tiết lỗ), huy hiệu giấy chữ lồng, thẻ tên
   có hạt ngọc; nghiêng máy là thấy các lớp lệch nhau (thị sai). Chạm -> ren, huy hiệu, thẻ tên nhấc lên bay đi như gỡ
   lớp vải ren, thiệp trong tiến lên. Thiệp mở: nền màu + khung ren + vương miện ren + tờ giấy nổi, các lớp trượt
   ngược chiều nhau theo độ nghiêng. */
.ic--lasercut {
  --ic-out-delay: .69s;
  --lc-lace: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><path fill-rule='evenodd' d='M0 0H32V32H0Z M16 10.5a5.5 5.5 0 1 1 0 11a5.5 5.5 0 1 1 0-11Z M0 5.5a5.5 5.5 0 0 0 5.5-5.5H0Z M26.5 0a5.5 5.5 0 0 0 5.5 5.5V0Z M0 26.5V32h5.5a5.5 5.5 0 0 0-5.5-5.5Z M32 26.5a5.5 5.5 0 0 0-5.5 5.5H32Z M16 0l2.6 3.2L16 6.4l-2.6-3.2Z M16 25.6l2.6 3.2L16 32l-2.6-3.2Z M0 13.4l3.2 2.6L0 18.6Z M32 13.4v5.2L28.8 16Z M8 6.6a1.4 1.4 0 1 1 0 2.8a1.4 1.4 0 1 1 0-2.8Z M24 6.6a1.4 1.4 0 1 1 0 2.8a1.4 1.4 0 1 1 0-2.8Z M8 22.6a1.4 1.4 0 1 1 0 2.8a1.4 1.4 0 1 1 0-2.8Z M24 22.6a1.4 1.4 0 1 1 0 2.8a1.4 1.4 0 1 1 0-2.8Z'/></svg>");
  --lc-crown: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'><path fill-rule='evenodd' d='M0 100A100 100 0 0 1 200 100Z M100 44a9 9 0 1 1 0 18a9 9 0 1 1 0-18Z M84 76a6 6 0 1 1 0 .1Z M116 76a6 6 0 1 1 0 .1Z M30 92a6 6 0 1 1 0 .1Z M170 92a6 6 0 1 1 0 .1Z M42 62a7 7 0 1 1 0 .1Z M158 62a7 7 0 1 1 0 .1Z M64 38a8 8 0 1 1 0 .1Z M136 38a8 8 0 1 1 0 .1Z M100 10l7 9-7 9-7-9Z M20 98l4-14 6 14Z M180 98l-4-14-6 14Z'/></svg>");
  --lc-pearl: color-mix(in srgb, var(--ic-paper) 92%, var(--accent));
  --lc-shimmer: linear-gradient(150deg, color-mix(in srgb, var(--accent) 70%, #fff) 0%, var(--accent) 38%, color-mix(in srgb, var(--accent) 70%, #000) 70%, color-mix(in srgb, var(--accent) 80%, #fff) 100%);
}
[data-theme="demsao"] .ic--lasercut { --lc-pearl: #f3e2b0; --lc-shimmer: linear-gradient(150deg, #2c3a78, #16214a 50%, #0b1330); }
[data-theme="tapchi"] .ic--lasercut { --lc-shimmer: linear-gradient(150deg, #3a3936, #161514 55%, #2c2b28); }

/* ── Bìa ── */
.ic--lasercut .ic-env-btn { width: min(320px, 76vw, calc((100vh - 150px) / 1.4)); aspect-ratio: 5 / 7; animation: ic-float 6s ease-in-out infinite; }
.ic--lasercut.is-opening .ic-env-btn { animation: none; }
.lc, .lc > span, .lc-insert > span { display: block; }
.lc, .lc > span { position: absolute; }
.lc { inset: 0; transform-style: preserve-3d; }
.lc-back { inset: 0; border-radius: 6px; background: var(--ic-grain), var(--lc-shimmer); box-shadow: 0 46px 70px -30px rgba(0, 0, 0, .55), 0 10px 22px -10px rgba(0, 0, 0, .3); }
.lc .lc-insert {
  inset: 7% 8%; transform: translateZ(5px); border-radius: 3px; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 0 10%;
  text-align: center; background: var(--ic-grain), var(--ic-card-bg); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35);
  transition: transform .8s var(--ic-ease) .3s;
}
.lc .lc-insert { opacity: 0; }
.ic--lasercut.is-opening .lc-insert { opacity: 1; transition: transform .8s var(--ic-ease) .3s, opacity .35s .12s; }
.lc-insert-greet { font: 600 .72rem/1.3 var(--f-ui, system-ui, sans-serif); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.lc-insert-names { font: var(--name-style, normal) 400 1.7rem/1.2 var(--f-name, Georgia, serif); color: var(--accent); text-wrap: balance; }
.lc-insert-names i { font-style: normal; font-size: .65em; color: var(--muted); margin: 0 6px; }
.lc-insert-date { font: 500 1rem/1 var(--f-head, Georgia, serif); letter-spacing: .16em; color: var(--ink); }
.lc-lace {
  inset: 3%; transform: translateZ(14px); border-radius: 4px; background: linear-gradient(160deg, var(--lc-pearl), color-mix(in srgb, var(--lc-pearl) 88%, #8a7a6a));
  -webkit-mask: var(--lc-lace) 0 0 / 30px 30px; mask: var(--lc-lace) 0 0 / 30px 30px;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); transition: transform .7s var(--ic-ease) .05s, opacity .5s .2s;
}
.lc-medal {
  left: 50%; top: 13%; width: 132px; height: 160px; margin-left: -66px; border-radius: 50%; transform: translateZ(22px);
  display: grid !important; place-items: center; background: var(--ic-grain), var(--lc-pearl);
  box-shadow: inset 0 0 0 5px var(--lc-pearl), inset 0 0 0 6px var(--ic-line), 0 0 0 4px color-mix(in srgb, var(--lc-pearl) 70%, transparent), 0 10px 16px -6px rgba(0, 0, 0, .4);
  transition: transform .7s var(--ic-ease) .12s, opacity .5s .26s;
}
.lc-medal b { font: var(--name-style, normal) 400 2.4rem/1.15 var(--f-name, Georgia, serif); color: var(--accent); font-weight: 400; }
.lc-medal i { font-style: normal; font-size: .5em; color: var(--muted); margin: 0 2px; }
.lc-tag {
  left: 11%; right: 11%; bottom: 7%; height: 27%; transform: translateZ(26px); border-radius: 3px;
  background: var(--ic-grain), var(--lc-pearl); box-shadow: inset 0 0 0 5px var(--lc-pearl), inset 0 0 0 6px var(--ic-line), 0 12px 18px -8px rgba(0, 0, 0, .45);
  transition: transform .7s var(--ic-ease) .18s, opacity .5s .3s;
}
.lc-tag .lc-pearl { position: absolute; left: 50%; top: -9px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 2px, #f4efe6 4px, #d8cfc0 8px, #b9ae9d 10px); box-shadow: 0 3px 4px rgba(0, 0, 0, .35); }
.ic--lasercut .ic-env-to { left: 13%; right: 13%; bottom: 9%; top: auto; height: 23%; align-content: center; justify-items: center; text-align: center; transform: translateZ(28px); --ic-to-small: var(--muted); --ic-to-name: var(--ink); }
[data-theme="demsao"] .ic--lasercut .ic-env-to { --ic-to-name: #2a2235; --ic-to-small: #5b5470; }
[data-theme="demsao"] .ic--lasercut .lc-medal b { color: #8a6a2c; }
/* M1-CARDS-02: xoay ngang -> bìa rộng hơn (chừa ít chỗ cho dòng gợi ý), thẻ tên cao hơn, ngọc nhỏ + nằm trên mép, chữ bắt đầu dưới ngọc. */
@media (max-height: 500px) {
  .ic--lasercut .ic-env-btn { width: min(320px, 76vw, calc((100vh - 104px) / 1.4)); animation: none; }
  .lc-tag { height: 34%; bottom: 5%; }
  .lc-tag .lc-pearl { width: 12px; height: 12px; margin-left: -6px; top: -6px; }
  .ic--lasercut .ic-env-to { height: auto; top: auto; bottom: 5%; min-height: 34%; padding-top: 8px; box-sizing: border-box; }
}
.ic--lasercut.is-opening .lc-lace { transform: translateZ(180px) translateY(-26%) rotateX(24deg); opacity: 0; }
.ic--lasercut.is-opening .lc-medal { transform: translateZ(240px) translateY(-40%); opacity: 0; }
.ic--lasercut.is-opening .lc-tag { transform: translateZ(220px) translateY(30%) rotateX(-20deg); opacity: 0; }
.ic--lasercut.is-opening .lc-insert { transform: translateZ(40px) scale(1.03); }
.ic--lasercut.is-opening .ic-env { animation-name: lc-env-out; }
@keyframes lc-env-out { to { opacity: 0; transform: scale(1.1); } }

/* ── Thiệp mở: nền màu + khung ren + tờ giấy nổi ── */
.ic--lasercut .ic-card { width: min(490px, 100%); padding: 96px 64px 64px; background: none; box-shadow: none; border-radius: 8px; }
.ic--lasercut.is-open .ic-card { animation: lc-card-in .85s var(--ic-ease) both; }
@keyframes lc-card-in { from { opacity: 0; transform: translateZ(-120px); } 35% { opacity: 1; } to { opacity: 1; transform: none; } }
.ic--lasercut .lc-deco > span { position: absolute; display: block; }
.lc-deco .lc-bg {
  inset: 0; border-radius: 8px; background: var(--ic-grain), var(--lc-shimmer);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .55), 0 10px 22px -12px rgba(0, 0, 0, .25);
}
.lc-deco .lc-frame {
  inset: 10px; border-radius: 5px; background: linear-gradient(160deg, var(--lc-pearl), color-mix(in srgb, var(--lc-pearl) 90%, #8a7a6a));
  -webkit-mask: var(--lc-lace) 0 0 / 34px 34px; mask: var(--lc-lace) 0 0 / 34px 34px;
  transform: translate(calc(var(--tx) * 3px), calc(var(--ty) * 3px));
}
.lc-deco .lc-panel {
  inset: 38px; border-radius: 3px; background: var(--ic-grain), var(--ic-card-bg);
  box-shadow: inset 0 0 0 6px var(--ic-card-bg), inset 0 0 0 7px var(--ic-line), 0 6px 14px -4px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .05);
  transform: translate(calc(var(--tx) * -2px), calc(var(--ty) * -2px));
}
.lc-deco .lc-crown {
  top: 26px; left: 50%; width: 180px; height: 90px; margin-left: -90px; background: var(--lc-shimmer);
  -webkit-mask: var(--lc-crown) center / contain no-repeat; mask: var(--lc-crown) center / contain no-repeat;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .28)); transform: translate(calc(var(--tx) * -4px), calc(var(--ty) * -4px));
}
.ic--lasercut.is-open .lc-frame { animation: lc-layer .9s var(--ic-ease) .05s both; }
.ic--lasercut.is-open .lc-panel { animation: lc-layer .9s var(--ic-ease) .15s both; }
.ic--lasercut.is-open .lc-crown { animation: lc-layer .9s var(--ic-ease) .3s both; }
@keyframes lc-layer { from { opacity: 0; transform: translateY(-18px) scale(1.04); } }
.ic--lasercut .ic-mono { margin-top: 0; width: 62px; height: 62px; background: var(--ic-card-bg); }
[data-theme="demsao"] .ic--lasercut .lc-deco .lc-panel { box-shadow: inset 0 0 0 6px transparent, inset 0 0 0 7px var(--ic-line), 0 6px 14px -4px rgba(0, 0, 0, .5); }
@media (max-width: 420px) {
  .ic--lasercut .ic-card { padding: 86px 34px 44px; }
  .lc-deco .lc-frame { inset: 6px; }
  .lc-deco .lc-panel { inset: 22px; }
  .lc-deco .lc-crown { width: 150px; height: 75px; margin-left: -75px; top: 24px; }
}
