/* Bốc thăm may mắn — dựa trên shared/css/app.css. */

/* --- Một phòng: điểm danh và chờ --- */
.lk-room { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; width: min(100%, 560px); }
.lk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lk-head > div { min-width: 0; }
.lk-title { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 28px; font-weight: 500; overflow-wrap: anywhere; }
.lk-prize { margin: 2px 0 0; color: var(--accent-dark); font-weight: 700; overflow-wrap: anywhere; }
.lk-head .status-pill { flex: none; margin-top: 6px; }
.lk-stage { display: grid; justify-items: center; gap: 10px; padding: 28px 18px; text-align: center; }
.lk-checkin {
  width: min(100%, 360px);
  min-height: 88px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 14px 30px -14px rgb(122 54 29 / 0.8);
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s;
}
.lk-checkin:active:not(:disabled) { transform: scale(0.97); }
.lk-checkin:disabled { cursor: default; }
.lk-checkin.is-ready { background: var(--green); box-shadow: none; }
.lk-checkin:disabled:not(.is-ready) { background: var(--clay); color: var(--muted); box-shadow: none; }
.lk-checkin:focus-visible { outline: 3px solid var(--hint); outline-offset: 3px; }
.lk-state { margin: 0; font-size: 18px; font-weight: 700; }
.lk-state:empty, .lk-note:empty { display: none; }
.lk-note { margin: 0; font-size: 14px; }
.lk-result { display: grid; gap: 4px; border-color: var(--hint); background: var(--hint-soft); text-align: center; }
.lk-result-label { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.lk-result-name { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 30px; overflow-wrap: anywhere; }
.lk-names { justify-content: flex-start; max-width: none; }
.lk-names li.is-self { border-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
.lk-names li.empty { padding: 0; border: 0; background: none; color: var(--muted); }
.lk-foot { display: flex; justify-content: center; }

/* --- Con lăn (js/reel.js): 7 tên trên một dải, tên ở giữa nằm dưới vạch đánh dấu --- */
.lk-roll { display: grid; align-content: center; justify-items: center; gap: 14px; min-height: 70vh; text-align: center; }
.lk-roll-prize { margin: 0; color: var(--accent-dark); font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.lk-roll-caption { margin: 0; color: var(--muted); font-size: 15px; font-weight: 700; }
.lk-reel {
  --slot: 58px;
  position: relative;
  width: min(100%, 460px);
  height: calc(var(--slot) * 5);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  -webkit-mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent);
  mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent);
}
.lk-reel-strip { position: absolute; inset: 0; }
.lk-reel-strip span {
  position: absolute;
  top: calc(50% - var(--slot) / 2);
  left: 0;
  right: 0;
  height: var(--slot);
  padding: 0 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
  line-height: var(--slot);
  text-overflow: ellipsis;
  white-space: nowrap;
  will-change: transform;
}
.lk-reel-strip span.is-centre { color: var(--ink); font-size: 26px; font-weight: 800; }
.lk-reel-marker {
  position: absolute;
  top: calc(50% - var(--slot) / 2);
  left: 10px;
  right: 10px;
  height: var(--slot);
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: rgb(156 71 40 / 0.06);
  pointer-events: none;
}
.lk-reel.is-still { -webkit-mask-image: none; mask-image: none; }
.lk-cheer { display: grid; justify-items: center; gap: 8px; }
.lk-cheer-title { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 32px; overflow-wrap: anywhere; }
.lk-cheer-title:focus { outline: none; }
.lk-cheer-text { margin: 0 0 6px; font-size: 17px; }
.lk-confetti { position: fixed; inset: 0; z-index: 50; width: 100%; height: 100%; pointer-events: none; }

/* --- "Lượt của tôi" --- */
.lk-mine-item { cursor: default; }

@media (max-width: 380px) {
  .lk-checkin { min-height: 76px; font-size: 20px; }
  .lk-reel { --slot: 50px; }
  .lk-reel-strip span { font-size: 19px; }
  .lk-reel-strip span.is-centre { font-size: 22px; }
  .lk-title { font-size: 24px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .lk-reel { --slot: 44px; }
  .lk-roll { min-height: auto; }
}

/* --- Trang Admin (js/admin/view.js) --- */
.lk-admin-reel { width: 100%; }
.lk-entries { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lk-entries li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.lk-entries li.is-out { background: var(--sand); color: var(--muted); }
.lk-entries li.empty { border: 0; background: none; }
/* Các nút của phòng nhô lên 4px dưới tên phòng (.room-tools); dưới dòng giải thì chúng sẽ che dòng đó. */
.lk-prize + .room-tools { margin-top: 8px; }
/* "Đã trúng: …" của người đã trúng nhiều lượt quay dài hơn hàng: nó xuống dòng trong hàng thay vì làm rộng trang. */
.lk-entries .tag { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lk-entry-name { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.lk-entry-name small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.lk-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.lk-dot.is-on { background: var(--green); }
.lk-counts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; font-size: 15px; }
.lk-counts b { font-size: 20px; }
.lk-winner { margin: 0; font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
/* "Mở lại điểm danh" cạnh "Quay tiếp" (một lượt quay bị bỏ dở): mỗi nút một dòng, kể cả trên điện thoại 320 px. */
#lucky-reopen, #lucky-reopen:not([hidden]) + #lucky-primary { white-space: nowrap; }
@media (max-width: 380px) {
  #lucky-reopen, #lucky-reopen:not([hidden]) + #lucky-primary { padding: 0 14px; font-size: 15px; }
}
