*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #07060a;
  --card: rgba(18, 14, 22, 0.72);
  --text: #f4efe8;
  --muted: #b7aea4;
  --line: rgba(232, 201, 160, 0.22);
  --accent: #e8c9a0;
  --accent-strong: #f0d7b4;
  --danger: #ffb4b4;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --tap: 52px;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang TC", "Hiragino Sans CNS", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

body.is-watching {
  overflow: hidden;
  background: #000;
  overscroll-behavior: none;
}

body.is-watching .bg {
  display: none;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 50% -10%, rgba(90, 18, 40, 0.55), transparent 58%),
    radial-gradient(900px 700px at 110% 80%, rgba(28, 16, 70, 0.55), transparent 60%),
    radial-gradient(700px 500px at -10% 90%, rgba(70, 22, 28, 0.4), transparent 55%),
    #07060a;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.82;
  will-change: transform;
}

.orb-a {
  width: 58vw;
  height: 58vw;
  min-width: 260px;
  min-height: 260px;
  left: -12%;
  top: 8%;
  background: radial-gradient(circle, rgba(150, 28, 62, 0.7), rgba(60, 8, 24, 0.05) 70%);
  animation: drift-a 18s ease-in-out infinite;
}

.orb-b {
  width: 64vw;
  height: 64vw;
  min-width: 280px;
  min-height: 280px;
  right: -18%;
  top: 28%;
  background: radial-gradient(circle, rgba(72, 36, 140, 0.65), rgba(16, 8, 40, 0.05) 70%);
  animation: drift-b 22s ease-in-out infinite;
}

.orb-c {
  width: 48vw;
  height: 48vw;
  min-width: 220px;
  min-height: 220px;
  left: 28%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(160, 70, 36, 0.38), rgba(20, 8, 8, 0.04) 70%);
  animation: drift-c 26s ease-in-out infinite;
}

.haze {
  position: absolute;
  inset: -10%;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  background: rgba(7, 6, 10, 0.18);
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(0, 0, 0, 0.72) 100%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 4px);
  animation: grain 0.8s steps(2, end) infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8%, 10%) scale(1.08); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10%, -6%) scale(1.06); }
}

@keyframes drift-c {
  0%, 100% { transform: translate(0, 0) scale(1.02); }
  50% { transform: translate(6%, -10%) scale(1); }
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-1%, 1%); }
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
}

.screen[hidden] {
  display: none !important;
}

.card {
  width: 100%;
  max-width: 420px;
  padding: 32px 24px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 16px;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: none;
}

.mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  box-shadow: 0 0 24px rgba(232, 201, 160, 0.18);
}

.mark span {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

h1:focus {
  outline: none;
}

h1:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.hint {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(180deg, #f3d7b0, #d7b387);
  color: #2a1b12;
  border-color: rgba(255, 236, 210, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #f7e0c0, #e0be94);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.date-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 2px;
}

select {
  width: 100%;
  min-height: var(--tap);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 7, 12, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
  text-align: center;
}

.screen-video {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  overflow: hidden;
}

.player-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #000;
}

#clip {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

#clip::-webkit-media-controls,
#clip::-webkit-media-controls-enclosure,
#clip::-webkit-media-controls-panel,
#clip::-webkit-media-controls-start-playback-button,
#clip::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: var(--tap);
  border: 0;
  background: #07060a;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.play-overlay[hidden] {
  display: none !important;
}

.play-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f3d7b0, #d7b387);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 26px;
  border-style: solid;
  border-width: 17px 0 17px 26px;
  border-color: transparent transparent transparent #2a1b12;
}

.play-label {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .card { padding: 40px 36px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .noise {
    animation: none;
  }
  .btn {
    transition: none;
  }
}
