/* Trang khách vòng quay Lá Legacy: theo bản vẽ Bố duyệt 3/11/2026 (khung điện thoại 390 x 844). Mọi cỡ theo bề rộng
   khung --w để điện thoại to nhỏ đều giữ đúng bố cục: ảnh ở trên, vòng quay ở dưới không đè logo trên ly, người mẫu. */
:root {
  --w: min(100vw, 480px);
  --la: #a8b47c;
  --la-dam: #34482a;
  --la-dam-2: #26361c;
  --kem: #fff6dc;
  --vang: #fdda58;
  --troi: #bedcf7;
  --xi-mang: #515b5a;
  --chu-phu: #4b5a3c;
  --do: #b42318;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--xi-mang); font-family: var(--sans); color: var(--la-dam-2); }
a { color: var(--la-dam-2); }
[hidden] { display: none !important; }
.an-chu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.trang { position: relative; width: var(--w); min-height: 100svh; margin: 0 auto; overflow-x: clip;
  background: var(--xi-mang); display: flex; flex-direction: column; }

/* Ảnh Lá Legacy ở trên (rộng 112,8% khung, vuông, lệch trái 0,8% như bản vẽ) */
.khu-anh { position: relative; height: calc(20px + var(--w) * 1.128 + 18px); flex-shrink: 0; overflow: hidden; }
.troi { position: absolute; left: 0; right: 0; top: 0; height: 40px; background: var(--troi); }
.anh-nen { position: absolute; left: -0.8%; top: 20px; width: 112.8%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; display: block; }
.mo-tren { position: absolute; left: 0; right: 0; top: 20px; height: 30px;
  background: linear-gradient(var(--troi), rgba(190, 220, 247, 0)); }
.mo-duoi { position: absolute; left: 0; right: 0; top: calc(20px + var(--w) * 1.128 - 12px); height: 12px;
  background: linear-gradient(rgba(81, 91, 90, 0), var(--xi-mang)); }
.dau { position: absolute; left: 0; right: 0; top: 0; padding: 14px 20px 0; display: flex;
  justify-content: space-between; align-items: flex-start; gap: 12px; }
.dau-chu { display: flex; flex-direction: column; gap: 3px; }
.khau-hieu { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--la-dam); }
.dau h1 { margin: 0; font-family: var(--serif); font-size: 28px; line-height: 1.1; font-weight: 600; color: var(--la-dam-2); }
.nut-the-le { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.85); font-size: 14px; font-weight: 600; text-decoration: none; }

/* Vòng quay: 228 / 390 bề rộng khung như bản vẽ, to nhất 300px */
.khu-vong { position: relative; flex-shrink: 0; height: min(calc(var(--w) * 0.585), 300px); margin-bottom: 13px; }
.vong { position: absolute; left: 50%; top: 0; width: min(calc(var(--w) * 0.585), 300px); aspect-ratio: 1 / 1;
  transform: translateX(-50%); }
.banh { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  transform: rotate(0deg); will-change: transform; }
.banh svg { display: block; width: 100%; height: 100%; }
.banh text { font-family: 'La Legacy Display', var(--serif); font-weight: 400; fill: var(--la-dam-2); }
.o-la { fill: var(--la); }
.o-kem { fill: var(--kem); }
.o-vang { fill: var(--vang); }
.tam { position: absolute; left: 29.8%; top: 29.8%; width: 40.4%; height: 40.4%; border-radius: 50%;
  background: #25352b; border: 4px solid var(--vang); overflow: hidden; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); }
.tam img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kim { position: absolute; left: 50%; top: -14px; width: 28px; height: 34px; transform: translateX(-50%); }
.ve-tay { position: absolute; pointer-events: none; }
.ve-mui-ten { left: calc(var(--w) * 0.031); top: 42px; }
.ve-sao { left: calc(var(--w) * 0.836); top: 10px; }
.ve-song { left: calc(var(--w) * 0.785); top: 172px; }

/* Thẻ nhập số ở cuối, dính đáy màn hình khi màn hình thấp */
.the { position: sticky; bottom: 0; margin-top: auto; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--kem); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
  display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.the label { font-size: 13px; font-weight: 600; }
.hang-nhap { display: flex; gap: 8px; }
.o-so { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 2px solid var(--la); border-radius: 14px;
  background: #fff; font-family: inherit; font-size: 17px; color: var(--la-dam-2); }
.o-so:focus { outline: 3px solid var(--vang); outline-offset: 1px; }
.o-so[aria-invalid="true"] { border-color: var(--do); }
.nut-quay { flex-shrink: 0; width: 132px; height: 48px; border: 0; border-radius: 14px; background: var(--la-dam);
  color: #fff; font-family: inherit; font-size: 16px; font-weight: 800; letter-spacing: 0.06em; cursor: pointer;
  white-space: nowrap; }
.nut-quay:disabled { opacity: 0.6; cursor: default; font-size: 14px; letter-spacing: 0.02em; }
.ghi-chu { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--chu-phu); }
.bao-loi { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--do); font-weight: 600; }
.bao-dung { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff; font-size: 14px; line-height: 1.5; }

/* Lớp phủ: trúng giải, đã quay, chưa là thành viên, thông báo */
.lop { position: fixed; inset: 0; z-index: 10; background: rgba(22, 33, 16, 0.62); display: flex;
  align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.ve { width: min(350px, 100%); margin: auto; border-radius: 22px; overflow: hidden; background: var(--kem);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; }
.ve-dau { background: var(--la); padding: 20px 20px 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.ve-nho { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; }
.ve-lon { font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1.15; }
.ve-phu { font-size: 13px; color: var(--chu-phu); }
.ve-than { border-top: 2px dashed var(--la); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.ve-than-tron { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.nhan-ma { font-size: 13px; font-weight: 600; color: var(--chu-phu); text-align: center; }
.ma { padding: 12px; border: 2px dashed var(--la-dam); border-radius: 14px; background: #fff; text-align: center;
  font-family: var(--mono); font-size: clamp(18px, 7.5vw, 30px); font-weight: 700; letter-spacing: 0.1em;
  overflow-wrap: anywhere; user-select: all; }
.nut { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 0; border-radius: 14px;
  background: var(--la-dam); color: #fff; font-family: inherit; font-size: 16px; font-weight: 700; text-decoration: none;
  cursor: pointer; padding: 0 14px; text-align: center; }
.nut-vien { min-height: 44px; border: 2px solid var(--la-dam); background: transparent; color: var(--la-dam-2);
  font-size: 15px; font-weight: 600; }
.nut-chu { align-self: center; min-height: 44px; padding: 0 12px; border: 0; background: transparent; font-family: inherit;
  font-size: 13px; color: var(--chu-phu); text-decoration: underline; cursor: pointer; }
.ve p { margin: 0; font-size: 13.5px; line-height: 1.5; text-align: center; }
.anh-dang-ky { display: block; width: 100%; height: auto; aspect-ratio: 700 / 987; max-height: 62svh;
  object-fit: cover; object-position: top center; }

/* Thể lệ */
.trang-chu { background: var(--kem); }
.the-le { width: var(--w); margin: 0 auto; padding: 20px 20px 40px; min-height: 100svh; background: var(--kem); }
.the-le h1 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 8px 0 4px; }
.the-le h2 { font-size: 15px; margin: 22px 0 8px; }
.the-le ol, .the-le ul { margin: 0; padding-left: 22px; line-height: 1.6; font-size: 15px; }
.the-le .ve-nho { color: var(--la-dam); }
.quay-lai { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .banh { transition-duration: 0.6s !important; }
}
