:root {
  --bg: #000;
  --text: #fff;
  --muted: rgba(255,255,255,.58);
  --faint: rgba(255,255,255,.28);
  --line: rgba(255,255,255,.74);
  --app-w: 430px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-mincho: "dnp-shuei-4go-std", "DNP Shuei 4Go Kana Std", "DNP秀英四号かなStd", "Shippori Mincho", "Noto Serif JP", serif, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font-family: "dnp-shuei-4go-std", var(--font-mincho), sans-serif;
  letter-spacing: .08em;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.app {
  position: relative;
  width: min(100%, var(--app-w));
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #000;
}
.app--center {
  display: grid;
  place-items: center;
}

.brand-splash { text-align: center; }
.brand-en {
  margin: 0 0 .35rem;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .5em;
  color: rgba(255, 255, 255, 0.8);
}
.brand-ja {
  margin: 0;
  font-family: "dnp-shuei-4go-std", 'Noto Serif JP', serif;
  font-size: clamp(2.1rem, 11vw, 3.45rem);
  font-weight: 500;
  letter-spacing: .3em;
  line-height: 1.1;
  color: #ffffff;
  margin-left: 0.3em;
}
.fade-in { animation: fadeIn 1.5s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* intro */
.intro-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12vh 28px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .75s ease, visibility .75s ease;
}
.intro-screen.is-active { opacity: 1; visibility: visible; }
.intro-screen p {
  margin: 0;
  font-size: clamp(1rem, 4vw, 1.16rem);
  line-height: 2.05;
  text-shadow: 0 0 16px rgba(255,255,255,.16);
}
.intro-screen--start { gap: 2rem; align-content: center; }
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 240px;
  min-height: 54px;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  border-radius: 0.375rem;
  transition: all 0.5s ease;
  backdrop-filter: blur(4px);
  box-sizing: border-box;
  text-align: center;
  line-height: 1;
}
.outline-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.tap-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.intro-screen--start .outline-button { position: relative; z-index: 2; }

/* profile */
.app--form { padding: 58px 30px calc(38px + var(--safe-bottom)); }
.mini-header { text-align: center; }
.mini-header .brand-en { font-size: .57rem; margin-bottom: .08rem; }
.mini-header .brand-ja { font-size: 1.75rem; letter-spacing: .14em; }
.progress-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 32px;
}
.progress-track { height: 2px; background: rgba(255,255,255,.58); }
.progress-fill { display: block; width: 20%; height: 100%; background: #fff; transition: width .45s ease; }
.progress-count { font-size: 1rem; letter-spacing: .04em; }
.profile-form { min-height: calc(100dvh - 168px); position: relative; }
.form-step {
  position: absolute;
  inset: 0 0 78px;
  display: grid;
  align-content: center;
  justify-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .45s ease, visibility .45s ease, transform .45s ease;
}
.form-step.is-active { opacity: 1; visibility: visible; transform: none; }
.question-label {
  margin: 0 0 48px;
  font-size: 1rem;
  letter-spacing: .12em;
}
.wheel {
  position: relative;
  display: grid;
  gap: .26rem;
  min-width: 220px;
  text-align: center;
}
.wheel::before,
.wheel::after {
  display: none !important;
  content: none !important;
}
.wheel button {
  font-size: clamp(1.85rem, 8.5vw, 2.5rem);
  line-height: 1.1;
  color: rgba(255,255,255,.55);
  letter-spacing: .08em;
}
.wheel button.is-selected { color: #fff; }
.wheel--date { min-width: 300px; }
.split-choice {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
  min-width: 245px;
}
.split-choice span {
  width: 2px;
  height: 96px;
  background: rgba(255,255,255,.78);
}
.split-choice button {
  font-size: clamp(2rem, 8.2vw, 2.55rem);
  color: rgba(255,255,255,.6);
  letter-spacing: .08em;
}
.split-choice button.is-selected { color: #fff; }
.form-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid rgba(255,255,255,.74);
  text-align: center;
  padding-top: 18px;
}
.next-button { min-width: 120px; color: rgba(255,255,255,.76); font-size: 1rem; }
.form-step--loading p { margin: 0; font-size: 1rem; text-align: center; }

/* ads */
/* ads */
/* ads */
.ad-slot {
  height: 50px;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  color: rgba(255,255,255,.72);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: .18em;
  font-size: 12px;
}

.ad-banner {
  width: 320px;
  height: 50px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, .18);
  box-sizing: border-box;
}

.ad-slot span {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  height: 26px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: rgba(255,255,255,.72);
}

.ad-slot--bottom {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  transform: translateX(-50%);
  height: calc(72px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.copyright-notice {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding-top: 4px;
  padding-bottom: 2px;
  width: 100%;
}

/* detail (マイページ / 占い結果詳細) */
.app--detail {
  display: flex !important;
  flex-direction: column !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
  position: relative;
}

/* 画面幅が狭い場合（スマホ等）は横幅目いっぱい (100%) */
@media (max-width: 640px) {
  .app--detail {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

/* 画面幅が広い場合（PC等）は現状通りの左右余白付き中央寄せ */
@media (min-width: 641px) {
  .app--detail {
    width: min(100%, var(--app-w)) !important;
    max-width: var(--app-w) !important;
    margin: 0 auto !important;
  }
}

/* 1. 上部 広告枠 */
.app--detail > .ad-slot:first-child {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  z-index: 10;
  width: 100%;
  height: 50px !important;
  flex-shrink: 0;
  margin-bottom: 8px;
}

/* 2. 占い結果スライダー / カード */
.app--detail .story-slider-container {
  flex: 1 1 0px !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  margin-bottom: 8px !important;
}

.story-slider {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.story-slider.is-dragging {
  transition: none !important;
}

.story-card {
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
  background: #111 !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  flex-shrink: 0 !important;
}

.story-card img,
.story-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.story-card--large {
  height: 100% !important;
  min-height: 0 !important;
}

.story-card--large::after,
.story-card--thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.10), rgba(0,0,0,.16) 40%, rgba(0,0,0,.34));
}

.app--detail .story-card--large {
  height: 100% !important;
  min-height: 0 !important;
}

.story-top {
  position: absolute !important;
  top: 37% !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 50 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  pointer-events: none !important;
  transform: translateY(-50%) !important;
}
.story-bottom {
  position: absolute !important;
  bottom: 20px !important;
  left: 16px !important;
  right: 16px !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
}
.story-bottom.justify-end { justify-content: flex-end !important; }
.story-bottom.justify-between { justify-content: space-between !important; }
.story-bottom.justify-start { justify-content: flex-start !important; }

.swipe-hint {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 8px 18px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #111111 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.swipe-hint span {
  color: #111111 !important;
  font-weight: 700 !important;
}

/* 3. アクションバー (下部ナビゲーション) - 四隅角丸のカプセルデザイン */
.bottom-nav {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  align-items: center !important;
  justify-items: center !important;
  width: min(calc(100% - 24px), 390px) !important;
  padding: 8px 12px;
  background: rgba(36, 36, 40, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 36px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: .12em;
  box-sizing: border-box;
}

.app--detail .bottom-nav {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 10;
  flex-shrink: 0;
  margin: 0 auto 8px auto !important;
}

/* 4. 下部 広告枠 (バナー + コピーライト) */
.app--detail .ad-slot--bottom {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 10;
  width: 100%;
  flex-shrink: 0;
  height: calc(72px + var(--safe-bottom)) !important;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 4px 0;
  transition: all 0.25s ease;
}
.bottom-nav .nav-item:hover {
  color: #ffffff;
}

.bottom-nav .nav-icon {
  font-size: 24px !important;
  line-height: 1 !important;
}

/* 完了ボタン表示制御 */
.bottom-nav .nav-item--complete {
  position: relative;
}

.complete-icon-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  margin-top: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 完了（クリック済み）状態 */
.nav-item--complete.is-completed .complete-icon-wrapper {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.45);
}

.nav-item--complete.is-completed .complete-icon-checked {
  display: block !important;
  font-size: 28px !important;
}

.nav-item--complete.is-completed .complete-icon-unchecked {
  display: none !important;
}

.nav-item--complete.is-completed .complete-label {
  color: #ffffff;
  font-weight: 600;
}

/* 未完了（未クリック）状態 */
.nav-item--complete.is-uncompleted .complete-icon-wrapper {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  border: 2px dashed rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.nav-item--complete.is-uncompleted .complete-icon-checked {
  display: none !important;
}

.nav-item--complete.is-uncompleted .complete-icon-unchecked {
  display: block !important;
  font-size: 24px !important;
  opacity: 0.6;
}

.nav-item--complete.is-uncompleted .complete-label {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

/* collection */
.app--collection { padding-bottom: calc(70px + var(--safe-bottom)); }
.collection-summary {
  height: 112px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  padding: 0 52px;
}
.collection-summary div { display: grid; justify-items: center; gap: 7px; font-family: system-ui, -apple-system, sans-serif; letter-spacing: .16em; }
.summary-check {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 50%; background: #fff; color: #000; font-size: 34px; font-weight: 900;
}
.summary-line { width: 1px; height: 58px; background: rgba(255,255,255,.7); }
.collection-summary strong { font-size: 2rem; font-weight: 400; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 11px 22px;
}
.story-card--thumb { aspect-ratio: 4 / 6.15; }
.story-card--thumb span {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 10px 4px;
  text-align: center;
  font-size: .8rem;
  letter-spacing: .1em;
  line-height: 1.35;
}
.story-card--thumb b {
  margin: 4px 0 8px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: .08em;
}
.story-card--thumb small { font-size: .58rem; line-height: 1.45; }

@media (min-width: 700px) {
  body { background: #000; }
  .app { min-height: 100vh; box-shadow: none; border: none; }
  .ad-slot--bottom, .bottom-nav { position: absolute; }
}


.story-slider {
  display: flex;
  width: 100%;
  height: 100svh;
  transition: transform .45s ease;
  will-change: transform;
  touch-action: pan-y;
}

@supports (height: 100dvh) {
  .story-slider {
    height: 100dvh;
  }
}

.app--detail .story-card--large {
  height: 100%;
  min-height: 100%;
}

/* detail swipe slider fix */
.app--detail {
  overflow: hidden;
}

.story-slider {
  display: flex;
  width: 100%;
  height: 100svh;
  transition: transform .45s ease;
  will-change: transform;
  touch-action: pan-y;
}

@supports (height: 100dvh) {
  .story-slider {
    height: 100dvh;
  }
}

.story-slider.is-dragging {
  transition: none;
}

.story-slider .story-card--large {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100%;
}