:root {
  --rose: #ff6b8b;
  --rose-deep: #e04a6e;
  --blush: #fbe4e4;
  --peach: #ffd9c7;
  --cream: #fff8f5;
  --ink: #4a2c3a;
  --muted: #9b7383;
  --line: #f3d5dc;
  --empty: #f6e9ec;
  --card: rgba(255, 255, 255, 0.78);
  --shadow: 0 10px 30px -12px rgba(224, 74, 110, 0.35);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: #fff3ea; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(160deg, #ffe9ec 0%, #fff3ea 45%, #fde2ee 100%); }
body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100dvh;
  background: transparent;
  -webkit-font-smoothing: antialiased;
}
.script { font-family: 'Dancing Script', cursive; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* Tim bay nền */
.sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sky span {
  position: absolute; bottom: -40px; color: var(--rose); opacity: 0;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) rotate(0); opacity: 0; }
  10% { opacity: .35; }
  90% { opacity: .2; }
  100% { transform: translateY(-110vh) translateX(30px) rotate(25deg); opacity: 0; }
}

#app {
  position: relative; z-index: 1;
  max-width: 460px; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}
.screen { display: flex; flex-direction: column; gap: 16px; animation: fadeIn .5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; }

/* Hero / form */
.hero-card { text-align: center; margin-top: 8vh; padding: 28px 22px; }
.logo { font-size: 52px; animation: beat 1.6s ease-in-out infinite; }
.hero-card h1 { font-size: 42px; margin: 4px 0 6px; color: var(--rose-deep); }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; text-align: left; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, textarea {
  font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px 14px; background: #fff; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(255, 107, 139, .15); }
textarea { resize: none; }
.error { color: var(--rose-deep); font-size: 13px; min-height: 1em; margin: 0; text-align: center; }

.btn {
  font: inherit; font-weight: 600; border: 0; cursor: pointer;
  border-radius: 999px; padding: 14px 20px;
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #ff8fa6, var(--rose) 50%, var(--rose-deep));
  box-shadow: 0 8px 20px -6px rgba(224, 74, 110, .6);
}
.btn.soft { background: var(--blush); color: var(--rose-deep); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn:disabled { opacity: .55; cursor: default; }
.big-btn { width: 100%; font-size: 17px; padding: 16px; margin-top: 18px; }
#btn-nudge { width: 100%; margin-top: 10px; }
.icon-btn {
  border: 0; background: rgba(255,255,255,.7); color: var(--rose-deep);
  width: 38px; height: 38px; border-radius: 50%; font-size: 20px; cursor: pointer;
}

/* Chọn người */
.who-pick { display: flex; align-items: center; justify-content: center; gap: 10px; }
.who-heart { color: var(--rose); font-size: 22px; animation: beat 1.4s infinite; }
.who-opt input { position: absolute; opacity: 0; pointer-events: none; }
.who-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 18px; border-radius: 18px; border: 2px solid var(--line);
  background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .2s; min-width: 110px;
}
.who-opt input:checked + .who-card { border-color: var(--rose); background: var(--blush); transform: translateY(-2px); }

.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, #ffb3c1, var(--rose));
}
.avatar.b { background: linear-gradient(135deg, #ffd3b0, #ff9f7f); }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }

/* Topbar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 0; }
.couple { font-size: 30px; color: var(--rose-deep); line-height: 1.1; }
.beat { display: inline-block; color: var(--rose); animation: beat 1.3s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }

.banner {
  background: linear-gradient(135deg, #fff, var(--blush));
  border: 1.5px dashed var(--rose); color: var(--rose-deep);
  border-radius: 16px; padding: 12px 16px; font-size: 14px; font-weight: 500;
  animation: wiggle 2.5s ease-in-out infinite;
}
@keyframes wiggle { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-1.5deg); } 96% { transform: rotate(1.5deg); } }

/* Streak */
.streak-card { text-align: center; padding-top: 26px; }
.streak-ring { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--empty); stroke-width: 9; }
.ring-fg {
  fill: none; stroke: var(--rose); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1);
}
.streak-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.streak-heart { font-size: 26px; animation: beat 1.5s infinite; }
.streak-heart.cold { filter: grayscale(1); opacity: .5; animation: none; }
.streak-num { font-size: 54px; font-weight: 700; line-height: 1; color: var(--rose-deep); }
.streak-label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.streak-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.streak-stats div { display: flex; flex-direction: column; gap: 2px; background: rgba(255,255,255,.7); border-radius: 14px; padding: 10px 4px; }
.streak-stats b { font-size: 20px; color: var(--ink); }
.streak-stats span { font-size: 11px; color: var(--muted); }
.streak-hint { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* Today */
.duo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.person.done .avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--rose); }
.pname { font-weight: 600; }
.pstatus { font-size: 12px; color: var(--muted); word-spacing: 2px; }
.person.done .pstatus { color: var(--rose-deep); }
.link-heart { width: 64px; }
.heart-svg { width: 64px; display: block; filter: drop-shadow(0 6px 10px rgba(224, 74, 110, .3)); }
.link-heart.full .heart-svg { animation: beat 1.3s infinite; }

/* Letter */
.letter {
  background: repeating-linear-gradient(#fffdf9, #fffdf9 27px, #fbe9e4 28px);
  border: 1px solid #f6d9cf; position: relative;
}
.letter-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.stamp { font-size: 22px; width: 40px; height: 40px; display: grid; place-items: center; border: 2px dashed var(--peach); border-radius: 8px; background: #fff; }
.letter-body { font-size: 24px; color: var(--ink); margin: 12px 0 0; line-height: 1.25; white-space: pre-wrap; word-break: break-word; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { margin: 0; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow span { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.day {
  aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center;
  font-size: 13px; position: relative; background: var(--empty); color: var(--muted);
}
.day.blank { background: transparent; }
.day.future { opacity: .4; }
.day.half { background: linear-gradient(135deg, #ffc2cf 50%, var(--empty) 50%); color: var(--ink); }
.day.full { background: linear-gradient(135deg, #ff8fa6, var(--rose)); color: #fff; font-weight: 600; }
.day.full::after { content: '♥'; position: absolute; font-size: 8px; bottom: 3px; }
.day.today { outline: 2px solid var(--rose-deep); outline-offset: 1px; }
.cal-legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.dot.full { background: var(--rose); }
.dot.half { background: linear-gradient(135deg, #ffc2cf 50%, var(--empty) 50%); }
.dot.none { background: var(--empty); }

/* Badges */
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.badge .medal {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 26px;
  background: var(--empty); filter: grayscale(1); opacity: .45; transition: all .3s;
}
.badge.got .medal { background: linear-gradient(135deg, #fff1c9, #ffc6d3); filter: none; opacity: 1; box-shadow: 0 6px 14px -6px rgba(224,74,110,.5); }
.badge b { font-size: 12px; }
.badge span { font-size: 10px; color: var(--muted); line-height: 1.2; }

/* Notes */
.notes { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; }
.note { display: flex; gap: 10px; align-items: flex-end; }
.note.mine { flex-direction: row-reverse; }
.bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 18px 18px 18px 6px;
  background: #fff; font-size: 14px; line-height: 1.4; word-break: break-word; white-space: pre-wrap;
}
.note.mine .bubble { background: linear-gradient(135deg, #ff8fa6, var(--rose)); color: #fff; border-radius: 18px 18px 6px 18px; }
.bubble small { display: block; font-size: 10px; opacity: .7; margin-top: 4px; }
.note .avatar { width: 30px; height: 30px; font-size: 13px; flex: none; }
.empty-notes { text-align: center; color: var(--muted); font-size: 14px; padding: 12px; }

.quote { text-align: center; font-size: 22px; color: var(--rose-deep); opacity: .85; margin: 8px 16px 0; }

/* Sheet */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(74, 44, 58, .35); z-index: 10;
  display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s;
}
.sheet {
  width: 100%; max-width: 460px; background: var(--cream);
  border-radius: 28px 28px 0 0; padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px; animation: slideUp .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.big-title { font-size: 30px; margin: 0; text-align: center; color: var(--rose-deep); }
.moods { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.mood {
  font-size: 26px; aspect-ratio: 1; border-radius: 16px; border: 2px solid transparent;
  background: #fff; cursor: pointer; transition: transform .15s, border-color .2s;
}
.mood.sel { border-color: var(--rose); background: var(--blush); transform: scale(1.08); }
.sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px;
  z-index: 20; animation: fadeIn .25s; max-width: 90vw; text-align: center;
}

/* Heart burst */
.burst-layer { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.burst-heart {
  position: absolute; font-size: 22px; will-change: transform, opacity;
  animation: burst 1.4s cubic-bezier(.15,.8,.3,1) forwards;
}
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(var(--rot)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Mốc quà & phiếu ===== */
.center { text-align: center; }
.sub { margin: -8px 0 14px; }

/* Hành trình */
.journey { position: relative; display: flex; flex-direction: column; gap: 4px; }
.journey::before {
  content: ''; position: absolute; left: 27px; top: 20px; bottom: 20px; width: 3px;
  background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 12px); border-radius: 2px;
}
.ms {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 4px;
  border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer;
  border-radius: 16px; width: 100%; transition: background .2s;
}
.ms:hover { background: rgba(255,255,255,.6); }
.ms-icon {
  position: relative; z-index: 1; flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; background: var(--empty); border: 3px solid #fff;
}
.ms.unlocked .ms-icon { background: linear-gradient(135deg, #fff1c9, #ffc6d3); box-shadow: 0 6px 14px -6px rgba(224,74,110,.5); }
.ms.next .ms-icon { background: #fff; border-color: var(--rose); animation: beat 1.8s infinite; }
.ms-body { flex: 1; min-width: 0; }
.ms-title { font-weight: 600; font-size: 15px; }
.ms.locked .ms-title { color: var(--muted); letter-spacing: 1px; }
.ms-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ms-bar { height: 6px; background: var(--empty); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff8fa6, var(--rose)); border-radius: 3px; }
.ms-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--blush); color: var(--rose-deep); }
.ms-chev { color: var(--muted); font-size: 18px; }

/* Phiếu */
.wallet { display: flex; flex-direction: column; gap: 10px; }
.coupon {
  display: flex; align-items: stretch; border-radius: 14px; overflow: hidden;
  background: #fff; box-shadow: 0 4px 12px -6px rgba(224,74,110,.35);
}
.coupon-stub {
  flex: none; width: 56px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, #ffd3dc, #ffb3c1); border-right: 2px dashed #fff;
}
.coupon-main { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.coupon-text { font-size: 14px; font-weight: 600; }
.coupon-from { font-size: 11px; color: var(--muted); }
.coupon-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coupon .btn { padding: 7px 14px; font-size: 13px; white-space: nowrap; flex: none; }
.coupon.used { opacity: .55; }
.coupon.used .coupon-stub { filter: grayscale(.6); }
.state { font-size: 12px; color: var(--rose-deep); font-weight: 500; }
.empty-box { text-align: center; color: var(--muted); font-size: 14px; padding: 10px; }

/* Yêu cầu từ người kia */
.request {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  background: linear-gradient(135deg, #fff, #fff1c9); border: 1.5px solid #ffd98a;
  border-radius: 16px; padding: 12px 14px; font-size: 14px;
}
.request span { flex: 1; }
.request .btn { padding: 8px 14px; font-size: 13px; flex: none; }

/* Thư hẹn giờ đã viết */
.sealed { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }
.sealed span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.sealed button { border: 0; background: transparent; color: var(--rose-deep); cursor: pointer; font: inherit; font-size: 12px; }

/* Mở quà */
.gift-backdrop {
  position: fixed; inset: 0; z-index: 15; overflow-y: auto;
  background: radial-gradient(circle at 50% 40%, #ffe9ee 0%, #f9c4d0 60%, #e897aa 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px 16px; animation: fadeIn .3s;
}
.gift-stage { text-align: center; color: #fff; }
.gift-kicker { font-family: 'Dancing Script', cursive; font-size: 34px; color: var(--rose-deep); text-shadow: 0 2px 0 #fff; margin-bottom: 26px; }
.gift-tap { color: var(--ink); opacity: .7; font-size: 14px; margin-top: 22px; }
.envelope {
  position: relative; width: 230px; height: 150px; border: 0; padding: 0; cursor: pointer; background: transparent;
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.env-body {
  position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(160deg, #fff8f5, #ffe1e7); box-shadow: 0 20px 40px -12px rgba(224,74,110,.6);
}
.env-body::before, .env-body::after {
  content: ''; position: absolute; bottom: 0; width: 0; height: 0; border-bottom: 90px solid #ffd3dc;
}
.env-body::before { left: 0; border-right: 115px solid transparent; border-radius: 0 0 0 10px; }
.env-body::after { right: 0; border-left: 115px solid transparent; border-radius: 0 0 10px 0; }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: 2;
  border-left: 115px solid transparent; border-right: 115px solid transparent; border-top: 85px solid #ffc2cf;
  transform-origin: top; transition: transform .6s;
}
.env-seal { position: absolute; z-index: 3; left: 50%; top: 62px; transform: translateX(-50%); font-size: 34px; transition: opacity .3s; }
.envelope.opening .env-flap { transform: rotateX(180deg); }
.envelope.opening .env-seal { opacity: 0; }
.gift-card {
  width: 100%; max-width: 420px; background: var(--cream); border-radius: 26px; padding: 26px 20px 20px;
  text-align: center; box-shadow: 0 30px 60px -20px rgba(74,44,58,.6); animation: popIn .5s cubic-bezier(.2,1.4,.4,1);
  margin: auto;
}
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.gift-icon { font-size: 56px; }
.gift-days { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--rose); text-transform: uppercase; }
.gift-title { font-size: 38px; margin: 2px 0 10px; color: var(--rose-deep); }
.gift-msg { white-space: pre-wrap; line-height: 1.55; font-size: 15px; text-align: left; background: #fff; border-radius: 16px; padding: 14px 16px; margin: 0; }
.gift-section { margin-top: 16px; text-align: left; }
.gift-section h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 1px; }
.gift-letter {
  background: repeating-linear-gradient(#fffdf9, #fffdf9 27px, #fbe9e4 28px); border: 1px solid #f6d9cf;
  border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
}
.gift-letter .from { font-size: 12px; color: var(--muted); }
.gift-letter p { font-family: 'Dancing Script', cursive; font-size: 22px; margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; line-height: 1.25; }
.gift-coupon { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px dashed #ffb3c1; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.recap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recap div { background: #fff; border-radius: 14px; padding: 10px; text-align: center; }
.recap b { display: block; font-size: 22px; color: var(--rose-deep); }
.recap span { font-size: 11px; color: var(--muted); }
.recap .wide { grid-column: span 2; text-align: left; font-size: 13px; }
.more-btn { width: 100%; margin-top: 4px; font-size: 13px; padding: 10px; position: relative; z-index: 1; }

/* ===== Responsive ===== */
.main-grid, .col { display: flex; flex-direction: column; gap: 16px; }
#requests:empty { display: none; }

/* Điện thoại nhỏ (iPhone SE…) */
@media (max-width: 360px) {
  #app { padding-left: 10px; padding-right: 10px; }
  .card { padding: 16px; }
  .streak-ring { width: 160px; height: 160px; }
  .streak-num { font-size: 44px; }
  .row2 { grid-template-columns: 1fr; }
  .moods { grid-template-columns: repeat(3, 1fr); }
  .couple { font-size: 26px; }
  .link-heart, .heart-svg { width: 48px; }
  .avatar.big { width: 54px; height: 54px; }
}

/* Máy tính bảng dọc */
@media (min-width: 600px) {
  #app { max-width: 560px; }
}

/* Laptop / màn hình rộng: 2 cột */
@media (min-width: 960px) {
  #app { max-width: 1100px; padding: 28px 32px 40px; }
  .main-grid { display: grid; grid-template-columns: minmax(360px, 420px) 1fr; gap: 22px; align-items: start; }

  .topbar { padding: 0 4px 4px; }
  .couple { font-size: 38px; }
  .wallet { display: grid; grid-template-columns: repeat(2, 1fr); }
  .notes { max-height: 460px; }
  .day { aspect-ratio: auto; height: 46px; }
  .hero-card { max-width: 440px; margin-left: auto; margin-right: auto; }
  #screen-login { align-items: stretch; }

  /* Bảng nhập liệu thành hộp thoại giữa màn hình */
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 28px; max-width: 480px; padding-bottom: 24px; animation: popIn .3s cubic-bezier(.2,1.2,.4,1); }
  .sheet-grip { display: none; }
  .toast { bottom: 32px; }
}

/* Thiết bị có chuột: hiệu ứng hover */
@media (hover: hover) {
  .btn.primary:hover:not(:disabled) { box-shadow: 0 12px 26px -8px rgba(224, 74, 110, .7); transform: translateY(-1px); }
  .icon-btn:hover { background: #fff; }
  .mood:hover { transform: scale(1.06); }
  .coupon:hover { transform: translateY(-1px); transition: transform .15s; }
}
@media (min-width: 960px) and (min-height: 880px) { .col-left { position: sticky; top: 20px; } }

/* ===== Hộp quà nhảy nhảy ===== */
@keyframes hop {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(0); }
  10% { transform: translateY(0) scale(1.12, .88); }
  30% { transform: translateY(-34%) scale(.94, 1.08) rotate(-6deg); }
  50% { transform: translateY(-42%) scale(1, 1) rotate(5deg); }
  70% { transform: translateY(0) scale(1.1, .9); }
  80% { transform: translateY(-8%) scale(.98, 1.02); }
}
@keyframes hopShadow {
  0%, 10%, 70%, 100% { transform: translateX(-50%) scale(1); opacity: .35; }
  50% { transform: translateX(-50%) scale(.55); opacity: .15; }
}
@keyframes shake {
  0%, 100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-14deg) scale(1.05); }
  30% { transform: rotate(12deg) scale(1.1); }
  45% { transform: rotate(-10deg) scale(1.15); }
  60% { transform: rotate(8deg) scale(1.2); }
  80% { transform: rotate(0) scale(1.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.gift-box {
  position: relative; border: 0; background: transparent; cursor: pointer; padding: 40px 30px 20px;
  -webkit-tap-highlight-color: transparent;
}
.gift-emoji {
  display: block; font-size: 120px; line-height: 1; transform-origin: 50% 100%;
  animation: hop 1.1s cubic-bezier(.3,.7,.4,1) infinite;
  filter: drop-shadow(0 12px 18px rgba(224, 74, 110, .45));
}
.gift-shadow {
  position: absolute; left: 50%; bottom: 10px; width: 90px; height: 14px; border-radius: 50%;
  background: rgba(74, 44, 58, .5); filter: blur(4px);
  animation: hopShadow 1.1s cubic-bezier(.3,.7,.4,1) infinite;
}
.gift-box.opening .gift-emoji { animation: shake .9s ease-in forwards; transform-origin: 50% 50%; }
.gift-box.opening .gift-shadow { opacity: 0; animation: none; }
.gift-box:disabled { cursor: default; }
.gift-later { color: var(--ink); opacity: .6; margin-top: 4px; }
.gift-box.opening ~ .gift-tap, .gift-box.opening ~ .gift-later { visibility: hidden; }

/* Mốc có quà chưa mở trong Hành trình */
.ms.unopened .ms-icon {
  background: linear-gradient(135deg, #fff1c9, #ffb3c1); border-color: #fff;
  animation: hop 1.1s cubic-bezier(.3,.7,.4,1) infinite; transform-origin: 50% 100%;
  box-shadow: 0 0 0 4px rgba(255, 107, 139, .25);
}
.ms.unopened .ms-title { color: var(--rose-deep); }
.ms.unopened { background: rgba(255, 255, 255, .7); }

/* Nút quà nổi ở góc */
.gift-fab {
  position: fixed; right: 18px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 12;
  width: 66px; height: 66px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #fff, #ffe1e7); box-shadow: 0 10px 26px -6px rgba(224, 74, 110, .6);
  -webkit-tap-highlight-color: transparent;
}
.gift-fab::before {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--rose); opacity: .6; animation: ping 1.6s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }
.gift-fab-icon { display: block; font-size: 34px; animation: hop 1.1s cubic-bezier(.3,.7,.4,1) infinite; transform-origin: 50% 100%; }
.gift-fab-count {
  position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--rose-deep); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
@media (min-width: 960px) { .gift-fab { right: 32px; bottom: 32px; } }

/* Tiến độ dạng phân số */
.ms-frac {
  flex: none; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 4px 9px; border-radius: 999px; background: var(--empty); color: var(--muted);
}
.ms-frac.next { background: linear-gradient(135deg, #ff8fa6, var(--rose)); color: #fff; }
.ms-frac.done { background: #fff1c9; color: #b07a1c; }
.ms-chev { display: none; }

/* ===== Bảng note ===== */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.board-head h2 { margin: 0; }
.badge-new { background: var(--rose-deep); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; animation: beat 1.5s infinite; }
.note-banner { width: 100%; text-align: left; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; animation: none; border-style: solid; }

.compose { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.compose textarea { background: #fffdf7; }
.compose-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.compose .btn { padding: 10px 18px; font-size: 14px; white-space: nowrap; }
.colors { display: flex; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(74,44,58,.2); transition: transform .15s; padding: 0; }
.swatch.sel { transform: scale(1.15) rotate(-6deg); box-shadow: 0 0 0 2px var(--rose); }

/* Màu giấy */
.c-pink { --paper: #ffd6e0; }
.c-peach { --paper: #ffe0c7; }
.c-yellow { --paper: #fff1a8; }
.c-mint { --paper: #cdf2dc; }
.c-lilac { --paper: #e5d9ff; }
.c-checkin { --paper: #fffaf3; }
.swatch { background: var(--paper); }

.board { columns: 2; column-gap: 12px; }
.sticky {
  position: relative; break-inside: avoid; display: inline-block; width: 100%;
  margin: 6px 0 12px; padding: 16px 14px 10px;
  background: var(--paper);
  border-radius: 4px 4px 14px 4px;
  box-shadow: 0 8px 16px -10px rgba(74, 44, 58, .45), 0 1px 0 rgba(255,255,255,.6) inset;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .2s;
}
.sticky::before { /* băng dính */
  content: ''; position: absolute; top: -8px; left: 50%; width: 54px; height: 16px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 255, 255, .65); border-radius: 2px;
  box-shadow: 0 1px 2px rgba(74,44,58,.12);
}
.sticky.c-checkin { border: 1px dashed #f3cfc3; }
.sticky.fresh { box-shadow: 0 0 0 3px rgba(255, 107, 139, .45), 0 10px 20px -10px rgba(224, 74, 110, .6); }
.sticky-kind { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.sticky-text { margin: 0; font-family: 'Dancing Script', cursive; font-size: 21px; line-height: 1.25; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.sticky-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.avatar.tiny { width: 20px; height: 20px; font-size: 10px; flex: none; }
.sticky-meta { flex: 1; font-size: 11px; color: rgba(74, 44, 58, .6); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heart-btn { border: 0; background: rgba(255,255,255,.55); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 15px; flex: none; transition: transform .15s; }
.heart-btn:active { transform: scale(1.3); }
.heart-btn.on { background: #fff; }
.sticky-liked { font-size: 11px; color: var(--rose-deep); margin-top: 6px; font-weight: 500; }
.sticky-del {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.6); color: var(--muted); cursor: pointer; font-size: 11px; opacity: .6;
}
.sticky-del:hover { opacity: 1; }
.ribbon {
  position: absolute; top: 8px; right: -6px; background: var(--rose-deep); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px 0 0 4px;
  box-shadow: 0 2px 6px rgba(224,74,110,.4);
}
.sticky.mine .ribbon { display: none; }

@media (hover: hover) { .sticky:hover { transform: rotate(0deg) scale(1.02); z-index: 1; } }
@media (max-width: 340px) { .board { columns: 1; } .compose-row { flex-direction: column; align-items: stretch; } }
@media (min-width: 1200px) { .board { columns: 3; } }

/* ===== Hồ sơ ===== */
.profile-btn { border: 0; background: transparent; padding: 0; cursor: pointer; border-radius: 50%; }
.profile-btn .avatar { box-shadow: 0 0 0 3px #fff, 0 4px 12px -4px rgba(224,74,110,.5); transition: transform .15s; }
.profile-btn:hover .avatar { transform: scale(1.06); }
.sheet.profile { max-height: 92dvh; overflow-y: auto; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-name { font-size: 30px; color: var(--rose-deep); line-height: 1.1; }
.profile-section { display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 18px; padding: 14px; }
.profile-section h3 { margin: 0; font-size: 15px; }
.profile-section p { margin: -6px 0 0; }
.profile-section .error { text-align: left; min-height: 0; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.inline .btn { padding: 10px 18px; }
.sheet.profile .sheet-actions { grid-template-columns: 1fr 1fr; } .sheet.profile .sheet-actions .btn { white-space: nowrap; } #btn-logout { color: var(--rose-deep); }

/* ===== Ảnh đại diện ===== */
.avatar.has-img { background-size: cover; background-position: center; background-color: #fff; color: transparent; }
.avatar.xl { width: 84px; height: 84px; font-size: 34px; }
.avatar-picker { position: relative; cursor: pointer; flex: none; display: block; color: inherit; }
.avatar-picker .avatar { box-shadow: 0 0 0 4px #fff, 0 8px 20px -8px rgba(224,74,110,.6); transition: filter .2s; }
.avatar-picker:hover .avatar { filter: brightness(.92); }
.avatar-cam {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; font-size: 15px; box-shadow: 0 2px 8px rgba(74,44,58,.25);
}
.avatar.uploading { animation: beat 1s infinite; opacity: .6; }
.avatar-actions { display: flex; gap: 12px; margin-top: 6px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--rose-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#btn-avatar-remove { color: var(--muted); }

/* ===== Role & quản trị ===== */
.role-badge { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--blush); color: var(--rose-deep); }
.role-badge.admin { background: #fff1c9; color: #a06a10; }
.admin-entry {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); border: 1.5px solid #ffd98a; border-radius: 18px; padding: 12px 14px;
  background: linear-gradient(135deg, #fffaf0, #fff1c9);
}
.admin-entry small { color: var(--muted); }
.admin-entry-icon { font-size: 24px; }
.admin-entry-chev { margin-left: auto; font-size: 22px; color: var(--muted); }

.sheet.admin { max-width: 720px; max-height: 94dvh; overflow-y: auto; padding-bottom: 0; }
.admin-sec { background: #fff; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.admin-sec h3 { margin: 0; font-size: 15px; }
.admin-sec p { margin: -4px 0 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.small-btn { padding: 8px 14px; font-size: 13px; white-space: nowrap; flex: none; }
.adm-list { display: flex; flex-direction: column; gap: 12px; }
.adm-card { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--cream); }
.adm-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--empty); color: var(--muted); }
.pill.on { background: #fff1c9; color: #a06a10; }
.adm-del { margin-left: auto; border: 0; background: none; color: var(--rose-deep); font: inherit; font-size: 12px; cursor: pointer; }
.adm-row { display: grid; grid-template-columns: 64px 90px 1fr; gap: 8px; }
.adm-field { gap: 4px; font-size: 12px; }
.adm-field input, .adm-field textarea { padding: 9px 11px; font-size: 14px; }
.adm-icon { text-align: center; font-size: 20px !important; }
.adm-coupons { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.adm-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.adm-coupon { display: flex; gap: 6px; width: 100%; }
.adm-coupon input { flex: 1; min-width: 0; padding: 8px 11px; font-size: 14px; }
.adm-x { border: 0; background: var(--empty); color: var(--muted); width: 34px; border-radius: 10px; cursor: pointer; flex: none; }
.adm-check { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.adm-check input { width: 18px; height: 18px; accent-color: var(--rose); }
.admin-actions {
  position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr 1.4fr; gap: 8px;
  background: var(--cream); padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); margin-top: 4px;
  border-top: 1px solid var(--line);
}
.admin-actions .btn { padding: 12px 14px; font-size: 14px; white-space: nowrap; }
#adm-reset { color: var(--muted); font-size: 12px; }
#adm-error { text-align: left; }
@media (max-width: 400px) {
  .adm-row { grid-template-columns: 56px 1fr; }
  .adm-row label:last-child { grid-column: span 2; }
  .admin-actions { grid-template-columns: 1fr 1fr; }
  #adm-reset { grid-column: span 2; order: 3; }
}

/* ===== Kỷ niệm ===== */
.board-head h2 { display: flex; align-items: center; gap: 8px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; font: inherit; font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 999px; background: var(--empty); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.on { background: var(--ink); color: #fff; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 2px; }
.timeline::before { content: ""; position: absolute; left: 70px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--line), #ffc2cf, var(--line)); }
.tl-year { font-size: 12px; font-weight: 700; color: var(--rose); letter-spacing: 2px; padding: 8px 0 4px 2px; }
.tl-item {
  position: relative; display: grid; grid-template-columns: 44px 40px 1fr; gap: 6px; align-items: start;
  width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left;
  padding: 10px 8px 10px 0; border-radius: 16px; cursor: pointer; transition: background .2s;
}
.tl-item:hover { background: rgba(255,255,255,.7); }
.tl-item.fresh { background: rgba(255, 214, 224, .45); }
.tl-date { text-align: right; line-height: 1.1; padding-top: 4px; }
.tl-date b { display: block; font-size: 20px; color: var(--ink); }
.tl-date span { font-size: 11px; color: var(--muted); }
.tl-dot {
  position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; margin-left: 2px;
  display: grid; place-items: center; font-size: 18px; background: #fff; border: 2px solid var(--line);
}
.tl-item.theirs .tl-dot { border-color: #ffb08f; background: #fff6f0; }
.tl-item.mine .tl-dot { border-color: #ffb3c1; }
.tl-title { font-weight: 600; font-size: 15px; padding-top: 2px; }
.tl-snip { font-size: 13px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag.private { background: #f1ecee; color: #8a7480; }
.tag.shared { background: #ffe1e7; color: var(--rose-deep); }
.tag.new { background: var(--rose-deep); color: #fff; }

/* Form kỷ niệm */
.sheet.mem-form, .sheet.mem-view { max-height: 94dvh; overflow-y: auto; padding-bottom: 0; }
.mem-top { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.emoji-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emoji-row .mood { font-size: 20px; border-radius: 12px; }
.mem-photo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mem-photo-preview { position: relative; }
.mem-photo-preview img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 14px; box-shadow: 0 4px 12px -4px rgba(74,44,58,.35); }
.mem-photo-preview .adm-x { position: absolute; top: -8px; right: -8px; height: 28px; width: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(74,44,58,.25); }
.share-toggle { flex-direction: row; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px 14px; cursor: pointer; color: var(--ink); font-size: 14px; }
.share-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.share-toggle small { color: var(--muted); font-weight: 400; }
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: #e9dde1; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.share-toggle input:checked + .switch { background: var(--rose); }
.share-toggle input:checked + .switch::after { transform: translateX(18px); }
.share-toggle input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(255,107,139,.35); }
.mem-actions { grid-template-columns: auto 1fr 1.4fr; }
#mem-delete { color: var(--rose-deep); }

/* Xem kỷ niệm */
.mem-view-photo { margin: 4px -4px 0; }
.mem-view-photo img { display: block; width: 100%; max-height: 52vh; object-fit: cover; border-radius: 18px; background: var(--empty); min-height: 120px; }
.mv-head { display: flex; align-items: center; gap: 12px; }
.mv-emoji { width: 52px; height: 52px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 26px; box-shadow: 0 4px 12px -6px rgba(224,74,110,.5); }
.mv-date { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--rose); }
.mv-title { margin: 0; font-size: 32px; line-height: 1.1; color: var(--rose-deep); }
.mv-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.mv-content { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.6; font-size: 15px; background: #fff; border-radius: 16px; padding: 14px 16px; }
#mv-actions { grid-template-columns: auto 1fr 1fr; }
#mv-actions:has(> :nth-child(2):last-child) { grid-template-columns: auto 1fr; }

@media (max-width: 400px) {
  .mem-top { grid-template-columns: 1fr; }
  .mem-actions { grid-template-columns: 1fr 1fr; }
  #mem-delete { grid-column: span 2; order: 3; }
}
.mem-actions:has(#mem-delete[hidden]) { grid-template-columns: 1fr 1.4fr; }

/* ===== Huy hiệu ẩn ===== */
.badge-count { font-size: 13px; font-weight: 700; color: var(--rose-deep); background: var(--blush); padding: 4px 10px; border-radius: 999px; }
.badge-progress { height: 8px; background: var(--empty); border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.badge-progress i { display: block; height: 100%; background: linear-gradient(90deg, #ffd36e, #ff8fa6, var(--rose)); border-radius: 4px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.badge-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px;
  border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; border-radius: 14px; text-align: center;
}
.badge-tile:hover { background: rgba(255,255,255,.7); }
.badge-medal {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 32px;
  background: radial-gradient(circle at 35% 30%, #fffbe8, #ffe08a 45%, #f5b942 100%);
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px #f5c96b, 0 10px 20px -8px rgba(176, 122, 28, .6);
}
.badge-medal.small { width: 52px; height: 52px; font-size: 26px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f5c96b, 0 6px 14px -6px rgba(176,122,28,.55); }
.badge-tile.locked .badge-medal { background: var(--empty); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #eee2e6; font-size: 20px; filter: grayscale(1); opacity: .7; }
.badge-tile.fresh .badge-medal { animation: beat 1.4s infinite; }
.badge-name { font-size: 11px; font-weight: 600; line-height: 1.25; }
.badge-tile.locked .badge-name { font-weight: 400; font-style: italic; color: var(--muted); }
.badge-by { display: flex; gap: 2px; margin-top: -2px; }
.badge-by .avatar.tiny { width: 16px; height: 16px; font-size: 8px; }

.badge-backdrop { z-index: 16; }
.badge-pop {
  width: 100%; max-width: 380px; background: var(--cream); border-radius: 28px; padding: 26px 22px 20px; text-align: center;
  box-shadow: 0 30px 60px -20px rgba(74,44,58,.6); animation: popIn .5s cubic-bezier(.2,1.4,.4,1); margin: auto;
}
.badge-pop-kicker { font-size: 13px; font-weight: 700; color: #b07a1c; letter-spacing: 1px; margin-bottom: 18px; }
.badge-pop .badge-medal { width: 110px; height: 110px; font-size: 56px; margin: 0 auto; }
.badge-medal.shine { position: relative; animation: medalIn .9s cubic-bezier(.2,1.4,.4,1); }
.badge-medal.shine::after {
  content: ''; position: absolute; inset: -18px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 10%, rgba(255,214,110,.55) 12% 14%, transparent 16% 35%, rgba(255,143,166,.5) 37% 39%, transparent 41% 60%, rgba(255,214,110,.55) 62% 64%, transparent 66% 85%, rgba(255,143,166,.5) 87% 89%, transparent 91%);
  animation: spin 6s linear infinite;
}
@keyframes medalIn { 0% { transform: scale(0) rotate(-180deg); } 100% { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.badge-pop-name { font-size: 34px; margin: 16px 0 4px; color: var(--rose-deep); }
.badge-pop-detail { margin: 0 0 14px; font-size: 15px; color: var(--ink); }
.badge-pop-how { background: #fff; border-radius: 14px; padding: 10px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.badge-pop-how span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.badge-pop-by { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-size: 13px; }
.badge-pop-by:empty { display: none; }
.bp-person { display: flex; align-items: center; gap: 6px; }
.bp-person.none { opacity: .45; }
.badge-pop-date { font-size: 12px; color: var(--muted); margin-top: 12px; }

@media (min-width: 600px) { .badge-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .badge-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 340px) { .badge-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== Thông báo ===== */
.push-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.push-actions:not(:has(> :not([hidden]))) { display: none; }
.push-prefs { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.push-pref { flex-direction: row; align-items: center; gap: 10px; padding: 7px 0; color: var(--ink); font-size: 14px; font-weight: 400; cursor: pointer; }
.push-pref input { position: absolute; opacity: 0; pointer-events: none; }
.push-pref .switch { width: 40px; height: 24px; }
.push-pref .switch::after { width: 18px; height: 18px; }
.push-pref input:checked + .switch { background: var(--rose); }
.push-pref input:checked + .switch::after { transform: translateX(16px); }
