/* ============================================================
 * Tiful v4 Onboarding — Common Stylesheet (v1)
 * 2026-05-03 / Phase 5 (CSS 分離)
 * ============================================================
 * 集約画面: 8 画面 (Coachmark は coachmark_v1.css に別出し)
 *   - Hero        (01)        body.ob-hero
 *   - Value       (2a/2b/2c)  body.ob-value
 *   - Signup      (03)        body.ob-signup
 *   - PickIntro   (04)        body.ob-pickintro
 *   - Tifuler     (05)        body.ob-tifuler
 *   - Complete    (06)        body.ob-complete
 *
 * 設計原則:
 *   - 共通土台 (reset / body / iPhone モード) は無 scope
 *   - 画面個別スタイルは body.ob-* で scope して衝突分離
 *   - 元 inline と byte-by-byte 互換 (visual regression なし)
 * ============================================================ */


/* ============================================================
 * 1. Reset & Base
 * ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
}

body.ob-hero,
body.ob-value,
body.ob-pickintro,
body.ob-tifuler,
body.ob-complete {
  overflow: hidden;
}

body {
  background: var(--bg, #FAFAF8);
  color: var(--ink, #1F232E);
  font-family: 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.ob-hero {
  background: #000;
  color: #fff;
}


/* ============================================================
 * 2. Common animations
 * ============================================================ */

@keyframes onbFadeIn {
  to { opacity: 1; }
}

@keyframes heroFadeIn {
  to { opacity: 1; }
}


/* ============================================================
 * 3. Common .onb container (Value / Signup / PickIntro / Tifuler / Complete)
 * ============================================================ */

.ob-value .onb,
.ob-pickintro .onb,
.ob-tifuler .onb,
.ob-complete .onb {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

.ob-value .onb {
  padding:
    max(16px, env(safe-area-inset-top))
    0
    max(28px, env(safe-area-inset-bottom));
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.ob-signup .onb {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-tap-highlight-color: transparent;
}

.ob-pickintro .onb,
.ob-tifuler .onb,
.ob-complete .onb {
  padding-top: max(8px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.ob-value .onb.is-leaving,
.ob-signup .onb.is-leaving,
.ob-pickintro .onb.is-leaving,
.ob-tifuler .onb.is-leaving,
.ob-complete .onb.is-leaving {
  transition: opacity 280ms ease, transform 280ms ease;
  opacity: 0;
  transform: translateX(-12px);
}


/* ============================================================
 * 4. Common .onb__top / __back / __logo
 * ============================================================ */

/* Value 系 (logo center / back なし) */
.ob-value .onb__top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px 0;
  min-height: 36px;
  opacity: 0;
  animation: onbFadeIn 700ms ease 200ms forwards;
}

.ob-value .onb__logo {
  height: 22px;
  width: auto;
}

/* Signup / PickIntro / Tifuler / Complete (back あり / logo center) */
.ob-signup .onb__top,
.ob-pickintro .onb__top,
.ob-tifuler .onb__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 0;
  min-height: 40px;
  flex-shrink: 0;
}

.ob-pickintro .onb__top,
.ob-tifuler .onb__top {
  opacity: 0;
}

.ob-pickintro .onb__top {
  animation: onbFadeIn 700ms ease 200ms forwards;
}

.ob-tifuler .onb__top {
  animation: onbFadeIn 600ms ease 200ms forwards;
}

.ob-complete .onb__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 16px 0;
  min-height: 40px;
  flex-shrink: 0;
  opacity: 0;
  animation: onbFadeIn 600ms ease 200ms forwards;
}

.ob-signup .onb__back,
.ob-pickintro .onb__back,
.ob-tifuler .onb__back {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #1F232E);
}

.ob-complete .onb__back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #1F232E);
}

.ob-signup .onb__logo,
.ob-pickintro .onb__logo {
  height: 22px;
  width: auto;
}

.ob-tifuler .onb__logo {
  height: 20px;
  width: auto;
  opacity: 0.55;
}


/* ============================================================
 * 5. Hero (画面 01)
 * ============================================================ */

.ob-hero .hero {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.ob-hero .hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ob-hero .hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,0.18) 0%,
      rgba(0,0,0,0) 18%,
      rgba(0,0,0,0) 48%,
      rgba(0,0,0,0.55) 70%,
      rgba(0,0,0,0.85) 100%);
}

.ob-hero .hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    24px
    max(28px, env(safe-area-inset-bottom));
}

.ob-hero .hero__logo {
  margin-top: 12px;
  height: 24px;
  width: auto;
  filter: drop-shadow(0 1px 10px rgba(0,0,0,0.35));
  opacity: 0;
  animation: heroFadeIn 1200ms cubic-bezier(0.22, 0.61, 0.36, 1) 200ms forwards;
}

.ob-hero .hero__copy {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.ob-hero .hero__copy-en {
  font-family: 'Italiana', 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.32;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
  opacity: 0;
  animation: heroFadeIn 1200ms cubic-bezier(0.22, 0.61, 0.36, 1) 700ms forwards;
}

.ob-hero .hero__copy-ja {
  font-family: 'Noto Serif JP', serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
  opacity: 0;
  animation: heroFadeIn 1200ms cubic-bezier(0.22, 0.61, 0.36, 1) 950ms forwards;
}

.ob-hero .hero__cta {
  width: 100%;
  max-width: 360px;
  height: 52px;
  background: #1F232E;
  color: #fff;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  opacity: 0;
  animation: heroFadeIn 1000ms ease 1300ms forwards;
  transition: opacity 200ms ease, transform 200ms ease;
}

.ob-hero .hero__cta:active {
  opacity: 0.88;
  transform: scale(0.985);
}

.ob-hero .hero__login {
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  animation: heroFadeIn 1000ms ease 1600ms forwards;
}

.ob-hero .hero__login span {
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 4px;
  color: #fff;
}

.ob-hero .hero.is-leaving {
  transition: opacity 400ms ease;
  opacity: 0;
}


/* ============================================================
 * 6. Value (画面 2a / 2b / 2c — 完全共通)
 * ============================================================ */

.ob-value .onb__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 24px 0;
}

.ob-value .onb-photo {
  position: relative;
  width: 56%;
  max-width: 240px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
}

.ob-value .onb-photo__main {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  overflow: hidden;
  background: #EFEBE4;
  z-index: 3;
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
  opacity: 0;
  animation: onbFadeIn 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) 350ms forwards;
}

.ob-value .onb-photo__main img,
.ob-value .onb-photo__layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ob-value .onb-photo__layer {
  position: absolute;
  border-radius: 2px;
  overflow: hidden;
  background: #EFEBE4;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  opacity: 0;
}

.ob-value .onb-photo__layer--r1 {
  top: 12%;
  right: -50%;
  width: 70%;
  aspect-ratio: 4 / 5;
  z-index: 2;
  animation: onbFadeIn 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) 600ms forwards;
}

.ob-value .onb-photo__layer--r2 {
  top: 32%;
  right: -100%;
  width: 50%;
  aspect-ratio: 4 / 5;
  z-index: 1;
  animation: onbFadeIn 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) 800ms forwards;
}

.ob-value .onb-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 64px;
  gap: 16px;
  max-width: 320px;
}

.ob-value .onb-copy__head {
  font-family: 'Italiana', 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.32;
  letter-spacing: 0.02em;
  color: var(--ink, #1F232E);
  opacity: 0;
  animation: onbFadeIn 900ms ease 1000ms forwards;
}

.ob-value .onb-copy__sub {
  font-family: 'Noto Serif JP', serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: 0.06em;
  color: var(--muted, #8A8378);
  opacity: 0;
  animation: onbFadeIn 900ms ease 1250ms forwards;
}

.ob-value .onb__bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 0 4px;
  opacity: 0;
  animation: onbFadeIn 800ms ease 1500ms forwards;
}

.ob-value .onb-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(31, 35, 46, 0.04);
}

.ob-value .onb-progress__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(31, 35, 46, 0.22);
  transition: width 220ms ease, background 220ms ease;
}

.ob-value .onb-progress__dot.is-active {
  width: 22px;
  background: var(--ink, #1F232E);
}


/* ============================================================
 * 7. Signup (画面 03)
 * ============================================================ */

.ob-signup .onb__form {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 8px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.ob-signup .onb__title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  color: var(--ink, #1F232E);
}

.ob-signup .onb__title-en {
  display: block;
  font-family: 'Italiana', serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted, #8A8378);
  margin-bottom: 28px;
  font-weight: 400;
}

.ob-signup .onb-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 200ms ease;
  border: 1px solid transparent;
}

.ob-signup .onb-sso:active { opacity: 0.85; }

.ob-signup .onb-sso--apple {
  background: #1F232E;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.ob-signup .onb-sso--google {
  background: #FFFFFF;
  color: #1F232E;
  border-color: rgba(31, 35, 46, 0.18);
}

.ob-signup .onb-sso__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.ob-signup .onb-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
}

.ob-signup .onb-divider::before,
.ob-signup .onb-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(31, 35, 46, 0.14);
}

.ob-signup .onb-divider__label {
  font-size: 11px;
  color: var(--muted, #8A8378);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ob-signup .onb-field {
  margin-bottom: 14px;
}

.ob-signup .onb-field__label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink, #1F232E);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}

.ob-signup .onb-field__input-wrap {
  position: relative;
}

.ob-signup .onb-field__input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(31, 35, 46, 0.18);
  border-radius: 4px;
  background: #FFFFFF;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  color: var(--ink, #1F232E);
  transition: border-color 200ms ease;
}

.ob-signup .onb-field__input:focus {
  outline: none;
  border-color: var(--ink, #1F232E);
}

.ob-signup .onb-field__input::placeholder {
  color: rgba(138, 131, 120, 0.55);
  font-size: 14px;
}

.ob-signup .onb-field__input--has-toggle { padding-right: 44px; }

.ob-signup .onb-field__hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted, #8A8378);
  letter-spacing: 0.04em;
}

.ob-signup .onb-field__toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted, #8A8378);
  padding: 8px;
  display: flex;
  align-items: center;
}

.ob-signup .onb-cta {
  width: 100%;
  height: 52px;
  background: var(--ink, #1F232E);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity 200ms ease;
}

.ob-signup .onb-cta:active { opacity: 0.85; }

.ob-signup .onb-login {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted, #8A8378);
}

.ob-signup .onb-login__link {
  color: var(--ink, #1F232E);
  text-decoration: underline;
  margin-left: 4px;
}

.ob-signup .onb-tos {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted, #8A8378);
  letter-spacing: 0.04em;
}

.ob-signup .onb-tos__link {
  color: var(--ink, #1F232E);
  text-decoration: underline;
}


/* ============================================================
 * 8. PickIntro (画面 04)
 * ============================================================ */

.ob-pickintro .onb__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 28px 0;
  text-align: center;
}

.ob-pickintro .onb__step {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--muted, #8A8378);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: onbFadeIn 800ms ease 350ms forwards;
}

.ob-pickintro .onb__title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink, #1F232E);
  margin-bottom: 12px;
  opacity: 0;
  animation: onbFadeIn 900ms ease 500ms forwards;
}

.ob-pickintro .onb__sub {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.05em;
  color: var(--muted, #8A8378);
  max-width: 290px;
  margin: 0 auto 36px;
  opacity: 0;
  animation: onbFadeIn 900ms ease 700ms forwards;
}

.ob-pickintro .onb-collage,
.ob-complete .onb-collage {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 5 / 4;
  margin: 0 auto;
}

.ob-pickintro .onb-collage__item,
.ob-complete .onb-collage__item {
  position: absolute;
  border-radius: 2px;
  overflow: hidden;
  background: #EFEBE4;
  opacity: 0;
}

.ob-pickintro .onb-collage__item img,
.ob-complete .onb-collage__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ob-pickintro .onb-collage__item--left,
.ob-complete .onb-collage__item--left {
  left: 4%;
  top: 18%;
  width: 36%;
  aspect-ratio: 4 / 5;
  transform: rotate(-8deg);
  z-index: 1;
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
}

.ob-pickintro .onb-collage__item--center,
.ob-complete .onb-collage__item--center {
  left: 50%;
  top: 4%;
  transform: translateX(-50%) rotate(0deg);
  width: 42%;
  aspect-ratio: 4 / 5;
  z-index: 3;
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
}

.ob-pickintro .onb-collage__item--right,
.ob-complete .onb-collage__item--right {
  right: 4%;
  top: 22%;
  width: 36%;
  aspect-ratio: 4 / 5;
  transform: rotate(8deg);
  z-index: 2;
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
}

.ob-pickintro .onb-collage__item--left {
  animation: onbFadeIn 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) 900ms forwards;
}

.ob-pickintro .onb-collage__item--center {
  animation: onbFadeIn 1100ms cubic-bezier(0.22, 0.61, 0.36, 1) 1100ms forwards;
}

.ob-pickintro .onb-collage__item--right {
  animation: onbFadeIn 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) 1300ms forwards;
}

.ob-pickintro .onb__bottom {
  flex-shrink: 0;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  opacity: 0;
  animation: onbFadeIn 800ms ease 1500ms forwards;
}

.ob-pickintro .onb-cta--primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 16px;
  background: var(--ink, #1F232E);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 200ms ease;
  font-family: 'Noto Sans JP', sans-serif;
}

.ob-pickintro .onb-cta--primary:active { opacity: 0.85; }

.ob-pickintro .onb-cta__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.ob-pickintro .onb-cta__labels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.ob-pickintro .onb-cta__main {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.ob-pickintro .onb-cta__sub {
  font-family: 'Italiana', serif;
  font-style: italic;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
}

.ob-pickintro .onb-cta--secondary {
  display: block;
  text-align: center;
  width: 100%;
  padding: 10px 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink, #1F232E);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(31, 35, 46, 0.4);
  cursor: pointer;
}

.ob-pickintro .onb-cta--secondary:active { opacity: 0.65; }


/* ============================================================
 * 9. Tifuler 選定 (画面 05)
 * ============================================================ */

.ob-tifuler .onb__head {
  flex-shrink: 0;
  padding: 24px 28px 0;
  text-align: center;
}

.ob-tifuler .onb__title {
  font-family: 'Italiana', 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--ink, #1F232E);
  margin-bottom: 12px;
  opacity: 0;
  animation: onbFadeIn 800ms ease 350ms forwards;
}

.ob-tifuler .onb__sub {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--muted, #8A8378);
  max-width: 300px;
  margin: 0 auto 22px;
  opacity: 0;
  animation: onbFadeIn 800ms ease 500ms forwards;
}

.ob-tifuler .onb__tabs {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(31, 35, 46, 0.10);
  flex-shrink: 0;
  opacity: 0;
  animation: onbFadeIn 700ms ease 700ms forwards;
}

.ob-tifuler .onb__tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0 12px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted, #8A8378);
  position: relative;
  transition: color 200ms ease;
}

.ob-tifuler .onb__tab.is-active {
  color: var(--ink, #1F232E);
}

.ob-tifuler .onb__tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink, #1F232E);
}

.ob-tifuler .onb__list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 22px 0 8px;
  opacity: 0;
  animation: onbFadeIn 800ms ease 900ms forwards;
}

.ob-tifuler .onb__panel { display: none; }
.ob-tifuler .onb__panel.is-active { display: block; }

.ob-tifuler .tsec {
  margin-bottom: 26px;
}

.ob-tifuler .tsec__heading {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ink, #1F232E);
  padding: 0 28px 12px;
}

.ob-tifuler .tsec__row {
  display: flex;
  gap: 12px;
  padding: 0 28px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.ob-tifuler .tsec__row::-webkit-scrollbar { display: none; }

.ob-tifuler .tcard {
  flex: 0 0 auto;
  width: 138px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}

.ob-tifuler .tcard__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background: #EFEBE4;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.ob-tifuler .tcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.ob-tifuler .tcard:active .tcard__media img { transform: scale(0.98); }

.ob-tifuler .tcard__check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(31, 35, 46, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.ob-tifuler .tcard__check svg {
  width: 12px;
  height: 12px;
  stroke: #FFFFFF;
  opacity: 0;
  transition: opacity 200ms ease;
}

.ob-tifuler .tcard.is-selected .tcard__check {
  background: var(--ink, #1F232E);
  border-color: var(--ink, #1F232E);
}

.ob-tifuler .tcard.is-selected .tcard__check svg { opacity: 1; }

.ob-tifuler .tcard__name {
  display: block;
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink, #1F232E);
  line-height: 1.35;
  margin-bottom: 2px;
}

.ob-tifuler .tcard__cat {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  color: var(--muted, #8A8378);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.ob-tifuler .tsearch {
  padding: 0 28px;
}

.ob-tifuler .tsearch__field {
  position: relative;
  margin-bottom: 18px;
}

.ob-tifuler .tsearch__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted, #8A8378);
  pointer-events: none;
}

.ob-tifuler .tsearch__input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid rgba(31, 35, 46, 0.14);
  border-radius: 999px;
  background: #FFFFFF;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: var(--ink, #1F232E);
  transition: border-color 200ms ease;
}

.ob-tifuler .tsearch__input:focus {
  outline: none;
  border-color: var(--ink, #1F232E);
}

.ob-tifuler .tsearch__input::placeholder {
  color: rgba(138, 131, 120, 0.6);
}

.ob-tifuler .tsearch__heading {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--muted, #8A8378);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.ob-tifuler .tlist__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(31, 35, 46, 0.06);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.ob-tifuler .tlist__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #EFEBE4;
}

.ob-tifuler .tlist__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ob-tifuler .tlist__main { flex: 1; min-width: 0; }

.ob-tifuler .tlist__name {
  display: block;
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink, #1F232E);
  line-height: 1.3;
}

.ob-tifuler .tlist__cat {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  color: var(--muted, #8A8378);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.ob-tifuler .tlist__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(31, 35, 46, 0.22);
  background: #FFFFFF;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.ob-tifuler .tlist__check svg { width: 12px; height: 12px; stroke: #FFFFFF; opacity: 0; transition: opacity 200ms ease; }

.ob-tifuler .tlist__item.is-selected .tlist__check {
  background: var(--ink, #1F232E);
  border-color: var(--ink, #1F232E);
}

.ob-tifuler .tlist__item.is-selected .tlist__check svg { opacity: 1; }

.ob-tifuler .onb__bottom {
  flex-shrink: 0;
  padding: 12px 28px 0;
  background: linear-gradient(180deg, rgba(250, 250, 248, 0) 0%, rgba(250, 250, 248, 0.95) 30%, var(--bg, #FAFAF8) 100%);
  opacity: 0;
  animation: onbFadeIn 700ms ease 1200ms forwards;
}

.ob-tifuler .onb__hint {
  font-family: 'Italiana', 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--muted, #8A8378);
  text-align: center;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  min-height: 16px;
  transition: opacity 250ms ease;
}

.ob-tifuler .onb__hint.is-hidden { opacity: 0; }

.ob-tifuler .onb-continue {
  width: 100%;
  height: 54px;
  background: var(--ink, #1F232E);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 250ms ease, opacity 200ms ease;
  margin-bottom: 14px;
}

.ob-tifuler .onb-continue:active { opacity: 0.85; }

.ob-tifuler .onb-continue:disabled,
.ob-tifuler .onb-continue.is-disabled {
  background: #C9C5BD;
  color: rgba(255,255,255,0.85);
  cursor: not-allowed;
}

.ob-tifuler .onb__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
  transition: opacity 250ms ease;
}

.ob-tifuler .onb__meta.is-hidden { opacity: 0; pointer-events: none; }

.ob-tifuler .onb__count {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted, #8A8378);
  text-transform: uppercase;
}

.ob-tifuler .onb__skip {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink, #1F232E);
  text-transform: uppercase;
  padding: 4px 8px;
}

.ob-tifuler .onb-dialog {
  position: fixed;
  inset: 0;
  background: rgba(31, 35, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.ob-tifuler .onb-dialog.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ob-tifuler .onb-dialog__panel {
  background: #FFFFFF;
  border-radius: 12px;
  width: calc(100% - 56px);
  max-width: 320px;
  padding: 24px 22px 16px;
  text-align: center;
}

.ob-tifuler .onb-dialog__title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--ink, #1F232E);
  line-height: 1.5;
  margin-bottom: 10px;
}

.ob-tifuler .onb-dialog__body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: var(--muted, #8A8378);
  line-height: 1.7;
  margin-bottom: 18px;
}

.ob-tifuler .onb-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ob-tifuler .onb-dialog__btn {
  width: 100%;
  height: 46px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.ob-tifuler .onb-dialog__btn--primary {
  background: var(--ink, #1F232E);
  color: #FFFFFF;
}

.ob-tifuler .onb-dialog__btn--ghost {
  background: none;
  color: var(--muted, #8A8378);
  text-decoration: underline;
  text-underline-offset: 4px;
}


/* ============================================================
 * 10. Complete (画面 06)
 * ============================================================ */

.ob-complete .onb__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 28px 0;
  text-align: center;
}

.ob-complete .onb__title {
  font-family: 'Italiana', 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--ink, #1F232E);
  margin-bottom: 16px;
  opacity: 0;
  animation: onbFadeIn 900ms ease 350ms forwards;
}

.ob-complete .onb__sub {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.05em;
  color: var(--muted, #8A8378);
  max-width: 290px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: onbFadeIn 900ms ease 550ms forwards;
}

.ob-complete .onb__sub strong {
  font-weight: 500;
  color: var(--ink, #1F232E);
}

.ob-complete .onb-collage__item--left {
  animation: onbFadeIn 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) 800ms forwards;
}

.ob-complete .onb-collage__item--center {
  animation: onbFadeIn 1100ms cubic-bezier(0.22, 0.61, 0.36, 1) 1050ms forwards;
}

.ob-complete .onb-collage__item--right {
  animation: onbFadeIn 1000ms cubic-bezier(0.22, 0.61, 0.36, 1) 1300ms forwards;
}

.ob-complete .onb__bottom {
  flex-shrink: 0;
  padding: 0 28px;
  opacity: 0;
  animation: onbFadeIn 800ms ease 1700ms forwards;
}

.ob-complete .onb-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  background: var(--ink, #1F232E);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.ob-complete .onb-cta:active { opacity: 0.85; }


/* ============================================================
 * 11. Responsive — Desktop frame (>=431px) + iPhone (<=430px)
 * ============================================================ */

@media (min-width: 431px) {
  body {
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ob-hero .hero {
    position: relative;
    inset: auto;
    width: 390px;
    height: 844px;
    max-height: 95vh;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  }

  .ob-value .onb,
  .ob-pickintro .onb,
  .ob-tifuler .onb,
  .ob-complete .onb {
    position: relative;
    inset: auto;
    width: 390px;
    height: 844px;
    max-height: 95vh;
    border-radius: 40px;
    overflow: hidden;
    background: var(--bg, #FAFAF8);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  }

  .ob-pickintro .onb,
  .ob-tifuler .onb,
  .ob-complete .onb {
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .ob-signup .onb {
    position: relative;
    inset: auto;
    width: 390px;
    height: 844px;
    max-height: 95vh;
    border-radius: 40px;
    background: var(--bg, #FAFAF8);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    padding-top: 16px;
    padding-bottom: 24px;
  }
}

@media (max-width: 430px) {
  body.ob-hero { background: #000; }
  body.ob-value,
  body.ob-signup,
  body.ob-pickintro,
  body.ob-tifuler,
  body.ob-complete { background: var(--bg, #FAFAF8); }
}
