/* === base (index.css + Layout) === */
:root {
  --color-masked: #e91e8c;
  --color-love: #ad1457;
  --color-bg: #1a0a12;
  --color-surface: #2d1520;
  --color-text: #fce4ec;
  --color-muted: #b0a0a8;
  --font-sans: 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

#root {
  min-height: 100vh;
  max-width: 420px;
  margin: 0 auto;
  background: var(--color-surface);
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

button { font-family: inherit; cursor: pointer; }

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout .header {
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid rgba(233, 30, 140, 0.3);
}

.layout .logo {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.layout .logoLove { color: var(--color-masked); }

.layout .main {
  flex: 1;
  padding: 16px;
  padding-bottom: 24px;
}

/* === TitlePhase === */
.title-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.title-creditBtn {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.title-creditBtn:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
}

.title-logo {
  max-width: 100%;
  width: min(520px, 98vw);
  height: auto;
  margin-bottom: 24px;
  display: block;
}

.title-sub {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.title-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0 0 32px;
  max-width: 280px;
}

.title-startGroup {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.title-startBtn {
  padding: 14px 48px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-masked), var(--color-love));
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(233, 30, 140, 0.4);
}

.title-startBtn:hover { opacity: 0.95; transform: scale(1.02); }

.title-startBtnSub {
  background: linear-gradient(135deg, rgba(233, 30, 140, 0.6), rgba(173, 20, 87, 0.7));
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* === ConditionPhase === */
.condition-wrap { max-width: 360px; margin: 0 auto; }

.condition-h2 { font-size: 1.35rem; margin: 0 0 8px; color: var(--color-text); }

.condition-lead { font-size: 0.9rem; color: var(--color-muted); margin: 0 0 16px; }

.condition-tagList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.condition-tag {
  padding: 8px 14px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: var(--color-text);
}

.condition-tag:hover { background: rgba(255, 255, 255, 0.12); }

.condition-tag.selected {
  background: rgba(233, 30, 140, 0.35);
  border-color: var(--color-masked);
  color: #fff;
}

.condition-partnerSection {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin-bottom: 24px;
}

.condition-h3 { font-size: 0.95rem; margin: 0 0 10px; color: var(--color-muted); }

.condition-partnerTags { display: flex; flex-wrap: wrap; gap: 8px; }

.condition-partnerTag {
  padding: 6px 12px;
  font-size: 0.85rem;
  background: rgba(233, 30, 140, 0.2);
  border-radius: 999px;
  color: var(--color-masked);
}

.condition-nextBtn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-masked), var(--color-love));
  border: none;
  border-radius: 12px;
}

.condition-nextBtn:hover { opacity: 0.95; }

/* === EditPhase === */
.edit-wrap { max-width: 420px; margin: 0 auto; }

.edit-h2 { font-size: 1.35rem; margin: 0 0 8px; color: var(--color-text); }

.edit-lead { font-size: 0.9rem; color: var(--color-muted); margin: 0 0 20px; }

.edit-avatar { width: 100%; margin-bottom: 24px; }

.edit-avatarInner {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(233, 30, 140, 0.3), rgba(173, 20, 87, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(233, 30, 140, 0.5);
  overflow: hidden;
  position: relative;
}

.edit-avatarInner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
}

.edit-avatarInner.edit-effect-2::after {
  opacity: 0.35;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 30%, rgba(255, 220, 255, 0.6) 0%, transparent 15%),
    radial-gradient(circle at 80% 40%, rgba(255, 200, 255, 0.5) 0%, transparent 12%),
    radial-gradient(circle at 50% 70%, rgba(255, 230, 255, 0.4) 0%, transparent 18%);
  animation: edit-sparkle 2s ease-in-out infinite;
}

.edit-avatarInner.edit-effect-3::after {
  opacity: 0.55;
  background: radial-gradient(circle at 20% 30%, rgba(255, 220, 255, 0.7) 0%, transparent 12%),
    radial-gradient(circle at 80% 40%, rgba(255, 200, 255, 0.6) 0%, transparent 10%),
    radial-gradient(circle at 50% 70%, rgba(255, 230, 255, 0.5) 0%, transparent 14%),
    radial-gradient(circle at 30% 60%, rgba(255, 240, 255, 0.5) 0%, transparent 11%);
  animation: edit-sparkle 1.5s ease-in-out infinite;
}

.edit-avatarInner.edit-effect-4::after {
  opacity: 0.8;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 30%, rgba(255, 220, 255, 0.9) 0%, transparent 10%),
    radial-gradient(circle at 80% 40%, rgba(255, 200, 255, 0.8) 0%, transparent 8%),
    radial-gradient(circle at 50% 70%, rgba(255, 230, 255, 0.7) 0%, transparent 12%),
    radial-gradient(circle at 30% 60%, rgba(255, 240, 255, 0.7) 0%, transparent 9%),
    radial-gradient(circle at 70% 20%, rgba(255, 210, 255, 0.6) 0%, transparent 10%);
  animation: edit-sparkle 1s ease-in-out infinite;
}

@keyframes edit-sparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.edit-playerImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.15s ease;
}

.edit-levels { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.edit-levelRow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.edit-levelLabel { width: 72px; font-size: 0.9rem; color: var(--color-text); }

.edit-levelBtns { display: flex; gap: 8px; flex-wrap: wrap; }

.edit-levelBtn {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.edit-levelBtn:hover { background: rgba(255, 255, 255, 0.15); }

.edit-levelBtn.selected {
  background: rgba(233, 30, 140, 0.4);
  border-color: var(--color-masked);
  color: #fff;
}

.edit-nextBtn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-masked), var(--color-love));
  border: none;
  border-radius: 12px;
}

.edit-nextBtn:hover { opacity: 0.95; }

/* === MatchingPhase (Matching1 + Matching2) === */
.match-wrap { max-width: 420px; margin: 0 auto; }

.match-h2 { font-size: 1.35rem; margin: 0 0 8px; color: var(--color-text); }

.match-lead { font-size: 0.9rem; color: var(--color-muted); margin: 0 0 20px; }

.match-card {
  padding: 20px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  border: 1px solid rgba(233, 30, 140, 0.2);
  text-align: center;
}

.match-cardImage {
  width: 100%;
  height: 380px;
  margin: 0 0 12px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(233, 30, 140, 0.2), rgba(173, 20, 87, 0.3));
  border: 2px solid rgba(233, 30, 140, 0.3);
}

.match-partnerImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.match-avatarText { font-size: 1.1rem; font-weight: 600; color: rgba(255, 255, 255, 0.95); margin: 0 0 8px; }

.match-cardDesc { font-size: 0.85rem; color: var(--color-muted); margin: 0 0 20px; }

.match-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.match-buttonsDivider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.match-ngBtn {
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #e91e8c;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(233, 30, 140, 0.5);
}

.match-ngBtn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.match-okBtn {
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #e91e8c;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(233, 30, 140, 0.5);
}

.match-okBtn:hover { opacity: 0.9; transform: scale(1.05); }

.match-resultArea { margin-top: 16px; }

.match-matched { color: var(--color-masked); font-weight: 600; margin: 0 0 12px; }

.match-rejected { color: var(--color-muted); font-size: 0.9rem; margin: 0 0 12px; }

.match-nextBtn {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-masked), var(--color-love));
  border: none;
  border-radius: 12px;
  margin-top: 8px;
}

.match-nextBtn:hover { opacity: 0.95; }

/* === DatePhase === */
.date-bg {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background-color: #1a0a14;
}

.date-bgTop {
  position: relative;
  height: 50vh;
  min-height: 200px;
  flex-shrink: 0;
  background-image: url('../images/date-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.date-partnerOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 1.2s ease-out;
  pointer-events: none;
}

.date-partnerOverlay--hidden {
  opacity: 0;
}

.date-partnerOverlay--visible {
  opacity: 1;
}

.date-partnerOverlay .date-partnerFace {
  margin: 0;
  width: 100%;
  max-height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.date-partnerOverlay .date-partnerImg {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  transform: scale(1.45);
  transform-origin: bottom center;
}

.date-content {
  flex: 1;
  padding: 16px 0 24px;
  overflow-y: auto;
}

.date-wrap { max-width: 360px; margin: 0 auto; }

.date-h2 { font-size: 1.35rem; margin: 0 0 8px; color: var(--color-text); }

.date-lead { font-size: 0.9rem; color: var(--color-muted); margin: 0 0 20px; }

.date-partnerFace {
  width: 220px;
  height: 220px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(173, 20, 87, 0.4), rgba(233, 30, 140, 0.3));
  border: 3px solid rgba(233, 30, 140, 0.4);
}

.date-partnerImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.date-faceLabel {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  margin-bottom: 20px;
}

.date-dialogue {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  min-height: 120px;
}

.date-text { font-size: 1rem; line-height: 1.6; margin: 0 0 16px; color: var(--color-text); }

.date-introBtns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.date-backBtn {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  margin-top: 4px;
}

.date-backBtn:hover { background: rgba(255, 255, 255, 0.15); }

.date-choices { display: flex; flex-direction: column; gap: 10px; }

.date-choiceBtn {
  padding: 12px 16px;
  font-size: 0.95rem;
  text-align: left;
  background: rgba(233, 30, 140, 0.2);
  border: 1px solid rgba(233, 30, 140, 0.4);
  border-radius: 10px;
  color: var(--color-text);
}

.date-choiceBtn:hover { background: rgba(233, 30, 140, 0.35); }

.date-nextLineBtn {
  padding: 10px 20px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--color-text);
}

.date-nextLineBtn:hover { background: rgba(255, 255, 255, 0.15); }

.date-nextBtn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-masked), var(--color-love));
  border: none;
  border-radius: 12px;
  margin-top: 8px;
}

.date-nextBtn:hover { opacity: 0.95; }

/* === EndingPhase === */
.ending-wrap {
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
  padding: 24px 0;
}

.ending-imgWrap {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.ending-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.ending-titleHappy {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-masked);
  margin: 0 0 24px;
  text-shadow: 0 0 20px rgba(233, 30, 140, 0.5);
}

.ending-titleBad {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-muted);
  margin: 0 0 24px;
}

.ending-textWrap {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin-bottom: 24px;
}

.ending-text { font-size: 1rem; line-height: 1.8; margin: 0; color: var(--color-text); }

.ending-actions { display: flex; flex-direction: column; gap: 12px; }

.ending-retryBtn {
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-masked), var(--color-love));
  border: none;
  border-radius: 12px;
}

.ending-retryBtn:hover { opacity: 0.95; }

.ending-titleBtn {
  padding: 12px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: var(--color-text);
}

.ending-titleBtn:hover { background: rgba(255, 255, 255, 0.15); }

/* === CreditPage === */
.credit-wrap {
  max-width: 360px;
  margin: 0 auto;
  padding: 24px 0;
  text-align: center;
}

.credit-h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
  margin: 24px 0 8px;
  letter-spacing: 0.05em;
}

.credit-h2:first-child { margin-top: 0; }

.credit-list {
  text-align: left;
  max-width: 320px;
  margin: 0 auto 8px;
}

.credit-row {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.credit-label {
  flex-shrink: 0;
  width: 130px;
  color: var(--color-muted);
}

.credit-value { color: var(--color-text); }

.credit-rowSub .credit-label { min-width: 130px; }

.credit-by {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0 0 8px;
}

.credit-backBtn {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 32px auto 0;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
}

.credit-backBtn:hover { background: rgba(255, 255, 255, 0.15); }
