/* Phần dùng chung cho MỌI trang của lenamiu.vn (trang video, Fanfic, 404):
   dải chữ chạy PK trên cùng, đầu trang, hộp ủng hộ website (mã QR + thanh PK), tung bông tung hoa.
   Đi cùng site.js. Sửa ở đây là mọi trang đổi theo. */

:root {
  color-scheme: light;
  --bg: #faf7f6; --surface: #ffffff; --surface-2: #f1ecec;
  --text: #1d1a1f; --muted: #6c6570; --line: rgba(29, 26, 31, .10);
  --accent: #c13a6c; --on-accent: #ffffff; --danger: #c62828;
  --team-a: #d63a78; --team-b: #7447dc;   /* LenaMiu hồng, MiuLena tím — lấy từ màu logo */
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121014; --surface: #1b181e; --surface-2: #26222a;
    --text: #f3eff4; --muted: #a39ca8; --line: rgba(255, 255, 255, .09);
    --accent: #f06d9b; --on-accent: #1a0d13; --danger: #ff7b72;
    --team-a: #e5528c; --team-b: #8c62ee;
  }
}

/* ---------- đầu trang ---------- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px; padding-top: 20px; padding-bottom: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand img { width: 40px; height: 40px; flex: none; border-radius: 50%; }
/* the name on two lines, like the logo: "LenaMiu" over a small "VIETNAM HOUSE" */
.brand > span { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand b { color: var(--accent); font-weight: 700; font-size: .58em; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
/* dòng ghi công tự co (xuống 2 dòng nếu chật) để các nút luôn nằm cùng hàng với logo */
.tagline { flex: 1 1 0; min-width: 140px; margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.45; text-align: right; }
/* tên người làm sub trong dòng ghi công: bấm mở trang X */
.tagline .social {
  color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.tagline .social:hover { color: var(--accent); text-decoration-color: currentColor; }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.top-link {
  flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 5px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: .85rem; font-weight: 700; line-height: 1.4; text-decoration: none;
}
.top-link:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.top-link[aria-current="page"] {
  border-color: color-mix(in srgb, var(--text) 30%, var(--line)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent);
}
.donate-btn {
  flex: none; font: inherit; font-size: .85rem; font-weight: 700; line-height: 1.4; min-height: 34px; padding: 5px 14px;
  border-radius: 999px; cursor: pointer; color: var(--accent);
  background: var(--surface-2); background: color-mix(in srgb, var(--accent) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.btn-short { display: none; }
@media (max-width: 420px) { .btn-long { display: none; } .btn-short { display: inline; } }
/* điện thoại: 4 nút (Video · Fanfic · Cổ vũ · Nuôi Lumi) gọn lại cho vừa một hàng */
@media (max-width: 440px) {
  .top-nav { gap: 5px; }
  .top-link, .donate-btn { padding: 5px 9px; font-size: .78rem; }
}
@media (max-width: 380px) {
  .top-nav { gap: 4px; }
  .top-link, .donate-btn { padding: 5px 6px; }
}
.top-extra { display: flex; align-items: center; gap: 4px; }
.top-extra:empty { display: none; }

/* nút đổi ngôn ngữ 🌐 */
.lang { position: relative; flex: none; }
.lang > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 5px 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: .85rem; font-weight: 700; line-height: 1.4; cursor: pointer; user-select: none; white-space: nowrap;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover, .lang[open] > summary { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 200px; margin: 0; padding: 6px;
  list-style: none; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .4);
}
.lang-list a {
  display: block; padding: 8px 12px; border-radius: 9px; color: var(--text); text-decoration: none;
  font-size: .92rem; font-weight: 500; line-height: 1.4;
}
.lang-list a:hover { background: var(--surface-2); }
.lang-list a[aria-current] { color: var(--accent); font-weight: 700; }
.lang-list a[aria-current]::after { content: " ✓"; }
/* trang Fanfic khi xem bằng tiếng nước ngoài: báo truyện viết bằng tiếng Việt */
.lang-note { margin-top: -6px; margin-bottom: 10px; color: var(--muted); font-size: .85rem; }
.donate-link { color: var(--accent); font-weight: 600; }
.top a:focus-visible, .top button:focus-visible, .top summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* no credit line (site.tagline empty): the buttons sit on the right, next to the language button */
@media (min-width: 641px) {
  .tagline[hidden] + .top-nav { margin-left: auto; }
}

/* điện thoại: hàng 1 logo (+ nút tài khoản ở trang Fanfic), hàng 2 các nút, hàng 3 dòng ghi công */
@media (max-width: 640px) {
  .top { gap: 8px; justify-content: flex-start; }
  .top::before { content: ""; order: 2; flex-basis: 100%; height: 0; }
  .top .brand { order: 0; }
  .top .lang { order: 1; margin-left: auto; }
  .top .top-extra { order: 1; }
  .top .top-nav { order: 3; }
  .top .tagline { order: 4; flex-basis: 100%; margin-left: 0; text-align: left; }
  .brand { font-size: 1.15rem; }
}

/* ---------- dải chữ chạy ở trên cùng trang ---------- */
.ticker {
  display: block; overflow: hidden; white-space: nowrap; padding: 7px 0;
  background: linear-gradient(90deg, var(--team-a), var(--team-b)); color: #fff;
  font-size: .85rem; font-weight: 700; line-height: 1.5; text-decoration: none;
}
.ticker:focus-visible { outline: 3px solid var(--text); outline-offset: -3px; }
.ticker-track { display: inline-flex; animation: lm-ticker var(--dur, 40s) linear infinite; will-change: transform; }
.ticker-item { padding-right: 56px; }
.ticker:hover .ticker-track, .ticker:focus-visible .ticker-track { animation-play-state: paused; }
.ticker.flash { animation: lm-ticker-flash .5s ease 4; }
@keyframes lm-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes lm-ticker-flash { 50% { filter: brightness(1.35) saturate(1.3); } }

/* ---------- hộp nổi (dùng chung) ---------- */
.sheet {
  width: min(520px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px);
  padding: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45);
}
.sheet::backdrop { background: rgba(18, 12, 22, .55); }
.sheet-in { padding: 18px 20px 20px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.icon-btn {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 1rem; cursor: pointer;
}
.sheet-sub { margin: 4px 0 12px; font-size: .85rem; color: var(--muted); }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
@media (max-width: 640px) {
  .sheet { width: 100%; max-height: 92%; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .sheet-in { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .sheet-actions > * { flex: 1 1 0; justify-content: center; }
}

/* ---------- hộp ủng hộ website (donate) ---------- */
.lm-dd { font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.6; }
.lm-dd .ghost {
  display: inline-flex; align-items: center;
  font: inherit; font-size: .875rem; font-weight: 600; min-height: 36px; padding: 6px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--text); cursor: pointer; text-decoration: none;
}
.lm-dd .primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer;
}
.lm-dd a:focus-visible, .lm-dd button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* nền QR luôn trắng, kể cả chế độ tối, để app ngân hàng quét được */
.qr { margin: 4px auto 0; width: min(100%, 300px); padding: 12px; background: #fff; border-radius: 16px;
      box-shadow: 0 0 0 1px var(--line); }
.qr img, .qr svg { display: block; width: 100%; height: auto; border-radius: 6px; }
.qr-wait {
  display: grid; place-items: center; aspect-ratio: 1; padding: 20px; text-align: center;
  color: #6c6570; font-size: .9rem; font-weight: 500;
}
/* no team yet: a lighter dashed frame with a faint QR glyph instead of a big empty white square */
.qr:has(.qr-wait) {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface)); box-shadow: none;
  border: 2px dashed color-mix(in srgb, var(--accent) 30%, var(--line));
}
.qr:has(.qr-wait) .qr-wait { aspect-ratio: auto; min-height: 170px; gap: 10px; align-content: center; color: var(--muted); }
.qr:has(.qr-wait) .qr-wait::before {
  content: ""; width: 52px; height: 52px; background: var(--accent); opacity: .4;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M3 3h7v7H3zM4.5 4.5v4h4v-4zM5.5 5.5h2v2h-2zM14 3h7v7h-7zM15.5 4.5v4h4v-4zM16.5 5.5h2v2h-2zM3 14h7v7H3zM4.5 15.5v4h4v-4zM5.5 16.5h2v2h-2zM14 14h2.5v2.5H14zM18.5 14H21v2.5h-2.5zM16.25 16.25h2.5v2.5h-2.5zM14 18.5h2.5V21H14zM18.5 18.5H21V21h-2.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M3 3h7v7H3zM4.5 4.5v4h4v-4zM5.5 5.5h2v2h-2zM14 3h7v7h-7zM15.5 4.5v4h4v-4zM16.5 5.5h2v2h-2zM3 14h7v7H3zM4.5 15.5v4h4v-4zM5.5 16.5h2v2h-2zM14 14h2.5v2.5H14zM18.5 14H21v2.5h-2.5zM16.25 16.25h2.5v2.5h-2.5zM14 18.5h2.5V21H14zM18.5 18.5H21V21h-2.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* thanh PK LenaMiu vs MiuLena: hai phe kéo co, chỉ hiện % */
.pk {
  position: relative; margin: 2px 0 14px; padding: 14px 14px 12px; border-radius: 16px;
  background: var(--surface-2);
  background: linear-gradient(100deg, color-mix(in srgb, var(--team-a) 14%, var(--surface-2)),
                                      var(--surface-2) 50%, color-mix(in srgb, var(--team-b) 14%, var(--surface-2)));
}
.pk-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.pk-side { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pk-side b { font-size: .9rem; font-weight: 800; white-space: nowrap; }
.pk-side.a b { color: var(--team-a); }
.pk-side.b { text-align: right; }
.pk-side.b b { color: var(--team-b); }
.pk-pct {
  margin-top: 2px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; transition: transform .25s ease;
}
.pk-side.a .pk-pct { color: var(--team-a); }
.pk-side.b .pk-pct { color: var(--team-b); }
.crown { display: inline-block; margin-right: 3px; visibility: hidden; }
.pk-side.b .crown { margin: 0 0 0 3px; }
.pk-side.lead .crown { visibility: visible; animation: pk-crown 1.6s ease-in-out infinite; }
.pk-vs {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--team-a), var(--team-b)); color: #fff;
  font-size: .8rem; font-weight: 900; letter-spacing: .02em; font-style: italic;
  box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--team-b) 70%, transparent);
  animation: pk-vs 2.4s ease-in-out infinite;
}
.pk-bar { position: relative; margin-top: 12px; }
.pk-track {
  display: flex; height: 20px; border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25);
}
.pk-fill { position: relative; overflow: hidden; }
.pk-fill.a {
  flex: none; width: 50%; background: linear-gradient(90deg, #ff8ab4, var(--team-a));
  transition: width 1s cubic-bezier(.25, 1.35, .45, 1);   /* hơi nảy qua rồi về, như đang giằng co */
}
.pk-fill.b { flex: 1; background: linear-gradient(90deg, var(--team-b), #a98bff); }
/* sọc chạy: phe hồng đẩy sang phải, phe tím đẩy sang trái */
.pk-fill::after {   /* rộng hơn thanh 2 bên, dịch đúng 1 chu kỳ sọc (14px / cos45° ≈ 19.8px) rồi lặp lại */
  content: ""; position: absolute; top: 0; bottom: 0; left: -40px; right: -40px;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 7px, transparent 7px 14px);
  animation: pk-stripes .9s linear infinite;
}
.pk-fill.b::after { animation-direction: reverse; }
/* tia lửa ở chỗ hai phe giáp nhau */
.pk-spark {
  position: absolute; top: 50%; left: 50%; z-index: 1; width: 34px; height: 34px;
  display: grid; place-items: center; font-size: 15px; pointer-events: none;
  border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff 0 32%, rgba(255, 255, 255, .55) 48%, transparent 70%);
  transition: left 1s cubic-bezier(.25, 1.35, .45, 1);
  animation: pk-spark 1.1s ease-in-out infinite;
}
.pk-heart {
  position: absolute; top: 50%; z-index: 2; font-size: 18px; pointer-events: none;
  transform: translate(-50%, -50%); animation: pk-fly 1.2s ease-out forwards;
}
.pk-news { margin: 10px 0 0; min-height: 1.3em; font-size: .82rem; color: var(--muted); text-align: center; }
.pk-news.fresh { color: var(--text); font-weight: 700; }
.pk.hit .pk-bar { animation: pk-shake .55s ease; }
.pk.hit-a .pk-side.a .pk-pct, .pk.hit-b .pk-side.b .pk-pct { animation: pk-pop .6s ease; }
@keyframes pk-stripes { from { transform: translateX(-19.8px); } to { transform: translateX(0); } }
@keyframes pk-spark { 50% { transform: translate(-50%, -50%) scale(1.2); } }
@keyframes pk-vs { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.06); } }
@keyframes pk-crown { 50% { transform: translateY(-3px) rotate(-8deg); } }
@keyframes pk-pop { 35% { transform: scale(1.3); } }
@keyframes pk-shake {
  20% { transform: translateX(-4px) scaleY(1.15); } 40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); } 80% { transform: translateX(2px); }
}
@keyframes pk-fly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1.15); }
}
.teams-label { display: flex; align-items: center; margin: 0 0 8px; font-size: .95rem; font-weight: 700; }
/* step numbers: ① team, ② bank QR or PayPal, ③ PayPal amount */
.step-no {
  flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; line-height: 1;
}
/* ô chọn phe: chưa chọn thì có viền + nền màu, 2 nút tỏa sáng nhấp nháy cho dễ thấy */
#teamBox {
  margin: 0 0 12px; padding: 12px; border-radius: 16px; border: 2px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
#teamBox.pick {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
#teamBox.pick .team.a { animation: lm-glow-a 1.6s ease-in-out infinite; }
#teamBox.pick .team.b { animation: lm-glow-b 1.6s ease-in-out infinite .8s; }
@keyframes lm-glow-a { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--team-a) 28%, transparent); border-color: var(--team-a); } }
@keyframes lm-glow-b { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--team-b) 28%, transparent); border-color: var(--team-b); } }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.team {
  min-height: 48px; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer;
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text);
}
.team.a { color: var(--team-a); }
.team.b { color: var(--team-b); }
.team.a[aria-pressed="true"] { background: var(--team-a); border-color: var(--team-a); color: #fff; }
.team.b[aria-pressed="true"] { background: var(--team-b); border-color: var(--team-b); color: #fff; }
.team[aria-pressed="true"]::before { content: "✓ "; }
.memo { margin: 10px 0 0; text-align: center; font-size: .9rem; }
.memo b { font-size: 1.05rem; letter-spacing: .02em; }
.memo-copy {
  margin-left: 6px; padding: 2px 10px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text);
}
.acct { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .9rem; }
.acct dt { color: var(--muted); }
.acct dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.qr-tip { margin: 12px 0 0; font-size: .8rem; color: var(--muted); }
/* xem bằng tiếng nước ngoài: mã QR chỉ dùng được với ngân hàng / ví Việt Nam */
.qr-tip.vn-only {
  margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; color: var(--text);
  background: var(--surface-2); background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}
/* nút Ko-fi / PayPal cho người ở nước ngoài */
.intl { margin: 2px 0 4px; padding: 14px; border-radius: 14px; background: var(--surface-2); text-align: center; }
.intl-text { margin: 0 0 12px; font-size: .9rem; }
.lm-dd .intl-go { width: 100%; }
/* nút PayPal: chọn số tiền rồi bấm nút vàng của PayPal */
.pp { margin-top: 2px; text-align: left; }
.pp-label { display: flex; align-items: center; margin: 0 0 8px; font-size: .95rem; font-weight: 700; }
.pp-amounts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pp-amt {
  min-height: 40px; min-width: 56px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer;
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text);
}
.pp-amt[aria-pressed="true"] {
  border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.pp-other {
  display: block; width: 100%; min-height: 42px; margin: 0 0 10px; padding: 8px 12px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.pp-buttons { min-height: 45px; }
.pp-msg { margin: 0; font-size: .9rem; color: var(--muted); text-align: center; }
.pp-msg:not(:empty) { margin: 0 0 10px; }
/* bấm PayPal mà chưa chọn phe: ô chọn phe rung nhẹ + viền màu */
#teamBox.need .team.a, #teamBox.need .team.b { border-color: var(--accent); animation: lm-need .45s ease 2; }
@keyframes lm-need { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.pp-msg.bad { color: var(--danger); font-weight: 600; }
.pp-msg.good { color: var(--text); font-weight: 700; }
/* banner at the top of the box: a LenaMiu pink → MiuLena purple wash with Lumi's orange in the corner,
   language chips + close on top, the project name and title, and Lumi peeking in over the bottom edge */
.lm-dd .sheet-in { padding-top: 0; }
.dd-hero {
  position: relative; margin: 0 -20px 14px; padding: 12px 20px 0; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, #f0963c 24%, transparent) 0%, transparent 60%),
    linear-gradient(120deg, color-mix(in srgb, var(--team-a) 16%, var(--surface)), color-mix(in srgb, var(--team-b) 14%, var(--surface)));
}
.dd-top { display: flex; align-items: center; gap: 8px; }
.lm-dd .dd-close { margin-left: auto; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.dd-hero-main { display: flex; align-items: flex-end; gap: 8px; }
.dd-hero-text { flex: 1; min-width: 0; padding: 10px 0 16px; }
.dd-eyebrow {
  margin: 0 0 2px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.lm-dd #dTitle { margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.lm-dd #dTitle:focus { outline: none; }
.dd-sub { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.dd-lumi { flex: none; width: 96px; height: 112px; margin-right: -6px; overflow: hidden; }
.dd-lumi img {
  display: block; width: 100%; height: auto; transform-origin: 50% 100%;
  filter: drop-shadow(0 6px 10px rgba(80, 40, 10, .22)); animation: dd-lumi 3.2s ease-in-out infinite;
}
@keyframes dd-lumi { 50% { transform: translateY(4px) rotate(-3deg); } }
/* language chips (the header's 🌐 menu is behind the open dialog) */
.dd-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.dd-langs-ic { margin-right: 1px; font-size: .9rem; }
.dd-lang {
  min-height: 30px; min-width: 38px; padding: 2px 9px; font: inherit; font-size: .75rem; font-weight: 700; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--muted);
}
/* the chosen language is filled, so a focus ring on another chip can't be mistaken for it */
.dd-lang[aria-pressed="true"] {
  border-color: var(--accent); background: var(--accent); color: var(--on-accent);
  box-shadow: 0 2px 8px -3px color-mix(in srgb, var(--accent) 70%, transparent);
}
/* how to give: Vietnamese bank QR or PayPal, as two cards with an icon and a short line */
#payBox { margin: 0 0 12px; padding: 0 14px; }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-tab {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 10px;
  font: inherit; text-align: left; cursor: pointer; color: var(--text);
  border: 2px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.pay-ic {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent);
  transition: background-color .2s ease, color .2s ease;
}
.pay-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pay-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pay-txt b { font-size: .88rem; font-weight: 800; }
.pay-txt small { margin-top: 2px; font-size: .72rem; font-weight: 500; color: var(--muted); }
.pay-tab[aria-pressed="true"] {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.pay-tab[aria-pressed="true"] .pay-ic { background: var(--accent); color: var(--on-accent); }
.pay-tab[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: -8px; right: -8px; display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: .7rem; font-weight: 900; box-shadow: 0 0 0 2px var(--surface);
}
/* phones: the two ways become tiles (icon on top), the language chips get smaller so they stay on one line */
@media (max-width: 460px) {
  .pay-tabs { gap: 8px; }
  .pay-tab { flex-direction: column; justify-content: center; gap: 6px; padding: 10px 6px; text-align: center; }
  .pay-txt { align-items: center; }
  .pay-txt b { font-size: .85rem; }
  .dd-langs { gap: 4px; }
  .dd-lang { min-width: 32px; padding: 2px 7px; }
}
@media (max-width: 360px) { .dd-langs-ic { display: none; } }
/* PayPal part: a soft card instead of a grey block */
.lm-dd .intl { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); box-shadow: inset 0 0 0 1px var(--line); border-radius: 16px; }

/* ---------- tung bông tung hoa khi có người donate (cho cả trang) ---------- */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 10000; pointer-events: none; }
.cele-banner {
  position: fixed; top: 18px; left: 50%; z-index: 10001; max-width: calc(100% - 24px);
  padding: 10px 20px; border-radius: 999px; color: #fff; font-size: 1rem; font-weight: 800;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); transform: translateX(-50%);
  animation: cele-in .55s cubic-bezier(.2, 1.4, .4, 1), cele-out .4s ease 4.8s forwards;
}
.cele-banner.a { background: linear-gradient(90deg, #ff7aa8, var(--team-a)); }
.cele-banner.b { background: linear-gradient(90deg, var(--team-b), #a98bff); }
@keyframes cele-in { from { opacity: 0; transform: translate(-50%, -30px) scale(.7); } }
@keyframes cele-out { to { opacity: 0; transform: translate(-50%, -20px); } }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-item + .ticker-item { display: none; }
  .ticker { white-space: normal; padding-left: 16px; padding-right: 16px; }
  .ticker.flash, .cele-banner, .dd-lumi img { animation: none; }
  .pk-fill::after, .pk-spark, .pk-vs, .pk-side.lead .crown, .pk.hit .pk-bar,
  .pk.hit-a .pk-side.a .pk-pct, .pk.hit-b .pk-side.b .pk-pct { animation: none; }
  .pk-fill.a, .pk-spark { transition: none; }
  #teamBox.need .team, #teamBox.pick .team { animation: none; }
}
