/* 事前登録ページの見た目（公開ページと、Worker が返す確認・配信停止ページで共通） */
:root {
  --bg: #0d0e1a;
  --sheet: rgba(13, 14, 26, 0.86);
  --card: rgba(255, 255, 255, 0.06);
  --card-2: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f6ff;
  --muted: rgba(247, 246, 255, 0.7);
  --faint: rgba(247, 246, 255, 0.5);
  --accent: #ffc21a;
  --accent-ink: #17120a;
  --ok: #45e0a0;
  --err: #ff8a80;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 背景：ゲームの絵をぼかして敷く（PC で左右に見える） */
.backdrop {
  position: fixed;
  inset: -60px;
  z-index: -1;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  filter: blur(48px) saturate(1.25) brightness(0.42);
  transform: translateZ(0);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, transparent 0%, rgba(13, 14, 26, 0.6) 70%);
}

.sheet {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--sheet);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sheet.wide { max-width: 1040px; }
@media (min-width: 600px) {
  .sheet {
    min-height: 0;
    margin: 32px auto;
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  }
}
.pad { padding: 0 20px; }

/* 上のバー */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  padding: 0 16px 0 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand img { width: 22px; height: 22px; border-radius: 6px; }
.topbar .to-list {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
}

/* いちばん上の動画・絵 */
.hero { position: relative; margin: 0; background: #000; }
.hero picture { display: contents; }
.hero-media { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--aspect, 16 / 9); }
.hero.portrait { display: flex; justify-content: center; overflow: hidden; }
.hero.portrait .hero-bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(26px) brightness(0.55); }
.hero.portrait .hero-media { position: relative; width: auto; height: min(56vh, 560px); max-width: 100%; }
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 36%;
  background: linear-gradient(to bottom, transparent, rgba(13, 14, 26, 0.85));
  pointer-events: none;
}

.intro { position: relative; margin-top: -26px; padding: 0 20px; z-index: 1; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(13, 14, 26, 0.9);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(69, 224, 160, 0.7);
  animation: pulse 1.8s infinite;
}
.pill.done::before { content: "★"; color: var(--accent); }
.pill.off { color: var(--faint); }
h1.title {
  margin: 12px 0 6px;
  font-size: clamp(30px, 8.6vw, 40px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.catch { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips li { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: var(--card-2); color: var(--muted); }

/* 登録フォーム */
.join { margin: 16px 20px 0; }
.join form { margin: 0; }
.field {
  display: block;
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: #fff;
  color: #14151f;
  font: 600 17px/1 var(--font);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field::placeholder { color: #8a8c99; font-weight: 500; }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 194, 26, 0.35); }
.field[aria-invalid="true"] { border-color: var(--err); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 60px;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35), 0 14px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: shine 3.6s ease-in-out infinite;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.3); }
.cta svg { width: 20px; height: 20px; }
.cta[disabled] { cursor: progress; filter: saturate(0.6) brightness(0.9); }
.cta[disabled]::after { animation-duration: 0.9s; }
.cta .spin { display: none; width: 20px; height: 20px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.cta[disabled] .spin { display: block; }
.cta[disabled] .arrow { display: none; }
.err { min-height: 0; margin: 8px 2px 0; color: var(--err); font-size: 14px; font-weight: 600; }
.err:empty { display: none; }
.suggest {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 194, 26, 0.12);
  border: 1px solid rgba(255, 194, 26, 0.4);
  font-size: 14px;
}
.suggest button {
  margin: 8px 8px 0 0;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--card-2);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.suggest button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.consent { margin: 12px 2px 0; font-size: 12.5px; line-height: 1.7; color: var(--faint); }
.consent a { color: var(--muted); }
.ts { display: flex; justify-content: center; }
.ts:not(:empty) { margin-top: 12px; }
.closed-box {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
}
.play-btn { text-decoration: none; }

/* 登録したあと */
.done-card {
  padding: 22px 20px 20px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line);
  text-align: center;
  animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.done-icon { font-size: 44px; line-height: 1; }
.done-card h2 { margin: 10px 0 6px; font-size: 22px; line-height: 1.35; font-weight: 900; }
.done-card p { margin: 6px 0; color: var(--muted); }
.done-card p b { color: var(--text); overflow-wrap: anywhere; }
.tips {
  margin: 14px 0 0;
  padding: 12px 14px 12px 30px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  text-align: left;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.ghost {
  padding: 9px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.ghost:hover { background: var(--card); }
.note { font-size: 13px; }
.note:empty { display: none; }
.done-card .share { margin-top: 16px; }

/* シェア */
.share h2, .section h2 { margin: 0 0 12px; font-size: 17px; font-weight: 900; letter-spacing: 0.03em; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-row .copy { grid-column: 1 / -1; }
@media (min-width: 440px) { .share-row { grid-template-columns: 1fr 1fr 1.3fr; } .share-row .copy { grid-column: auto; } }
.sbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 46px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card-2);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.sbtn svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.sbtn.x { background: #000; border-color: #333; color: #fff; }
.sbtn.line { background: #06c755; border-color: #06c755; color: #fff; }
.sbtn.copied { border-color: var(--ok); color: var(--ok); }

.section { margin: 30px 20px 0; }
.watch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 20px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
}
.watch .play {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.watch .play svg { width: 16px; height: 16px; margin-left: 2px; fill: currentColor; }
.watch small { display: block; font-weight: 500; color: var(--faint); font-size: 12px; }
.prose p { margin: 0 0 12px; color: var(--muted); }
.prose a { color: var(--text); word-break: break-all; }

/* ゲームのカード */
.cards { display: grid; gap: 12px; }
.gcard {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.gcard:hover { background: var(--card-2); transform: translateY(-1px); }
.gthumb { display: block; overflow: hidden; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; align-self: start; }
.gthumb img { width: 100%; height: 100%; object-fit: cover; }
.gbody { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.gbody .pill { height: 22px; font-size: 11px; padding: 0 9px; background: transparent; }
.gtitle { font-size: 16px; line-height: 1.35; font-weight: 900; }
.gcatch {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* トップ（一覧） */
.hub-head { padding: 34px 20px 8px; }
.hub-head h1 { margin: 0; font-size: clamp(28px, 7vw, 40px); line-height: 1.2; font-weight: 900; }
.hub-head p { margin: 10px 0 0; color: var(--muted); }
.hub-cards { padding: 18px 20px 0; }
@media (min-width: 720px) {
  .hub-cards .cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
  .hub-cards .gcard { grid-template-columns: 1fr; padding: 0 0 14px; overflow: hidden; }
  .hub-cards .gthumb { border-radius: 0; }
  .hub-cards .gbody { padding: 4px 14px 0; }
  .hub-cards .gtitle { font-size: 19px; }
}
.empty { padding: 30px 0; color: var(--muted); text-align: center; }

/* 確認・配信停止などのお知らせページ */
.notice { padding: 36px 20px 8px; text-align: center; }
.notice .done-card { text-align: center; }
.notice .game-mini { display: block; margin: 0 auto 18px; max-width: 320px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.notice form { margin: 16px 0 0; }
.check { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 12px 0 0; font-size: 14px; color: var(--muted); text-align: left; }
.check input { margin-top: 5px; }
.btn-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card-2);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn-plain.danger { background: #3a1d24; border-color: #6b2f3a; }

/* プライバシーポリシー */
.doc { padding: 30px 20px 10px; }
.doc h1 { margin: 0 0 6px; font-size: 26px; font-weight: 900; line-height: 1.3; }
.doc h2 { margin: 28px 0 8px; font-size: 17px; font-weight: 900; }
.doc p, .doc li { color: var(--muted); font-size: 15px; }
.doc ul { padding-left: 1.3em; }
.doc dl { display: grid; grid-template-columns: 7em 1fr; gap: 6px 12px; margin: 0; }
.doc dt { color: var(--faint); font-size: 14px; }
.doc dd { margin: 0; font-size: 15px; }
.doc .updated { color: var(--faint); font-size: 13px; }

.foot { margin-top: 40px; padding: 22px 20px 34px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot p { margin: 0; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(69, 224, 160, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(69, 224, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(69, 224, 160, 0); }
}
@keyframes shine {
  0%, 55% { left: -60%; }
  100% { left: 130%; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
