:root {
  --bg: #f4f6f8;
  --ink: #101828;
  --muted: #667085;
  --line: #d0d5dd;
  --paper: #ffffff;
  --accent: #111827;
  --success: #067647;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(100%, 560px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .06);
}

.eyebrow {
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 14px;
  line-height: 1.25;
  font-size: clamp(28px, 5vw, 42px);
}

h2 { margin-top: 0; }

.lead, .fine, .watch-note, .expiry {
  color: var(--muted);
  line-height: 1.7;
}

.fine {
  font-size: 13px;
  margin-top: 28px;
}

.state {
  min-height: 88px;
  margin: 24px 0 12px;
  padding: 18px;
  border-radius: 12px;
  background: #f9fafb;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #d0d5dd;
  border-top-color: #111827;
  border-radius: 999px;
  animation: spin .8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn {
  width: 100%;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 16px;
  cursor: pointer;
  border: 1px solid var(--accent);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.secondary {
  margin-top: 10px;
  background: #fff;
  color: var(--accent);
}

.friend-box {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.hidden { display: none !important; }

.watch-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.watch-header {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.watch-header h1 { font-size: clamp(24px, 4vw, 36px); }

.expiry { white-space: nowrap; }

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.watch-note {
  font-size: 13px;
  margin-top: 14px;
}

.warning {
  margin: 40px auto;
}

.error { color: var(--danger); }
.success { color: var(--success); }

@media (max-width: 720px) {
  .card { padding: 24px; border-radius: 14px; }
  .watch-header { align-items: flex-start; flex-direction: column; }
  .expiry { white-space: normal; }
}
