/* 9Fin — tông tím năng động, ưu tiên điện thoại. */

:root {
  --nen: #f7f3ff;
  --the: #ffffff;
  --vien: #e8dff8;
  --chu: #1a1230;
  --chu-nhat: #6b5f82;
  --chinh: #7c3aed;
  --chinh-nhat: #ede9fe;
  --chinh-dam: #5b21b6;
  --chinh-2: #d946ef;
  --thang: #16a34a;
  --thua: #dc2626;
  --vang: #d97706;
  --vang-nhat: #fef3c7;
  --bong: 0 1px 2px rgba(88, 28, 135, .06), 0 8px 20px rgba(124, 58, 237, .10);
  --bo: 16px;
  --duoi: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --nen: #12081f;
    --the: #1c122c;
    --vien: #3b2a55;
    --chu: #f3e8ff;
    --chu-nhat: #b8a4d4;
    --chinh: #c4b5fd;
    --chinh-nhat: #3b0764;
    --chinh-dam: #e9d5ff;
    --chinh-2: #f0abfc;
    --thang: #4ade80;
    --thua: #f87171;
    --vang: #fbbf24;
    --vang-nhat: #3a2c0a;
    --bong: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px rgba(124, 58, 237, .18);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--nen);
  color: var(--chu);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(var(--duoi) + env(safe-area-inset-bottom));
  overflow-wrap: break-word;
}

a { color: var(--chinh); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.dau {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(118deg, #6d28d9 0%, #7c3aed 48%, #d946ef 100%);
  color: #fff;
  padding: env(safe-area-inset-top) 0 0;
  box-shadow: 0 6px 18px rgba(124, 58, 237, .28);
}
.dau-tren {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 12px;
}
.ve-9app {
  flex: none;
  display: inline-flex; align-items: center; gap: 1px;
  height: 32px; padding: 0 9px 0 8px;
  border-radius: 10px;
  background: #fff; color: #6d28d9;
  font-size: 16px; font-weight: 900; letter-spacing: -.6px;
  line-height: 1; text-decoration: none;
}
.ve-9app span { font-size: 11px; font-weight: 800; color: #7c3aed; }
.hieu { color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.hieu small { display: block; font-size: 10px; font-weight: 650; letter-spacing: 1.2px; opacity: .8; }
.dau-tren .phai { margin-left: auto; }
.nut-tho {
  background: rgba(255, 255, 255, .16); color: #fff; border: 0;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  cursor: pointer;
}

.thanh-duoi {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: var(--the);
  border-top: 1px solid var(--vien);
  padding-bottom: env(safe-area-inset-bottom);
}
.thanh-duoi a {
  flex: 1; text-align: center; padding: 8px 2px 7px;
  color: var(--chu-nhat); font-size: 11px; font-weight: 600;
}
.thanh-duoi a b { display: block; font-size: 18px; line-height: 1.25; font-weight: 400; }
.thanh-duoi a.chon { color: var(--chinh); }

.than { max-width: 720px; margin: 0 auto; padding: 12px 12px 24px; }

.the {
  background: var(--the); border: 1px solid var(--vien);
  border-radius: var(--bo); box-shadow: var(--bong);
  padding: 14px; margin-bottom: 12px;
}
.the > h2, .the > h3 { margin: 0 0 10px; font-size: 15px; }
h1 { font-size: 20px; margin: 4px 0 12px; }
.nhat { color: var(--chu-nhat); }
.nho { font-size: 13px; }
.rat-nho { font-size: 12px; }
.giua { text-align: center; }
.hang { display: flex; align-items: center; gap: 8px; }
.hang-deu { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gian { flex: 1; min-width: 0; }

.bao {
  border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
  font-size: 14px; border: 1px solid transparent;
}
.bao-vui { background: var(--chinh-nhat); color: var(--chinh-dam); border-color: var(--chinh); }
.bao-loi { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.bao-nhac { background: var(--vang-nhat); color: var(--vang); border-color: var(--vang); }
@media (prefers-color-scheme: dark) {
  .bao-loi { background: #3b1414; color: #fca5a5; border-color: #7f1d1d; }
}

.nut {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(118deg, #6d28d9, #7c3aed 55%, #c026d3);
  color: #fff; border: 0; border-radius: 12px;
  padding: 11px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
  min-height: 44px;
  box-shadow: 0 6px 14px rgba(124, 58, 237, .28);
}
.nut-phu { background: var(--the); color: var(--chinh); border: 1px solid var(--chinh); }
.nut-xam { background: var(--the); color: var(--chu-nhat); border: 1px solid var(--vien); }
.nut-do { background: var(--the); color: var(--thua); border: 1px solid var(--thua); }
.nut-rong { width: 100%; }
.nut-be { padding: 6px 11px; min-height: 34px; font-size: 13px; border-radius: 9px; }
a.nut { color: #fff; }
a.nut-phu { color: var(--chinh); }
a.nut-xam { color: var(--chu-nhat); }

label.nhan { display: block; font-size: 13px; font-weight: 600; margin: 0 0 5px; color: var(--chu-nhat); }
input[type=text], input[type=month], input[type=date], input[type=number], input[type=tel],
input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; font-size: 16px;
  border: 1px solid var(--vien); border-radius: 11px;
  background: var(--nen); color: var(--chu); min-height: 44px;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--chinh); outline-offset: -1px; border-color: var(--chinh);
}
.o { margin-bottom: 11px; }
.o-mk { display: flex; gap: 8px; align-items: stretch; }
.o-mk input { flex: 1; }
.nut-mk {
  flex: none; min-width: 52px; border: 1px solid var(--vien); background: var(--the);
  color: var(--chu-nhat); border-radius: 11px; font: 13px/1 inherit; font-weight: 600;
  cursor: pointer; padding: 0 10px;
}
.luoi2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.loc-ky { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; }
.loc-ky::-webkit-scrollbar { display: none; }
.loc-ky a, .loc-ky button {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  background: var(--the); border: 1px solid var(--vien);
  color: var(--chu-nhat); font-size: 13px; font-weight: 600;
}
.loc-ky a.chon, .loc-ky button.chon { background: var(--chinh); border-color: var(--chinh); color: #fff; }

.o-so { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.o-so > div { background: var(--nen); border-radius: 11px; padding: 9px 6px; text-align: center; }
.o-so b { display: block; font-size: 16px; }
.o-so span { font-size: 11px; color: var(--chu-nhat); }
.o-so .thu b { color: var(--thang); }
.o-so .chi b { color: var(--thua); }

.so-lon { font-size: clamp(26px, 7vw, 36px); font-weight: 800; letter-spacing: -.8px; margin: 0; }
.so-lon.thu { color: var(--thang); }
.so-lon.chi { color: var(--thua); }

.ds-the { display: flex; flex-direction: column; gap: 10px; }
.muc-ds {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--the); border: 1px solid var(--vien); border-radius: var(--bo);
  padding: 12px 14px; box-shadow: var(--bong); color: inherit;
}
.muc-ds .gian { flex: 1; min-width: 0; }
.muc-ds .gian b { display: block; font-size: 15px; }
.muc-ds .tien-gd { font-weight: 800; white-space: nowrap; }
.muc-ds .tien-gd.thu { color: var(--thang); }
.muc-ds .tien-gd.chi { color: var(--thua); }
.chu-cai {
  flex: 0 0 38px; height: 38px; border-radius: 50%;
  background: var(--chinh-nhat); color: var(--chinh-dam);
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
}

.the-nho {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: var(--nen); color: var(--chu-nhat);
}
.the-xanh { background: var(--chinh-nhat); color: var(--chinh-dam); }
.the-vang { background: var(--vang-nhat); color: var(--vang); }

.thanh-han {
  height: 8px; background: var(--nen); border-radius: 99px; overflow: hidden; margin-top: 8px;
}
.thanh-han i { display: block; height: 100%; background: var(--chinh); border-radius: 99px; }
.thanh-han.qua i { background: var(--thua); }
.thanh-han.thanh-thu i { background: var(--thang); }

.nhom-hang {
  display: block; color: inherit; text-decoration: none; margin-top: 12px;
}
.nhom-hang:first-of-type { margin-top: 10px; }

.chon-muc {
  font-size: 12px; border: 1px solid var(--vien); border-radius: 8px;
  padding: 3px 6px; background: var(--nen); color: inherit; max-width: 160px;
}
.hang-muc { margin-top: 4px; }

.anh-qr {
  width: 100%; max-width: 240px; border-radius: 12px;
  border: 1px solid var(--vien); background: #fff;
}
.anh-qr-ve { display: flex; justify-content: center; margin: 8px 0; }
.anh-qr-ve canvas {
  width: 220px; height: 220px; border-radius: 12px;
  background: #fff; padding: 8px; border: 1px solid var(--vien);
}
.lenh-ck {
  text-align: left; font-size: 13px; line-height: 1.55;
  background: var(--chinh-nhat); border-radius: 10px;
  padding: 10px 12px; margin: 12px 0 4px;
}
.lenh-ck b {
  display: inline-block; min-width: 76px; color: var(--chu-nhat); font-weight: 650;
}
.khung-cam { position: relative; border-radius: 14px; overflow: hidden; background: #111; aspect-ratio: 1; }
.khung-cam video, .khung-cam canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.hang-nut { display: flex; gap: 8px; flex-wrap: wrap; }
.hang-nut .nut { flex: 1; }

.trong { text-align: center; color: var(--chu-nhat); padding: 26px 12px; }
.trong .to { font-size: 34px; display: block; margin-bottom: 6px; }

.buoc { font-size: 12px; font-weight: 650; color: var(--chu-nhat); margin: 0 0 10px; }
.buoc b { color: var(--chinh); }

canvas.bieu-do { width: 100%; max-height: 220px; }
