/* ==========================================================================
   ECLIPSE design system
   Palette is taken from logo.png: a violet night, a moon-white crescent,
   and a thin magenta corona. Corona is the only loud color; use it sparingly.
   ========================================================================== */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

/* Token names are kept from the old night palette so every page keeps working:
   --night = page, --night-2 = surface, --night-3 = fill, --moon = text.
   Light is the default; phones in dark mode get the eclipse night. */
:root {
  --night: #f5f4f7;        /* page */
  --night-2: #ffffff;      /* raised surface */
  --night-3: #f0eef3;      /* fill: tiles, inputs */
  --line: #e8e5ec;         /* hairlines */
  --moon: #1b1421;         /* primary text */
  --mist: #6b6474;         /* secondary text */
  --dim: #a39dab;          /* tertiary text */
  --violet: #5b2a8c;       /* brand: primary buttons, progress */
  --violet-soft: #f2ebf8;  /* brand tint: selected tile, chips */
  --on-violet: #ffffff;    /* text on brand */
  --corona: #c42fe0;       /* one accent per screen */
  --eclipse: #200c36;      /* logo night: hero surfaces */
  --on-eclipse: #f6eef4;   /* moon-white on eclipse */
  --art-tile: #f1edf6;     /* behind illustration stickers */
  --ok: #1f9d6b;
  --scrim: rgba(23,20,31,.42);
  --bar: rgba(255,255,255,.92);
  --shadow: 0 1px 2px rgba(23,20,31,.06), 0 8px 24px -12px rgba(23,20,31,.18);
  --cover-blend: normal;

  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --serif: var(--sans);

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
  --col: 480px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --night: #0e0a13;
    --night-2: #19131f;
    --night-3: #241c2c;
    --line: #2e2537;
    --moon: #f6f1f8;
    --mist: #a89dae;
    --dim: #6f6578;
    --violet: #b88ce6;
    --violet-soft: #2c1d3d;
    --on-violet: #1a0b28;
    --corona: #e070f6;
    --eclipse: #2a1442;
    --on-eclipse: #f6eef4;
    --art-tile: #cfc5db;
    --ok: #7fd3b0;
    --scrim: rgba(0,0,0,.55);
    --bar: rgba(14,10,19,.9);
    --shadow: 0 0 0 1px #2e2537;
    --cover-blend: lighten;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--night);
  letter-spacing: -0.01em;
  color: var(--moon);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--corona); outline-offset: 3px; border-radius: 4px; }

/* ---------- buttons ---------- */
.ecl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: var(--r-m);
  background: var(--violet); color: var(--on-violet);
  font-weight: 700; font-size: 15px;
  transition: transform .15s ease, background .2s ease;
}
.ecl-btn:active { transform: scale(.97); }
.ecl-btn.ghost { background: transparent; color: var(--moon); box-shadow: inset 0 0 0 1px var(--line); }
.ecl-btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--mist); }

/* ---------- the eclipse mark (CSS rendering of logo.png) ---------- */
.ecl-mark { position: relative; aspect-ratio: 1; isolation: isolate; }
.ecl-mark::before {            /* halo rings */
  content: ""; position: absolute; inset: -32%; border-radius: 50%; z-index: -1;
  background:
    radial-gradient(circle, transparent 44%, rgba(139,84,212,.30) 45%, rgba(139,84,212,.10) 58%, transparent 59%),
    radial-gradient(circle, transparent 60%, rgba(139,84,212,.14) 61%, transparent 72%);
}
.ecl-mark i { position: absolute; inset: 0; border-radius: 50%; }
.ecl-mark .lit { background: var(--moon); box-shadow: 0 0 40px rgba(246,238,244,.18); }
.ecl-mark .rim { background: var(--corona); transform: translate(12%, 3%); }
.ecl-mark .shade { background: var(--night); transform: translate(13%, -3%); }

/* ---------- bottom tab bar ---------- */
.ecl-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bar);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.ecl-tabbar nav { max-width: var(--col); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.ecl-tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 8px; font-size: 11px; color: var(--dim);
}
.ecl-tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.ecl-tabbar a[aria-current="page"] { color: var(--moon); }
.ecl-tabbar a[aria-current="page"] svg { stroke: var(--violet); }
.ecl-tabbar a[aria-current="page"] { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
