/* Design tokens và component dùng chung cho design-system.html và app-ui.html (Light + Dark). */

/* ---------- Light (mặc định) ---------- */
:root,
[data-theme="light"] {
  /* Nền be ấm */
  --bg: #F3EFEA;
  --bg-top: #E8DDD1;
  --surface: #FFFFFF;
  --surface-2: #F8F5F1;
  --surface-3: #EEE8E0;
  --line: #E9E2D9;
  --line-2: #DCCFBF;
  --ink: #1C1A18;
  --ink-2: #6B655E;
  --ink-3: #A39C93;

  /* Than đen cho khối nổi bật và thanh điều hướng */
  --charcoal: #1F1E1C;
  --hero-bg: linear-gradient(160deg, #3A3733 0%, #1D1C1A 100%);
  --hero-deco: rgba(255, 255, 255, .10);
  --nav-bg: #1F1E1C;

  /* Đỏ san hô cho hành động chính và nút trợ lý */
  --primary: #D93D42;
  --on-primary: #FFFFFF;
  --accent-ink: #C8353A;
  --accent-soft: #FBE4E3;

  /* Be nhấn: badge trạng thái, nền gợi ý, tab đang chọn */
  --primary-soft: #F3E7D8;
  --primary-strong: #87592F;

  --voice-bg: #F3EFEA;
  --bubble-user: #EDE4D8;
  --bubble-agent: #FFFFFF;

  --spend: #B8452F; --spend-bg: #FBE6DF;
  --save: #2F7D4A; --save-bg: #E3F2E7;
  --warn: #87592F; --warn-bg: #F3E7D8;
  --info: #3E6488; --info-bg: #E3ECF5;
  --rose: #A93D52; --rose-bg: #F8E4E8;
  --plum: #6B4F92; --plum-bg: #EEE8F6;
  --coffee: #7B5B3D; --coffee-bg: #F3ECE3;
  --family: #7A5A44; --family-bg: #F2EAE2;
  --shop: #2E7C80; --shop-bg: #E0F1F1;
  --house: #56636F; --house-bg: #E9ECF0;
  --edu: #4A5BA8; --edu-bg: #E6E9F7;
  --danger-fill: #1F1E1C;

  /* Biểu đồ */
  --ch-food: #D2694B; --ch-market: #6E9A7A; --ch-bill: #D0A048; --ch-move: #6D8DB3; --ch-other: #C9B7A2;
  --ch-ink: #1B1510;
  --bar: #E9E0D4; --bar-active: #1F1E1C;
  --heat-0: #F4EFE8; --heat-1: #EADFD0; --heat-2: #D9C5AB; --heat-3: #B99A77; --heat-4: #5C4632; --heat-4-ink: #FFFFFF;

  --shadow-1: 0 1px 2px rgba(60, 45, 30, .04), 0 6px 20px rgba(60, 45, 30, .06);
  --shadow-2: 0 16px 40px rgba(30, 25, 20, .22);
  --orb-hi: #F58A84; --orb-mid: #E04B4F; --orb-lo: #C3343A;
  --orb-glow: rgba(217, 61, 66, .32);
  color-scheme: light;
}

/* ---------- Dark ---------- */
[data-theme="dark"] {
  --bg: #131211;
  --bg-top: #221E1A;
  --surface: #1D1B19;
  --surface-2: #252220;
  --surface-3: #2F2B27;
  --line: #33302C;
  --line-2: #433D37;
  --ink: #F4F0EB;
  --ink-2: #AFA79D;
  --ink-3: #7D766D;

  --charcoal: #2A2724;
  --hero-bg: linear-gradient(160deg, #403B35 0%, #26231F 100%);
  --hero-deco: rgba(255, 255, 255, .08);
  --nav-bg: #2A2724;

  --primary: #D93D42;
  --on-primary: #FFFFFF;
  --accent-ink: #FF8E8A;
  --accent-soft: #3B1F1F;

  --primary-soft: #3A2F25;
  --primary-strong: #E3C39F;

  --voice-bg: #131211;
  --bubble-user: #2F2B27;
  --bubble-agent: #1D1B19;

  --spend: #F2A08A; --spend-bg: #3A211B;
  --save: #8ED3A3; --save-bg: #1B3123;
  --warn: #E3C39F; --warn-bg: #3A2F25;
  --info: #9FC0E3; --info-bg: #1C2A39;
  --rose: #F09CB0; --rose-bg: #3B1F27;
  --plum: #C7B2EA; --plum-bg: #2C2439;
  --coffee: #DCC2A6; --coffee-bg: #342A20;
  --family: #D9BBA1; --family-bg: #352A21;
  --shop: #86D0D2; --shop-bg: #183032;
  --house: #B7C1CC; --house-bg: #262B31;
  --edu: #AEB9EE; --edu-bg: #1F2440;
  --danger-fill: #3A3631;

  --ch-food: #E07D5F; --ch-market: #7EAE8B; --ch-bill: #DDB15A; --ch-move: #7F9FC6; --ch-other: #C9B7A2;
  --ch-ink: #1B1510;
  --bar: #34302B; --bar-active: #F4F0EB;
  --heat-0: #252220; --heat-1: #3A322A; --heat-2: #5A4A3A; --heat-3: #8C7258; --heat-4: #E3C39F; --heat-4-ink: #1B1510;

  --shadow-1: 0 0 0 1px #2C2925;
  --shadow-2: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 1px #3A3631;
  --orb-hi: #F58A84; --orb-mid: #E04B4F; --orb-lo: #B92F35;
  --orb-glow: rgba(229, 72, 77, .3);
  color-scheme: dark;
}

/* Khối than đen: đảo token chữ/nền bên trong để nội dung luôn sáng rõ */
.hero {
  background: var(--hero-bg);
  --ink: #FFFFFF;
  --ink-2: #C9C2B8;
  --surface: rgba(255, 255, 255, .10);
  --line: rgba(255, 255, 255, .12);
  --primary-soft: rgba(255, 255, 255, .10);
  --primary-strong: #FFFFFF;
  --save: #9BE0B0;
  --save-bg: rgba(155, 224, 176, .16);
  --shadow-1: none;
  --bar: rgba(255, 255, 255, .14);
  --bar-active: #E9DCCB;
  --h-spend: #FF7F63; --h-income: #7E8CFF; --h-save: #3FE0A8;
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(30, 25, 20, .25);
}

/* ---------- Nền tảng ---------- */
.theme-root { background: var(--bg); color: var(--ink); font-family: 'Be Vietnam Pro', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.theme-root button, .theme-root input { font-family: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }

/* Icon */
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic-xs { width: 16px; height: 16px; } .ic-sm { width: 18px; height: 18px; } .ic-lg { width: 28px; height: 28px; }

/* Typography: nét vừa, gọn như ảnh tham chiếu */
.t-display { font-size: 42px; font-weight: 700; letter-spacing: -1.4px; line-height: 1; }
.t-h1 { font-size: 30px; font-weight: 700; letter-spacing: -.8px; line-height: 1.15; margin: 0; }
.t-h2 { font-size: 19px; font-weight: 600; letter-spacing: -.3px; line-height: 1.25; margin: 0; }
.t-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.t-body { font-size: 15px; font-weight: 500; line-height: 1.5; }
.t-label { font-size: 13px; font-weight: 500; line-height: 1.35; }
.t-cap { font-size: 12px; font-weight: 500; line-height: 1.3; }

/* Card & list */
.card { background: var(--surface); border-radius: 22px; padding: 16px; box-shadow: var(--shadow-1); }
.list { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-1); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 66px; text-decoration: none; color: inherit; }
.li + .li { border-top: 1px solid var(--line); }
.li .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.amt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-h a { font-size: 13px; font-weight: 600; color: var(--accent-ink); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }

/* Buttons */
.btn { height: 50px; border-radius: 25px; padding: 0 22px; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 18px var(--orb-glow); }
.btn-dark { background: var(--charcoal); color: #FFFFFF; }
.btn-tonal { background: var(--primary-soft); color: var(--primary-strong); }
.btn-outline { background: var(--surface); border: 1px solid var(--line-2); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--accent-ink); }
.btn-danger { background: var(--accent-soft); color: var(--accent-ink); }
.btn-sm { height: 40px; border-radius: 20px; padding: 0 16px; font-size: 14px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; border: 0; color: var(--ink); box-shadow: var(--shadow-1); position: relative; cursor: pointer; text-decoration: none; flex-shrink: 0; }
.icon-btn .dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }

/* Chip, badge, segmented, toggle, field */
.chip { height: 34px; padding: 0 14px; border-radius: 17px; background: transparent; border: 1px solid var(--line-2); font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.chip.on { background: var(--surface); border-color: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.badge { height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.b-spend { background: var(--spend-bg); color: var(--spend); } .b-save { background: var(--save-bg); color: var(--save); }
.b-warn { background: var(--warn-bg); color: var(--warn); } .b-info { background: var(--info-bg); color: var(--info); }
.b-neutral { background: var(--surface-3); color: var(--ink); } .b-primary { background: var(--bar-active); color: var(--surface); }
.b-accent { background: var(--accent-soft); color: var(--accent-ink); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface-3); border-radius: 22px; padding: 4px; gap: 4px; }
.seg button { height: 38px; border: 0; background: transparent; border-radius: 19px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.seg a { height: 38px; border-radius: 19px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; display: grid; place-items: center; }
.seg a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.toggle { width: 50px; height: 30px; border-radius: 15px; background: var(--primary); position: relative; flex-shrink: 0; border: 0; cursor: pointer; }
.toggle::after { content: ''; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.toggle.off { background: var(--surface-3); } .toggle.off::after { right: auto; left: 4px; }
.field { height: 50px; border-radius: 25px; background: var(--surface); border: 0; box-shadow: var(--shadow-1); display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px; color: var(--ink-2); }
.field input { flex: 1; border: 0; background: transparent; font-size: 14px; font-weight: 500; color: var(--ink); outline: none; min-width: 0; }
.field input::placeholder { color: var(--ink-2); }
.field .mic { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; border: 0; }

/* Category tiles: nền sáng trung tính, icon mang màu danh mục */
.cat { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.cat-sm { width: 38px; height: 38px; border-radius: 12px; }
.cat-lg { width: 56px; height: 56px; border-radius: 18px; }
.c-food { background: var(--spend-bg); color: var(--spend); } .c-market { background: var(--save-bg); color: var(--save); }
.c-bill { background: var(--warn-bg); color: var(--warn); } .c-move { background: var(--info-bg); color: var(--info); }
.c-health { background: var(--rose-bg); color: var(--rose); } .c-fun { background: var(--plum-bg); color: var(--plum); }
.c-coffee { background: var(--coffee-bg); color: var(--coffee); } .c-family { background: var(--family-bg); color: var(--family); }
.c-primary { background: var(--primary-soft); color: var(--primary-strong); }
.c-rose { background: var(--shop-bg); color: var(--shop); } .c-house { background: var(--house-bg); color: var(--house); }
.c-edu { background: var(--edu-bg); color: var(--edu); }

/* Voice orb: đỏ san hô như nút "+" của ảnh tham chiếu */
.orb { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #FFFFFF; text-decoration: none; flex-shrink: 0;
  background: radial-gradient(circle at 34% 28%, var(--orb-hi) 0%, var(--orb-mid) 55%, var(--orb-lo) 100%);
  box-shadow: 0 10px 24px var(--orb-glow), inset 0 -4px 10px rgba(0, 0, 0, .15), inset 0 2px 5px rgba(255, 255, 255, .35); }
.orb.flat { box-shadow: none; }
.wave { display: flex; align-items: center; gap: 5px; }
.wave i { display: block; width: 6px; border-radius: 3px; background: currentColor; }

/* Bottom navigation: viên thuốc than đen, cả 5 tab đều có icon + nhãn, nút trợ lý nhô lên ở giữa */
.nav { position: sticky; bottom: 16px; margin: 8px 16px 16px; height: 74px; background: var(--nav-bg); border-radius: 30px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; padding: 0 4px; box-shadow: var(--shadow-2); z-index: 5; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 62px; color: #B3ACA2; font-size: 12px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav a .pill { width: 46px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }
.nav a.on { color: #FFFFFF; font-weight: 600; }
.nav a.on .pill { background: rgba(255, 255, 255, .16); }
.nav a.voice { color: #FFFFFF; font-weight: 600; margin-top: -30px; height: auto; }
.nav a.voice .orb { width: 62px; height: 62px; border: 4px solid var(--nav-bg); }

/* Thương hiệu */
.logo { display: inline-grid; place-items: center; border-radius: 30%; background: var(--primary); color: #FFFFFF; flex-shrink: 0; }
.avatar { border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; color: #5A3E26; background: linear-gradient(140deg, #F6E7D3 0%, #E3C7A3 100%); box-shadow: 0 0 0 2px var(--surface); }

/* Bars */
.bars { display: grid; gap: 8px; align-items: end; }
.bars > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bars .bar { width: 100%; border-radius: 10px 10px 4px 4px; background: var(--bar); }
.bars .bar.on { background: var(--bar-active); }
/* Biểu đồ có đường trung bình: nhãn số nổi trên đường kẻ */
.bars.avg > div > span { position: relative; z-index: 1; padding: 0 4px; border-radius: 6px; }
.bars.avg > div > span.t-cap { background: var(--surface); }

/* ---------- Agent overlay: trợ lý hiện trên mọi màn hình mà không che nội dung ---------- */
:root, [data-theme="light"] { --island-bg: rgba(24, 22, 20, .94); --island-line: rgba(255, 255, 255, .06); --scrim: rgba(20, 18, 16, .38); }
[data-theme="dark"] { --island-bg: rgba(48, 44, 40, .96); --island-line: rgba(255, 255, 255, .10); --scrim: rgba(0, 0, 0, .55); }

@keyframes xu-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes xu-bar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes xu-blink { 50% { opacity: 0; } }
@keyframes xu-spin { to { transform: rotate(360deg); } }
@keyframes xu-ring { 0% { box-shadow: 0 0 0 0 rgba(217, 61, 66, .45); } 100% { box-shadow: 0 0 0 14px rgba(217, 61, 66, 0); } }

/* Hạt trợ lý: quả cầu thu nhỏ, đổi hình theo trạng thái */
.blob { position: relative; width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; color: #FFFFFF;
  background: radial-gradient(circle at 34% 28%, var(--orb-hi) 0%, var(--orb-mid) 55%, var(--orb-lo) 100%); }
.blob.live { animation: xu-breathe 2.4s ease-in-out infinite, xu-ring 1.6s ease-out infinite; }
.blob.think::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--orb-hi); border-right-color: var(--orb-hi); animation: xu-spin 1s linear infinite; }
.blob.wait { background: #FFFFFF; color: var(--primary); }
.blob.err { background: #5B5650; }
.eq { display: flex; align-items: center; gap: 3px; height: 18px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; animation: xu-bar 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.25s; } .eq i:nth-child(3) { animation-delay: -.5s; } .eq i:nth-child(4) { animation-delay: -.75s; } .eq i:nth-child(5) { animation-delay: -.1s; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -3px; background: var(--primary); animation: xu-blink 1s steps(1) infinite; }

/* Đảo trợ lý (agent island) */
.island { position: absolute; left: 14px; right: 14px; bottom: 102px; z-index: 6; min-height: 60px; padding: 10px; border-radius: 30px; background: var(--island-bg); color: #FFFFFF;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .3), inset 0 0 0 1px var(--island-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.island.inline { position: relative; left: auto; right: auto; bottom: auto; }
.island .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.island .k { font-size: 12px; font-weight: 600; color: #F7A29D; display: flex; align-items: center; gap: 6px; }
.island .v { font-size: 14px; font-weight: 500; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island .ib { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; color: #FFFFFF; border: 0; flex-shrink: 0; cursor: pointer; text-decoration: none; }
.island .qb { height: 36px; padding: 0 14px; border-radius: 18px; border: 0; background: rgba(255, 255, 255, .14); color: #FFFFFF; font: 600 13px 'Be Vietnam Pro', sans-serif; cursor: pointer; }
.island .qb.yes { background: var(--primary); }
.island .prog { position: absolute; left: 62px; right: 62px; bottom: 6px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.island .prog i { display: block; height: 100%; border-radius: 2px; background: var(--orb-hi); }

/* Phụ đề: chỉ hiện câu trả lời của trợ lý, thời gian hiển thị theo độ dài câu */
.caption { position: absolute; z-index: 6; bottom: 176px; max-width: 300px; padding: 12px 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); font-size: 16px; font-weight: 500; line-height: 1.45; display: flex; flex-direction: column; gap: 6px; }
.caption.agent { left: 18px; border-radius: 20px 20px 20px 6px; }
.caption .who { font-size: 12px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.caption .timer { height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.caption .timer i { display: block; height: 100%; background: var(--ink-3); }

/* Thông báo kết quả, kèm Hoàn tác */
.toast { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 7; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-2); }
.toast.inline { position: relative; top: auto; left: auto; right: auto; }

/* Phần tử trợ lý đang thao tác: viền active; nhãn chỉ dùng cho nút/thao tác cần người dùng hành động */
.agent-focus { position: relative; outline: 2px solid var(--primary); outline-offset: 3px; box-shadow: 0 0 0 9px rgba(217, 61, 66, .10); }
.agent-tag { position: absolute; top: -15px; right: 12px; z-index: 2; height: 26px; padding: 0 10px 0 4px; border-radius: 13px; background: var(--primary); color: #FFFFFF; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; box-shadow: 0 6px 14px var(--orb-glow); }
.agent-tag .lg { width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }

/* Bảng chi tiết trợ lý */
.scrim { position: absolute; inset: 0; z-index: 6; background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; background: var(--bg); border-radius: 32px 32px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .22); display: flex; flex-direction: column; overflow: hidden; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 10px auto 2px; }
.tl { position: relative; display: flex; flex-direction: column; gap: 14px; }
.tl::before { content: ''; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-row { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.tl-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 0 0 4px var(--bg); }
.tl-said { font-size: 13px; font-weight: 500; color: var(--ink-2); padding-top: 9px; }
.tl-said b { color: var(--ink); font-weight: 600; }

.nav a.voice.live .orb { animation: xu-ring 1.6s ease-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .blob.live, .blob.think::after, .eq i, .caret, .nav a.voice.live .orb { animation: none; }
}

/* Xếp hạng danh mục: thanh ngang, mở rộng tốt khi có nhiều danh mục */
.rank { display: flex; flex-direction: column; gap: 14px; }
.rank-row { display: flex; align-items: center; gap: 12px; }
.rank-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rank-bar { display: flex; align-items: center; gap: 8px; }
.rank-bar .track { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.rank-bar .track i { display: block; height: 100%; border-radius: 5px; }
.rank-bar .pct { width: 34px; text-align: right; font-size: 12px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.tab-panel[hidden] { display: none; }

/* Bản hội thoại trong bảng chi tiết: có cả phụ đề người dùng (dạng thu nhỏ chỉ hiện phụ đề của trợ lý) */
.tr { display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.tr-user { align-self: flex-end; max-width: 82%; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tr-user .bubble { background: var(--bubble-user); color: var(--ink); border-radius: 20px 20px 6px 20px; padding: 10px 14px; font-size: 15px; font-weight: 500; line-height: 1.45; }
.tr-user.live .bubble { background: transparent; border: 1.5px dashed var(--line-2); }
.tr-time { font-size: 12px; font-weight: 500; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.tr-agent { display: flex; gap: 10px; align-items: flex-start; max-width: 94%; }
.tr-agent .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tr-agent .say { font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.interim { color: var(--ink-3); }

/* Chọn giọng trợ lý */
.voice-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 17px; font-weight: 700; }
.vtags { display: flex; flex-wrap: wrap; gap: 6px; }
.vtag { height: 22px; padding: 0 8px; border-radius: 11px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--primary-soft); color: var(--primary-strong); display: grid; place-items: center; flex-shrink: 0; cursor: pointer; }
.play.on { background: var(--charcoal); color: #FFFFFF; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--primary); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; display: grid; place-items: center; }
.radio.on { border-color: var(--primary); }
.radio.on::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.li.sel { background: var(--accent-soft); }
.mini-wave { display: flex; align-items: center; gap: 2px; height: 16px; color: var(--primary); }
.mini-wave i { width: 2px; border-radius: 1px; background: currentColor; animation: xu-bar 1s ease-in-out infinite; height: 100%; }
.mini-wave i:nth-child(2n) { animation-delay: -.3s; } .mini-wave i:nth-child(3n) { animation-delay: -.6s; }
.ring { position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .mini-wave i { animation: none; } }

/* Bộ chọn biểu đồ trên khối than: tab chữ gạch chân màu số liệu, nút đổi khoảng thời gian */
.mtabs { display: flex; gap: 16px; }
.mtabs button { border: 0; background: none; padding: 6px 0; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .5); border-bottom: 2px solid transparent; cursor: pointer; }
.mtabs button.on { color: #FFFFFF; font-weight: 700; border-bottom-color: var(--c); }
.period { margin-left: auto; height: 30px; padding: 0 10px 0 12px; border: 0; border-radius: 15px; background: rgba(255, 255, 255, .1); color: #FFFFFF; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.hchart { background: rgba(255, 255, 255, .05); border-radius: 16px; padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 2px; }
/* Rồng trên biểu đồ: biểu cảm theo data-mood; nhãn giá trị bật lên khi rồng dừng; cột loé sáng khi rồng đáp */
.dragon .ex, .dragon .d-paws { display: none; }
.auth-dragon .dragon .d-paws { display: inline; }
.dragon[data-mood="0"] .ex0, .dragon[data-mood="1"] .ex1, .dragon[data-mood="2"] .ex2, .dragon[data-mood="3"] .ex3, .dragon[data-mood="4"] .ex4, .dragon[data-mood="5"] .ex5 { display: inline; }
svg[data-mascot] .vpill { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .55s cubic-bezier(.34, 1.56, .64, 1); }
svg[data-mascot] .vpill.on { opacity: 1; transform: none; }
svg[data-mascot] .bar.hit { animation: bar-hit .5s ease-out; }
svg[data-mascot] .bar.cry { animation: bar-cry 1.4s ease-out; }
@keyframes bar-cry { 0% { filter: brightness(1.6) drop-shadow(0 0 10px #8FD3FF); } 40% { filter: saturate(.2) brightness(.7) drop-shadow(0 0 8px #8FD3FF); } 100% { filter: none; } }
@keyframes bar-hit { from { filter: brightness(1.9) drop-shadow(0 0 10px #FFFFFF); } to { filter: brightness(1); } }

/* ---------- Xác thực: sân khấu than có rồng + tấm form nổi ---------- */
.auth { display: flex; flex-direction: column; background: var(--bg); }
.a-stage { position: relative; flex: 1 1 auto; min-height: 250px; overflow: hidden; border-radius: 0 0 36px 36px;
  background: radial-gradient(120% 70% at 50% 78%, rgba(217, 61, 66, .42), transparent 60%), var(--hero-bg); box-shadow: none; }
.a-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1.3px); background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 60%, #000, transparent); mask-image: radial-gradient(80% 70% at 50% 60%, #000, transparent); }
.a-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 0; }
.a-back { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.a-lang { margin-left: auto; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #FFFFFF; font: 600 12.5px/1 'Be Vietnam Pro', system-ui; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.a-orbit { position: absolute; left: 50%; top: 58%; width: 360px; transform: translate(-50%, -50%); fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1; stroke-dasharray: 2 6; animation: a-spin 40s linear infinite; }
.a-coin { position: absolute; z-index: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); animation: a-float 4.2s ease-in-out infinite; }
.a-hero { position: absolute; left: 50%; top: 58%; width: 250px; height: 210px; transform: translate(-50%, -50%); z-index: 2; }
.auth-dragon { position: absolute; left: 12px; bottom: 8px; width: 226px; height: 181px; overflow: visible; }
.a-plate { position: absolute; left: 44px; right: 44px; bottom: 2px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 201, 77, .55), transparent); animation: a-glow 3s ease-in-out infinite; }
.a-bubble { position: absolute; z-index: 3; right: -30px; top: 0; padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: #FFFFFF; color: #1F1E1C; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); animation: a-pop .6s cubic-bezier(.34, 1.56, .64, 1) both .3s; transform-origin: 0 100%; }
.a-prop { position: absolute; z-index: 3; width: 36px; height: 36px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); animation: a-float 2.6s ease-in-out infinite; }
.a-q { position: absolute; z-index: 3; color: #FFD15C; font-size: 22px; font-weight: 800; animation: a-float 2.2s ease-in-out infinite; }

/* Rồng trên màn xác thực: thở, vỗ cánh, đuôi đung đưa, chớp mắt; che mắt khi nhập mật khẩu */
.auth-dragon .d-in { animation: a-breathe 2.4s ease-in-out infinite; }
.auth-dragon .d-wing { transform-box: fill-box; transform-origin: 90% 85%; animation: a-wing 1.4s ease-in-out infinite; }
.auth-dragon .d-tail { transform-box: fill-box; transform-origin: 100% 40%; animation: a-tail 2s ease-in-out infinite; }
.auth-dragon .d-eye { transform-box: fill-box; transform-origin: center; animation: a-blink 4.2s infinite; }
.auth-dragon .d-eye circle { transition: transform .25s ease; }
.auth-dragon .d-sack { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.auth-dragon .d-paws { transform-box: fill-box; transform-origin: 50% 100%; transform: translateY(14px); opacity: 0; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .2s; }
.auth-dragon.cover .d-paws { transform: none; opacity: 1; }
.auth-dragon.cover .d-eye { opacity: 0; }

/* Tấm form */
.a-sheet { position: relative; z-index: 3; margin: -28px 12px 12px; padding: 24px 18px 20px; border-radius: 30px; background: var(--surface); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 12px; animation: a-rise .6s cubic-bezier(.22, 1, .36, 1) both; }
.a-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 2px; }
.a-head .t-h1 { font-size: 26px; }
.a-head p { margin: 0; }
.af { min-height: 58px; border-radius: 18px; background: var(--surface-2); border: 1.5px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 8px 0 10px; transition: border-color .2s, box-shadow .2s, background .2s; cursor: text; }
.af:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.af-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex-shrink: 0; transition: background .2s, color .2s; }
.af:focus-within .af-ic { background: var(--primary); color: var(--on-primary); }
.af-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.af-l { font-size: 12px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.af-l em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.af input { border: 0; background: transparent; font: 600 15.5px/1.3 'Be Vietnam Pro', system-ui; color: var(--ink); outline: none; padding: 0; min-width: 0; }
.af input[type="password"] { letter-spacing: 2px; }
.af-eye { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.a-link { font-size: 13.5px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.a-cta { width: 100%; height: 56px; border-radius: 28px; font-size: 16px; margin-top: 4px; }
.a-cta:disabled { opacity: .45; box-shadow: none; cursor: default; }
.a-foot { margin: 2px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.a-foot a { color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.meter { display: flex; align-items: center; gap: 10px; margin-top: -2px; padding: 0 4px; }
.meter .bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.meter .bars i { height: 6px; border-radius: 3px; background: var(--surface-3); transition: background .3s; }
.meter[data-s="1"] .bars i:nth-child(-n+1) { background: var(--spend); }
.meter[data-s="2"] .bars i:nth-child(-n+2) { background: var(--ch-bill); }
.meter[data-s="3"] .bars i:nth-child(-n+3) { background: var(--save); }
.meter[data-s="4"] .bars i { background: var(--save); }
.meter-t { font-size: 12.5px; font-weight: 700; color: var(--ink-2); min-width: 60px; text-align: right; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-c { height: 58px; min-width: 0; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface-2); text-align: center; font: 700 24px/1 'Be Vietnam Pro', system-ui; color: var(--ink); outline: none; caret-color: var(--primary); transition: border-color .2s, box-shadow .2s, transform .2s; }
.otp-c.filled { background: var(--surface); border-color: var(--line-2); }
.otp-c.on, .otp-c:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-2px); }
.a-timer { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.a-timer span { display: inline-flex; align-items: center; gap: 6px; }
.a-timer b { color: var(--ink); }
.a-timer button { border: 0; background: none; font: 600 13px 'Be Vietnam Pro', system-ui; color: var(--ink-3); }
.a-timer button.ready { color: var(--accent-ink); cursor: pointer; min-height: 36px; }
/* Banner trạng thái trong form xác thực: chưa xác minh (warn), đã đổi mật khẩu (save) */
.a-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; }
.a-note.warn { background: var(--warn-bg); color: var(--warn); }
.a-note.save { background: var(--save-bg); color: var(--save); }
.a-note-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255, 255, 255, .55); }
[data-theme="dark"] .a-note-ic { background: rgba(255, 255, 255, .08); }
.a-note-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.a-note-main b { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.a-note-main .btn { margin-top: 8px; height: 40px; }
/* Thẻ kết quả nổi bật đầu form (sau khi đặt lại mật khẩu): tiêu đề rõ + các hệ quả liệt kê từng dòng */
.a-status { border-radius: 20px; background: var(--save-bg); border: 1.5px solid color-mix(in srgb, var(--save) 30%, transparent); overflow: hidden; animation: a-pop-in .5s cubic-bezier(.34, 1.56, .64, 1) .25s both; }
.a-status-top { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px; }
.a-status-top div { display: flex; flex-direction: column; gap: 1px; }
.a-status-top b { font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--save); }
.a-status-top span { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.a-status-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--save); color: var(--save-bg); box-shadow: 0 6px 14px color-mix(in srgb, var(--save) 35%, transparent); }
.a-status-ic .ic { width: 24px; height: 24px; stroke: var(--save-bg); stroke-width: 3; }
.a-status-list { list-style: none; margin: 0; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--surface) 55%, transparent); border-top: 1px solid color-mix(in srgb, var(--save) 18%, transparent); }
.a-status-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); }
.a-status-list .ic { color: var(--save); }
.a-status-list b { font-weight: 700; }
@keyframes a-pop-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
/* Ô mã báo lỗi: viền đỏ và rung nhẹ một lần */
.otp.err .otp-c { border-color: var(--accent-ink); background: var(--accent-soft); color: var(--accent-ink); animation: a-shake .4s ease both; }
.a-err { display: flex; align-items: flex-start; gap: 6px; margin: -2px 0 0; font-size: 13.5px; font-weight: 500; line-height: 1.4; color: var(--accent-ink); }
.a-err .ic { margin-top: 2px; }
.a-foot-sm { font-size: 13px; line-height: 1.5; }
/* Xác minh xong: dấu tích lớn + thanh tiến trình trong lúc tự đăng nhập */
.a-done { align-items: center; text-align: center; padding-top: 28px; padding-bottom: 28px; }
.a-done .a-head { align-items: center; }
.a-done-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--save-bg); color: var(--save); animation: a-pop .5s cubic-bezier(.34, 1.56, .64, 1) .2s both; }
.a-done-ic .ic { stroke-width: 2.6; }
.a-progress { width: 100%; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.a-progress i { display: block; width: 40%; height: 100%; border-radius: 3px; background: var(--primary); animation: a-load 1.2s ease-in-out infinite; }
@keyframes a-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes a-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes a-load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.a-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.a-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); padding-bottom: 8px; border-bottom: 3px solid var(--surface-3); }
.a-steps li i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--surface-3); }
.a-steps li.on { color: var(--ink); border-color: var(--primary); }
.a-steps li.on i { background: var(--primary); color: var(--on-primary); }

@keyframes a-float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-9px) rotate(6deg); } }
@keyframes a-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes a-glow { 0%, 100% { opacity: .7; transform: scaleX(1); } 50% { opacity: 1; transform: scaleX(1.12); } }
@keyframes a-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes a-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes a-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }
@keyframes a-wing { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-16deg); } }
@keyframes a-tail { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(7deg); } }
@keyframes a-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) {
  .a-orbit, .a-coin, .a-plate, .a-bubble, .a-prop, .a-q, .a-sheet, .auth-dragon *, .otp.err .otp-c, .a-done-ic, .a-progress i, .a-status { animation: none !important; }
}

/* ---------- Khởi động: đồng xu nảy, sóng âm lan ra, rồng bật lên từ đồng xu ----------
   Splash gốc của hệ điều hành chỉ có nền san hô và đồng xu ở đúng vị trí này, nên hoạt ảnh nối liền không giật. */
.splash { background: #E5484B; }
/* Splash gốc chỉ có màu đặc; gradient hiện dần khi màn hoạt ảnh bắt đầu. */
.splash::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 30% 12%, #FF8D72, #E5484B 55%, #B42A33); animation: s-fade .5s ease-out both; }
.s-center { position: absolute; inset: 0; }
/* Tâm đồng xu (y = 245.5px trong khung 300px) nằm đúng tâm màn hình, trùng với splash gốc iOS/Android. */
.s-art { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -245.5px 0 0 -150px; overflow: visible; }
.s-word { position: absolute; left: 0; right: 0; top: calc(50% + 74.5px); display: flex; flex-direction: column; align-items: center; gap: 2px; color: #FFFFFF; }
.s-word b { font-size: 52px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; animation: s-up .6s cubic-bezier(.22, 1, .36, 1) 1.3s both; }
.s-word span { font-size: 16px; font-weight: 600; opacity: .8; animation: s-up .6s cubic-bezier(.22, 1, .36, 1) 1.45s both; }
.s-coin { transform-box: fill-box; transform-origin: center; animation: s-bump .55s cubic-bezier(.34, 1.56, .64, 1) .15s both; }
.s-bar { transform-box: fill-box; transform-origin: center; animation: s-eq .52s ease-in-out .4s infinite alternate; }
.s-ripple { fill: none; stroke: #FFE7A0; stroke-width: 8; transform-box: fill-box; transform-origin: center; opacity: 0; animation: s-ripple 1.8s cubic-bezier(.2, .7, .3, 1) infinite; }
.s-head { transform-box: view-box; transform-origin: 512px 878px; animation: s-pop .75s cubic-bezier(.34, 1.56, .64, 1) .7s both, s-bob 3.2s ease-in-out 1.6s infinite; }
.s-paws > * { transform-box: fill-box; transform-origin: center; animation: s-pop .45s cubic-bezier(.34, 1.56, .64, 1) 1.05s both; }
.s-eyes > * { transform-box: view-box; transform-origin: 512px 540px; animation: s-blink 3.6s ease-in-out 2.2s infinite; }
.s-halo { transform-box: fill-box; transform-origin: center; animation: s-halo-in .8s ease-out .9s both, s-halo 3s ease-in-out 1.7s infinite; }
.s-spark > * { transform-box: fill-box; transform-origin: center; animation: s-twinkle 2.4s ease-in-out 1.3s infinite both; }
.s-spark > :nth-child(2) { animation-delay: 1.7s; } .s-spark > :nth-child(3) { animation-delay: 2.1s; }
.s-replay { margin-left: auto; height: 30px; padding: 0 12px; border-radius: 15px; border: 1.5px solid currentColor; background: none; color: inherit; font: 700 12.5px 'Be Vietnam Pro', system-ui; cursor: pointer; opacity: .8; }
/* Splash gốc: chỉ còn nền và đồng xu đứng yên */
.splash.static *, .splash.static::before { animation: none !important; }
.splash.static::before { opacity: 0; }
.splash.static .s-head, .splash.static .s-paws, .splash.static .s-spark, .splash.static .s-halo, .splash.static .s-ripple, .splash.static .s-word { visibility: hidden; }

@keyframes s-bump { 0% { transform: scale(1); } 40% { transform: scale(1.16, 1.1); } 70% { transform: scale(.95, 1); } 100% { transform: scale(1); } }
@keyframes s-eq { from { transform: scaleY(.45); } to { transform: scaleY(1.12); } }
@keyframes s-ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.4); opacity: 0; } }
@keyframes s-pop { from { transform: scale(0); opacity: 0; } 40% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
@keyframes s-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes s-blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.08); } }
@keyframes s-halo-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes s-halo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes s-twinkle { 0%, 100% { transform: scale(0) rotate(0); } 30%, 60% { transform: scale(1) rotate(45deg); } }
@keyframes s-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes s-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .splash *, .splash::before { animation: none !important; } }
