@font-face {
  font-family: "Circular Standard";
  src: url("https://cdn.shopify.com/s/files/1/0556/4373/4115/files/CircularPRE-Book.woff2?v=1731618292")
      format("woff2"),
    url("https://cdn.shopify.com/s/files/1/0556/4373/4115/files/CircularPRE-Book.woff?v=1731618293")
      format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Circular Standard";
  src: url("https://cdn.shopify.com/s/files/1/0556/4373/4115/files/CircularPRE-Medium.woff2?v=1731618421")
      format("woff2"),
    url("https://cdn.shopify.com/s/files/1/0556/4373/4115/files/CircularPRE-Medium.woff?v=1731618421")
      format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Circular Standard";
  src: url("https://cdn.shopify.com/s/files/1/0556/4373/4115/files/CircularPRE-Medium.woff2?v=1731618421")
      format("woff2"),
    url("https://cdn.shopify.com/s/files/1/0556/4373/4115/files/CircularPRE-Medium.woff?v=1731618421")
      format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --player-font: "Circular Standard", "SF Pro Text", system-ui, -apple-system, sans-serif;
  --outline-btn-border: rgba(255, 255, 255, 0.92);
  --filled-btn-bg: rgba(45, 48, 56, 0.84);
  --filled-btn-bg-hover: rgba(55, 58, 66, 0.92);
  --shadow: 0 10px 30px rgba(16, 35, 63, 0.18);
  --page-bg: #0f172a;
  --page-text: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--player-font);
  background: var(--page-bg);
  color: var(--page-text);
  min-height: 100vh;
}

.layout {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

select,
button {
  font: inherit;
  font-family: inherit;
}

select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #f8fafc;
}

button.dev-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  background: #334155;
  color: white;
  font-weight: 500;
}

button.dev-btn:hover {
  background: #475569;
}

.stage-wrap {
  position: relative;
  width: 100%;
  max-width: min(100%, 420px);
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

#stage {
  position: absolute;
  inset: 0;
}

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

.player-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 10px 12px 12px;
  background: linear-gradient(rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35) 70%, transparent);
  pointer-events: none;
}

.video-tap {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.video-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  z-index: 2;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.95);
  animation: video-spin 0.8s linear infinite;
  pointer-events: none;
}

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

.player-chrome > * {
  pointer-events: auto;
}

.transport {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-btn svg.hidden {
  display: none;
}

.icon-btn--restart svg {
  width: 17px;
  height: 17px;
}

.scrubber-wrap {
  min-width: 0;
  padding: 10px 0;
}

.scrubber {
  width: 100%;
  height: 6px;
  margin: 0;
  appearance: none;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
}

.scrubber::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.scrubber::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.scrubber::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.scrubber::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.timecode {
  margin-top: 4px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  font-family: var(--player-font);
}

.screen-question {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 44%;
  transform: translateY(-50%);
  text-align: center;
  color: #fff;
  font-family: var(--player-font);
  font-size: 1.575rem;
  font-weight: 500;
  line-height: 1.35;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

.options-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 16px 22px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: auto;
}

.options.awaiting-reveal {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.options-heading {
  text-align: center;
  color: #fff;
  font-family: var(--player-font);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 2px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

.option-btn {
  display: block;
  width: auto;
  max-width: 100%;
  text-align: center;
  line-height: 1.3;
  padding: 14px 22px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.option-btn--outline {
  background: transparent;
  border: 1.5px solid var(--outline-btn-border);
  color: #fff;
  border-radius: 10px;
}

.option-btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.option-btn--filled {
  background: var(--filled-btn-bg);
  color: #fff;
  border-radius: 10px;
}

.option-btn--filled:hover {
  background: var(--filled-btn-bg-hover);
}

.options--single {
  align-items: center;
}

.options--single .option-btn--filled {
  border-radius: 999px;
  padding: 15px 28px;
}

.option-btn.end-action {
  background: rgba(45, 48, 56, 0.84);
  border-radius: 999px;
}

.dev-meta {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1e293b;
  border: 1px dashed #475569;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
}

.dev-meta-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}

.dev-meta-line {
  word-break: break-word;
}

.dev-meta-file {
  margin-top: 4px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.status-bar {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.45;
}

.status-bar.error {
  background: #451a1a;
  color: #fecaca;
}

.start-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at top, #1e293b, #0f172a);
  color: #e2e8f0;
  z-index: 4;
}

.start-screen p {
  margin: 0;
  max-width: 520px;
  color: #94a3b8;
  font-size: 0.92rem;
}

.start-screen button {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  background: #fff;
  color: #0f172a;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* Dev-only chrome (title, restart, internal reference, status bar) is shown
   only on localhost. Any deployed host hides it for a clean production UI. */
body:not(.is-dev) .dev-only {
  display: none !important;
}

.market-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.market-field select {
  min-width: 220px;
  text-align: center;
}

/* Desktop: white page background frames the portrait player on large screens. */
@media (min-width: 601px) {
  :root {
    --page-bg: #ffffff;
    --page-text: #1f2937;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12), 0 4px 14px rgba(15, 23, 42, 0.06);
  }

  body.is-dev header h1 {
    color: #1f2937;
  }
}

/* On mobile the production UI fills the whole viewport edge-to-edge, so the
   navy page background never shows around the video. Dev preview keeps its
   framed portrait look and chrome. */
@media (max-width: 600px) {
  body:not(.is-dev) .layout {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  body:not(.is-dev) .stage-wrap {
    max-width: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }

  /* Lock the full-screen player so touch gestures can't scroll, bounce, or
     pull-to-refresh the page — the video stays fixed regardless of interaction. */
  html {
    overscroll-behavior: none;
  }

  body:not(.is-dev) {
    position: fixed;
    inset: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }
}
