/* FONT:BAT-DAU — tự host (OFL-1.1, xem /fonts/OFL-*.txt), không gọi Google Fonts */
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/big-shoulders-display-vietnamese-700-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/big-shoulders-display-vietnamese-800-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/lexend-vietnamese-400-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/lexend-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lexend-vietnamese-600-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lexend-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/lexend-vietnamese-700-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/lexend-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/patrick-hand-vietnamese-400-normal.woff2") format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/patrick-hand-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* FONT:KET-THUC */


/* Bố cục: nhãn hộp quẹt đỏ (khung chỉ đồng) ở đầu → ô tra mã trên nền giấy → thẻ treo hàng được đóng dấu → dãy tem mã mới.
   Một giao diện sáng duy nhất (giấy in), có chủ đích; màu nào cũng khai báo rõ. */
:root {
  --giay: #edece6;
  --trang: #fffefb;
  --muc: #19212c;
  --muc-2: #4b5361;
  --vien: #c9c5ba;
  --do: #b8241b;
  --do-dam: #861a13;
  --kem: #fff4dc;
  --dong: #e2b23a;
  --xanh: #1c6a42;
  --ho-phach: #8f5e00;
  --zalo: #0068ff;
  --zalo-dam: #0050c8;

  --f-so: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --f-chu: "Lexend", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-tay: "Patrick Hand", "Segoe Print", "Comic Sans MS", cursive;

  --bo: 8px;
  color-scheme: only light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Thuộc tính hidden luôn thắng các display:flex/grid bên dưới */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--giay);
  color: var(--muc);
  font-family: var(--f-chu);
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

b,
strong {
  font-weight: 700;
}

.ma {
  white-space: nowrap;
}

.an {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--do);
  outline-offset: 3px;
}

.trang {
  max-width: 32rem;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Nhãn hộp quẹt ---------- */

.nhan {
  position: relative;
  padding: 7px;
  background-color: var(--do);
  color: var(--kem);
  border-radius: 4px;
  box-shadow: 0 2px 0 var(--do-dam);
}

/* Hạt mực in trên giấy nhãn */
.nhan::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.nhan__khung {
  position: relative;
  z-index: 1;
  padding: 14px 16px 16px;
  border: 2px solid var(--dong);
  box-shadow: inset 0 0 0 3px var(--do), inset 0 0 0 4px var(--dong);
}

.nhan__dau {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--dong);
}

.nhan__logo {
  width: 40px;
  height: 52px;
  flex: none;
}

.nhan__ten {
  margin: 0;
  font-family: var(--f-so);
  font-size: 2.375rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nhan__phu {
  margin: 4px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dong);
}

.nhan__chinh {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
}

.nhan__chinh em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--dong);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.nhan__y {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 1.0625rem;
  line-height: 1.45;
}

.nhan__y li {
  position: relative;
  padding-left: 22px;
}

/* Hoa văn hình thoi như trên nhãn diêm */
.nhan__y li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--dong);
  transform: rotate(45deg);
}

.nhan__y strong {
  color: #fff;
}

.nhan__cam-on {
  margin: 12px 0 0;
  font-family: var(--f-tay);
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
}

/* ---------- Tra mã ---------- */

.tra {
  scroll-margin-top: 12px;
}

.tra h1 {
  margin: 0;
  font-family: var(--f-so);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.tra__mo-ta {
  margin: 6px 0 14px;
  color: var(--muc-2);
}

.tra__mo-ta b {
  color: var(--muc);
}

.chi-dan {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin: 0 0 2px 6px;
  color: var(--do);
  font-family: var(--f-tay);
  font-size: 1.5rem;
  line-height: 1;
  transform: rotate(-2deg);
  transform-origin: left bottom;
}

.chi-dan svg {
  width: 46px;
  height: 40px;
  flex: none;
  margin-bottom: -10px;
  animation: nhun 1.6s ease-in-out infinite;
}

.tra.da-cham .chi-dan svg {
  animation: none;
}

.o-tim {
  display: flex;
  align-items: stretch;
  min-height: 78px;
  background: var(--trang);
  border: 3px solid var(--muc);
  border-radius: var(--bo);
  overflow: hidden;
  cursor: text;
  animation: goi 2.6s ease-in-out infinite;
}

.tra.da-cham .o-tim,
.o-tim:focus-within {
  animation: none;
}

.o-tim:focus-within {
  border-color: var(--do);
  box-shadow: 0 0 0 4px rgba(184, 36, 27, 0.2);
}

.o-tim.rung {
  animation: rung 0.4s ease-in-out;
  border-color: var(--do);
}

.o-tim__tien-to {
  display: none;
  align-items: center;
  padding: 0 12px 0 14px;
  background: var(--muc);
  color: var(--kem);
  font-family: var(--f-so);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.o-tim:focus-within .o-tim__tien-to {
  background: var(--do);
}

.o-tim.co-tien-to .o-tim__tien-to {
  display: flex;
}

.o-tim input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 10px 0 14px;
  font-family: var(--f-so);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--muc);
}

/* Mã có chữ (không có tiền tố V-) thường dài → chữ nhỏ hơn để không tràn ô */
.o-tim:not(.co-tien-to) input {
  font-size: 2rem;
}

/* Ô trống: dùng chữ thường để gợi ý nằm giữa ô; gõ số vào thì thành số dập */
.o-tim input:placeholder-shown {
  font-family: var(--f-chu);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0;
}

.o-tim input::placeholder {
  font-family: var(--f-chu);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0;
  color: #8a8f99;
  opacity: 1;
}

.o-tim__xoa {
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: 8px;
  border: 0;
  border-radius: 6px;
  background: var(--giay);
  color: var(--muc-2);
  cursor: pointer;
}

.o-tim__xoa svg {
  width: 22px;
  height: 22px;
}

.o-tim__xoa[hidden] {
  display: none;
}

.tra__vi-du {
  margin: 10px 2px 0;
  font-size: 1rem;
  color: var(--muc-2);
}

.lien-ket {
  display: block;
  min-height: 48px;
  margin: 2px 0 0;
  padding: 10px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1rem;
  color: var(--muc-2);
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ---------- Nút ---------- */

.nut {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--bo);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.15s;
}

/* Nút bấm "thật": có gờ dưới, bấm thì lún xuống */
.nut--tra {
  margin-top: 14px;
  background: var(--muc);
  color: var(--kem);
  font-family: var(--f-so);
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 5px 0 #05080c;
}

.nut--tra:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #05080c;
}

.nut--zalo {
  justify-content: flex-start;
  padding: 12px 18px;
  min-height: 70px;
  background: var(--zalo);
  color: #fff;
  box-shadow: 0 5px 0 var(--zalo-dam);
}

.nut--zalo:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--zalo-dam);
}

.nut--zalo svg {
  width: 34px;
  height: 34px;
  flex: none;
}

.nut__chu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  font-size: 1.3125rem;
}

.nut__chu small {
  font-size: 0.9375rem;
  font-weight: 400;
}

.nut--phu {
  min-height: 56px;
  background: transparent;
  color: var(--muc);
  border: 2px solid var(--muc);
  font-size: 1.125rem;
}

.nut--phu:active {
  background: var(--giay);
}

/* ---------- Thẻ treo kết quả ---------- */

.ket-qua {
  scroll-margin-top: 12px;
}

.ket-qua:empty {
  display: none;
}

.ket-qua:focus {
  outline: none;
}

.the {
  position: relative;
  padding: 22px 18px 20px 18px;
  background: var(--trang);
  border: 2px solid var(--muc);
  border-radius: var(--bo);
  box-shadow: 0 4px 0 rgba(25, 33, 44, 0.12);
  animation: hien 0.22s ease-out;
}

/* Lỗ đục của thẻ treo */
.the--treo::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border: 2px solid var(--muc);
  border-radius: 50%;
  background: var(--giay);
}

.the--treo {
  padding-top: 40px;
}

.the__dau {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 2px dashed var(--vien);
}

.the__nhan {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muc-2);
}

.the__ma {
  margin: 2px 0 0;
  font-family: var(--f-so);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.the__ma-dai {
  font-size: 2.25rem;
}

/* Con dấu cao su */
.dau {
  flex: none;
  align-self: center;
  margin: 4px 4px 0 0;
  padding: 12px 12px 7px;
  border: 3px solid currentColor;
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--trang), inset 0 0 0 5px currentColor;
  font-family: var(--f-so);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-8deg);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 2.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 2.75'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: dong-dau 0.42s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

.dau--con {
  color: var(--xanh);
}

.dau--ban {
  color: var(--do);
}

.dau--dat {
  color: var(--ho-phach);
  font-size: 1.375rem;
}

.the__loi {
  margin: 0 0 18px;
  font-size: 1.1875rem;
}

/* Nút loa: đọc to kết quả bằng giọng tiếng Việt của máy (nút phụ, không lấn nút Zalo) */
.nut-nghe {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin: -4px 0 18px;
  padding: 8px 20px 8px 14px;
  border: 2px solid var(--muc);
  border-radius: 999px;
  background: var(--trang);
  color: var(--muc);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, color 0.15s;
}

.nut-nghe svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.nut-nghe:active {
  background: var(--giay);
}

.nut-nghe[aria-pressed="true"] {
  background: var(--muc);
  color: var(--kem);
}

/* Đang đọc: sóng âm nhấp nháy lần lượt */
.nut-nghe[aria-pressed="true"] .song {
  animation: song-am 1s ease-in-out infinite;
}

.nut-nghe[aria-pressed="true"] .song--xa {
  animation-delay: 0.2s;
}

.the__loi:last-child {
  margin-bottom: 0;
}

.the__ghi-chu {
  margin: 16px 0 0;
  font-size: 1rem;
  color: var(--muc-2);
}

.the__ghi-chu a {
  color: var(--muc);
  font-weight: 700;
  text-underline-offset: 3px;
}

.so-zalo {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.the__tieu {
  margin: 0 0 8px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}

.the__goi-y {
  margin: 18px 0 10px;
  font-weight: 700;
}

.the--tai {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}

/* Bánh xe đá lửa đang quay */
.banh-xe {
  width: 38px;
  height: 38px;
  flex: none;
  color: var(--muc);
  animation: xoay 0.9s linear infinite;
}

/* ---------- Mã mới đăng ---------- */

.ma-moi__dau {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 4px;
}

.ma-moi h2 {
  margin: 0;
  font-family: var(--f-so);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.ma-moi__nhan {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xanh);
}

.ma-moi__mo-ta {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--muc-2);
}

.luoi-ma {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.luoi-ma--hai {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.luoi-ma--mot {
  grid-template-columns: minmax(0, 1fr);
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 60px;
  padding: 8px 6px;
  border: 2px solid var(--muc);
  border-radius: 6px;
  background: var(--trang);
  font-family: var(--f-so);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--muc);
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 3px 0 var(--muc);
  transition: transform 0.08s, box-shadow 0.08s;
}

.chip:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--muc);
}

.chip small {
  font-family: var(--f-chu);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chip--dai {
  font-size: 1.375rem;
}

.chip--con small {
  color: var(--xanh);
}

.chip--ban small {
  color: var(--do);
}

.chip--dat small {
  color: var(--ho-phach);
}

.chip--cho {
  border-style: dashed;
  border-color: var(--vien);
  background: transparent;
  box-shadow: none;
  animation: nhap-nhay 1.4s ease-in-out infinite;
  cursor: default;
}

.ma-moi .nut--phu {
  margin-top: 16px;
}

.ma-moi__trong {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muc-2);
}

.lien-ket--gon {
  display: inline;
  min-height: 0;
  margin: 0;
  padding: 4px 2px;
  color: var(--muc);
  font-weight: 600;
}

.the__nut-sau {
  margin-top: 16px;
}

/* ---------- Nói mã bằng giọng ---------- */

.nut--noi {
  margin-top: 12px;
  min-height: 64px;
  background: var(--trang);
  color: var(--muc);
  border: 2px solid var(--muc);
  box-shadow: 0 4px 0 var(--muc);
}

.nut--noi:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--muc);
}

.nut--noi svg {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--do);
}

.nut--noi .nut__chu {
  font-size: 1.1875rem;
}

.nut--noi .nut__chu small {
  color: var(--muc-2);
}

/* Đang nghe: nút đỏ, micro phập phồng */
.nut--noi.dang-nghe {
  background: var(--do);
  border-color: var(--do-dam);
  color: #fff;
  box-shadow: 0 4px 0 var(--do-dam);
}

.nut--noi.dang-nghe svg {
  color: #fff;
  animation: nghe 1s ease-in-out infinite;
}

.nut--noi.dang-nghe .nut__chu small {
  color: var(--kem);
}

.noi-trang-thai {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 5px solid var(--dong);
  border-radius: 6px;
  background: var(--kem);
  font-size: 1.0625rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@keyframes nghe {
  50% {
    transform: scale(1.18);
  }
}

/* ---------- Ảnh từng mã (ảnh bìa video TikTok) ---------- */

/* Ảnh trên thẻ kết quả: như tấm ảnh kẹp vào thẻ treo */
.the__anh {
  width: min(72%, 270px);
  margin: 2px auto 18px;
  padding: 8px 8px 4px;
  background: #fff;
  border: 1px solid var(--vien);
  border-radius: 3px;
  box-shadow: 0 3px 0 rgba(25, 33, 44, 0.12);
  transform: rotate(-1.2deg);
}

.the__anh img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--giay);
}

.the__anh figcaption {
  text-align: center;
}

.the__video {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 8px;
  color: var(--muc);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.the__video svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--do);
}

/* Mã đã bán/đã đặt: ảnh nhỏ, nhạt màu */
.the__anh--het {
  width: min(46%, 170px);
}

.the__anh--het img {
  filter: grayscale(0.75);
  opacity: 0.85;
}

.the__video span {
  white-space: nowrap;
}

.the__anh--het .the__video {
  gap: 6px;
  padding: 6px 2px;
  font-size: 0.9375rem;
}

.the__anh--het .the__video svg {
  width: 20px;
  height: 20px;
}

/* Ảnh tải hỏng: bỏ khung ảnh, chỉ còn link xem video */
.the__anh--loi {
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  transform: none;
}

.luoi-anh {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.o-anh {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--muc);
  border-radius: 6px;
  background: var(--trang);
  color: var(--muc);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 3px 0 var(--muc);
  transition: transform 0.08s, box-shadow 0.08s;
}

.o-anh:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--muc);
}

.o-anh img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--giay);
}

/* Chưa có ảnh: khung đúng tỉ lệ 3:4 với hình bật lửa mờ */
.o-anh__trong {
  position: relative;
  display: block;
  height: 0;
  padding-top: 133.333%;
  background: var(--giay);
  color: var(--vien);
}

.o-anh__trong svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36%;
  height: auto;
  transform: translate(-50%, -50%);
}

.o-anh__ma {
  display: block;
  padding: 6px 2px 7px;
  border-top: 2px solid var(--muc);
  font-family: var(--f-so);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.o-anh__ma--dai {
  font-size: 1.125rem;
}

.o-anh--cho {
  height: 0;
  padding-top: 160%;
  border-style: dashed;
  border-color: var(--vien);
  background: transparent;
  box-shadow: none;
  animation: nhap-nhay 1.4s ease-in-out infinite;
  cursor: default;
}

/* ---------- Lưu biểu tượng ra màn hình điện thoại ---------- */

.luu-icon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 14px;
  align-items: center;
  padding: 14px;
  background: var(--trang);
  border: 2px dashed var(--vien);
  border-radius: var(--bo);
}

.luu-icon__anh {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.luu-icon h2 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.3;
}

.luu-icon p {
  margin: 2px 0 0;
  font-size: 1rem;
  color: var(--muc-2);
}

.luu-icon__nut {
  grid-column: 1 / -1;
}

/* ---------- Danh sách mua nhiều mã (thanh dưới cùng + khung mở rộng) ---------- */

.gio {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.gio > * {
  width: 100%;
  max-width: 32rem;
  pointer-events: auto;
}

.gio__thanh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--bo);
  background: var(--muc);
  color: var(--kem);
  font: inherit;
  font-size: 1.125rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(25, 33, 44, 0.35);
  -webkit-tap-highlight-color: transparent;
}

.gio__thanh > span:first-child {
  white-space: nowrap;
}

.gio__thanh b {
  font-family: var(--f-so);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.gio__thanh-mo {
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 6px;
  background: var(--zalo);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.gio__khung {
  max-height: 72vh;
  overflow-y: auto;
  margin-bottom: 8px;
  padding: 14px 16px 16px;
  background: var(--trang);
  border: 2px solid var(--muc);
  border-radius: var(--bo);
  box-shadow: 0 10px 28px rgba(25, 33, 44, 0.3);
  overscroll-behavior: contain;
}

.gio__dau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.gio__dau h2 {
  margin: 0;
  font-family: var(--f-so);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.gio__dong {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 0;
  border-radius: 6px;
  background: var(--giay);
  color: var(--muc);
  cursor: pointer;
}

.gio__dong svg {
  width: 24px;
  height: 24px;
}

.gio__ds {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--vien);
}

.gio__ds li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  border-bottom: 1px solid var(--vien);
}

.gio__ds .ma {
  font-family: var(--f-so);
  font-size: 1.75rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.gio__bo {
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--muc);
  border-radius: 6px;
  background: var(--trang);
  color: var(--muc);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.gio__bao {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--dong);
  background: var(--kem);
  font-size: 1rem;
}

.gio__khung .the--tai {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-weight: 600;
}

.nut-gio {
  margin-top: 12px;
  min-height: 54px;
  font-size: 1.0625rem;
}

.nut-gio[aria-pressed="true"] {
  border-color: var(--xanh);
  color: var(--xanh);
  background: #e8f3ec;
}

/* Chừa chỗ cho thanh danh sách để không che nội dung cuối trang và thông báo nổi */
body.co-gio .trang {
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

body.co-gio .thong-bao {
  bottom: calc(86px + env(safe-area-inset-bottom));
}

/* ---------- Chân trang ---------- */

.chan {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--vien);
  color: var(--muc-2);
  font-size: 0.9375rem;
}

.chan p {
  margin: 0;
}

/* ---------- Thông báo nổi ---------- */

.thong-bao {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 10;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 13px 18px;
  border-radius: var(--bo);
  background: var(--muc);
  color: var(--kem);
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.thong-bao.hien {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  max-width: 32rem;
  margin: 0 auto 24px;
  padding: 16px;
  font-weight: 600;
}

/* ---------- Chuyển động ---------- */

@keyframes nhun {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

@keyframes goi {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(184, 36, 27, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(184, 36, 27, 0.16);
  }
}

@keyframes rung {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@keyframes hien {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Đóng dấu: dấu từ trên giáng xuống, nảy nhẹ rồi nằm yên */
@keyframes dong-dau {
  0% {
    opacity: 0;
    transform: rotate(-8deg) scale(1.7);
  }
  55% {
    opacity: 1;
    transform: rotate(-8deg) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: rotate(-8deg) scale(1);
  }
}

@keyframes xoay {
  to {
    transform: rotate(360deg);
  }
}

@keyframes song-am {
  50% {
    opacity: 0.25;
  }
}

@keyframes nhap-nhay {
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }

  .banh-xe {
    animation: xoay 1.6s linear infinite !important;
  }
}
