/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 70px;
  padding: 0 clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 36px; height: 36px; }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.25; letter-spacing: 0.02em; }
.brand-name small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.08em; }
.top-right { display: flex; align-items: center; gap: 16px; }
.customer { font-size: 12px; color: var(--muted); }
.link-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 13px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
}
.link-btn:hover { border-color: #94a3b8; color: var(--ink); }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 64px; }
.container.narrow { width: min(880px, calc(100% - 40px)); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: center;
  padding: 40px 44px;
  border-radius: 26px;
  color: #e8eff8;
  background:
    radial-gradient(700px 360px at 88% 0%, rgba(14, 165, 164, 0.32), transparent 62%),
    linear-gradient(140deg, #0b1524, #12243a);
  overflow: hidden;
}
/* grid lines removed */
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 14px; }
.hero p { color: #a9b8ca; font-size: 14px; max-width: 34em; }

.progress-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(6px);
}
.progress-label { display: block; font-size: 11px; letter-spacing: 0.12em; color: #9fb1c6; margin-bottom: 6px; }
.progress-card strong { font-size: 34px; line-height: 1.1; letter-spacing: 0.02em; }
.progress-card strong small { font-size: 13px; font-weight: 500; color: #9fb1c6; }
.progress-bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); margin: 16px 0 10px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 4px; transition: width 0.4s ease; }
.progress-note { font-size: 11px; color: #8ea1b8; }

/* ---------- Controls ---------- */
.controls { margin: 30px 0 24px; display: grid; gap: 16px; }
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  max-width: 520px;
}
.search svg { width: 20px; height: 20px; color: #94a3b8; flex: none; }
.search input { flex: 1; border: 0; outline: none; padding: 14px 0; background: transparent; font-size: 16px; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%); mask-image: linear-gradient(90deg, #000 88%, transparent 100%); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 13px;
  color: #475569;
  transition: 0.15s;
}
.chip:hover { border-color: #94a3b8; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 22px; }
.card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e8edf3;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #0b1524; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .thumb img { transform: scale(1.03); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11, 21, 36, 0.35)); }
.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  background: rgba(11, 21, 36, 0.78);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.03em;
}
.seen {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.9);
  transition: 0.18s;
  z-index: 2;
}
.play svg { width: 24px; height: 24px; color: var(--navy); margin-left: 2px; }
.card:hover .play { opacity: 1; transform: scale(1); }
.card-body { padding: 15px 17px 18px; }
.tag {
  display: inline-block;
  font-size: 11px;
  color: var(--teal-d);
  background: #e6f7f6;
  border-radius: 5px;
  padding: 2px 8px;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.card h3 { font-size: 15px; font-weight: 700; }
.result-note { margin-top: 22px; font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }

/* ---------- Player ---------- */
.back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.back:hover { color: var(--ink); }
.player { background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.player video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; }
.player-note { margin-top: 12px; font-size: 12px; color: #475569; background: #eef2f7; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; }
.video-head { margin: 26px 0 24px; }
.video-head h1 { font-size: clamp(22px, 3vw, 30px); margin: 6px 0 10px; }
.video-head .muted { font-size: 14px; }
.steps { background: var(--white); border: 1px solid #e8edf3; border-radius: 16px; padding: 24px 26px; }
.steps h2 { font-size: 15px; margin-bottom: 12px; }
.steps ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 14px; }
.steps li::marker { color: var(--teal); font-weight: 700; }
.safety {
  margin-top: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 18px 22px;
}
.safety strong { font-size: 13px; color: #92400e; }
.safety p { font-size: 13px; color: #78350f; margin-top: 4px; }
.next {
  display: block;
  margin-top: 22px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition: 0.15s;
}
.next:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.next span { display: block; font-size: 11px; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 4px; }
.next strong { font-size: 15px; }

/* ---------- QR ---------- */
.qr-sheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  max-width: 520px;
  margin: 20px auto 0;
  box-shadow: var(--shadow);
}
.qr-sheet h1 { font-size: 24px; margin-bottom: 8px; }
.qr-img { margin: 26px auto 14px; width: 260px; height: 260px; }
.qr-url { font-size: 12px; color: #475569; word-break: break-all; margin-bottom: 18px; }
.qr-sheet .btn-primary { max-width: 260px; margin: 20px auto 0; display: block; }

/* ---------- Footer ---------- */
.footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.footer a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .brand-panel { padding: 40px 28px 34px; }
  .brand-panel h1 { font-size: 28px; }
  .brand-panel > p { font-size: 13px; }
  .brand-points, .brand-foot { display: none; }
  .brand-top { margin-bottom: 26px; }
  .login-card { padding: 36px 26px 48px; }
  .hero { grid-template-columns: 1fr; padding: 28px; gap: 22px; }
  .progress-card { display: none; }
}

@media (max-width: 640px) {
  .topbar { height: 62px; }
  .customer { display: none; }
  .brand-name { font-size: 13px; }
  .container, .container.narrow { width: calc(100% - 28px); padding-top: 20px; }
  .hero { border-radius: 20px; padding: 24px; }
  .hero h1 { font-size: 24px; }
  .sp { display: none; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .play { display: none; }
  .video-head { margin: 18px 0; }
  .steps, .safety { padding: 18px; }
  .footer { width: calc(100% - 28px); flex-direction: column; }
}

@media print {
  .topbar, .back, .no-print, .footer { display: none !important; }
  body { background: #fff; }
  .container.narrow { width: 100%; padding: 0; }
  .qr-sheet { box-shadow: none; border: 1px dashed #94a3b8; margin: 0; }
}

.message-page { padding-top: 80px; }
