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

  :root {
    --deep-night: #030812;
    --midnight: #080f1e;
    --navy: #0d1a35;
    --star-white: #e8f0f8;
    --pale-blue: #b8cce4;
    --glow-blue: #6fa0d4;
    --gold: #c8a84b;
    --gold-light: #e8d08a;
    --text-body: #c4d4e8;
    --text-dim: #7a9ab8;
  }

  html { scroll-behavior: smooth; }

  body {
    background-color: var(--deep-night);
    color: var(--text-body);
    font-family: 'Noto Serif JP', serif;
    font-weight: 200;
    overflow-x: hidden;
    cursor: none;
  }

  .cursor {
    width: 6px; height: 6px;
    background: var(--star-white);
    border-radius: 50%;
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 99999;
    box-shadow: 0 0 8px 2px rgba(180,210,255,0.6);
  }
  .cursor-trail {
    width: 30px; height: 30px;
    border: 1px solid rgba(180,210,255,0.3);
    border-radius: 50%;
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 99998;
    transition: all 0.15s ease;
  }

  #stars-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
  }

  /* NAV */
  nav {
    position: fixed; top: 0; width: 100%;
    z-index: 100; padding: 1.5rem 3rem;
    display: flex; justify-content: space-between; align-items: center;
    transition: background 0.4s ease, padding 0.4s ease;
  }
  nav.scrolled {
    background: rgba(3,8,18,0.92);
    backdrop-filter: blur(10px);
    padding: 1rem 3rem;
    border-bottom: 1px solid rgba(107,160,212,0.1);
  }
  .nav-logo { height: 44px; filter: invert(1) brightness(0.8); opacity: 0.7; }
  .nav-links { display: flex; gap: 2.5rem; list-style: none; }
  .nav-links a {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.6rem; letter-spacing: 0.35em;
    color: var(--text-dim); text-decoration: none; text-transform: uppercase;
    transition: color 0.3s ease;
  }
  .nav-links a:hover { color: var(--star-white); }

  /* HERO */
  #hero {
    position: relative; width: 100%; height: 100vh; min-height: 600px;
    overflow: hidden; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
  }
  .hero-bg {
    position: absolute; inset: 0;
    background-image: url('../images/hero_bg.png');
    background-size: cover; background-position: center center;
    filter: brightness(0.6) saturate(1.1);
    animation: slowZoom 20s ease-in-out infinite alternate; z-index: 1;
  }
  @keyframes slowZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.12); }
  }
  .hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
      rgba(3,8,18,0.1) 0%, rgba(3,8,18,0.3) 50%,
      rgba(3,8,18,0.85) 85%, rgba(3,8,18,1) 100%);
    z-index: 2;
  }
  .hero-content {
    position: relative; z-index: 3;
    display: flex; flex-direction: column; align-items: center;
  }
  .hero-logo {
    width: min(580px, 78vw);
    opacity: 0; transform: translateY(30px);
    animation: fadeUp 1.4s cubic-bezier(0.22,1,0.36,1) 0.3s forwards;
    filter: invert(1) brightness(1.15);
  }
  .hero-tagline {
    font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 300;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    color: var(--pale-blue); letter-spacing: 0.2em; text-align: center;
    margin-top: 0.8em;
    opacity: 0; animation: fadeUp 1.4s cubic-bezier(0.22,1,0.36,1) 0.7s forwards;
  }
  .hero-release {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    color: var(--star-white); letter-spacing: 0.4em; margin-top: 2.5em;
    opacity: 0; animation: fadeUp 1.4s cubic-bezier(0.22,1,0.36,1) 1s forwards;
  }
  .hero-release span { color: var(--gold-light); }

  .hero-dev-link {
    position: absolute; bottom: 2rem; right: 2rem;
    opacity: 0.45; transition: opacity 0.4s ease;
    z-index: 5;
  }
  .hero-dev-link:hover { opacity: 0.85; }
  .hero-dev-logo {
    height: 36px; width: auto;
    filter: brightness(1.2);
  }

  .scroll-indicator {
    position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
    z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    opacity: 0; animation: fadeIn 1s ease 2s forwards;
  }
  .scroll-indicator span {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.6rem; letter-spacing: 0.3em; color: var(--text-dim);
  }
  .scroll-line {
    width: 1px; height: 50px;
    background: linear-gradient(to bottom, var(--glow-blue), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
  }
  @keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  }
  @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
  @keyframes fadeIn { to { opacity: 1; } }

  /* SECTIONS */
  section { position: relative; z-index: 1; padding: 7rem 2rem; }
  .section-inner { max-width: 900px; margin: 0 auto; }
  .section-label {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.65rem; letter-spacing: 0.45em;
    color: var(--gold); text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: flex; align-items: center; gap: 1rem;
  }
  .section-label::before {
    content: ''; display: block; width: 30px; height: 1px; background: var(--gold);
  }
  .section-title-jp {
    font-family: 'Noto Serif JP', serif; font-weight: 200;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--star-white); letter-spacing: 0.15em; margin-bottom: 3rem; line-height: 1.4;
  }

  .star-divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 0 auto 0; max-width: 900px; padding: 0 2rem;
    position: relative; z-index: 1;
  }
  .star-divider::before, .star-divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(to right, transparent, rgba(107,160,212,0.4), transparent);
  }
  .star-divider-icon {
    font-size: 0.5rem; color: var(--glow-blue); letter-spacing: 0.5em;
    font-family: 'Josefin Sans', sans-serif;
  }

  /* STORY */
  #story { background: linear-gradient(to bottom, var(--deep-night), var(--midnight)); }
  .story-text {
    font-family: 'Noto Serif JP', serif; font-weight: 300;
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    line-height: 2.6; color: var(--text-body);
    border-left: 1px solid rgba(107,160,212,0.3);
    padding-left: 2.5rem; max-width: 650px;
  }
  .story-quote {
    display: inline-block;
    color: var(--star-white);
    font-style: italic;
    letter-spacing: 0.05em;
    padding: 0.1em 0;
  }

  /* CHARACTER */
  #character { background: var(--midnight); }
  .char-grid {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start;
  }
  .char-image-wrap { position: relative; }
  .char-img {
    width: 100%; max-width: 320px; display: block;
    filter: drop-shadow(0 20px 60px rgba(107,160,212,0.25));
    transition: filter 0.4s ease;
  }
  .char-img:hover { filter: drop-shadow(0 20px 80px rgba(107,160,212,0.5)); cursor: pointer; }

  /* Zoom overlay */
  .zoom-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(3,8,18,0.92);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease;
    cursor: pointer;
  }
  .zoom-overlay.active { opacity: 1; pointer-events: auto; }
  .zoom-inner {
    width: 80vmin; height: 80vmin; max-width: 500px; max-height: 500px;
    overflow: hidden; border-radius: 50%;
    border: 1px solid rgba(200,220,255,0.15);
    box-shadow: 0 0 80px rgba(107,160,212,0.25);
    transform: scale(0.85); transition: transform 0.5s cubic-bezier(0.23,1,0.32,1);
  }
  .zoom-overlay.active .zoom-inner { transform: scale(1); }
  .zoom-img {
    width: 260%; height: auto;
    transform: translate(-28.5%, -5%);
  }
  .char-info { padding-top: 1rem; }
  .char-name-en {
    font-family: 'Cormorant Garamond', serif; font-weight: 600;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--star-white); letter-spacing: 0.05em; line-height: 1; margin-bottom: 0.3rem;
  }
  .char-name-jp {
    font-family: 'Noto Serif JP', serif; font-weight: 200;
    font-size: 0.85rem; color: var(--gold); letter-spacing: 0.4em; margin-bottom: 2rem;
  }
  .char-desc {
    font-family: 'Noto Serif JP', serif; font-weight: 300;
    font-size: 0.95rem; line-height: 2.2; color: var(--text-body);
  }
  .char-tag {
    display: inline-block; border: 1px solid rgba(107,160,212,0.4);
    padding: 0.2rem 0.8rem;
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.6rem; letter-spacing: 0.3em; color: var(--glow-blue); margin-bottom: 1.5rem;
  }
  .char-placeholder {
    width: 100%; max-width: 320px; aspect-ratio: 3/4;
    border: 1px dashed rgba(107,160,212,0.2);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
    color: var(--text-dim);
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.6rem; letter-spacing: 0.3em;
  }
  .char-placeholder::before { content: '✦'; font-size: 1.5rem; color: rgba(107,160,212,0.25); }

  /* STAFF */
  #staff { background: linear-gradient(to bottom, var(--midnight), var(--navy)); }
  .staff-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    border: 1px solid rgba(107,160,212,0.12);
  }
  .staff-item {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid rgba(107,160,212,0.1);
    border-right: 1px solid rgba(107,160,212,0.1);
    transition: background 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 130px;
  }
  .staff-item:hover { background: rgba(107,160,212,0.05); }
  .staff-role {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.6rem; letter-spacing: 0.4em; color: var(--gold);
    text-transform: uppercase; margin-bottom: 0.6rem;
    margin-top: 0;
  }
  .staff-name {
    font-family: 'Noto Serif JP', serif; font-weight: 300;
    font-size: 1.05rem; color: var(--star-white); letter-spacing: 0.1em;
  }

  /* DEVELOPER */
  #developer {
    background: var(--navy); padding: 4.5rem 2rem;
    border-top: 1px solid rgba(107,160,212,0.1);
  }
  .dev-inner {
    max-width: 900px; margin: 0 auto;
    display: flex; align-items: center; gap: 2.5rem;
  }
  .dev-logo { height: 52px; width: auto; filter: brightness(1.1); flex-shrink: 0; }
  .dev-sep { width: 1px; height: 30px; background: rgba(107,160,212,0.2); flex-shrink: 0; }
  .dev-text {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.6rem; letter-spacing: 0.35em; color: var(--text-dim);
    line-height: 1.8;
  }

  /* FOOTER */
  footer {
    position: relative; z-index: 1; padding: 3.5rem 2rem; text-align: center;
    border-top: 1px solid rgba(107,160,212,0.08);
    background: var(--deep-night);
  }
  .footer-logo { width: 180px; margin: 0 auto 2rem; filter: invert(1) brightness(0.4); opacity: 0.4; }
  .footer-copy {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.6rem; letter-spacing: 0.3em; color: var(--text-dim);
    line-height: 2;
  }

  /* REVEAL */
  .reveal {
    opacity: 0; transform: translateY(25px);
    transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1);
  }
  .reveal.visible { opacity: 1; transform: none; }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.22s; }
  .reveal-delay-3 { transition-delay: 0.38s; }

  @media (max-width: 700px) {
    nav { padding: 1rem 1.5rem; }
    nav.scrolled { padding: 0.8rem 1.5rem; }
    .nav-links { gap: 1.2rem; }
    section { padding: 5rem 1.5rem; }
    .char-grid { grid-template-columns: 1fr; gap: 2rem; }
    .char-img, .char-placeholder { max-width: 260px; margin: 0 auto; }
    .dev-inner { flex-direction: column; gap: 1.5rem; }
  }


  /* ===== LOADING SCREEN ===== */
  #loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #030812;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s cubic-bezier(0.22,1,0.36,1), visibility 1s;
  }
  #loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  /* Twinkling bg stars */
  .loader-bg-stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
  .lstar {
    position: absolute; border-radius: 50%;
    background: rgba(200,220,255,0.65);
    animation: lstarTwinkle var(--dur) ease-in-out infinite var(--delay);
  }
  @keyframes lstarTwinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.7); }
    50%       { opacity: 0.85; transform: scale(1); }
  }

  /* Shooting star */
  .loader-shoot {
    position: absolute;
    width: 140px; height: 1px;
    background: linear-gradient(to right, transparent, rgba(220,235,255,0.85), transparent);
    top: 30%; left: 15%;
    transform: rotate(-26deg);
    opacity: 0;
    animation: shootAnim 4.5s ease-in-out infinite 1.2s;
  }
  .loader-shoot::after {
    content: '';
    position: absolute; right: 0; top: -2.5px;
    width: 5px; height: 5px; border-radius: 50%;
    background: #ddeeff;
    box-shadow: 0 0 8px 3px rgba(180,210,255,0.9);
  }
  @keyframes shootAnim {
    0%   { opacity: 0; transform: rotate(-26deg) translateX(0); }
    5%   { opacity: 1; }
    28%  { opacity: 0; transform: rotate(-26deg) translateX(240px); }
    100% { opacity: 0; transform: rotate(-26deg) translateX(240px); }
  }

  /* Center content */
  .loader-center {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    gap: 2.8rem;
  }

  /* Logo */
  .loader-logo {
    width: min(340px, 52vw);
    filter: invert(1) brightness(1.1);
    opacity: 0; transform: translateY(14px);
    animation: loaderLogoIn 1.1s cubic-bezier(0.22,1,0.36,1) 0.4s forwards;
  }
  @keyframes loaderLogoIn { to { opacity: 1; transform: translateY(0); } }

  /* Bar area */
  .loader-bar-wrap {
    width: min(280px, 48vw);
    display: flex; flex-direction: column; align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 0.7s ease 0.9s forwards;
  }

  /* Track */
  .loader-bar-track {
    width: 100%; height: 1px;
    background: rgba(107,160,212,0.18);
    position: relative;
  }
  /* Fill */
  .loader-bar-fill {
    position: absolute; left: 0; top: 0; height: 100%;
    background: linear-gradient(to right, #3d7ab5, #a8cce8);
    width: 0%;
    transition: width 0.08s linear;
    box-shadow: 0 0 7px 1px rgba(107,160,212,0.55);
  }
  /* Glowing tip */
  .loader-bar-fill::after {
    content: '';
    position: absolute; right: -3px; top: -3.5px;
    width: 7px; height: 7px; border-radius: 50%;
    background: #c8e4ff;
    box-shadow: 0 0 10px 3px rgba(140,200,255,0.9);
  }

  /* Percent + label */
  .loader-percent {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.62rem; letter-spacing: 0.5em;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
  }
  .loader-label {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.52rem; letter-spacing: 0.6em;
    color: rgba(107,160,212,0.35); text-transform: uppercase;
    animation: labelBlink 2.2s ease-in-out infinite 1s;
  }
  @keyframes labelBlink {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 0.9; }
  }

  /* ===== INTRO SPLASH ===== */
  .intro-splash {
    position: fixed; inset: 0; z-index: 30000;
    background: var(--deep-night);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 1.2s ease, visibility 1.2s;
  }
  .intro-splash.hidden {
    opacity: 0; visibility: hidden; pointer-events: none;
  }
  .intro-stars { position: absolute; inset: 0; overflow: hidden; }
  .intro-text {
    position: relative; z-index: 2;
    font-family: 'Noto Serif JP', serif;
    font-weight: 200;
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    color: var(--star-white);
    letter-spacing: 0.15em;
    line-height: 2;
    text-align: center;
    writing-mode: vertical-rl;
  }
  .intro-line {
    display: block;
    margin-left: 1.5em;
  }
  .intro-line:first-child { margin-left: 0; }
  .intro-line:last-child { margin-top: 3em; }
  .intro-text .intro-char {
    opacity: 0;
    display: inline-block;
    animation: introCharIn 0.6s ease forwards;
  }
  @keyframes introCharIn {
    from { opacity: 0; filter: blur(4px); }
    to { opacity: 1; filter: blur(0); }
  }

  /* ===== COUNTDOWN PAGE ===== */
  .countdown-page {
    position: fixed; inset: 0; z-index: 20000;
    background: var(--deep-night);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: opacity 1.2s ease, visibility 1.2s;
  }
  .countdown-page.hidden {
    opacity: 0; visibility: hidden; pointer-events: none;
  }
  .countdown-stars { position: absolute; inset: 0; overflow: hidden; }
  .countdown-stars .lstar {
    position: absolute; border-radius: 50%;
    background: rgba(200,220,255,0.65);
    animation: lstarTwinkle var(--dur) ease-in-out infinite var(--delay);
  }
  .countdown-shoot {
    position: absolute;
    width: 180px; height: 1px;
    background: linear-gradient(to right, transparent, rgba(220,235,255,0.85), transparent);
    top: 25%; left: 10%;
    transform: rotate(-26deg);
    opacity: 0;
    animation: shootAnim 5s ease-in-out infinite 2s;
  }
  .countdown-shoot::after {
    content: '';
    position: absolute; right: 0; top: -2.5px;
    width: 5px; height: 5px; border-radius: 50%;
    background: #ddeeff;
    box-shadow: 0 0 8px 3px rgba(180,210,255,0.9);
  }
  .countdown-center {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    gap: 2rem;
    opacity: 0; animation: fadeIn 1.5s ease 0.3s forwards;
  }
  .countdown-logo {
    width: min(380px, 60vw);
    filter: invert(1) brightness(1.1);
  }
  .countdown-sub {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.7rem; letter-spacing: 0.5em;
    color: var(--text-dim);
  }
  .countdown-timer {
    display: flex; align-items: center; gap: 0.8rem;
  }
  .countdown-unit {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  }
  .countdown-num {
    font-family: 'Josefin Sans', sans-serif; font-weight: 200;
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    color: var(--star-white);
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    min-width: 2.4em; text-align: center;
  }
  .countdown-label {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: 0.5rem; letter-spacing: 0.35em;
    color: var(--text-dim);
  }
  .countdown-sep {
    font-family: 'Josefin Sans', sans-serif; font-weight: 100;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--glow-blue); opacity: 0.4;
    margin-bottom: 1.2rem;
  }
  .countdown-date {
    font-family: 'Josefin Sans', sans-serif; font-weight: 200;
    font-size: 0.8rem; letter-spacing: 0.4em;
    color: var(--gold); opacity: 0.6;
    margin-top: 0.5rem;
  }
  .countdown-dev-link {
    position: absolute; bottom: 2rem;
    opacity: 0.45; transition: opacity 0.4s ease;
    z-index: 5;
  }
  .countdown-dev-link:hover { opacity: 0.85; }
  .countdown-dev-logo {
    height: 36px; width: auto;
    filter: brightness(1.2);
  }
