/* Mekobook AR - giao diện trang AR công khai (scanner, một trải nghiệm, video thay thế, sắp ra mắt).
 *
 * Khái quát từ ar.css của theme HaiLuuNguoc (nền xanh đại dương + chữ Fraunces) sang thương hiệu Mekobook:
 * nền kem, chữ xanh rêu, nút cam viên thuốc, Baloo 2 + Nunito, bo tròn lớn, KHÔNG border-left, KHÔNG emoji.
 * Trang tự chứa (layout riêng _ArLayout) nên không phụ thuộc CSS của theme nào.
 *
 * Màu lấy đúng bảng của BRIEF.md §4. Riêng NỀN NÚT CAM dùng #C2561E (không phải #D96A2B như BRIEF gợi ý):
 * đã đo — chữ trắng trên #D96A2B chỉ đạt ~3.5:1, trên #C2561E đạt 4.5:1 (đủ AA cho chữ thường).
 * Cam bình minh #EE8A4F vẫn dùng cho điểm nhấn trang trí (tia sáng, ngôi sao), không làm nền chữ trắng.
 */

:root {
  --mk-cream: #F6F3EC;      /* surface */
  --mk-cream-2: #EDE6D6;
  --mk-white: #FFFFFF;
  --mk-ink: #1F5C6E;        /* ink / teal-700: chữ đậm (6.7:1 trên kem) */
  --mk-ink-soft: #3E6B79;   /* chữ phụ (5.3:1 trên kem) */
  --mk-green: #4FD14B;      /* brand-500 */
  --mk-orange: #EE8A4F;     /* accent-500: trang trí */
  --mk-orange-btn: #C2561E; /* nền nút + chữ nhấn (4.5:1 với chữ trắng) */
  --mk-orange-btn-2: #AE4814;
  --mk-sun: #F4E46C;        /* sun-300 */
  --mk-mint: #BFEBDD;       /* mint-200 */
  --mk-river: #7DB8E3;      /* river-400: vòng focus */
  --mk-plum: #C36BB5;
  --mk-line: rgba(31, 92, 110, .14);
  --mk-shadow: 0 22px 44px -22px rgba(31, 92, 110, .45), 0 2px 8px rgba(31, 92, 110, .08);
  --mk-font-display: "Baloo 2", "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --mk-font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.ar-body {
  margin: 0;
  background: var(--mk-cream);
  color: var(--mk-ink);
  font-family: var(--mk-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.ar-body img { max-width: 100%; }
.ar-body p { margin: 0; }

.ar-ico { width: 1.25em; height: 1.25em; flex: none; display: block; }

/* [hidden] phải thắng mọi display:flex bên dưới, nếu không thẻ lỗi ẩn vẫn nằm trên cùng và nuốt cú bấm "Bật camera". */
.ar-root [hidden] { display: none !important; }

.ar-root {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9000;
}

/* ───────────────────────── Nút ───────────────────────── */
.ar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--mk-font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.ar-btn:focus-visible,
.ar-brand:focus-visible,
.ar-textlink:focus-visible,
.ar-more summary:focus-visible {
  outline: 3px solid var(--mk-river);
  outline-offset: 3px;
}
.ar-btn:active { transform: translateY(1px); }
.ar-btn:disabled { cursor: progress; opacity: .75; }

.ar-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--mk-orange-btn) 0%, var(--mk-orange-btn-2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 22px -10px rgba(194, 86, 30, .75);
}
.ar-btn--ghost {
  color: var(--mk-ink);
  background: var(--mk-white);
  border-color: var(--mk-ink);
}
.ar-btn--soft {
  color: var(--mk-ink);
  background: var(--mk-mint);
}
.ar-btn--sm { min-height: 48px; padding: 0 18px; font-size: 17px; }
.ar-btn--block { width: 100%; }
.ar-btn .ar-ico { width: 24px; height: 24px; }

@media (hover: hover) {
  .ar-btn--primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 16px 26px -10px rgba(194, 86, 30, .85); }
  .ar-btn--ghost:hover { background: var(--mk-mint); }
  .ar-btn--soft:hover { background: #A9E1D0; }
}

/* ───────────────────────── Khung chung ───────────────────────── */
.ar-permission-card {
  position: absolute;
  inset: 0;
  z-index: 9100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
  background:
    radial-gradient(60% 38% at 100% 0%, rgba(244, 228, 108, .55), transparent 72%),
    radial-gradient(70% 46% at 0% 100%, rgba(191, 235, 221, .95), transparent 72%),
    var(--mk-cream);
}

.ar-sheet {
  width: 100%;
  max-width: 1080px;
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.ar-sheet--narrow { max-width: 560px; }
.ar-sheet--wide { max-width: 1080px; min-height: 0; }

.ar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 4px 0;
}
.ar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--mk-ink);
  text-decoration: none;
  border-radius: 14px;
}
.ar-brand__mark { width: 40px; height: 40px; display: block; }
.ar-brand__word {
  font-family: var(--mk-font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.01em;
}
.ar-brand__book { color: var(--mk-orange-btn); }

.ar-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 6px 0 4px;
}
.ar-stage--single { align-items: center; }

/* Ô minh hoạ: ảnh bình minh sông nước + Martin vẫy tay nhô khỏi khung */
.ar-visual { position: relative; margin-top: 28px; }
.ar-visual__frame {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 16 / 6.4;
  background: var(--mk-mint);
  box-shadow: var(--mk-shadow);
}
.ar-visual__frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.ar-visual__martin {
  position: absolute;
  right: 5%;
  bottom: -3%;
  height: 118%;
  width: auto;
  filter: drop-shadow(0 10px 12px rgba(31, 92, 110, .28));
}

.ar-panel {
  background: var(--mk-white);
  border: 1px solid var(--mk-line);
  border-radius: 28px;
  padding: 22px 18px 18px;
  box-shadow: var(--mk-shadow);
}
.ar-panel--center { width: 100%; max-width: 520px; text-align: center; padding: 28px 20px 24px; }
.ar-panel--center .ar-btn { width: 100%; }
.ar-panel > .ar-btn--block { margin-top: 18px; }

.ar-kicker {
  margin-bottom: 8px !important;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mk-orange-btn);
}
.ar-title {
  margin: 0 0 4px;
  font-family: var(--mk-font-display);
  font-weight: 800;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.22; /* đủ rộng để dấu tiếng Việt của dòng trên không chạm dòng dưới */
  color: var(--mk-ink);
  text-wrap: balance;
}
.ar-title--md { font-size: clamp(24px, 5.6vw, 30px); }
.ar-title--xl { font-size: clamp(34px, 9vw, 58px); line-height: 1.14; }
.ar-lead { margin-top: 4px !important; font-size: 17px; color: var(--mk-ink); }
.ar-lead--hint { margin-bottom: 2px !important; }
.ar-en { display: block; font-size: 15px; line-height: 1.45; color: var(--mk-ink-soft); }
.ar-en--lead { font-size: 17px; margin-bottom: 2px; }
.ar-center { text-align: center; }

.ar-subhead { margin: 22px 0 0; font-family: var(--mk-font-display); font-weight: 700; font-size: 20px; line-height: 1.3; color: var(--mk-ink); }
.ar-subhead .ar-en { display: inline; margin-left: 6px; font-family: var(--mk-font-body); font-weight: 600; font-size: 15px; }

.ar-note { margin-top: 12px !important; font-size: 15px; line-height: 1.5; color: var(--mk-ink-soft); text-align: center; }
.ar-note .ar-en { font-size: 14px; }

/* Thẻ hướng dẫn 3 bước */
.ar-steps { list-style: none; margin: 14px 0 16px; padding: 0; display: grid; gap: 10px; }
.ar-step {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 8px;
  background: var(--mk-cream);
  border-radius: 20px;
}
.ar-step__pic { position: relative; display: block; aspect-ratio: 700 / 480; border-radius: 14px; overflow: hidden; background: var(--mk-mint); }
.ar-step__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ar-step__num {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mk-orange-btn);
  color: #fff;
  font-family: var(--mk-font-display);
  font-weight: 800;
  font-size: 15px;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.ar-step__txt strong {
  display: block;
  font-family: var(--mk-font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  color: var(--mk-ink);
}
.ar-step__txt .ar-en { margin-top: 2px; font-size: 14.5px; line-height: 1.35; }

.ar-more { margin-top: 10px; text-align: center; }
.ar-more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--mk-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  list-style: none;
}
.ar-more summary::-webkit-details-marker { display: none; }
.ar-more summary .ar-ico { width: 20px; height: 20px; transition: transform .2s ease; }
.ar-more[open] summary .ar-ico { transform: rotate(180deg); }

.ar-linklist { list-style: none; margin: 16px 0 12px; padding: 0; display: grid; gap: 10px; }
.ar-linklist .ar-btn { width: 100%; }
.ar-linklist--compact { margin: 6px 0 0; }

.ar-textlink {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 6px;
  color: var(--mk-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  border-radius: 999px;
}
.ar-textlink .ar-ico { width: 20px; height: 20px; }

.ar-badge {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--mk-mint);
  color: var(--mk-ink);
}
.ar-badge .ar-ico { width: 32px; height: 32px; }
.ar-badge--warn { background: #FBE2D1; color: var(--mk-orange-btn); }

.ar-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.ar-actions .ar-btn { width: 100%; }

.ar-float { animation: arFloat 5.5s ease-in-out infinite; }
.ar-float--slow { animation-duration: 7.5s; animation-delay: -2s; }
@keyframes arFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ───────────────────────── Cảnh camera ───────────────────────── */
.ar-scene-container { position: absolute; inset: 0; z-index: 9050; }
.ar-scene-container a-scene { width: 100%; height: 100%; }

.ar-btn--float {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  z-index: 9200;
  min-height: 48px;
  padding: 0 18px;
  font-size: 17px;
  color: var(--mk-ink);
  background: rgba(246, 243, 236, .96);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
}

.ar-hud {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  transform: translateX(-50%);
  z-index: 9200;
  width: min(92vw, 420px);
  padding: 12px 18px 14px;
  border-radius: 22px;
  text-align: center;
  color: var(--mk-ink);
  background: rgba(246, 243, 236, .96);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .55);
  transition: background-color .25s ease;
}
.ar-root[data-state="found"] .ar-hud { background: var(--mk-sun); }
.ar-hud-title { font-family: var(--mk-font-display); font-weight: 800; font-size: 19px; line-height: 1.25; }
.ar-hud-desc { margin-top: 2px !important; font-size: 16px; line-height: 1.4; }
.ar-hud-en { margin-top: 2px !important; font-size: 14.5px; line-height: 1.4; color: var(--mk-ink-soft); }
.ar-root[data-state="found"] .ar-hud-en { display: none; }

/* Khung ngắm: bốn góc vẽ bằng SVG (không dùng border một cạnh) */
.ar-reticle {
  position: fixed;
  left: 50%;
  top: 46%;
  z-index: 9150;
  width: min(64vw, 300px);
  height: min(64vw, 300px);
  transform: translate(-50%, -50%);
  fill: none;
  stroke: #fff;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(31, 92, 110, .85));
  pointer-events: none;
  opacity: .95;
  animation: arReticle 2.2s ease-in-out infinite;
  transition: opacity .25s ease;
}
.ar-root[data-state="found"] .ar-reticle { opacity: 0; animation: none; }
@keyframes arReticle { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(.94); } }

/* ───────────────────────── Trang video thay thế ───────────────────────── */
.ar-page {
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(env(safe-area-inset-bottom, 0px) + 40px);
  background:
    radial-gradient(60% 30% at 100% 0%, rgba(244, 228, 108, .5), transparent 72%),
    radial-gradient(70% 36% at 0% 100%, rgba(191, 235, 221, .9), transparent 72%),
    var(--mk-cream);
}
.ar-fallback { display: grid; gap: 22px; padding: 14px 0 6px; }
.ar-fallback__head { max-width: 720px; margin: 0 auto; text-align: center; }
.ar-fallback__head .ar-en { margin-bottom: 16px; }
.ar-fallback__video {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 28px;
  background: #10343D;
  box-shadow: var(--mk-shadow);
}
.ar-fallback__player { display: block; width: 100%; max-height: 72vh; background: #000; }
.ar-fallback__post {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px;
  background: #fff;
  border: 1px solid var(--mk-line);
  border-radius: 28px;
  box-shadow: var(--mk-shadow);
}
.ar-post-body { margin-top: 12px; font-size: 17px; line-height: 1.75; }
.ar-post-body img, .ar-post-body video, .ar-post-body iframe { max-width: 100%; height: auto; border-radius: 16px; }
.ar-post-body a { color: var(--mk-ink); text-underline-offset: 3px; }

/* ───────────────────────── Sắp ra mắt ───────────────────────── */
.ar-soon { min-height: 100vh; min-height: 100svh; background: var(--mk-cream); }
.ar-soon__hero {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: min(100svh, 780px);
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 84px;
}
.ar-soon__sky { position: absolute; inset: 0; }
.ar-soon__sky img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.ar-soon__sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(246, 243, 236, .94) 0%, rgba(246, 243, 236, .86) 50%, rgba(246, 243, 236, .1) 100%);
}
.ar-soon__glow {
  position: absolute;
  top: -8%;
  right: -12%;
  width: 70vmin;
  height: 70vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 228, 108, .75) 0%, rgba(244, 228, 108, 0) 68%);
  animation: arGlow 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes arGlow { from { opacity: .55; transform: scale(.96); } to { opacity: 1; transform: scale(1.07); } }

.ar-soon__sheet { position: relative; z-index: 1; min-height: 0; flex: 1; }
.ar-soon__grid { flex: 1; display: grid; gap: 10px; align-items: center; align-content: center; padding: 8px 0; }
.ar-soon__copy .ar-lead { max-width: 52ch; margin-top: 12px !important; }
.ar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px !important;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--mk-sun);
  color: var(--mk-ink);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
}
.ar-pill .ar-en { display: inline; font-weight: 600; font-size: 14px; color: var(--mk-ink); }

.ar-soon__art { position: relative; display: grid; place-items: end center; min-height: 270px; }
.ar-soon__martin { position: relative; z-index: 1; height: min(40vh, 330px); width: auto; filter: drop-shadow(0 14px 16px rgba(31, 92, 110, .3)); }
.ar-soon__bird { position: absolute; z-index: 2; width: 64px; height: auto; right: 12%; top: 18%; }
.ar-soon__spark { position: absolute; z-index: 2; fill: var(--mk-orange); animation: arTwinkle 3.2s ease-in-out infinite; }
.ar-soon__spark--a { width: 30px; height: 30px; left: 18%; top: 22%; }
.ar-soon__spark--b { width: 20px; height: 20px; right: 28%; top: 6%; fill: var(--mk-green); animation-delay: -1.4s; }
@keyframes arTwinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

.ar-soon__wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 70px; fill: var(--mk-cream); }

.ar-soon__how { padding: 6px 16px 40px; }
.ar-soon__how .ar-steps { margin-top: 18px; }
.ar-soon__foot { padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 28px); text-align: center; font-size: 15px; color: var(--mk-ink-soft); }

/* ───────────────────────── Màn hình rộng ───────────────────────── */
@media (min-width: 640px) {
  .ar-actions { flex-direction: row; flex-wrap: wrap; }
  .ar-actions .ar-btn { width: auto; }
  .ar-panel { padding: 26px 26px 22px; }
  .ar-step { grid-template-columns: 120px minmax(0, 1fr); }
}

@media (min-width: 900px) {
  .ar-permission-card { padding-left: 32px; padding-right: 32px; }
  .ar-stage { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 44px; align-items: center; padding: 8px 0 24px; }
  .ar-stage--single { display: flex; }
  .ar-visual { margin-top: 0; }
  .ar-visual__frame { aspect-ratio: 4 / 5; }
  .ar-visual__frame img { object-position: 49% 50%; }
  .ar-visual__martin { left: 0; right: 0; margin: 0 auto; bottom: -3%; height: 82%; }
  .ar-panel { padding: 34px 36px 28px; }
  .ar-title { font-size: clamp(36px, 3.4vw, 46px); }
  .ar-title--md { font-size: 30px; }
  .ar-title--xl { font-size: clamp(46px, 4.6vw, 64px); }

  .ar-soon__hero { padding-left: 32px; padding-right: 32px; }
  .ar-soon__sky::after { background: linear-gradient(90deg, rgba(246, 243, 236, .96) 0%, rgba(246, 243, 236, .86) 40%, rgba(246, 243, 236, .05) 78%); }
  .ar-soon__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; }
  .ar-soon__art { min-height: 420px; }
  .ar-soon__martin { height: min(58vh, 500px); }
  .ar-soon__bird { width: 84px; right: 16%; top: 14%; }
  .ar-soon__how { padding: 10px 32px 56px; }
  .ar-soon__how .ar-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .ar-soon__how .ar-step { grid-template-columns: 1fr; gap: 12px; align-items: start; align-content: start; padding: 10px 10px 16px; text-align: center; }
  .ar-soon__how .ar-step__num { top: 8px; left: 8px; width: 32px; height: 32px; font-size: 18px; line-height: 32px; }
}

/* Màn hình thấp (điện thoại ngang / máy nhỏ): gọn lại để nút bấm vẫn lọt màn đầu */
@media (max-height: 720px) and (max-width: 899px) {
  .ar-visual__frame { aspect-ratio: 16 / 5; }
  .ar-panel { padding-top: 16px; }
  .ar-steps { margin: 10px 0 12px; gap: 8px; }
  .ar-step { grid-template-columns: 76px minmax(0, 1fr); }
  .ar-btn { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .ar-float,
  .ar-float--slow,
  .ar-soon__glow,
  .ar-soon__spark,
  .ar-reticle { animation: none !important; }
  .ar-btn, .ar-hud, .ar-more summary .ar-ico { transition: none !important; }
}


/* ---------- iOS: khối chứa video + nhắc chạm + cảnh báo trình duyệt trong app ---------- */
/* Video phải nằm trong DOM và vẫn được vẽ (iOS có thể không giải mã khung hình cho media display:none),
   nhưng không được choán chỗ: 2x2px, mờ, nằm ngoài màn hình. */
.ar-media-holder {
  position: fixed; left: 0; bottom: 0; width: 2px; height: 2px;
  overflow: hidden; opacity: .01; pointer-events: none; z-index: -1;
}
.ar-media-holder video { width: 2px !important; height: 2px !important; }

/* Nhắc "chạm để phát": chỉ hiện khi iOS chặn phát tự động */
.ar-tap-play {
  position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); z-index: 9060;
  display: none; align-items: center; gap: 10px; min-height: 52px; padding: 12px 22px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--mk-orange-btn); color: #fff;
  font-family: var(--mk-font-display); font-weight: 800; font-size: 17px;
  box-shadow: 0 10px 24px -8px rgba(138, 60, 19, .6);
}
.ar-root[data-state] .ar-tap-play.is-on { display: inline-flex; }
.ar-tap-play svg { width: 22px; height: 22px; }

/* Cảnh báo khi mở trong trình duyệt của ứng dụng (Zalo/Facebook/Messenger...):
   WKWebView của các app này không bật phát video nội tuyến nên video sẽ nhảy sang trình phát toàn màn hình. */
.ar-inapp {
  position: absolute; left: 12px; right: 12px; top: 12px; z-index: 9070;
  display: none; gap: 12px; align-items: center; padding: 12px 14px;
  border-radius: 16px; background: rgba(31, 92, 110, .94); color: #fff;
  font-size: 15px; line-height: 1.4;
}
.ar-inapp.is-on { display: flex; }
.ar-inapp button {
  flex: 0 0 auto; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 999px;
  background: #fff; color: var(--mk-ink); font-family: var(--mk-font-display); font-weight: 800; cursor: pointer;
}

/* Thẻ hướng dẫn khi camera không cho khung hình (màn hình đen trong WebView của app) */
.ar-camera-help {
  position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); z-index: 9080;
  display: none; padding: 18px 18px 16px; border-radius: 20px; text-align: center;
  background: rgba(246, 243, 236, .97); color: var(--mk-ink); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .7);
}
.ar-camera-help.is-on { display: block; }
.ar-camera-help__msg { margin: 0 0 14px; font-size: 16px; line-height: 1.5; }
.ar-camera-help__row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ar-camera-help__row button, .ar-camera-help__link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--mk-orange-btn); color: #fff; text-decoration: none;
  font-family: var(--mk-font-display); font-weight: 800; font-size: 16px;
}
.ar-camera-help__link { background: var(--mk-white); color: var(--mk-ink); border: 2px solid var(--mk-ink); }
