:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #a3a3a3;
  --accent: #e11d48;
  --accent-hover: #be123c;
  --panel: #171717;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
}

.feed {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.card {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.75rem;
  padding:
    calc(0.85rem + var(--safe-top))
    1rem
    calc(1rem + var(--safe-bottom));
  background:
    radial-gradient(120% 80% at 50% 0%, #1a1a1a 0%, var(--bg) 55%);
}

.card__title {
  margin: 0;
  font-size: clamp(0.95rem, 3.6vw, 1.1rem);
  font-weight: 700;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.card__frame {
  width: min(100%, 720px);
  aspect-ratio: 720 / 480;
  background: #000;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  touch-action: none;
  overscroll-behavior: none;
}

.card__frame iframe,
.card__frame .card__player {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  overflow: hidden;
  background: #000;
  pointer-events: auto;
}

.card__frame img,
.card__frame .card__poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border: 0;
}

.card__poster--empty {
  background: #111;
}

.card__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  width: 4.25rem;
  height: 4.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.92);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card__play:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.card__play[hidden] {
  display: none;
}

.card__fallback-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.45rem 0.6rem;
  font-size: 0.75rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  text-align: center;
}

.card__cta {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
}

.card__cta:hover,
.card__cta:focus-visible {
  background: var(--accent-hover);
}

.card__cta[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.45;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    linear-gradient(160deg, #141414 0%, #050505 100%);
}

.age-gate[hidden] {
  display: none;
}

.age-gate__panel {
  width: min(100%, 22rem);
  padding: 1.75rem 1.35rem;
  border-radius: 16px;
  background: var(--panel);
  text-align: center;
}

.age-gate__brand {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.age-gate__title {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
}

.age-gate__text {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.age-gate__actions {
  display: grid;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

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

.btn--ghost {
  color: var(--fg);
  background: transparent;
  border: 1px solid #404040;
}

.status {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 20;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.92);
  color: var(--muted);
  font-size: 0.82rem;
  pointer-events: none;
}

.status[hidden] {
  display: none;
}

.status--error {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.92);
}
