/* charm v2 — collector's binder. Holo card hero, toploader sleeves, polaroid wall, sparkles. */
@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
[data-theme='charm'] { --lav: #E7DDFB; --mint: #CFF4E6; --sun: #FFE9A8; --holo: linear-gradient(125deg, #FFD3E6 0%, #E7DDFB 28%, #C8F1FF 52%, #FFF3B5 74%, #FFD3E6 100%); }
[data-theme='charm'] body, body[data-theme='charm'] {
  background: radial-gradient(circle, #F6D2DF 1.2px, transparent 1.6px) 0 0 / 22px 22px, var(--bg); }

.ch-page { position: relative; }
.ch-page .demo-tag { top: 10px; }

/* ---------- hero ---------- */
.ch-hero { position: relative; padding: 44px 16px 8px; text-align: center; overflow: hidden; }
.ch-hero::before { content: ''; position: absolute; inset: -20% -30% auto; height: 520px; background: radial-gradient(closest-side, #FFD9E8, transparent), radial-gradient(closest-side at 80% 40%, #E3D8FF, transparent); opacity: .8; z-index: -1; }
.ch-sky { position: absolute; inset: 0; pointer-events: none; }
.ch-star { position: absolute; width: 18px; height: 18px; background: var(--accent); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation: ch-twinkle 2.6s ease-in-out infinite; }
.ch-star.s2 { width: 12px; height: 12px; background: #9B7BEA; animation-delay: -1s; }
.ch-star.s3 { width: 22px; height: 22px; background: #F7C948; animation-delay: -1.8s; }
@keyframes ch-twinkle { 50% { transform: scale(.55) rotate(40deg); opacity: .5; } }

.ch-card-wrap { perspective: 1000px; display: flex; justify-content: center; margin-bottom: 26px; }
.ch-card { --rx: 0deg; --ry: 0deg; position: relative; width: min(300px, 78vw); aspect-ratio: 5 / 7; padding: 10px; border-radius: 20px; background: var(--holo);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .25s var(--ease);
  box-shadow: 0 30px 60px -24px rgba(214, 51, 108, .55), 0 0 0 1px rgba(255, 255, 255, .8) inset; }
.ch-card.live { transition: transform .06s linear; }
.ch-card-in { position: relative; height: 100%; display: flex; flex-direction: column; border-radius: 13px; overflow: hidden; background: #fff; }
.ch-card-in img, .ch-card-empty { flex: 1; min-height: 0; width: 100%; object-fit: cover; background: var(--lav); }
.ch-card-foot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; }
.ch-card-foot .k-logo { width: 40px; height: 40px; font-size: 16px; border: 2px solid var(--lav); }
.ch-card-foot b { flex: 1; min-width: 0; font: 500 15px/1.3 var(--f-display); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ch-rare { font-style: normal; color: #F7B500; font-size: 12px; letter-spacing: 1px; }
.holo, .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.holo { background: repeating-linear-gradient(115deg, transparent 0%, rgba(255, 80, 190, .22) 7%, rgba(80, 220, 255, .22) 14%, rgba(255, 235, 90, .2) 21%, transparent 28%);
  background-size: 300% 300%; background-position: var(--mx) var(--my); mix-blend-mode: color-dodge; opacity: .7; }
.glare { background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .75), transparent 42%); mix-blend-mode: overlay; }
.fx2 .ch-card:not(.live) { animation: ch-float 6s ease-in-out infinite, ch-sheen 5s ease-in-out infinite; }
@keyframes ch-float { 50% { transform: translateY(-8px) rotateX(4deg) rotateY(-6deg); } }
@keyframes ch-sheen { 0%, 100% { --mx: 15%; --my: 20%; } 50% { --mx: 85%; --my: 75%; } }

.ch-name { font: 500 clamp(32px, 9vw, 44px)/1.15 var(--f-display); text-shadow: 3px 3px 0 #fff, -2px -2px 0 #fff; }
.ch-tag { color: var(--muted); margin-top: 6px; }
.ch-id .k-status { justify-content: center; margin: 16px auto 0; padding: 8px 16px; border-radius: 999px; background: #fff; width: fit-content; max-width: 100%; box-shadow: 0 4px 14px -8px rgba(59, 34, 56, .3); }
.ch-notice { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 12px; background: var(--sun); font-weight: 600; font-size: 14px; transform: rotate(-1.5deg); }
.ch-contacts { justify-content: center; margin-top: 20px; }
.ch-contacts .btn { border-radius: 999px; }
.ch-contacts .btn-primary { box-shadow: 0 10px 24px -10px var(--accent); background: linear-gradient(180deg, #E8508A, var(--accent)); }
.ch-trust { margin-top: 26px; gap: 10px; }
.ch-trust div { align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 50%; background: #fff; border: 2px dashed #F3C3D5; padding: 8px; }
.ch-trust div:nth-child(1) { transform: rotate(-6deg); } .ch-trust div:nth-child(2) { transform: rotate(4deg); background: var(--lav); border-color: #C9B8F5; } .ch-trust div:nth-child(3) { transform: rotate(-3deg); background: var(--mint); border-color: #9FDDC6; }
.ch-trust dd { font-size: clamp(18px, 5.4vw, 26px); color: var(--at); } .ch-trust dt { font-size: 11px; text-align: center; } .ch-trust dd.sm { font-size: clamp(15px, 3.8vw, 18px); white-space: nowrap; }

/* ---------- jump nav ---------- */
[data-theme='charm'] .k-jump { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin-top: 24px; }
[data-theme='charm'] .k-jump a { background: #fff; color: var(--text); border: 1.5px solid var(--line); }
[data-theme='charm'] .k-jump a:hover { border-color: var(--accent); color: var(--at); }

/* ---------- sections ---------- */
.ch-sec { padding: 44px 16px 0; scroll-margin-top: 56px; }
.ch-h { text-align: center; margin-bottom: 20px; }
.ch-h span { position: relative; display: inline-block; padding: 6px 22px; border-radius: 999px; background: var(--lav); font: 500 22px/1.4 var(--f-display); transform: rotate(-1.5deg); }
.ch-h span::before, .ch-h span::after { content: ''; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--accent);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ch-h span::before { left: -22px; } .ch-h span::after { right: -22px; background: #F7C948; }
[data-theme='charm'] .k-chips { justify-content: flex-start; }
[data-theme='charm'] .k-chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* binder page with ring holes */
.ch-binder > .ch-sleeves { position: relative; padding: 22px 14px 22px 34px; border-radius: 24px; background: #fff;
  background-image: radial-gradient(circle at 14px 30px, var(--bg) 6px, #F0D6E0 7px, transparent 8.5px); background-size: 28px 70px; background-repeat: repeat-y;
  box-shadow: 0 20px 50px -30px rgba(59, 34, 56, .45); }
.ch-sleeves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
.ch-sleeve { position: relative; display: flex; flex-direction: column; perspective: 700px; }
.ch-toploader { --rx: 0deg; --ry: 0deg; position: relative; padding: 7px; border-radius: 12px; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s var(--ease);
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(231, 221, 251, .7)); border: 1.5px solid #F0D1DE; box-shadow: 0 1px 0 #fff inset, 0 12px 24px -16px rgba(59, 34, 56, .5); }
.ch-toploader.live { transition: transform .06s linear; }
.ch-toploader::before { content: ''; position: absolute; z-index: 2; top: 3px; left: 50%; width: 34%; height: 4px; margin-left: -17%; border-radius: 2px; background: rgba(214, 51, 108, .25); }
.ch-toploader .holo { opacity: .45; border-radius: 12px; }
.ch-pic { aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--lav); }
.ch-pic img { width: 100%; height: 100%; object-fit: cover; }
.ch-sleeve .k-badge { top: -8px; left: -8px; transform: rotate(-10deg); border: 2.5px solid #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.fx2 .ch-sleeve .k-badge { transform: rotate(-10deg) scale(0); transition: transform .5s var(--spring) .35s; }
.fx2 .ch-sleeve.in .k-badge { transform: rotate(-10deg) scale(1); }
.ch-info { padding: 10px 2px 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ch-info h3 { font-size: 15px; line-height: 1.45; }
.ch-price b { color: var(--at); font: 500 18px/1.4 var(--f-display); }
.ch-info .k-add { margin-top: auto; border-radius: 999px; width: 100%; }
.ch-info .k-muted { font-size: 12px; }
.ch-sleeve.is-sold .ch-pic img { filter: grayscale(.85); opacity: .6; }
.ch-sleeve.is-sold .ch-price b { color: var(--muted); text-decoration: line-through; }

/* queue */
.ch-queue { display: grid; gap: 10px; }
.ch-queue li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: 0 8px 20px -16px rgba(59, 34, 56, .6); }
.ch-qn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lav); font: 500 15px/1 var(--f-display); flex: none; }
.ch-qwho { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; } .ch-qwho small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-qs { flex: none; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--lav); }
.ch-queue .is-making .ch-qs { background: linear-gradient(90deg, #FFD3E6, #FFF0F6, #FFD3E6); background-size: 200% 100%; color: var(--at); animation: ch-shimmer 1.6s linear infinite; }
.ch-queue .is-shipped .ch-qs { background: var(--mint); color: #13684A; }
@keyframes ch-shimmer { to { background-position: -200% 0; } }

/* polaroid wall */
.ch-wall { columns: 2; column-gap: 14px; }
.ch-pola { --r: 0deg; position: relative; break-inside: avoid; margin: 0 0 18px; padding: 10px 10px 14px; background: #fff; transform: rotate(var(--r));
  box-shadow: 0 2px 3px rgba(59, 34, 56, .08), 0 14px 26px -16px rgba(59, 34, 56, .5); transition: transform .35s var(--spring); }
.ch-pola::before { content: ''; position: absolute; top: -9px; left: 50%; width: 64px; height: 18px; margin-left: -32px; transform: rotate(-3deg); background: rgba(231, 221, 251, .85); }
.ch-pola:nth-child(3n+2)::before { background: rgba(255, 211, 230, .9); } .ch-pola:nth-child(3n)::before { background: rgba(207, 244, 230, .9); }
.ch-pola:hover { transform: rotate(0) translateY(-4px) scale(1.02); z-index: 2; }
.ch-pola-pic { display: block; width: 100%; padding: 0; border: 0; background: var(--lav); margin-bottom: 10px; aspect-ratio: 4 / 3; overflow: hidden; }
.ch-pola-pic img { width: 100%; height: 100%; object-fit: cover; }
.ch-pola-body { font-size: 14px; line-height: 1.6; }
.ch-pola-who { margin-top: 8px; font-size: 13px; color: var(--at); }
.ch-pola-ok { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; font-size: 11px; color: var(--muted); }
.ch-pola-ok .i { color: var(--accent); }
.fx2 .ch-pola[data-drop] { opacity: 0; transform: translateY(-90px) rotate(calc(var(--r) * 5)) scale(1.08); transition: opacity .35s, transform .9s var(--spring); transition-delay: calc(var(--i) * 120ms); }
.fx2 .ch-pola[data-drop].in { opacity: 1; transform: rotate(var(--r)); }
.ch-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.ch-row .btn { border-radius: 999px; }

/* album strip */
.ch-strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 16px 18px; margin: 0 -16px; scrollbar-width: none; }
.ch-strip::-webkit-scrollbar { display: none; }
.ch-strip li { --r: 0deg; flex: none; width: 168px; scroll-snap-align: center; padding: 8px 8px 10px; background: #fff; transform: rotate(var(--r)); box-shadow: 0 12px 24px -16px rgba(59, 34, 56, .55); text-align: center; }
.ch-strip button { display: block; width: 100%; padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: var(--lav); }
.ch-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ch-strip li:hover img { transform: scale(1.08); }
.ch-strip span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* faq + ticket + steps */
.ch-info-grid { display: grid; gap: 28px; }
.ch-faq details { border-radius: 16px; border-color: #F3D9E2; }
.ch-side-cards { display: grid; gap: 18px; }
.ch-ticket { position: relative; padding: 20px 20px 22px; border-radius: 18px; background: #fff;
  -webkit-mask: radial-gradient(circle 12px at 0 56px, transparent 98%, #000) , radial-gradient(circle 12px at 100% 56px, transparent 98%, #000); -webkit-mask-composite: source-in; mask-composite: intersect;
  mask: radial-gradient(circle 12px at 0 56px, transparent 98%, #000), radial-gradient(circle 12px at 100% 56px, transparent 98%, #000); }
.ch-ticket h3 { display: flex; align-items: center; gap: 8px; font: 500 18px/1.3 var(--f-display); padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px dashed var(--line); }
.ch-ticket .btn { border-radius: 999px; }
.ch-ticket input { border-radius: 999px; }
.ch-steps { padding: 20px; border-radius: 18px; background: var(--lav); }
.ch-steps h3 { font: 500 18px/1.3 var(--f-display); margin-bottom: 12px; }
.ch-steps ol { display: grid; gap: 10px; }
.ch-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.ch-steps li span { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--at); font: 500 14px/1 var(--f-display); transform: rotate(-8deg); }

/* intro + sparkles (fx2) */
.ch-intro { background: var(--bg); animation: ch-intro-out 1.25s var(--ease) forwards; }
.ch-intro span { display: grid; place-items: center; width: 140px; height: 140px; border-radius: 50%; background: var(--holo); animation: ch-intro-pop 1.25s var(--spring) forwards; }
.ch-intro .k-logo { width: 96px; height: 96px; font-size: 40px; background: #fff; }
@keyframes ch-intro-pop { 0% { transform: scale(0) rotate(-120deg); } 45% { transform: scale(1) rotate(0); } 80% { transform: scale(1.05); } 100% { transform: scale(6); opacity: 0; } }
@keyframes ch-intro-out { 0%, 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.ch-spark { position: fixed; z-index: 44; width: 12px; height: 12px; pointer-events: none; background: var(--c, var(--accent));
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

/* ---------- tablet ---------- */
@media (min-width: 700px) {
  .ch-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; text-align: left; max-width: 900px; margin: 0 auto; padding: 56px 32px 8px; }
  .ch-card-wrap { margin: 0; } .ch-card { width: 280px; }
  .ch-id .k-status { margin-left: 0; } .ch-contacts { justify-content: flex-start; }
  .ch-sec, [data-theme='charm'] .k-jump { max-width: 900px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }
  .ch-sleeves { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ch-wall { columns: 3; }
  .ch-info-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .ch-strip { margin: 0; padding-left: 0; padding-right: 0; }
}
/* ---------- desktop: cover page left, binder right ---------- */
@media (min-width: 1100px) {
  .ch-page { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 40px; max-width: 1320px; margin: 0 auto; padding: 0 32px; align-items: start; }
  .ch-hero { position: sticky; top: 24px; display: block; text-align: center; margin: 24px 0 0; padding: 40px 28px 32px; border-radius: 32px; background: rgba(255, 255, 255, .7); backdrop-filter: blur(8px); box-shadow: 0 30px 70px -40px rgba(59, 34, 56, .5); }
  .ch-card-wrap { margin-bottom: 24px; } .ch-card { width: 260px; }
  .ch-id .k-status { margin-left: auto; } .ch-contacts { justify-content: center; }
  .ch-main { padding-top: 12px; }
  .ch-sec, [data-theme='charm'] .k-jump { max-width: none; padding-left: 0; padding-right: 0; }
  .ch-sleeves { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
