/* ==================================================================
   sendaprize, the experience layer
   Gift box · box opening · surprise reveal · create wizard · admin
   ================================================================== */

/* ---------- 3D gift box ---------- */
.gift-stage { position: relative; width: 320px; height: 320px; perspective: 900px; }
.gift { position: absolute; inset: 0; transform-style: preserve-3d; }
.gift .shade {
  position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%);
  width: 240px; height: 36px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 45, 120, 0.5), transparent 70%);
  filter: blur(10px);
}

/* box body, a properly measured cube */
.gift .cube { position: absolute; left: 50%; bottom: 16px; width: 220px; height: 180px; transform: translateX(-50%); transform-style: preserve-3d; }
.cube .face {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(150deg, #ff5f8f, #ff2d78 60%, #d31a63);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.22);
}
.cube .face.f-front { transform: translateZ(60px); }
.cube .face.f-back { transform: translateZ(-60px) rotateY(180deg); background: #c2185b; }
.cube .face.f-left { transform: rotateY(-90deg) translateZ(110px); background: #e12168; }
.cube .face.f-right { transform: rotateY(90deg) translateZ(110px); background: #d31a63; }
.cube .face.f-top { transform: rotateX(90deg) translateZ(90px); background: #ff7aa8; }
.cube .face.f-bottom { transform: rotateX(-90deg) translateZ(90px); background: #c2185b; }

/* ribbons, wrapped on the front face, slightly proud of the surface */
.ribbon { position: absolute; background: linear-gradient(180deg, #ffe4ef, #ff9ec2); box-shadow: 0 0 16px rgba(255, 158, 194, 0.55); }
.ribbon.r-h { top: 0; bottom: 0; left: 50%; width: 34px; margin-left: -17px; transform: translateZ(61px); }
.ribbon.r-v { left: 0; right: 0; top: 50%; height: 34px; margin-top: -17px; transform: translateZ(61px); }

/* lid, a slab that lifts off the box */
.gift .lid { position: absolute; left: 50%; bottom: 196px; width: 232px; height: 60px; transform: translateX(-50%); transform-style: preserve-3d; transition: transform 0.85s var(--ease); }
.lid .face { position: absolute; inset: 0; border-radius: 6px; }
.lid .face.l-front { transform: translateZ(64px); background: linear-gradient(150deg, #ff9ec2, #f22470); box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.18); }
.lid .face.l-back { transform: translateZ(-64px) rotateY(180deg); background: #d31a63; }
.lid .face.l-left { transform: rotateY(-90deg) translateZ(116px); background: #ff6f9f; }
.lid .face.l-right { transform: rotateY(90deg) translateZ(116px); background: #e12168; }
.lid .face.l-top { transform: rotateX(90deg) translateZ(30px); background: linear-gradient(150deg, #ffb6d2, #ff7aa8); }
.lid .face.l-bottom { transform: rotateX(-90deg) translateZ(30px); background: #d31a63; }

/* bow on top of the lid */
.bow { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); width: 0; height: 0; }
.bow::before, .bow::after {
  content: ""; position: absolute; width: 34px; height: 46px;
  background: linear-gradient(140deg, #ffd3e4, #ff7aa8);
  border-radius: 80% 20% 80% 20%;
}
.bow::before { transform: rotate(-38deg) skewX(8deg); left: -34px; top: 4px; box-shadow: 0 4px 14px rgba(255, 45, 120, 0.4); }
.bow::after { transform: rotate(38deg) skewX(-8deg); right: -34px; top: 4px; box-shadow: 0 4px 14px rgba(255, 45, 120, 0.4); }
.bow .knot { position: absolute; left: -11px; top: 20px; width: 22px; height: 22px; background: var(--pink); border-radius: 50%; box-shadow: 0 0 18px var(--pink); }

/* the light bursting out when opened */
.gift .burst { position: absolute; left: 50%; bottom: 210px; transform: translate(-50%, 30px) translateZ(70px); opacity: 0; transition: 0.5s var(--ease); pointer-events: none; }
.gift .burst i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--pink-3); filter: blur(1px); }

/* light beam + glow that grow out of the open box */
.gift .beam { position: absolute; left: 50%; bottom: 196px; width: 30px; height: 0; transform: translateX(-50%); background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--pink-soft)); border-radius: 999px; filter: blur(7px); opacity: 0; pointer-events: none; }
.gift.opening::after {
  content: ""; position: absolute; left: 50%; bottom: 200px; width: 70px; height: 70px; transform: translate(-50%, 50%) translateZ(150px) scale(0.4);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), var(--pink-2) 45%, transparent 72%);
  border-radius: 50%; opacity: 0; pointer-events: none;
}

/* sparkles around the box */
.sparkles { position: absolute; inset: -40px; pointer-events: none; }
.sparkles i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--pink-3); opacity: 0.8; animation: twinkle 1.8s ease-in-out infinite; }
.sparkles i:nth-child(1) { top: 8%; left: 12%; animation-delay: 0s; }
.sparkles i:nth-child(2) { top: 20%; right: 8%; animation-delay: 0.4s; }
.sparkles i:nth-child(3) { bottom: 30%; left: 4%; animation-delay: 0.9s; }
.sparkles i:nth-child(4) { bottom: 6%; right: 20%; animation-delay: 0.2s; }
.sparkles i:nth-child(5) { top: 0; left: 48%; animation-delay: 1.2s; }
.sparkles i:nth-child(6) { bottom: 44%; right: 2%; animation-delay: 1.5s; }
@keyframes twinkle { 0%, 100% { transform: scale(0.6); opacity: 0.3; } 50% { transform: scale(1.3); opacity: 1; } }

/* float + heartbeat idle animation */
.gift.float { animation: floaty 4.5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.gift.pulse .cube { animation: boxpulse 2.2s ease-in-out infinite; }
@keyframes boxpulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.03); } }

/* ---------- the OPEN animation ---------- */
/* the box gets excited first, then the lid springs off with light */
.gift.shaking { animation: box-shake 0.55s ease-in-out; }
@keyframes box-shake {
  0%, 100% { transform: translateY(0) rotate(0); }
  15% { transform: translateY(-6px) rotate(-2.5deg); }
  30% { transform: translateY(3px) rotate(2deg); }
  45% { transform: translateY(-5px) rotate(-2deg); }
  60% { transform: translateY(3px) rotate(1.6deg); }
  80% { transform: translateY(-2px) rotate(-1deg); }
}
.gift.opening { animation: none; }
.gift.opening .lid {
  transform: translateX(-50%) translateY(-190px) translateZ(-40px) rotateX(-52deg) rotateZ(14deg);
  transition: transform 0.8s cubic-bezier(0.34, 1.45, 0.5, 1);
}
.gift.opening .burst { opacity: 1; transform: translate(-50%, -40px) translateZ(70px); }
.gift.opening .burst i { animation: bursty 1.15s ease-out forwards; }
.gift.opening .beam { animation: beam-grow 1s var(--ease) 0.18s forwards; }
.gift.opening::after { animation: open-glow 0.9s var(--ease) 0.1s forwards; }
@keyframes bursty {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
@keyframes beam-grow {
  0% { height: 0; opacity: 0; }
  25% { opacity: 0.85; }
  100% { height: 320px; opacity: 0; }
}
@keyframes open-glow {
  0% { transform: translate(-50%, 50%) translateZ(150px) scale(0.4); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translate(-50%, 50%) translateZ(150px) scale(3.2); opacity: 0; }
}

/* full-page shake, the moment before the box opens */
@keyframes shake-page {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-14px) rotate(-0.6deg); }
  30% { transform: translateX(12px) rotate(0.5deg); }
  50% { transform: translateX(-9px); }
  70% { transform: translateX(7px); }
  90% { transform: translateX(-3px); }
}
body.page-shake { animation: shake-page 0.75s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

/* flower-petal shower across the whole page */
.petals {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 55;
  transition: opacity 1.3s var(--ease);
}
.petals.done { opacity: 0; }
.petal {
  position: absolute; top: -8vh; left: var(--x);
  width: var(--size); height: calc(var(--size) * 1.35);
  background: var(--pc);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.35);
  border-radius: 62% 38% 62% 38% / 48% 62% 38% 52%;
  opacity: 0;
  animation: petal-fall var(--dur) linear var(--delay) forwards;
}
@keyframes petal-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  6% { opacity: 0.95; }
  25% { transform: translate3d(var(--sway), 26vh, 0) rotate(75deg); }
  50% { transform: translate3d(calc(var(--sway) * -0.7), 55vh, 0) rotate(155deg); }
  75% { transform: translate3d(calc(var(--sway) * 0.6), 82vh, 0) rotate(235deg); }
  100% { transform: translate3d(0, 114vh, 0) rotate(320deg); opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  body.page-shake { animation: none; }
  .petals { display: none; }
}

/* ---------- experience shell ---------- */
.experience { min-height: 100vh; display: flex; flex-direction: column; }
.experience__main {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 76px 20px 56px; position: relative;
}
.experience__main .gift-stage { transform: scale(0.88); transform-origin: center; }
.experience__top { position: absolute; top: 24px; left: 0; right: 0; display: flex; justify-content: center; }

/* lock screen */
.lock-title { font-size: clamp(1.4rem, 3.6vw, 2.1rem); margin-bottom: 10px; }
.lock-sub { color: var(--ink-dim); max-width: 400px; margin: 0 auto 0; font-size: 0.96rem; }
.lock-btn { margin-top: 34px; }
.lock-hint { margin-top: 22px; color: rgba(185, 173, 182, 0.7); font-size: 0.78rem; }

/* reveal screen */
.reveal-screen {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  padding: 40px 22px; overflow-y: auto;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 45, 120, 0.22), transparent 60%),
    radial-gradient(100% 80% at 80% 100%, rgba(255, 95, 143, 0.14), transparent 60%),
    var(--black);
  opacity: 0; pointer-events: none;
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal-screen:not(.show) { transform: scale(0.985); }
.reveal-screen.show { opacity: 1; pointer-events: auto; transform: none; }

.reveal-inner { max-width: 640px; width: 100%; }
.reveal-type { margin-bottom: 14px; animation: pop-in 0.7s var(--ease) both; color: var(--pink-2); }
.reveal-type .lucide { width: 2.8rem; height: 2.8rem; }
.reveal-title { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.08; margin-bottom: 10px; animation: fade-up 0.9s var(--ease) 0.15s both; }
.reveal-from { color: var(--ink-dim); font-size: 0.95rem; margin-bottom: 30px; animation: fade-up 0.9s var(--ease) 0.3s both; }

.letter {
  position: relative; text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 30px 30px 34px; margin: 8px 0 28px;
  animation: letter-in 1.1s var(--ease) 0.45s both;
}
.letter::before {
  content: "❝"; position: absolute; top: -22px; left: 26px;
  font-size: 4rem; font-family: var(--font-head); color: var(--pink); opacity: 0.9;
}
.letter .message { font-size: 1.12rem; line-height: 1.85; color: var(--ink); white-space: pre-wrap; }
.letter .sign { margin-top: 22px; font-family: var(--font-head); font-size: 1.35rem; color: var(--pink-3); }

@keyframes fade-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes letter-in { from { opacity: 0; transform: rotateX(-18deg) translateY(40px) scale(0.96); } to { opacity: 1; transform: none; } }

/* media inside reveal */
.reveal-media { display: grid; gap: 16px; margin: 6px 0 26px; animation: fade-up 1s var(--ease) 0.6s both; }
.reveal-media img, .reveal-media video { width: 100%; border-radius: var(--radius); border: 1px solid var(--stroke); box-shadow: var(--shadow-sm); }
.audio-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.audio-card .play {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  background: linear-gradient(140deg, var(--pink-2), var(--pink));
  display: grid; place-items: center; border: none; color: #fff;
  box-shadow: 0 8px 22px -6px rgba(255, 45, 120, 0.6);
  transition: transform 0.2s var(--ease);
}
.audio-card .play .lucide { width: 1.2rem; height: 1.2rem; }
.audio-card .play:hover { transform: scale(1.08); }

/* reactions */
.reactions {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin: 10px 0 8px; animation: fade-up 1s var(--ease) 0.75s both;
}
.reaction-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--glass); border: 1px solid var(--stroke); cursor: pointer;
  border-radius: 999px; padding: 12px 16px; min-width: 68px;
  color: var(--ink-dim); font-size: 0.8rem; font-weight: 700;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.reaction-btn .r-ico { color: var(--pink-2); transition: transform 0.25s var(--ease); }
.reaction-btn .r-ico .lucide { width: 1.5rem; height: 1.5rem; }
.reaction-btn:hover { transform: translateY(-4px) scale(1.05); border-color: rgba(255, 45, 120, 0.5); background: rgba(255, 45, 120, 0.12); }
.reaction-btn:hover .r-ico { transform: scale(1.2) rotate(-8deg); color: var(--pink); }
.reaction-btn .r-count { min-height: 1.1em; }

/* share row */
.share-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; animation: fade-up 1s var(--ease) 0.9s both; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; font-size: 0.88rem; font-weight: 700;
  background: var(--glass); border: 1px solid var(--stroke); color: var(--ink); cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.share-btn:hover { transform: translateY(-3px); background: var(--glass-2); }
.share-btn .lucide { width: 1rem; height: 1rem; }
.share-btn.wa:hover { border-color: #25d366; color: #25d366; }
.share-btn.x:hover { border-color: #fff; color: #fff; }
.share-btn.tg:hover { border-color: #229ed9; color: #229ed9; }
.share-btn.cp:hover { border-color: var(--pink); color: var(--pink-2); }

/* counts strip */
.counts { display: flex; justify-content: center; gap: 26px; margin-top: 26px; flex-wrap: wrap; animation: fade-up 1s var(--ease) 1.05s both; }
.counts .c { text-align: center; }
.counts .c b { display: block; font-size: 1.2rem; color: var(--ink); font-family: var(--font-head); }
.counts .c span { font-size: 0.75rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.08em; }

/* password + countdown overlays */
.overlay-card {
  max-width: 420px; width: 100%; text-align: center;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 34px 28px; backdrop-filter: blur(16px); box-shadow: var(--shadow-sm);
  animation: pop-in 0.5s var(--ease) both;
}
.countdown-grid { display: flex; justify-content: center; gap: 12px; margin: 22px 0; }
.cd-box { min-width: 74px; padding: 14px 8px; border-radius: var(--radius-sm); background: var(--glass-2); border: 1px solid var(--stroke); }
.cd-box b { display: block; font-size: 2rem; font-family: var(--font-head); color: var(--pink-3); }
.cd-box span { font-size: 0.72rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* ==================================================================
   create wizard
   ================================================================== */
.wizard { max-width: 760px; margin: 0 auto; padding: 60px 0 100px; }
.wizard-progress { display: flex; justify-content: center; gap: 10px; margin-bottom: 34px; }
.wizard-progress .p {
  width: 44px; height: 6px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.12); transition: background 0.4s, box-shadow 0.4s;
}
.wizard-progress .p.on { background: linear-gradient(90deg, var(--pink-2), var(--pink)); box-shadow: 0 0 12px rgba(255, 45, 120, 0.5); }

.wizard-card { animation: fade-up 0.55s var(--ease) both; padding: 46px 44px; }
.wizard-step { margin-bottom: 30px; }
.wizard-step h2 { font-size: 1.75rem; margin-bottom: 6px; }
.wizard-step .hint { color: var(--ink-dim); margin-bottom: 26px; font-size: 0.92rem; }

.type-pick { grid-template-columns: repeat(3, 1fr); }
.type-pick .type-card { padding: 20px 16px; text-align: center; }
.type-pick .type-card.sel { border-color: var(--pink); background: rgba(255, 45, 120, 0.1); box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.18); }
.type-pick .type-card .t-ico { margin: 0 auto 10px; }

.fields-2 { grid-template-columns: 1fr 1fr; }

.theme-pick { display: flex; gap: 14px; flex-wrap: wrap; }
.theme-dot { width: 58px; height: 58px; border-radius: 18px; cursor: pointer; border: 3px solid transparent; transition: transform 0.25s var(--ease), border-color 0.25s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.theme-dot:hover { transform: scale(1.1); }
.theme-dot.sel { border-color: #fff; transform: scale(1.12); }
.theme-dot span { display: none; }

.anim-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.anim-opt {
  padding: 14px 20px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--glass); border: 1px solid var(--stroke); color: var(--ink-dim);
  font-weight: 600; transition: 0.25s;
  display: inline-flex; align-items: center; gap: 8px;
}
.anim-opt .lucide { width: 1rem; height: 1rem; }
.anim-opt.sel { border-color: var(--pink); color: var(--ink); background: rgba(255, 45, 120, 0.12); }

.media-pick { display: grid; gap: 16px; }
.media-zone {
  border: 2px dashed rgba(255, 45, 120, 0.4); border-radius: var(--radius);
  padding: 30px; text-align: center; cursor: pointer; position: relative;
  transition: 0.3s; background: rgba(255, 45, 120, 0.04);
}
.media-zone:hover { border-color: var(--pink); background: rgba(255, 45, 120, 0.08); }
.media-zone .mz-ico { color: var(--pink-2); margin-bottom: 8px; }
.media-zone .mz-ico .lucide { width: 2rem; height: 2rem; }
.media-zone input { display: none; }
.media-zone .mz-note { font-size: 0.8rem; color: var(--ink-dim); margin-top: 6px; }
.media-zone.uploading { opacity: 0.6; pointer-events: none; }

.preview-thumbs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.preview-thumbs .th { position: relative; width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--stroke); }
.preview-thumbs .th img { width: 100%; height: 100%; object-fit: cover; }
.preview-thumbs .th .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; border: none; cursor: pointer; font-size: 0.7rem; }

.preview-live { display: grid; gap: 24px; grid-template-columns: 1fr 1.3fr; align-items: center; padding: 28px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); }
.preview-live .gift-stage { transform: scale(0.66); transform-origin: center; }
.preview-card { text-align: center; }
.preview-card h3 { font-size: 1.55rem; }
.preview-card p { color: var(--ink-dim); }
.badge-pw { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; font-size: 0.8rem; color: var(--pink-3); background: rgba(255, 45, 120, 0.1); border: 1px solid rgba(255, 45, 120, 0.3); padding: 6px 12px; border-radius: 999px; }

.wizard-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; }

/* share/success screen after creation */
.success-box { text-align: center; }
.success-box .tick {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 22px;
  background: linear-gradient(140deg, var(--pink-2), var(--pink));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 18px 50px -10px rgba(255, 45, 120, 0.7);
  animation: pop-in 0.6s var(--ease) both;
}
.success-box .tick .lucide { width: 2.4rem; height: 2.4rem; }
.success-box h2 { margin-bottom: 8px; }
.success-box > p { color: var(--ink-dim); margin-bottom: 6px; }
.link-copy {
  display: flex; align-items: stretch; gap: 10px; justify-content: center;
  max-width: 520px; margin: 26px auto 6px;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 8px;
}
.link-copy input {
  flex: 1; min-width: 0; text-align: center; border: none; background: transparent;
  color: var(--ink); font: inherit; font-size: 0.92rem; padding: 10px 12px; outline: none;
}
.link-copy .btn { flex-shrink: 0; padding: 12px 22px; }
.btn-wa { background: rgba(37, 211, 102, 0.12); color: #4ade80; border: 1px solid rgba(37, 211, 102, 0.4); }
.btn-wa:hover { background: rgba(37, 211, 102, 0.2); transform: translateY(-2px); }
.qr-wrap { display: inline-block; padding: 14px; border-radius: var(--radius); background: #fff; margin: 10px 0 0; box-shadow: var(--shadow-sm); }
.qr-wrap img { width: 172px; height: 172px; display: block; }
.qr-cap { margin-top: 10px; color: var(--ink-dim); font-size: 0.78rem; }
.success-box .actions { margin-top: 22px; }

/* ==================================================================
   admin dashboard
   ================================================================== */
.admin { padding: 44px 0 90px; }

/* header */
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 20px 26px; }
.admin-title { max-width: 640px; }
.admin-title .chip { margin-bottom: 18px; }
.admin-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); line-height: 1.12; margin: 0 0 10px; }
.admin-head .muted { font-size: 0.98rem; line-height: 1.7; }
.admin-head .mode-pill { flex-shrink: 0; margin-top: 26px; }

/* section scaffolding */
.admin-section { margin-top: 38px; }
.admin-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.admin-section-head h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.14rem; letter-spacing: 0;
}
.admin-section-head h2 .lucide { width: 1.15rem; height: 1.15rem; color: var(--pink-2); }

/* KPI tiles */
.stat-grid { grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--stroke);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.stat:hover { transform: translateY(-4px); border-color: rgba(255, 45, 120, 0.35); }
.stat .ico {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; color: var(--pink-2);
  background: linear-gradient(140deg, rgba(255, 45, 120, 0.2), rgba(255, 45, 120, 0.05));
  border: 1px solid rgba(255, 45, 120, 0.28);
}
.stat .ico .lucide { width: 1.35rem; height: 1.35rem; }
.stat b { display: block; font-size: 2.1rem; font-family: var(--font-head); margin: 14px 0 2px; line-height: 1; }
.stat b small { font-size: 1rem; color: var(--ink-dim); }
.stat span { font-size: 0.78rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.08em; }

.admin-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.panel { padding: 24px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--stroke); }
.panel h3 { font-size: 1.05rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }

.bar-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; margin-bottom: 12px; font-size: 0.88rem; }
.bar-row .bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--pink-3), var(--pink)); box-shadow: 0 0 12px rgba(255, 45, 120, 0.4); transition: width 0.8s var(--ease); }
.bar-row b { font-weight: 700; color: var(--ink-dim); min-width: 40px; text-align: right; }

.event-feed { max-height: 430px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 6px; }
.event-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke);
  font-size: 0.86rem;
}
.event-item .e-ico { color: var(--pink-2); margin-top: 1px; }
.event-item .e-ico .lucide { width: 1.05rem; height: 1.05rem; }
.event-item .e-msg { flex: 1; }
.event-item .e-msg b { color: var(--ink); font-weight: 700; }
.event-item .e-time { color: rgba(185, 173, 182, 0.6); font-size: 0.75rem; white-space: nowrap; }
.event-item.system { border-color: rgba(255, 45, 120, 0.3); background: rgba(255, 45, 120, 0.06); }

.commit-feed { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; }
.commit-item { display: flex; gap: 12px; align-items: flex-start; font-size: 0.86rem; }
.commit-item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); margin-top: 6px; box-shadow: 0 0 10px var(--pink); flex-shrink: 0; }
.commit-item .c-msg { color: var(--ink); font-weight: 600; }
.commit-item .c-sha { color: rgba(185, 173, 182, 0.6); font-family: ui-monospace, monospace; font-size: 0.74rem; }

.mode-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.05em; }
.mode-pill.live { background: rgba(45, 212, 120, 0.12); color: #4ade80; border: 1px solid rgba(45, 212, 120, 0.35); }
.mode-pill.preview { background: rgba(255, 200, 90, 0.12); color: #fbbf24; border: 1px solid rgba(255, 200, 90, 0.35); }
.mode-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.heartbeat-box { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.heartbeat-box .hb-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; color: var(--pink-2);
  background: linear-gradient(140deg, rgba(255, 45, 120, 0.22), rgba(255, 45, 120, 0.05));
  border: 1px solid rgba(255, 45, 120, 0.3);
}
.heartbeat-box .hb-icon .lucide { width: 1.7rem; height: 1.7rem; }
.heartbeat-box h3 { margin: 14px 0 8px; justify-content: center; }
.heartbeat-box > p { max-width: 320px; margin: 0 auto 6px; }
.heartbeat-box pre {
  text-align: left; margin: 16px auto; width: 100%; overflow-x: auto;
  background: rgba(0, 0, 0, 0.4); border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  padding: 16px; font-size: 0.84rem; line-height: 1.8; color: var(--pink-3);
}

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .preview-live { grid-template-columns: 1fr; }
  .type-pick { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .gift-stage, .experience__main .gift-stage { transform: scale(0.7); }
  .experience__main { padding: 64px 16px 48px; }
  .wizard { padding: 28px 0 72px; }
  .wizard-card { padding: 26px 18px; }
  .type-pick { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fields-2 { grid-template-columns: 1fr; gap: 14px; }
  .wizard-step h2 { font-size: 1.45rem; }
  .wizard-step .hint { margin-bottom: 20px; }
  .wizard-actions { flex-direction: row; gap: 10px; }
  .wizard-actions .btn { flex: 1; justify-content: center; padding: 15px 20px; }
  .media-zone { padding: 26px 14px; }
  .qr-wrap img { width: 150px; height: 150px; }
  .success-box .actions { display: flex; flex-direction: column; gap: 14px; max-width: 420px; margin: 18px auto 0; }
  .success-box .actions .btn { width: 100%; justify-content: center; }
  .preview-live { padding: 20px 14px; }
  .overlay-card { padding: 28px 22px; }
  .letter { padding: 26px 22px 30px; }
  .share-row { display: grid; grid-template-columns: 1fr 1fr; }
  .share-btn { justify-content: center; padding: 12px 12px; font-size: 0.84rem; }
}
@media (max-width: 360px) {
  .share-row { grid-template-columns: 1fr; }
}
