/* momentfilm — trang xem ảnh sau khi quét QR.
   Mobile-first. KHÔNG dùng font hay tài nguyên ngoài: máy khách có thể nối
   vào WiFi của booth mà không có internet, tải CDN sẽ hỏng giao diện. */

:root {
  --navy:       #1d2a52;
  --navy-soft:  #2a3866;
  --cream:      #f3ead9;
  --ink:        #1d2a52;
  --text:       #eef1f8;
  --text-dim:   #9fa9c6;
  --radius:     4px;
  --gap:        10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- Thanh trên ---------- */
.topbar {
  position: relative;
  background: var(--cream);
  padding: 14px 12px 16px;
  text-align: center;
}

.lang {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 8px;
  border: 0;
  border-radius: 999px;
  background: #e4d9c4;
  color: var(--ink);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.lang:active { background: #d8cbb2; }
.lang-icon { font-size: 12px; opacity: .75; }

.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  letter-spacing: .5px;
  color: var(--ink);
  margin-top: 16px;
}
.wordmark em { font-style: italic; }

/* ---------- Tab ---------- */
.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
}

.tab {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: 600 16px/1 inherit;
  font-family: inherit;
  padding: 18px 0;
  cursor: pointer;
}
.tab.is-active { color: #fff; }
/* Tab KHÔNG hoạt động là ô sáng hơn, giống thiết kế */
.tab:not(.is-active) { background: var(--navy-soft); }

.tab-lens {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #7d88ad 0%, #4a5680 45%, #2b365e 100%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.12);
  pointer-events: none;
}

/* ---------- Nội dung ---------- */
main {
  flex: 1;
  padding: 26px 16px 8px;
}

.hint {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}
.hint-sub {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-dim);
}

.block { margin-top: 30px; }

.caption {
  margin: 12px 0 0;
  text-align: center;
  font-family: "Consolas", "SF Mono", Menlo, monospace;
  font-size: 13.5px;
  letter-spacing: 1.4px;
  color: #cfd6ea;
}

/* Ảnh ghép (bản in) */
.strip-wrap { display: flex; justify-content: center; }
.strip-wrap img {
  max-width: 62%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* Lưới ảnh lẻ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  justify-items: center;
}
.grid img {
  width: 100%;
  aspect-ratio: 3 / 2;      /* ảnh chụp ra là 3:2 */
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

/* Video */
.video-wrap { display: flex; justify-content: center; }
.video-wrap video {
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius);
  background: #000;
}

/* Giữ chỗ trong lúc tải */
.ph {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #2a3866 25%, #35447a 37%, #2a3866 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0 } to { background-position: 0 0 } }

/* Trạng thái lỗi / hết hạn */
.state {
  margin: 40px auto;
  max-width: 340px;
  padding: 22px 18px;
  border-radius: 8px;
  background: var(--navy-soft);
  text-align: center;
  font-size: 14.5px;
  line-height: 1.6;
  color: #dfe4f2;
}

.foot {
  padding: 22px 16px calc(26px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 11.5px;
  color: #7a86ab;
}

/* Màn rộng: giới hạn bề ngang cho dễ nhìn */
@media (min-width: 620px) {
  .topbar, .tabs, main, .foot { max-width: 560px; margin-inline: auto; }
  .tabs { width: 100%; }
}
