/* ============ BBNB — ビビンバ性格診断 ============ */
:root {
  --gold: #e8b45a;
  --gold-bright: #f6d27c;
  --ink: #f2ede4;
  --bg: #030308;
}

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

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(232, 180, 90, 0.4); }

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ---------- ヘッダー ---------- */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  letter-spacing: 0.4em;
  color: rgba(232, 180, 90, 0.85);
}

.top .back {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  letter-spacing: 0.2em;
  color: rgba(232, 180, 90, 0.85);
  text-decoration: none;
  transition: color 0.25s;
}

.top .back:hover { color: var(--gold-bright); }

/* ---------- 画面 ---------- */
main {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 6.5rem 1.4rem 4rem;
}

.screen {
  display: none;
  width: min(600px, 100%);
  text-align: center;
  animation: fadeUp 0.7s ease both;
}

.screen.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.kicker {
  font-weight: 300;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ---------- イントロ ---------- */
.logo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(4.5rem, 18vw, 8.5rem);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 60px rgba(255, 160, 50, 0.5), 0 0 150px rgba(255, 80, 30, 0.3);
  animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { text-shadow: 0 0 60px rgba(255, 160, 50, 0.5), 0 0 150px rgba(255, 80, 30, 0.3); }
  50% { text-shadow: 0 0 90px rgba(255, 185, 70, 0.8), 0 0 220px rgba(255, 95, 40, 0.5); }
}

.sub {
  font-family: 'Shippori Mincho B1', serif;
  font-weight: 700;
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
  letter-spacing: 0.14em;
  line-height: 2;
  margin-top: 2rem;
}

.meta {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: rgba(242, 237, 228, 0.55);
  margin-top: 1.2rem;
}

.axes-hint {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  line-height: 1.9;
  color: rgba(242, 237, 228, 0.45);
  margin-top: 2.2rem;
}

.sp { display: none; }

/* ---------- ボタン ---------- */
.gold-btn {
  cursor: pointer;
  display: inline-block;
  margin-top: 2.6rem;
  font-family: 'Shippori Mincho B1', serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  padding: 1.05em 2.6em;
  color: #14090a;
  background: linear-gradient(135deg, var(--gold-bright), #e8a33d 55%, #d4822a);
  border: none;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 0 40px rgba(240, 180, 80, 0.4), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gold-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 80px rgba(240, 180, 80, 0.75), inset 0 1px 0 rgba(255,255,255,0.6);
}

.gold-btn.small {
  margin-top: 0;
  font-size: 0.85rem;
  padding: 0.9em 2em;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
}

.gold-btn.outline {
  background: transparent;
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(232, 180, 90, 0.7);
}

.gold-btn.outline:hover {
  box-shadow: inset 0 0 0 1px var(--gold-bright), 0 0 40px rgba(240, 180, 80, 0.35);
}

.text-btn {
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  color: rgba(242, 237, 228, 0.55);
  text-decoration: underline;
  text-underline-offset: 0.4em;
  transition: color 0.25s;
}

.text-btn:hover { color: var(--gold-bright); }

/* ---------- 診断 ---------- */
.q-progress {
  width: 100%;
  height: 2px;
  background: rgba(232, 180, 90, 0.15);
  margin-bottom: 1.6rem;
  overflow: hidden;
}

#qFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b3121f, var(--gold-bright));
  box-shadow: 0 0 10px rgba(246, 210, 124, 0.8);
  transition: width 0.4s ease;
}

.q-count {
  font-size: 0.74rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 1.6rem;
}

.q-text {
  font-family: 'Shippori Mincho B1', serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 4.4vw, 1.8rem);
  letter-spacing: 0.08em;
  line-height: 1.9;
  min-height: 4.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.q-opts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.8rem;
}

.opt {
  cursor: pointer;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 400;
  font-size: 0.98rem;
  letter-spacing: 0.1em;
  line-height: 1.8;
  padding: 1.2em 1.6em;
  color: var(--ink);
  background: rgba(232, 180, 90, 0.05);
  border: 1px solid rgba(232, 180, 90, 0.35);
  border-radius: 14px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.opt:hover {
  transform: translateY(-2px);
  background: rgba(232, 180, 90, 0.14);
  border-color: var(--gold-bright);
  box-shadow: 0 0 30px rgba(240, 180, 80, 0.25);
}

/* ---------- 結果 ---------- */
.code {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.4rem 0 2rem;
}

.slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 4.2rem;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--gold-bright);
  border: 1px solid rgba(232, 180, 90, 0.4);
  border-radius: 10px;
  background: rgba(232, 180, 90, 0.06);
  opacity: 0.25;
  transform: scale(0.9);
}

.slot.on {
  animation: slotPop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both;
  text-shadow: 0 0 25px rgba(246, 210, 124, 0.9);
  box-shadow: 0 0 30px rgba(240, 180, 80, 0.3);
}

@keyframes slotPop {
  from { opacity: 0.25; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.result-card {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  border: 1px solid rgba(232, 180, 90, 0.28);
  border-radius: 20px;
  background: rgba(8, 6, 14, 0.72);
  backdrop-filter: blur(6px);
  padding: 2.4rem 1.8rem 2.2rem;
}

.result-card.show {
  opacity: 1;
  transform: translateY(0);
}

.r-emoji {
  font-size: 4.2rem;
  filter: drop-shadow(0 0 30px rgba(255, 170, 60, 0.55));
}

.r-name {
  font-family: 'Shippori Mincho B1', serif;
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3rem);
  letter-spacing: 0.12em;
  margin-top: 0.6rem;
  text-shadow: 0 0 40px rgba(255, 160, 50, 0.4);
}

.r-title {
  font-family: 'Shippori Mincho B1', serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-top: 0.8rem;
}

.r-desc {
  font-weight: 300;
  font-size: 0.94rem;
  letter-spacing: 0.08em;
  line-height: 2.2;
  color: rgba(242, 237, 228, 0.9);
  margin-top: 1.6rem;
  text-align: left;
}

/* 軸メーター */
.meters {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.meter {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.meter .side {
  color: rgba(242, 237, 228, 0.4);
}

.meter .side.win {
  color: var(--gold-bright);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(246, 210, 124, 0.6);
}

.meter .side.l { text-align: right; }
.meter .side.r { text-align: left; }

.meter .dots {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.3em;
  color: var(--gold);
  white-space: nowrap;
}

/* 相性 */
.match {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-align: left;
}

.m-row {
  display: flex;
  gap: 0.9em;
  align-items: baseline;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  line-height: 1.9;
}

.m-tag {
  flex-shrink: 0;
  font-family: 'Shippori Mincho B1', serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 0.82rem;
}

.m-tag.good { color: var(--gold-bright); }
.m-tag.bad { color: #c96a5a; }

.r-rate {
  margin-top: 1.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: rgba(242, 237, 228, 0.45);
}

.share {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.again {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ---------- モバイル ---------- */
@media (max-width: 560px) {
  .top { padding: 1rem 1rem; font-size: 0.54rem; letter-spacing: 0.26em; }
  main { padding-top: 5.4rem; }
  .sp { display: inline; }
  .q-text { min-height: 5.2em; }
  .slot { width: 2.9rem; height: 3.6rem; font-size: 1.8rem; }
}
