/* ============================================================
   ミリーちゃんをつくりたい。— Project Page CSS
   ホラー × かわいい × 現代的
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:    #070710;
  --dark:     #0d0d1a;
  --dark2:    #13131f;
  --purple:   #6600cc;
  --purple2:  #4a0080;
  --purple3:  #8800ff;
  --red:      #cc0044;
  --red2:     #ff0055;
  --white:    #f0eeff;
  --gray:     #aaa8c0;
  --line-green: #06c755;

  --font-serif: 'Noto Serif JP', serif;
  --font-round: 'M PLUS Rounded 1c', sans-serif;

  --section-pad: 120px 0;
  --radius: 16px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-serif);
  overflow-x: hidden;
  cursor: none;
}

a { text-decoration: none; color: inherit; }

img, svg { display: block; }

/* ---------- Noise Overlay ---------- */
.noise-overlay {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
}

/* ---------- Loading Screen ---------- */
#loading-screen {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; }

.loading-inner { text-align: center; }

.loading-eye {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--purple3), var(--purple2));
  margin: 0 auto 20px;
  box-shadow: 0 0 40px var(--purple), 0 0 80px var(--purple2);
  animation: eyePulse 1.2s ease-in-out infinite;
}
@keyframes eyePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px var(--purple), 0 0 80px var(--purple2); }
  50% { transform: scale(1.2); box-shadow: 0 0 60px var(--purple3), 0 0 120px var(--purple); }
}

.loading-text {
  font-family: var(--font-round);
  font-size: 0.9rem;
  color: var(--gray);
  letter-spacing: 0.2em;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Custom Cursor ---------- */
#custom-cursor {
  position: fixed;
  width: 16px; height: 16px;
  background: var(--purple3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, background 0.2s;
  mix-blend-mode: screen;
}
#cursor-trail {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid var(--purple);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: left 0.12s ease-out, top 0.12s ease-out;
  opacity: 0.5;
}

/* ---------- Container ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Section Common ---------- */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 60px;
}
.section-num {
  font-size: 0.75rem;
  font-family: var(--font-round);
  color: var(--purple3);
  letter-spacing: 0.3em;
  opacity: 0.7;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--purple), transparent);
  margin-top: 10px;
}
.section-desc {
  color: var(--gray);
  line-height: 2;
  margin-bottom: 60px;
  margin-top: -30px;
  font-size: 1rem;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 60px;
  overflow: hidden;
}

/* Glitch BG */
.glitch-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(102,0,204,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(204,0,68,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(136,0,255,0.1) 0%, transparent 50%);
  animation: bgShift 8s ease-in-out infinite;
}
@keyframes bgShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Grid lines */
#hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(102,0,204,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102,0,204,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  backdrop-filter: blur(20px);
  background: rgba(7, 7, 16, 0.6);
  border-bottom: 1px solid rgba(102,0,204,0.15);
  transition: padding 0.3s;
}
.nav.scrolled { padding: 14px 60px; }

.nav-logo {
  font-family: var(--font-round);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--white);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-round);
  font-size: 0.85rem;
  color: var(--gray);
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--purple) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: 100px !important;
  font-weight: 700 !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--purple3) !important; transform: scale(1.04) !important; }

/* Hero Content */
.hero-content {
  position: relative; z-index: 2;
  padding-top: 80px;
}
.hero-eyebrow {
  font-family: var(--font-round);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--purple3);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 30px;
}
.title-line {
  display: block;
  opacity: 0;
  animation: fadeUp 0.8s forwards;
  position: relative;
}
.title-line:first-child { animation-delay: 0.7s; }
.title-line.accent {
  animation-delay: 0.9s;
  color: transparent;
  -webkit-text-stroke: 2px var(--white);
  text-shadow:
    0 0 40px rgba(136,0,255,0.6),
    0 0 80px rgba(102,0,204,0.3);
  position: relative;
}
.title-line.accent::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--white);
  -webkit-text-stroke: 0;
  opacity: 0;
  animation: glitchText 6s 2s infinite;
}
@keyframes glitchText {
  0%, 90%, 100% { opacity: 0; transform: none; }
  92% { opacity: 0.8; transform: translate(-3px, 0); clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%); }
  94% { opacity: 0.8; transform: translate(3px, 0); clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); }
  96% { opacity: 0; }
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--gray);
  line-height: 2;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeUp 0.8s 1.1s forwards;
}
.hero-sub em {
  color: var(--white);
  font-style: normal;
  font-weight: 700;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s 1.3s forwards;
}
.tag {
  font-family: var(--font-round);
  font-size: 0.75rem;
  padding: 6px 16px;
  border: 1px solid rgba(102,0,204,0.5);
  border-radius: 100px;
  color: var(--purple3);
  letter-spacing: 0.05em;
  background: rgba(102,0,204,0.08);
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-round);
  font-size: 0.9rem;
  color: var(--gray);
  letter-spacing: 0.15em;
  opacity: 0;
  animation: fadeUp 0.8s 1.5s forwards;
  transition: color 0.2s;
}
.hero-btn:hover { color: var(--white); }
.hero-btn svg { width: 18px; height: 18px; animation: bounce 2s ease infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(5px)} }

/* Hero Character */
.hero-char-area {
  position: relative; z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 80px;
}
.millie-silhouette {
  position: relative;
  text-align: center;
}
.silhouette-glow {
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 80px;
  background: radial-gradient(ellipse, rgba(102,0,204,0.4) 0%, transparent 70%);
  filter: blur(20px);
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100%{opacity:0.6;transform:translateX(-50%) scale(1)} 50%{opacity:1;transform:translateX(-50%) scale(1.1)} }

.millie-svg {
  width: 240px;
  filter: drop-shadow(0 0 20px rgba(102,0,204,0.5));
  animation: float 4s ease-in-out infinite;
  opacity: 0;
  animation: float 4s ease-in-out infinite, fadeIn 1s 0.3s forwards;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes fadeIn { to { opacity: 1; } }

.millie-name-tag {
  font-family: var(--font-round);
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.millie-age {
  font-size: 0.7rem;
  background: rgba(102,0,204,0.2);
  border: 1px solid rgba(102,0,204,0.4);
  border-radius: 100px;
  padding: 2px 10px;
  color: var(--purple3);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px; left: 60px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-round);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gray);
  opacity: 0.5;
}
.scroll-line {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, var(--gray), transparent);
  animation: lineExpand 2s ease-in-out infinite;
}
@keyframes lineExpand { 0%,100%{width:60px;opacity:0.5} 50%{width:100px;opacity:1} }

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

/* ============================================================
   CONCEPT
   ============================================================ */
#concept {
  padding: var(--section-pad);
  background:
    linear-gradient(180deg, var(--black) 0%, var(--dark) 50%, var(--black) 100%);
}

.concept-lead {
  max-width: 680px;
  margin-bottom: 70px;
}
.concept-lead p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 2;
  margin-bottom: 16px;
}
.concept-lead strong {
  color: var(--purple3);
  text-shadow: 0 0 20px rgba(136,0,255,0.5);
}
.concept-sub {
  color: var(--gray);
  font-size: 1rem !important;
}
.concept-sub em { color: var(--white); font-style: normal; }

/* Concept Cards */
.concept-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 80px;
}
.c-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(102,0,204,0.2);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}
.c-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.c-card:hover {
  border-color: rgba(102,0,204,0.5);
  transform: translateY(-4px);
  background: rgba(102,0,204,0.05);
}
.c-card:hover::before { opacity: 1; }

.c-card-icon { font-size: 2rem; margin-bottom: 16px; }
.c-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.c-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.9;
}

/* World View */
.world-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.wv-text h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.wv-text p {
  font-size: 1rem;
  line-height: 2;
  color: var(--gray);
  margin-bottom: 32px;
}
.scary {
  color: var(--red2);
  text-shadow: 0 0 15px rgba(255,0,85,0.5);
  font-weight: 700;
}

.millie-quote {
  border-left: 3px solid var(--purple);
  padding: 20px 24px;
  background: rgba(102,0,204,0.07);
  border-radius: 0 12px 12px 0;
}
.quote-bubble {
  display: block;
  font-family: var(--font-round);
  font-size: 1rem;
  color: var(--white);
  line-height: 1.8;
  margin-bottom: 12px;
}
.millie-quote cite {
  font-size: 0.8rem;
  color: var(--purple3);
  font-style: normal;
  opacity: 0.8;
}

/* Phone Mockup */
.phone-mockup {
  width: 240px;
  margin: 0 auto;
  background: #111118;
  border-radius: 32px;
  border: 2px solid rgba(102,0,204,0.3);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.5),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 40px rgba(102,0,204,0.15);
}
.phone-screen { padding: 0; }
.chat-header-mock {
  background: #1a1a28;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(102,0,204,0.2);
  font-family: var(--font-round);
  font-size: 0.85rem;
}
.chat-avatar-mock {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: radial-gradient(var(--purple), var(--purple2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
}
.online-dot { color: #06c755; font-size: 0.5rem; margin-left: auto; }

.chat-messages {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}
.msg {
  font-family: var(--font-round);
  font-size: 0.78rem;
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 85%;
  line-height: 1.6;
  opacity: 0;
  animation: msgFadeIn 0.5s forwards;
}
.msg-millie {
  background: #2a2a3a;
  border-radius: 4px 16px 16px 16px;
  color: var(--white);
  align-self: flex-start;
}
.msg-user {
  background: var(--line-green);
  border-radius: 16px 4px 16px 16px;
  color: #fff;
  align-self: flex-end;
}
.scary-msg {
  background: #1a0a1a !important;
  border: 1px solid rgba(204,0,68,0.3);
  color: rgba(240,238,255,0.8) !important;
  animation: msgFadeIn 0.5s forwards, scaryShadow 2s 1s ease-in-out infinite !important;
}
@keyframes scaryShadow { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 20px rgba(204,0,68,0.3)} }
@keyframes msgFadeIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:translateY(0)} }

#msg1 { animation-delay: 0.5s; }
#msg2 { animation-delay: 1.2s; }
#msg3 { animation-delay: 2.5s; }
#msg4 { animation-delay: 3.8s; }

.typing-indicator {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 12px 16px;
  background: #2a2a3a;
  border-radius: 4px 16px 16px 16px;
  width: fit-content;
  opacity: 0;
  animation: msgFadeIn 0.5s 3s forwards;
}
.typing-indicator span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray);
  animation: typingDot 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot { 0%,80%,100%{transform:scale(0.8);opacity:0.5} 40%{transform:scale(1.1);opacity:1} }

/* ============================================================
   PHASES
   ============================================================ */
#phases {
  padding: var(--section-pad);
  background: var(--black);
  position: relative;
  overflow: hidden;
}
#phases::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(102,0,204,0.3), transparent);
}

.phases-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.phase-item {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  align-items: start;
  gap: 0;
}
.phase-item:nth-child(odd) .phase-card { grid-column: 1; }
.phase-item:nth-child(odd) .phase-dot { grid-column: 2; }
.phase-item:nth-child(odd) .phase-connector { grid-column: 3; display: none; }

.phase-item:nth-child(even) .phase-card {
  grid-column: 3;
  grid-row: 1;
}
.phase-item:nth-child(even) .phase-dot {
  grid-column: 2;
  grid-row: 1;
}
.phase-item:nth-child(even) .phase-connector { display: none; }

.phase-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--dark2);
  border: 2px solid var(--purple);
  font-family: var(--font-round);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple3);
  letter-spacing: 0.05em;
  z-index: 2;
  box-shadow: 0 0 20px rgba(102,0,204,0.3);
  margin: 0 auto;
  transition: all 0.3s;
  position: relative;
}
.phase-item:hover .phase-dot {
  background: var(--purple2);
  box-shadow: 0 0 40px rgba(102,0,204,0.6);
}

.phase-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(102,0,204,0.15);
  border-radius: var(--radius);
  padding: 32px;
  margin: 20px 24px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.phase-item:hover .phase-card {
  border-color: rgba(102,0,204,0.4);
  transform: scale(1.01);
}

.phase-tag {
  font-family: var(--font-round);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--purple3);
  margin-bottom: 10px;
  opacity: 0.8;
}
.phase-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.phase-emotion {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: rgba(102,0,204,0.08);
  border-radius: 8px;
}
.emotion-label {
  font-family: var(--font-round);
  font-size: 0.7rem;
  color: var(--purple3);
  white-space: nowrap;
}
.emotion-text {
  font-family: var(--font-round);
  font-size: 0.85rem;
  color: var(--white);
}

.phase-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.phase-details li {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.6;
  font-family: var(--font-round);
}

.phase-visual {
  padding: 14px 18px;
  border-radius: 10px;
  font-family: var(--font-round);
  font-size: 0.85rem;
  margin-top: 16px;
}
.phase-v1 { background: rgba(6,199,85,0.08); border: 1px solid rgba(6,199,85,0.2); color: rgba(6,199,85,0.9); }
.phase-v2 { background: rgba(255,200,0,0.06); border: 1px solid rgba(255,200,0,0.2); color: rgba(255,200,0,0.9); }
.phase-v3 { background: rgba(204,0,68,0.08); border: 1px solid rgba(204,0,68,0.25); color: rgba(255,80,100,0.9); }
.phase-v4 { background: rgba(102,0,204,0.1); border: 1px solid rgba(102,0,204,0.3); color: var(--purple3); }

/* ============================================================
   SYSTEM
   ============================================================ */
#system {
  padding: var(--section-pad);
  background: linear-gradient(180deg, var(--black) 0%, var(--dark) 100%);
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.sys-block {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(102,0,204,0.15);
  border-radius: var(--radius);
  padding: 36px;
}
.sys-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(102,0,204,0.2);
}
.sys-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sys-list li {
  font-family: var(--font-round);
  font-size: 0.88rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 12px;
}

.tech-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.tech-badge.line  { background: rgba(6,199,85,0.15);  color: #06c755; border: 1px solid rgba(6,199,85,0.3); }
.tech-badge.ai    { background: rgba(136,0,255,0.15); color: var(--purple3); border: 1px solid rgba(136,0,255,0.3); }
.tech-badge.db    { background: rgba(0,150,255,0.12); color: #3399ff; border: 1px solid rgba(0,150,255,0.3); }
.tech-badge.cron  { background: rgba(255,150,0,0.12); color: #ff9900; border: 1px solid rgba(255,150,0,0.3); }

/* Flow Diagram */
.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.flow-node {
  background: rgba(102,0,204,0.1);
  border: 1px solid rgba(102,0,204,0.25);
  border-radius: 10px;
  padding: 12px 24px;
  font-family: var(--font-round);
  font-size: 0.85rem;
  text-align: center;
  width: 100%;
  max-width: 280px;
}
.flow-node.start { border-color: rgba(6,199,85,0.4); background: rgba(6,199,85,0.08); color: rgba(6,199,85,0.9); }
.flow-node.end   { border-color: rgba(204,0,68,0.4);  background: rgba(204,0,68,0.08);  color: rgba(255,80,100,0.9); }
.flow-node.split {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  max-width: 320px;
  padding: 12px 16px;
}
.split-option {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 6px;
}
.opt-a { background: rgba(6,199,85,0.1);  color: rgba(6,199,85,0.9); }
.opt-b { background: rgba(255,150,0,0.1); color: rgba(255,150,0,0.9); }
.opt-c { background: rgba(204,0,68,0.1);  color: rgba(255,80,100,0.9); }
.split-divider { color: var(--gray); opacity: 0.5; }

.flow-arrow { color: var(--purple3); opacity: 0.6; font-size: 1.2rem; }

/* Status Table */
.status-table { display: flex; flex-direction: column; gap: 0; border-radius: 10px; overflow: hidden; border: 1px solid rgba(102,0,204,0.2); }
.st-row { display: grid; grid-template-columns: 130px 1fr; padding: 12px 16px; border-bottom: 1px solid rgba(102,0,204,0.1); font-size: 0.83rem; font-family: var(--font-round); }
.st-row:last-child { border-bottom: none; }
.st-row.header { background: rgba(102,0,204,0.12); font-weight: 700; font-size: 0.75rem; color: var(--purple3); letter-spacing: 0.1em; }
.st-row span:first-child { color: var(--purple3); font-family: 'Courier New', monospace; font-size: 0.8rem; }
.st-row span:last-child { color: var(--gray); }

/* Night Visual */
.time-bar { display: flex; border-radius: 10px; overflow: hidden; margin-bottom: 16px; height: 48px; }
.time-segment { display: flex; align-items: center; justify-content: center; font-family: var(--font-round); font-size: 0.75rem; padding: 0 16px; text-align: center; }
.time-segment.day   { background: rgba(255,200,100,0.1); color: rgba(255,200,100,0.8); flex: 2; }
.time-segment.night { background: rgba(102,0,204,0.2);   color: var(--purple3);         flex: 1; }
.night-desc { font-family: var(--font-round); font-size: 0.85rem; color: var(--gray); line-height: 1.8; }

/* ============================================================
   CHARACTER
   ============================================================ */
#character {
  padding: var(--section-pad);
  background: var(--black);
}

.char-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: start;
}

.char-card-big {
  position: relative;
  text-align: center;
  padding: 40px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(102,0,204,0.2);
  border-radius: 24px;
}
.char-glow-ring {
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--purple2), transparent, var(--red) 80%);
  z-index: -1;
  opacity: 0.3;
  animation: ringRotate 6s linear infinite;
}
@keyframes ringRotate { from{filter:hue-rotate(0deg)} to{filter:hue-rotate(360deg)} }
.char-svg-big {
  width: 200px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 25px rgba(102,0,204,0.6));
  animation: float 4s ease-in-out infinite;
}
.char-label {
  font-family: var(--font-round);
  font-size: 0.85rem;
  color: var(--gray);
  letter-spacing: 0.1em;
}

.char-specs { display: flex; flex-direction: column; gap: 0; }

.spec-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid rgba(102,0,204,0.12);
}
.spec-key {
  font-family: var(--font-round);
  font-size: 0.75rem;
  color: var(--purple3);
  letter-spacing: 0.1em;
}
.spec-val {
  font-size: 0.95rem;
  color: var(--white);
}
.scary-spec {
  color: var(--red2) !important;
  text-shadow: 0 0 10px rgba(255,0,85,0.3);
}

/* Dialogue Examples */
.char-dialogue-examples {
  margin-top: 36px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(102,0,204,0.2);
  border-radius: var(--radius);
  padding: 28px;
}
.char-dialogue-examples h4 {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}
.dialogue-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.dtab {
  font-family: var(--font-round);
  font-size: 0.78rem;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid rgba(102,0,204,0.25);
  background: transparent;
  color: var(--gray);
  cursor: none;
  transition: all 0.2s;
}
.dtab.active, .dtab:hover {
  background: var(--purple2);
  border-color: var(--purple);
  color: var(--white);
}
.dc-panel { display: none; }
.dc-panel.active { display: flex; flex-direction: column; gap: 12px; }
.dc-panel p {
  font-family: var(--font-round);
  font-size: 0.88rem;
  color: var(--white);
  background: rgba(102,0,204,0.08);
  border-left: 3px solid var(--purple);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  line-height: 1.7;
}

/* ============================================================
   CTA
   ============================================================ */
#cta {
  padding: 160px 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(102,0,204,0.12) 0%, var(--black) 70%);
}

.cta-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}
.cta-warning {
  font-family: var(--font-round);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--red2);
  margin-bottom: 24px;
  animation: blink 2s ease-in-out infinite;
}
.cta-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.3;
  margin-bottom: 24px;
  text-shadow: 0 0 60px rgba(102,0,204,0.4);
}
.cta-desc {
  font-size: 1rem;
  color: var(--gray);
  line-height: 2;
  margin-bottom: 32px;
}
.cta-condition {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-round);
  font-size: 0.88rem;
  color: var(--gray);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(102,0,204,0.2);
  padding: 12px 24px;
  border-radius: 100px;
  margin-bottom: 40px;
}
.cta-condition strong { color: var(--red2); }
.condition-icon { font-size: 1rem; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--line-green);
  color: #fff;
  font-family: var(--font-round);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 18px 48px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 32px rgba(6,199,85,0.3);
}
.cta-btn:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 16px 48px rgba(6,199,85,0.4);
}
.line-icon { display: flex; align-items: center; }
.line-icon svg { width: 22px; height: 22px; }

.cta-note {
  font-family: var(--font-round);
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 24px;
  opacity: 0.5;
}

/* BG Effects */
.cta-bg-effects { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.eye-effect {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--purple3), var(--purple2));
  opacity: 0;
  animation: eyeFloat 8s ease-in-out infinite;
}
.e1 { width: 80px; height: 80px; top: 20%; left: 10%; animation-delay: 0s; }
.e2 { width: 50px; height: 50px; top: 60%; right: 15%; animation-delay: 2.5s; }
.e3 { width: 120px; height: 120px; bottom: 10%; left: 50%; animation-delay: 5s; }
@keyframes eyeFloat {
  0%   { opacity: 0; transform: translateY(0) scale(0.8); }
  30%  { opacity: 0.12; }
  70%  { opacity: 0.08; }
  100% { opacity: 0; transform: translateY(-30px) scale(1.1); }
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  padding: 60px 0;
  border-top: 1px solid rgba(102,0,204,0.15);
  background: var(--dark);
}
.footer-inner { text-align: center; }
.footer-logo {
  font-family: var(--font-round);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}
.footer-copy {
  font-family: var(--font-round);
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 6px;
  opacity: 0.7;
}
.footer-note {
  font-family: var(--font-round);
  font-size: 0.72rem;
  color: var(--purple3);
  opacity: 0.5;
  letter-spacing: 0.1em;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  #hero {
    grid-template-columns: 1fr;
    padding: 100px 32px 60px;
    text-align: center;
  }
  .hero-char-area { display: none; }
  .scroll-indicator { left: 32px; }
  .nav { padding: 16px 24px; }
  .nav.scrolled { padding: 12px 24px; }
  .nav-links { gap: 20px; }
  .nav-links li:not(:last-child) a { display: none; }
  .hero-tags { justify-content: center; }

  .concept-cards { grid-template-columns: 1fr; }
  .world-view { grid-template-columns: 1fr; }

  .phase-item { grid-template-columns: 1fr; }
  .phase-item .phase-dot { display: none; }
  .phase-card { margin: 8px 0; }

  .system-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .char-card-big { max-width: 280px; margin: 0 auto; }
}

@media (max-width: 600px) {
  :root { --section-pad: 80px 0; }
  .container { padding: 0 20px; }
  .cta-btn { padding: 16px 32px; font-size: 1rem; }
}
