/* ══════════════════════════════════════════════════════════════════
   KHO TRO CHOI — giao dien
   Toan bo hinh anh trong day duoc ve bang CSS (gradient, bo tron,
   bong do), khong dung anh ngoai — nen trang nhe va in ra man chieu
   o do phan giai nao cung sac net.
   ══════════════════════════════════════════════════════════════════ */

.ar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ---------------- thanh de bai ----------------
   De bai la nhan vat chinh cua man hinh: chu to, dat tren mot dai giay
   mau kem co vien vang mong, giong to thiep viet tay. */
.ar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: clamp(10px, 1.8vw, 16px) clamp(13px, 2.2vw, 22px);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8 0%, #fdf5e6 100%);
  border: 1px solid rgba(233, 162, 59, 0.42);
  box-shadow: 0 2px 10px rgba(31, 26, 23, 0.06);
}
.ar-prompt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-items: flex-start;
}
.ar-p-nhan {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(200, 55, 45, 0.1);
  color: var(--color-red-700);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.5;
}
.ar-prompt b {
  font-family: 'Noto Serif SC', 'Be Vietnam Pro', serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 3.6vw, 2.15rem);
  line-height: 1.22;
  color: var(--color-gray-900);
  text-wrap: balance;
}
.ar-lop .ar-prompt b { font-size: clamp(2rem, 5vw, 3.3rem); }
.ar-lop .ar-p-nhan { font-size: 0.95rem; padding: 4px 15px; }

/* Diem va dong ho lam theo kieu con dau. */
.ar-meta { display: flex; gap: 9px; flex-shrink: 0; }
.ar-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  padding: 7px 12px;
  border-radius: 13px;
  background: linear-gradient(165deg, #fffdf8, #f3ece0);
  border: 1px solid var(--color-gray-300);
  box-shadow: 0 2px 6px rgba(31, 26, 23, 0.08);
}
.ar-chip i {
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}
.ar-chip b {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  color: var(--color-gray-900);
}
.ar-chip-diem {
  background: linear-gradient(165deg, #f2bf6b, #e9a23b);
  border-color: #b7791f;
}
.ar-chip-diem i { color: #6b4405; }
.ar-chip-diem b { color: #4a2c05; }
.ar-lop .ar-chip { min-width: 96px; padding: 9px 16px; }
.ar-lop .ar-chip b { font-size: 2.2rem; }
.ar-lop .ar-chip i { font-size: 0.78rem; }

/* ---------------- san choi ---------------- */
.ar-stage {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 320px;
  max-height: 72vh;
  background:
    radial-gradient(120% 90% at 50% 100%, #eaf4ef 0%, #f7f4ec 55%, #fdfbf7 100%);
  border: 1px solid var(--color-gray-200);
  box-shadow: inset 0 2px 18px rgba(31, 26, 23, 0.05), inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.ar-lop .ar-stage { min-height: min(62vh, 620px); }

.ar-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.ar-foot:empty { display: none; }

.ar-btn {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--color-gray-300);
  background: #fff;
  padding: 10px 22px;
  color: var(--color-gray-700);
}
.ar-btn-chinh {
  background: linear-gradient(180deg, var(--color-red-600), var(--color-red-800));
  border-color: var(--color-red-800);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 13px 34px;
  box-shadow: 0 6px 16px rgba(138, 36, 29, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ar-btn-chinh:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(138, 36, 29, 0.42); }
.ar-btn:focus-visible { outline: 3px solid var(--color-gold-500); outline-offset: 2px; }

.ar-thieu {
  margin: auto;
  padding: 30px;
  text-align: center;
  color: var(--color-gray-600);
  background: var(--color-gold-50);
  border: 1px dashed var(--color-gold-400);
  border-radius: 18px;
}

/* ---------------- bang ket qua ---------------- */
.ar-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
}
.ar-over { background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.94) 0 46%, rgba(255,255,255,.78) 100%); }
.ar-over-emoji {
  font-size: 4rem;
  line-height: 1;
  animation: ar-over-hien .5s cubic-bezier(.34,1.5,.64,1) both;
}
@keyframes ar-over-hien { from { transform: scale(.4) rotate(-14deg); opacity: 0; } }
.ar-over-diem {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2.1rem, 5.4vw, 3.3rem);
  font-weight: 900;
  color: var(--color-red-700);
  line-height: 1.1;
}
.ar-over-chi { color: var(--color-gray-600); margin-bottom: 10px; }

/* ══════════════ 1 · BONG BÓNG ══════════════ */
.ar-bub {
  position: absolute;
  left: 0;   /* bottom dat bang JS theo % chieu cao san */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: calc(88px * var(--co, 1));
  height: calc(88px * var(--co, 1));
  padding: 4px;
  border: none;
  cursor: pointer;
  font: inherit;
  border-radius: 50%;
  /* Anh bong bong goc rat nhat (ve cho nen xanh), nen them quang va vien
     mo de no van doc duoc khi troi qua dai dat mau kem o duoi. */
  background: url('/img/game/bong-bong.png') center / contain no-repeat,
              radial-gradient(circle at 50% 50%, rgba(255,255,255,.34) 0 58%, rgba(23,182,174,.20) 72%, rgba(23,182,174,.05) 100%);
  box-shadow: 0 3px 10px rgba(13, 90, 110, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  transition: transform 0.12s ease;
}
.ar-bub-zh {
  font-size: calc(1.55rem / var(--co, 1) * 1.08);
  font-weight: 700;
  color: var(--color-gray-900);
  line-height: 1.1;
}
.ar-bub-py {
  font-size: 0.72rem;
  color: var(--color-teal-600);
  line-height: 1.1;
}
.ar-lop .ar-bub { width: calc(124px * var(--co, 1)); height: calc(124px * var(--co, 1)); }
.ar-lop .ar-bub-zh { font-size: calc(2.2rem / var(--co, 1) * 1.08); }
.ar-lop .ar-bub-py { font-size: 0.95rem; }

.ar-bub:hover { filter: brightness(1.06); }
.ar-bub-no { animation: ar-no 0.26s ease-out forwards; pointer-events: none; }
@keyframes ar-no {
  60% { transform: scale(1.35); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}
.ar-bub-lac { animation: ar-lac 0.3s ease; }
@keyframes ar-lac {
  25% { margin-left: -7px; }
  75% { margin-left: 7px; }
}

/* ══════════════ 2 · ĐẬP CHUỘT ══════════════ */
.ar-stage.ar-moles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: clamp(6px, 1.6vw, 16px);
  padding: clamp(12px, 2.6vw, 26px);
  place-items: end center;
  background: radial-gradient(120% 90% at 50% 0%, #f7f0e2 0%, #efe4cf 100%);
}
.ar-hole {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
/* mieng hang */
.ar-hole::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 34%;
  border-radius: 50%;
  background: linear-gradient(180deg, #6d5a42 0%, #4a3b2a 100%);
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.45);
}
.ar-mole {
  position: relative;
  z-index: 1;
  border: none;
  font: inherit;
  cursor: pointer;
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translateY(132%);   /* nup han duoi mieng hang */
  transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
  margin-bottom: 4%;
}
.ar-mole.is-len { transform: translateY(0); }
.ar-mole:not(.is-len) { pointer-events: none; }

.ar-mole-than {
  display: block;
  width: clamp(46px, 7.5vw, 80px);
  height: clamp(42px, 6.8vw, 72px);
  background: url('/img/game/chuot.png') center bottom / contain no-repeat;
}
.ar-mole-mat { display: none; }   /* mat ve bang CSS truoc day — nay dung anh */
.ar-mole-zh {
  display: block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--color-gold-500);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  font-weight: 700;
  color: var(--color-gray-900);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(31, 26, 23, 0.12);
}
.ar-lop .ar-mole-zh { font-size: clamp(1.4rem, 3vw, 2.2rem); }
.ar-lop .ar-mole-than { width: clamp(64px, 9vw, 112px); height: clamp(58px, 8vw, 100px); }

.ar-mole-trung .ar-mole-than { filter: hue-rotate(75deg) saturate(1.4) brightness(1.1); }
.ar-mole-trung .ar-mole-zh { border-color: var(--color-green-500); }
.ar-mole-truot .ar-mole-zh { border-color: var(--color-red-500); animation: ar-lac 0.3s ease; }

/* ══════════════ 3 · LẬT THẺ ══════════════ */
.ar-stage.ar-cards {
  display: grid;
  grid-template-columns: repeat(var(--cot, 4), 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(7px, 1.6vw, 14px);
  padding: clamp(12px, 2.4vw, 22px);
  place-content: stretch;
  background: radial-gradient(120% 90% at 50% 0%, #fdf5e6 0%, #f7f4ec 100%);
}
.ar-card {
  position: relative;
  min-height: 0;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  background: none;
  perspective: 700px;
}
.ar-card-lung,
.ar-card-mat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 12px;
  backface-visibility: hidden;
  transition: transform 0.4s ease;
}
.ar-card-lung {
  background: linear-gradient(145deg, var(--color-red-600) 0%, var(--color-red-800) 100%);
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1.3rem, 3vw, 2rem);
  border: 2px solid var(--color-gold-500);
  box-shadow: 0 3px 10px rgba(31, 26, 23, 0.18);
}
.ar-card-mat {
  background: #fff;
  border: 2px solid var(--color-gold-400);
  transform: rotateY(180deg);
  padding: 4px;
  text-align: center;
}
.ar-card.is-mo .ar-card-lung { transform: rotateY(-180deg); }
.ar-card.is-mo .ar-card-mat { transform: rotateY(0); }
.ar-card.is-xong .ar-card-mat {
  background: var(--color-green-50);
  border-color: var(--color-green-500);
}
.ar-card.is-xong { pointer-events: none; }
.ar-card-zh { font-size: clamp(1.2rem, 2.8vw, 1.9rem); color: var(--color-gray-900); line-height: 1.1; }
.ar-card-py { font-size: 0.72rem; font-style: normal; color: var(--color-teal-600); }
.ar-card-vn { font-size: clamp(0.78rem, 1.7vw, 1rem); font-weight: 600; color: var(--color-gray-700); line-height: 1.2; }
.ar-lop .ar-card-zh { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.ar-lop .ar-card-vn { font-size: clamp(0.95rem, 2vw, 1.3rem); }
.ar-lop .ar-card-py { font-size: 0.92rem; }

@media (prefers-reduced-motion: reduce) {
  .ar-bub, .ar-mole, .ar-card-lung, .ar-card-mat { transition: none; }
  .ar-bub-no, .ar-bub-lac, .ar-mole-truot .ar-mole-zh { animation: none; }
}

/* ══════════════ 7 · MÊ CUNG ĐỌC CHỮ ══════════════ */
.ar-stage.ar-me {
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 22px);
  background: radial-gradient(120% 90% at 50% 0%, #eef1fb 0%, #e4e9f7 100%);
}
.ar-me-luoi {
  display: grid;
  grid-template-columns: repeat(var(--cot), 1fr);
  grid-template-rows: repeat(var(--hang), 1fr);
  gap: clamp(4px, 1vw, 9px);
  /* Giu o gan vuong: cao bao nhieu thi rong bay nhieu, khong keo det ra. */
  aspect-ratio: var(--cot) / var(--hang);
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}
.ar-me-o {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid var(--color-gray-200);
  background: #fff;
  overflow: hidden;
}
.ar-me-o b {
  font-size: clamp(0.85rem, 2.1vw, 1.5rem);
  color: var(--color-gray-900);
  line-height: 1.1;
}
.ar-me-o i {
  font-style: normal;
  font-size: clamp(0.5rem, 1.1vw, 0.75rem);
  color: var(--color-teal-600);
  line-height: 1.1;
}
.ar-lop .ar-me-o b { font-size: clamp(1.1rem, 2.8vw, 2.1rem); }
.ar-lop .ar-me-o i { font-size: clamp(0.62rem, 1.4vw, 0.98rem); }

.ar-me-o.is-dau { border-style: dashed; border-color: var(--color-gray-400); }
.ar-me-o.is-cuoi {
  border-color: var(--color-gold-500);
  background: var(--color-gold-50);
}
.ar-me-o.is-daDi { background: var(--color-blue-50); border-color: var(--color-blue-500); }
.ar-me-o.is-dangO {
  background: var(--color-blue-500);
  border-color: var(--color-blue-600);
  box-shadow: 0 0 0 3px rgba(68, 114, 234, 0.25);
}
.ar-me-o.is-dangO b { color: #fff; }
.ar-me-o.is-dangO i { color: rgba(255, 255, 255, 0.82); }
.ar-me-o.is-sai { animation: ar-lac 0.3s ease; border-color: var(--color-red-500); background: var(--color-red-50); }
.ar-me-o.is-xa { animation: ar-lac 0.3s ease; }

/* ---------- ảnh lấy từ bộ giáo cụ PowerPoint ---------- */
/* Nền sân bong bóng: sân trường phẳng, chữ nổi rõ trên nền này. */
.ar-stage.ar-bong-nen {
  background:
    url('/img/game/nen-truong.png') center bottom / cover no-repeat,
    linear-gradient(180deg, #16b6ae 0%, #fdf3cf 100%);
}
/* Chữ trên bong bóng phải đậm hơn vì nền bong bóng trong suốt. */
.ar-bub-zh { text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 6px rgba(255, 255, 255, 0.8); }
.ar-bub-py { text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95); }

/* Mê cung: ô đang đứng gắn nhân vật, ô ra gắn rương báu. */
.ar-me-o.is-dangO::after,
.ar-me-o.is-cuoi::after {
  content: '';
  position: absolute;
  right: 3px;
  bottom: 2px;
  width: 26px;
  height: 26px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}
.ar-me-o { position: relative; }
.ar-me-o.is-cuoi::after { background-image: url('/img/game/ruong.png'); }
.ar-me-o.is-dangO::after { background-image: url('/img/game/nhan-vat.png'); }
.ar-lop .ar-me-o.is-dangO::after,
.ar-lop .ar-me-o.is-cuoi::after { width: 36px; height: 36px; }

/* ══════════════ TRAU CHUỐT TỪNG SÂN CHƠI ══════════════ */

/* --- Mê cung: ô như phiến đá, đường đã đi sáng lên --- */
.ar-stage.ar-me {
  background:
    repeating-linear-gradient(45deg, rgba(74, 99, 201, 0.035) 0 9px, transparent 9px 18px),
    radial-gradient(130% 100% at 50% 0%, #f2f4fd 0%, #e2e7f8 100%);
}
.ar-me-o {
  background: linear-gradient(170deg, #fff 0%, #f6f5f1 100%);
  box-shadow: 0 2px 4px rgba(31, 26, 23, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.ar-me-o.is-daDi {
  background: linear-gradient(170deg, #dfe7ff 0%, #c8d5fb 100%);
  box-shadow: inset 0 0 0 1px rgba(74, 99, 201, 0.3);
}
.ar-me-o.is-dangO {
  box-shadow: 0 0 0 4px rgba(68, 114, 234, 0.22), 0 5px 12px rgba(31, 46, 92, 0.3);
}
.ar-me-o.is-cuoi {
  background: linear-gradient(170deg, #fff6e2 0%, #fae3b4 100%);
  box-shadow: 0 0 0 3px rgba(233, 162, 59, 0.25), 0 3px 9px rgba(120, 80, 10, 0.2);
}

/* --- Lật thẻ: lưng thẻ có khung vàng như thẻ bài --- */
.ar-card-lung {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 220, 160, 0.16) 0 42%, transparent 43%),
    linear-gradient(145deg, var(--color-red-600) 0%, var(--color-red-800) 100%);
  box-shadow: 0 4px 12px rgba(31, 26, 23, 0.22), inset 0 0 0 4px rgba(233, 162, 59, 0.28);
}
.ar-card-zh { font-family: 'Noto Serif SC', serif; }

/* --- Đập chuột: miệng hang sâu hơn, nền đất có vân --- */
.ar-stage.ar-moles {
  background:
    repeating-linear-gradient(115deg, rgba(140, 105, 60, 0.035) 0 7px, transparent 7px 15px),
    radial-gradient(130% 100% at 50% 0%, #faf3e4 0%, #eadfc8 100%);
}
.ar-hole::after {
  background: radial-gradient(90% 130% at 50% 0%, #2f2418 0%, #5a452f 55%, #7a5f40 100%);
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(255, 255, 255, 0.35);
}
.ar-mole-zh { font-family: 'Noto Serif SC', serif; }

/* --- Bong bóng: chữ Hán dùng bộ chữ có chân --- */
.ar-bub-zh { font-family: 'Noto Serif SC', serif; }

/* ══════════════ 9 · VÒNG QUAY MAY MẮN ══════════════ */
.ar-stage.ar-vq {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 20px);
  padding: clamp(12px, 2.4vw, 24px);
  background:
    radial-gradient(circle at 50% 42%, rgba(233, 162, 59, 0.16) 0 40%, transparent 62%),
    radial-gradient(130% 100% at 50% 0%, #fdf6e9 0%, #f1e5cf 100%);
}
.ar-vq-khung {
  position: relative;
  width: min(74vw, 42vh, 380px);
  aspect-ratio: 1;
  flex-shrink: 0;
}
.ar-vq-dia {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-gray-200);
  box-shadow:
    0 0 0 8px #fffaf0,
    0 0 0 11px var(--color-gold-500),
    0 14px 34px rgba(80, 40, 10, 0.32);
  will-change: transform;
}
/* nhãn nằm dọc theo bán kính, đọc từ tâm ra ngoài */
/* Nhan cao dung nua duong kinh va lay ĐÁY lam tam xoay — day chinh la
   tam dia, nen xoay bao nhieu do la nam dung giua mieng do, khong phu
   thuoc chu dai hay ngan. */
.ar-vq-nhan {
  position: absolute;
  left: 50%;
  top: 0;
  width: 34%;
  height: 50%;
  margin-left: -17%;
  padding-top: 7%;
  box-sizing: border-box;
  transform-origin: 50% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.ar-vq-nhan b {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(0.78rem, 2.3vw, 1.32rem);
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ar-vq-nhan i { font-style: normal; font-size: 0.62rem; opacity: 0.88; }
.ar-lop .ar-vq-nhan b { font-size: clamp(1rem, 2.8vw, 1.7rem); }
.ar-lop .ar-vq-nhan i { font-size: 0.8rem; }

/* kim chỉ ở đỉnh */
.ar-vq-kim {
  position: absolute;
  left: 50%;
  top: -9px;
  width: 30px;
  height: 40px;
  margin-left: -15px;
  background: linear-gradient(180deg, #c8372d, #8a241d);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: drop-shadow(0 3px 5px rgba(60, 14, 10, 0.5));
  transform-origin: 50% 12%;
  z-index: 3;
}
.ar-vq-kim.is-quay { animation: ar-kim 0.22s ease-in-out infinite; }
@keyframes ar-kim { 50% { transform: rotate(-11deg); } }

/* nút quay ở giữa */
.ar-vq-nut {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 27%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 2;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 800;
  font-size: clamp(0.72rem, 2vw, 1.05rem);
  letter-spacing: 0.06em;
  color: #fff6e2;
  background: radial-gradient(circle at 38% 32%, #e05a4c 0 30%, #c8372d 55%, #8a241d 100%);
  box-shadow: 0 0 0 5px #fffaf0, 0 6px 16px rgba(80, 30, 20, 0.45);
  transition: transform 0.14s ease;
}
.ar-vq-nut:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.06); }
.ar-vq-nut:disabled { cursor: default; opacity: 0.75; }
.ar-vq-nut:focus-visible { outline: 3px solid var(--color-gold-500); outline-offset: 5px; }

/* ô kết quả */
.ar-vq-kq {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 2.2em;
  text-align: center;
}
.ar-vq-kq.is-hien { animation: ar-kq-hien 0.45s cubic-bezier(.34,1.5,.64,1) both; }
@keyframes ar-kq-hien { from { transform: scale(.55); opacity: 0; } }
.ar-vq-nhan-kq {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--color-green-50);
  color: var(--color-green-600);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ar-vq-kq b {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.5rem, 4.4vw, 2.6rem);
  font-weight: 900;
  color: var(--color-red-700);
  line-height: 1.15;
}
.ar-vq-kq i { font-style: normal; color: var(--color-gray-600); font-size: 0.92rem; }
.ar-lop .ar-vq-kq b { font-size: clamp(2rem, 5.6vw, 3.6rem); }
.ar-lop .ar-vq-kq i { font-size: 1.2rem; }
.ar-vq-het { color: var(--color-gray-500); }

/* bảng điều khiển dưới sân */
.ar-vq-dk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}
.ar-vq-kieu { display: flex; gap: 5px; padding: 4px; border-radius: 999px; background: var(--color-gray-100); }
.ar-vq-k {
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--color-gray-600);
}
.ar-vq-k.on {
  background: #fff;
  color: var(--color-red-700);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(31, 26, 23, 0.14);
}
.ar-vq-so, .ar-vq-gat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-gray-600);
  cursor: pointer;
}
.ar-vq-so input {
  font: inherit;
  width: 62px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid var(--color-gray-300);
}
.ar-vq-nhap {
  font: inherit;
  font-size: 0.9rem;
  width: min(100%, 420px);
  margin: 8px auto 0;
  display: block;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--color-gray-300);
  resize: vertical;
}
.ar-vq-ghi {
  margin: 5px 0 0;
  text-align: center;
  font-size: 0.76rem;
  color: var(--color-gray-500);
}

@media (prefers-reduced-motion: reduce) {
  .ar-vq-dia { transition: none !important; }
  .ar-vq-kim.is-quay { animation: none; }
  .ar-vq-kq.is-hien { animation: none; }
}
